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

ranging

package
v0.0.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionIBluetoothChannelSoundingGetVendorSpecificData          = binder.FirstCallTransaction + 0
	TransactionIBluetoothChannelSoundingGetSupportedSessionTypes       = binder.FirstCallTransaction + 1
	TransactionIBluetoothChannelSoundingGetMaxSupportedCsSecurityLevel = binder.FirstCallTransaction + 2
	TransactionIBluetoothChannelSoundingOpenSession                    = binder.FirstCallTransaction + 3
)
View Source
const (
	MethodIBluetoothChannelSoundingGetVendorSpecificData          = "getVendorSpecificData"
	MethodIBluetoothChannelSoundingGetSupportedSessionTypes       = "getSupportedSessionTypes"
	MethodIBluetoothChannelSoundingGetMaxSupportedCsSecurityLevel = "getMaxSupportedCsSecurityLevel"
	MethodIBluetoothChannelSoundingOpenSession                    = "openSession"
)
View Source
const (
	TransactionIBluetoothChannelSoundingSessionGetVendorSpecificReplies   = binder.FirstCallTransaction + 0
	TransactionIBluetoothChannelSoundingSessionGetSupportedResultTypes    = binder.FirstCallTransaction + 1
	TransactionIBluetoothChannelSoundingSessionIsAbortedProcedureRequired = binder.FirstCallTransaction + 2
	TransactionIBluetoothChannelSoundingSessionWriteRawData               = binder.FirstCallTransaction + 3
	TransactionIBluetoothChannelSoundingSessionClose                      = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIBluetoothChannelSoundingSessionGetVendorSpecificReplies   = "getVendorSpecificReplies"
	MethodIBluetoothChannelSoundingSessionGetSupportedResultTypes    = "getSupportedResultTypes"
	MethodIBluetoothChannelSoundingSessionIsAbortedProcedureRequired = "isAbortedProcedureRequired"
	MethodIBluetoothChannelSoundingSessionWriteRawData               = "writeRawData"
	MethodIBluetoothChannelSoundingSessionClose                      = "close"
)
View Source
const (
	TransactionIBluetoothChannelSoundingSessionCallbackOnOpened      = binder.FirstCallTransaction + 0
	TransactionIBluetoothChannelSoundingSessionCallbackOnOpenFailed  = binder.FirstCallTransaction + 1
	TransactionIBluetoothChannelSoundingSessionCallbackOnResult      = binder.FirstCallTransaction + 2
	TransactionIBluetoothChannelSoundingSessionCallbackOnClose       = binder.FirstCallTransaction + 3
	TransactionIBluetoothChannelSoundingSessionCallbackOnCloseFailed = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIBluetoothChannelSoundingSessionCallbackOnOpened      = "onOpened"
	MethodIBluetoothChannelSoundingSessionCallbackOnOpenFailed  = "onOpenFailed"
	MethodIBluetoothChannelSoundingSessionCallbackOnResult      = "onResult"
	MethodIBluetoothChannelSoundingSessionCallbackOnClose       = "onClose"
	MethodIBluetoothChannelSoundingSessionCallbackOnCloseFailed = "onCloseFailed"
)
View Source
const (
	StepTonePctToneQualityGood                         int32 = 0
	StepTonePctToneQualityMedium                       int32 = 1
	StepTonePctToneQualityLow                          int32 = 2
	StepTonePctToneQualityUnavailable                  int32 = 3
	StepTonePctExtensionSlotNone                       int32 = 0
	StepTonePctExtensionSlotToneNotExpectedToBePresent int32 = 1
	StepTonePctExtensionSlotToneExpectedToBePresent    int32 = 2
	StepTonePctExtensionSlotShiftAmount                int32 = 4
	StepTonePctToneExtensionAntenna1                   byte  = 0
	StepTonePctToneExtensionAntenna2                   byte  = 1
	StepTonePctToneExtensionAntenna3                   byte  = 2
	StepTonePctToneExtensionAntenna4                   byte  = 3
	StepTonePctToneExtensionUnused                     byte  = 255
)
View Source
const DescriptorIBluetoothChannelSounding = "android.hardware.bluetooth.ranging.IBluetoothChannelSounding"
View Source
const DescriptorIBluetoothChannelSoundingSession = "android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSession"
View Source
const DescriptorIBluetoothChannelSoundingSessionCallback = "android.hardware.bluetooth.ranging.IBluetoothChannelSoundingSessionCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressType

