Help us shape the future of Go! Take the 2026 Go Developer Survey

uwb

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIUwbGetChips = binder.FirstCallTransaction + 0
	TransactionIUwbGetChip  = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIUwbGetChips = "getChips"
	MethodIUwbGetChip  = "getChip"
)
View Source
const (
	TransactionIUwbChipGetName                       = binder.FirstCallTransaction + 0
	TransactionIUwbChipOpen                          = binder.FirstCallTransaction + 1
	TransactionIUwbChipClose                         = binder.FirstCallTransaction + 2
	TransactionIUwbChipCoreInit                      = binder.FirstCallTransaction + 3
	TransactionIUwbChipSessionInit                   = binder.FirstCallTransaction + 4
	TransactionIUwbChipGetSupportedAndroidUciVersion = binder.FirstCallTransaction + 5
	TransactionIUwbChipSendUciMessage                = binder.FirstCallTransaction + 6
)
View Source
const (
	MethodIUwbChipGetName                       = "getName"
	MethodIUwbChipOpen                          = "open"
	MethodIUwbChipClose                         = "close"
	MethodIUwbChipCoreInit                      = "coreInit"
	MethodIUwbChipSessionInit                   = "sessionInit"
	MethodIUwbChipGetSupportedAndroidUciVersion = "getSupportedAndroidUciVersion"
	MethodIUwbChipSendUciMessage                = "sendUciMessage"
)
View Source
const (
	TransactionIUwbClientCallbackOnUciMessage = binder.FirstCallTransaction + 0
	TransactionIUwbClientCallbackOnHalEvent   = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIUwbClientCallbackOnUciMessage = "onUciMessage"
	MethodIUwbClientCallbackOnHalEvent   = "onHalEvent"
)
View Source
const DescriptorIUwb = "android.hardware.uwb.IUwb"
View Source
const DescriptorIUwbChip = "android.hardware.uwb.IUwbChip"
View Source
const DescriptorIUwbClientCallback = "android.hardware.uwb.IUwbClientCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type IUwb

type IUwb interface {
	AsBinder() binder.IBinder
	GetChips(ctx context.Context) ([]string, error)
	GetChip(ctx context.Context, name string) (IUwbChip, error)
}

func NewUwbStub

func NewUwbStub(
	impl IUwbServer,
) IUwb

NewUwbStub creates a server-side IUwb wrapping the given server implementation. The returned value satisfies IUwb and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IUwbChip

type IUwbChip interface {
	AsBinder() binder.IBinder
	GetName(ctx context.Context) (string, error)
	Open(ctx context.Context, clientCallback IUwbClientCallback) error
	Close(ctx context.Context) error
	CoreInit(ctx context.Context) error
	SessionInit(ctx context.Context, sessionId int32) error
	GetSupportedAndroidUciVersion(ctx context.Context) (int32, error)
	SendUciMessage(ctx context.Context, data []byte) (int32, error)
}

func NewUwbChipStub

func NewUwbChipStub(
	impl IUwbChipServer,
) IUwbChip

NewUwbChipStub creates a server-side IUwbChip wrapping the given server implementation. The returned value satisfies IUwbChip and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IUwbChipServer

type IUwbChipServer interface {
	GetName(ctx context.Context) (string, error)
	Open(ctx context.Context, clientCallback IUwbClientCallback) error
	Close(ctx context.Context) error
	CoreInit(ctx context.Context) error
	SessionInit(ctx context.Context, sessionId int32) error
	GetSupportedAndroidUciVersion(ctx context.Context) (int32, error)
	SendUciMessage(ctx context.Context, data []byte) (int32, error)
}

IUwbChipServer is the server-side interface that user implementations provide to NewUwbChipStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IUwbClientCallback

type IUwbClientCallback interface {
	AsBinder() binder.IBinder
	OnUciMessage(ctx context.Context, data []byte) error
	OnHalEvent(ctx context.Context, event UwbEvent, status UwbStatus) error
}

func NewUwbClientCallbackStub

func NewUwbClientCallbackStub(
	impl IUwbClientCallbackServer,
) IUwbClientCallback

NewUwbClientCallbackStub creates a server-side IUwbClientCallback wrapping the given server implementation. The returned value satisfies IUwbClientCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IUwbClientCallbackServer

type IUwbClientCallbackServer interface {
	OnUciMessage(ctx context.Context, data []byte) error
	OnHalEvent(ctx context.Context, event UwbEvent, status UwbStatus) error
}

IUwbClientCallbackServer is the server-side interface that user implementations provide to NewUwbClientCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IUwbServer

type IUwbServer interface {
	GetChips(ctx context.Context) ([]string, error)
	GetChip(ctx context.Context, name string) (IUwbChip, error)
}