type AddressType int32
const (
	AddressTypePUBLIC AddressType = 0
	AddressTypeRANDOM AddressType = 1
)

type BluetoothChannelSoundingParameters

type BluetoothChannelSoundingParameters struct {
	SessionType                            SessionType
	AclHandle                              int32
	L2capCid                               int32
	RealTimeProcedureDataAttHandle         int32
	Role                                   Role
	LocalSupportsSoundingPhaseBasedRanging bool
	RemoteSupportsSoundingPhaseBaseRanging bool
	Config                                 Config
	Address                                DeviceAddress
	VendorSpecificData                     []VendorSpecificData
	LocationType                           LocationType
	SightType                              SightType
}

func (*BluetoothChannelSoundingParameters) MarshalParcel

func (s *BluetoothChannelSoundingParameters) MarshalParcel(
	p *parcel.Parcel,
) error

func (*BluetoothChannelSoundingParameters) UnmarshalParcel

func (s *BluetoothChannelSoundingParameters) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BluetoothChannelSoundingProxy

type BluetoothChannelSoundingProxy struct {
	Remote binder.IBinder
}

func NewBluetoothChannelSoundingProxy

func NewBluetoothChannelSoundingProxy(
	remote binder.IBinder,
) *BluetoothChannelSoundingProxy

func (*BluetoothChannelSoundingProxy) AsBinder

func (*BluetoothChannelSoundingProxy) GetMaxSupportedCsSecurityLevel

func (p *BluetoothChannelSoundingProxy) GetMaxSupportedCsSecurityLevel(
	ctx context.Context,
) (CsSecurityLevel, error)

func (*BluetoothChannelSoundingProxy) GetSupportedSessionTypes

func (p *BluetoothChannelSoundingProxy) GetSupportedSessionTypes(
	ctx context.Context,
) ([]SessionType, error)

func (*BluetoothChannelSoundingProxy) GetVendorSpecificData

func (p *BluetoothChannelSoundingProxy) GetVendorSpecificData(
	ctx context.Context,
) ([]VendorSpecificData, error)

type BluetoothChannelSoundingSessionCallbackProxy

type BluetoothChannelSoundingSessionCallbackProxy struct {
	Remote binder.IBinder
}

func NewBluetoothChannelSoundingSessionCallbackProxy

func NewBluetoothChannelSoundingSessionCallbackProxy(
	remote binder.IBinder,
) *BluetoothChannelSoundingSessionCallbackProxy

func (*BluetoothChannelSoundingSessionCallbackProxy) AsBinder

func (*BluetoothChannelSoundingSessionCallbackProxy) OnClose

func (*BluetoothChannelSoundingSessionCallbackProxy) OnCloseFailed

func (p *BluetoothChannelSoundingSessionCallbackProxy) OnCloseFailed(
	ctx context.Context,
	reason Reason,
) error

func (*BluetoothChannelSoundingSessionCallbackProxy) OnOpenFailed

func (*BluetoothChannelSoundingSessionCallbackProxy) OnOpened

func (*BluetoothChannelSoundingSessionCallbackProxy) OnResult

type BluetoothChannelSoundingSessionCallbackStub

type BluetoothChannelSoundingSessionCallbackStub struct {
	Impl      IBluetoothChannelSoundingSessionCallback
	Transport binder.VersionAwareTransport
}

BluetoothChannelSoundingSessionCallbackStub dispatches incoming binder transactions to a typed IBluetoothChannelSoundingSessionCallback implementation.

func (*BluetoothChannelSoundingSessionCallbackStub) Descriptor

func (*BluetoothChannelSoundingSessionCallbackStub) OnTransaction

type BluetoothChannelSoundingSessionProxy

type BluetoothChannelSoundingSessionProxy struct {
	Remote binder.IBinder
}

func NewBluetoothChannelSoundingSessionProxy

func NewBluetoothChannelSoundingSessionProxy(
	remote binder.IBinder,
) *BluetoothChannelSoundingSessionProxy

func (*BluetoothChannelSoundingSessionProxy) AsBinder

func (*BluetoothChannelSoundingSessionProxy) Close

func (*BluetoothChannelSoundingSessionProxy) GetSupportedResultTypes

func (p *BluetoothChannelSoundingSessionProxy) GetSupportedResultTypes(
	ctx context.Context,
) ([]ResultType, error)

func (*BluetoothChannelSoundingSessionProxy) GetVendorSpecificReplies

func (p *BluetoothChannelSoundingSessionProxy) GetVendorSpecificReplies(
	ctx context.Context,
) ([]VendorSpecificData, error)

func (*BluetoothChannelSoundingSessionProxy) IsAbortedProcedureRequired

func (p *BluetoothChannelSoundingSessionProxy) IsAbortedProcedureRequired(
	ctx context.Context,
) (bool, error)

func (*BluetoothChannelSoundingSessionProxy) WriteRawData

type BluetoothChannelSoundingSessionStub

type BluetoothChannelSoundingSessionStub struct {
	Impl      IBluetoothChannelSoundingSession
	Transport binder.VersionAwareTransport
}

BluetoothChannelSoundingSessionStub dispatches incoming binder transactions to a typed IBluetoothChannelSoundingSession implementation.

func (*BluetoothChannelSoundingSessionStub) Descriptor

func (*BluetoothChannelSoundingSessionStub) OnTransaction

type BluetoothChannelSoundingStub

type BluetoothChannelSoundingStub struct {
	Impl      IBluetoothChannelSounding
	Transport binder.VersionAwareTransport
}

BluetoothChannelSoundingStub dispatches incoming binder transactions to a typed IBluetoothChannelSounding implementation.

func (*BluetoothChannelSoundingStub) Descriptor

func (s *BluetoothChannelSoundingStub) Descriptor() string

func (*BluetoothChannelSoundingStub) OnTransaction

type ChannelSoudingRawData

type ChannelSoudingRawData struct {
	ProcedureCounter      int32
	FrequencyCompensation []int32
	Aborted               bool
	InitiatorData         ChannelSoundingSingleSideData
	ReflectorData         ChannelSoundingSingleSideData
	StepChannels          []byte
	ToaTodInitiator       []int32
	TodToaReflector       []int32
	StepMode              []ModeType
	NumAntennaPaths       byte
	TimestampMs           int64
}

func (*ChannelSoudingRawData) MarshalParcel

func (s *ChannelSoudingRawData) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ChannelSoudingRawData) UnmarshalParcel

func (s *ChannelSoudingRawData) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ChannelSoundingSingleSideData

type ChannelSoundingSingleSideData struct {
	StepTonePcts                   []StepTonePct
	PacketQuality                  []byte
	PacketRssiDbm                  []byte
	PacketNadm                     []Nadm
	MeasuredFreqOffset             []int32
	PacketPct1                     []ComplexNumber
	PacketPct2                     []ComplexNumber
	ReferencePowerDbm              byte
	VendorSpecificCsSingleSidedata []byte
}

func (*ChannelSoundingSingleSideData) MarshalParcel

func (s *ChannelSoundingSingleSideData) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ChannelSoundingSingleSideData) UnmarshalParcel

func (s *ChannelSoundingSingleSideData) UnmarshalParcel(
	p *parcel.Parcel,
) error

type ComplexNumber

type ComplexNumber struct {
	Real      float64
	Imaginary float64
}

func (*ComplexNumber) MarshalParcel

func (s *ComplexNumber) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ComplexNumber) UnmarshalParcel

func (s *ComplexNumber) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Config

type Config struct {
	ModeType    ModeType
	SubModeType SubModeType
	RttType     RttType
	ChannelMap  []byte
}

func (*Config) MarshalParcel

func (s *Config) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Config) UnmarshalParcel

func (s *Config) UnmarshalParcel(
	p *parcel.Parcel,
) error

type CsSecurityLevel

type CsSecurityLevel int32
const (
	CsSecurityLevelNotSupported CsSecurityLevel = 0
	CsSecurityLevelONE          CsSecurityLevel = 1
	CsSecurityLevelTWO          CsSecurityLevel = 2
	CsSecurityLevelTHREE        CsSecurityLevel = 3
	CsSecurityLevelFOUR         CsSecurityLevel = 4
)

type DeviceAddress

type DeviceAddress struct {
	AddressType AddressType
	Address     []byte
}

func (*DeviceAddress) MarshalParcel

func (s *DeviceAddress) MarshalParcel(
	p *parcel.Parcel,
) error

func (*DeviceAddress) UnmarshalParcel

func (s *DeviceAddress) UnmarshalParcel(
	p *parcel.Parcel,
) error

type IBluetoothChannelSounding

type IBluetoothChannelSounding interface {
	AsBinder() binder.IBinder
	GetVendorSpecificData(ctx context.Context) ([]VendorSpecificData, error)
	GetSupportedSessionTypes(ctx context.Context) ([]SessionType, error)
	GetMaxSupportedCsSecurityLevel(ctx context.Context) (CsSecurityLevel, error)
	OpenSession(ctx context.Context, params BluetoothChannelSoundingParameters, callback IBluetoothChannelSoundingSessionCallback) (IBluetoothChannelSoundingSession, error)
}

func NewBluetoothChannelSoundingStub

func NewBluetoothChannelSoundingStub(
	impl IBluetoothChannelSoundingServer,
) IBluetoothChannelSounding

NewBluetoothChannelSoundingStub creates a server-side IBluetoothChannelSounding wrapping the given server implementation. The returned value satisfies IBluetoothChannelSounding 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 IBluetoothChannelSoundingServer

type IBluetoothChannelSoundingServer interface {
	GetVendorSpecificData(ctx context.Context) ([]VendorSpecificData, error)
	GetSupportedSessionTypes(ctx context.Context) ([]SessionType, error)
	GetMaxSupportedCsSecurityLevel(ctx context.Context) (CsSecurityLevel, error)
	OpenSession(ctx context.Context, params BluetoothChannelSoundingParameters, callback IBluetoothChannelSoundingSessionCallback) (IBluetoothChannelSoundingSession, error)
}

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

type IBluetoothChannelSoundingSession

type IBluetoothChannelSoundingSession interface {
	AsBinder() binder.IBinder
	GetVendorSpecificReplies(ctx context.Context) ([]VendorSpecificData, error)
	GetSupportedResultTypes(ctx context.Context) ([]ResultType, error)
	IsAbortedProcedureRequired(ctx context.Context) (bool, error)
	WriteRawData(ctx context.Context, rawData ChannelSoudingRawData) error
	Close(ctx context.Context, reason Reason) error
}

func NewBluetoothChannelSoundingSessionStub

func NewBluetoothChannelSoundingSessionStub(
	impl IBluetoothChannelSoundingSessionServer,
) IBluetoothChannelSoundingSession

NewBluetoothChannelSoundingSessionStub creates a server-side IBluetoothChannelSoundingSession wrapping the given server implementation. The returned value satisfies IBluetoothChannelSoundingSession 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 IBluetoothChannelSoundingSessionCallback

type IBluetoothChannelSoundingSessionCallback interface {
	AsBinder() binder.IBinder
	OnOpened(ctx context.Context, reason Reason) error
	OnOpenFailed(ctx context.Context, reason Reason) error
	OnResult(ctx context.Context, result RangingResult) error
	OnClose(ctx context.Context, reason Reason) error
	OnCloseFailed(ctx context.Context, reason Reason) error
}

func NewBluetoothChannelSoundingSessionCallbackStub

func NewBluetoothChannelSoundingSessionCallbackStub(
	impl IBluetoothChannelSoundingSessionCallbackServer,
) IBluetoothChannelSoundingSessionCallback

NewBluetoothChannelSoundingSessionCallbackStub creates a server-side IBluetoothChannelSoundingSessionCallback wrapping the given server implementation. The returned value satisfies IBluetoothChannelSoundingSessionCallback 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 IBluetoothChannelSoundingSessionCallbackServer

type IBluetoothChannelSoundingSessionCallbackServer interface {
	OnOpened(ctx context.Context, reason Reason) error
	OnOpenFailed(ctx context.Context, reason Reason) error
	OnResult(ctx context.Context, result RangingResult) error
	OnClose(ctx context.Context, reason Reason) error
	OnCloseFailed(ctx context.Context, reason Reason) error
}

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

type IBluetoothChannelSoundingSessionServer

type IBluetoothChannelSoundingSessionServer interface {
	GetVendorSpecificReplies(ctx context.Context) ([]VendorSpecificData, error)
	GetSupportedResultTypes(ctx context.Context) ([]ResultType, error)
	IsAbortedProcedureRequired(ctx context.Context) (bool, error)
	WriteRawData(ctx context.Context, rawData ChannelSoudingRawData) error
	Close(ctx context.Context, reason Reason) error
}

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

type LocationType

type LocationType byte
const (
	LocationTypeUNKNOWN LocationType = 0
	LocationTypeINDOOR  LocationType = 1
	LocationTypeOUTDOOR LocationType = 2
)

type ModeType

type ModeType byte
const (
	ModeTypeZERO  ModeType = 0
	ModeTypeONE   ModeType = 1
	ModeTypeTWO   ModeType = 2
	ModeTypeTHREE ModeType = 3
)

type Nadm

type Nadm byte
const (
	NadmAttackIsExtremelyUnlikely Nadm = 0
	NadmAttackIsVeryUnlikely      Nadm = 1
	NadmAttackIsUnlikely          Nadm = 2
	NadmAttackIsPossible          Nadm = 3
	NadmAttackIsLikely            Nadm = 4
	NadmAttackIsVeryLikely        Nadm = 5
	NadmAttackIsExtremelyLikely   Nadm = 6
	NadmUNKNOWN                   Nadm = 255
)

type RangingResult

type RangingResult struct {
	ResultMeters                       float64
	ErrorMeters                        float64
	AzimuthDegrees                     float64
	ErrorAzimuthDegrees                float64
	AltitudeDegrees                    float64
	ErrorAltitudeDegrees               float64
	DelaySpreadMeters                  float64
	ConfidenceLevel                    byte
	DetectedAttackLevel                Nadm
	VelocityMetersPerSecond            float64
	VendorSpecificCsRangingResultsData []byte
}

func (*RangingResult) MarshalParcel

func (s *RangingResult) MarshalParcel(
	p *parcel.Parcel,
) error

func (*RangingResult) UnmarshalParcel

func (s *RangingResult) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Reason

type Reason int32
const (
	ReasonLocalStackRequest     Reason = 0
	ReasonHalInitiated          Reason = 1
	ReasonHardwareInitiated     Reason = 2
	ReasonErrorInvalidParameter Reason = 3
	ReasonErrorUnknown          Reason = 4
)

type ResultType

type ResultType int32
const (
	ResultTypeResultMeters         ResultType = 0
	ResultTypeErrorMeters          ResultType = 1
	ResultTypeAzimuthDegrees       ResultType = 2
	ResultTypeErrorAzimuthDegrees  ResultType = 3
	ResultTypeAltitudeDegrees      ResultType = 4
	ResultTypeErrorAltitudeDegrees ResultType = 5
	ResultTypeDelaySpreadMeters    ResultType = 6
	ResultTypeConfidenceLevel      ResultType = 7
	ResultTypeSecurityLevel        ResultType = 8
	ResultTypeVELOCITY             ResultType = 9
)

type Role

type Role int32
const (
	RoleINITIATOR Role = 0
	RoleREFLECTOR Role = 1
)

type RttType

type RttType int32
const (
	RttTypeAaCoarse                  RttType = 0
	RttTypeWith32BitSoundingSequence RttType = 1
	RttTypeWith96BitSoundingSequence RttType = 2
	RttTypeWith32BitRandomSequence   RttType = 3
	RttTypeWith64BitRandomSequence   RttType = 4
	RttTypeWith96BitRandomSequence   RttType = 5
	RttTypeWith128BitRandomSequence  RttType = 6
)

type SessionType

type SessionType int32
const (
	SessionTypeSoftwareStackDataParsing   SessionType = 0
	SessionTypeHardwareOffloadDataParsing SessionType = 1
)

type SightType

type SightType byte
const (
	SightTypeUNKNOWN        SightType = 0
	SightTypeLineOfSight    SightType = 1
	SightTypeNonLineOfSight SightType = 2
)

type StepTonePct

type StepTonePct struct {
	TonePcts                  []ComplexNumber
	ToneQualityIndicator      []byte
	ToneExtensionAntennaIndex byte
}

func (*StepTonePct) MarshalParcel

func (s *StepTonePct) MarshalParcel(
	p *parcel.Parcel,
) error

func (*StepTonePct) UnmarshalParcel

func (s *StepTonePct) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SubModeType

type SubModeType byte
const (
	SubModeTypeONE    SubModeType = 1
	SubModeTypeTWO    SubModeType = 2
	SubModeTypeTHREE  SubModeType = 3
	SubModeTypeUNUSED SubModeType = 255
)

type VendorSpecificData

type VendorSpecificData struct {
	CharacteristicUuid []byte
	OpaqueValue        []byte
}

func (*VendorSpecificData) MarshalParcel

func (s *VendorSpecificData) MarshalParcel(
	p *parcel.Parcel,
) error

func (*VendorSpecificData) UnmarshalParcel

func (s *VendorSpecificData) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

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