IUwbServer is the server-side interface that user implementations provide to NewUwbStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type UwbChipProxy

type UwbChipProxy struct {
	Remote binder.IBinder
}

func NewUwbChipProxy

func NewUwbChipProxy(
	remote binder.IBinder,
) *UwbChipProxy

func (*UwbChipProxy) AsBinder

func (p *UwbChipProxy) AsBinder() binder.IBinder

func (*UwbChipProxy) Close

func (p *UwbChipProxy) Close(
	ctx context.Context,
) error

func (*UwbChipProxy) CoreInit

func (p *UwbChipProxy) CoreInit(
	ctx context.Context,
) error

func (*UwbChipProxy) GetName

func (p *UwbChipProxy) GetName(
	ctx context.Context,
) (string, error)

func (*UwbChipProxy) GetSupportedAndroidUciVersion

func (p *UwbChipProxy) GetSupportedAndroidUciVersion(
	ctx context.Context,
) (int32, error)

func (*UwbChipProxy) Open

func (p *UwbChipProxy) Open(
	ctx context.Context,
	clientCallback IUwbClientCallback,
) error

func (*UwbChipProxy) SendUciMessage

func (p *UwbChipProxy) SendUciMessage(
	ctx context.Context,
	data []byte,
) (int32, error)

func (*UwbChipProxy) SessionInit

func (p *UwbChipProxy) SessionInit(
	ctx context.Context,
	sessionId int32,
) error

type UwbChipStub

type UwbChipStub struct {
	Impl      IUwbChip
	Transport binder.VersionAwareTransport
}

UwbChipStub dispatches incoming binder transactions to a typed IUwbChip implementation.

func (*UwbChipStub) Descriptor

func (s *UwbChipStub) Descriptor() string

func (*UwbChipStub) OnTransaction

func (s *UwbChipStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type UwbClientCallbackProxy

type UwbClientCallbackProxy struct {
	Remote binder.IBinder
}

func NewUwbClientCallbackProxy

func NewUwbClientCallbackProxy(
	remote binder.IBinder,
) *UwbClientCallbackProxy

func (*UwbClientCallbackProxy) AsBinder

func (p *UwbClientCallbackProxy) AsBinder() binder.IBinder

func (*UwbClientCallbackProxy) OnHalEvent

func (p *UwbClientCallbackProxy) OnHalEvent(
	ctx context.Context,
	event UwbEvent,
	status UwbStatus,
) error

func (*UwbClientCallbackProxy) OnUciMessage

func (p *UwbClientCallbackProxy) OnUciMessage(
	ctx context.Context,
	data []byte,
) error

type UwbClientCallbackStub

type UwbClientCallbackStub struct {
	Impl      IUwbClientCallback
	Transport binder.VersionAwareTransport
}

UwbClientCallbackStub dispatches incoming binder transactions to a typed IUwbClientCallback implementation.

func (*UwbClientCallbackStub) Descriptor

func (s *UwbClientCallbackStub) Descriptor() string

func (*UwbClientCallbackStub) OnTransaction

func (s *UwbClientCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type UwbEvent

type UwbEvent int32
const (
	UwbEventOpenCplt     UwbEvent = 0
	UwbEventCloseCplt    UwbEvent = 1
	UwbEventPostInitCplt UwbEvent = 2
	UwbEventERROR        UwbEvent = 3
)

type UwbProxy

type UwbProxy struct {
	Remote binder.IBinder
}

func NewUwbProxy

func NewUwbProxy(
	remote binder.IBinder,
) *UwbProxy

func (*UwbProxy) AsBinder

func (p *UwbProxy) AsBinder() binder.IBinder

func (*UwbProxy) GetChip

func (p *UwbProxy) GetChip(
	ctx context.Context,
	name string,
) (IUwbChip, error)

func (*UwbProxy) GetChips

func (p *UwbProxy) GetChips(
	ctx context.Context,
) ([]string, error)

type UwbStatus

type UwbStatus int32
const (
	UwbStatusOK            UwbStatus = 0
	UwbStatusFAILED        UwbStatus = 1
	UwbStatusErrTransport  UwbStatus = 2
	UwbStatusErrCmdTimeout UwbStatus = 3
	UwbStatusREFUSED       UwbStatus = 4
)

type UwbStub

type UwbStub struct {
	Impl      IUwb
	Transport binder.VersionAwareTransport
}

UwbStub dispatches incoming binder transactions to a typed IUwb implementation.

func (*UwbStub) Descriptor

func (s *UwbStub) Descriptor() string

func (*UwbStub) OnTransaction

func (s *UwbStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL