occupant_awareness

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionIOccupantAwarenessStartDetection       = binder.FirstCallTransaction + 0
	TransactionIOccupantAwarenessStopDetection        = binder.FirstCallTransaction + 1
	TransactionIOccupantAwarenessGetCapabilityForRole = binder.FirstCallTransaction + 2
	TransactionIOccupantAwarenessGetState             = binder.FirstCallTransaction + 3
	TransactionIOccupantAwarenessSetCallback          = binder.FirstCallTransaction + 4
	TransactionIOccupantAwarenessGetLatestDetection   = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodIOccupantAwarenessStartDetection       = "startDetection"
	MethodIOccupantAwarenessStopDetection        = "stopDetection"
	MethodIOccupantAwarenessGetCapabilityForRole = "getCapabilityForRole"
	MethodIOccupantAwarenessGetState             = "getState"
	MethodIOccupantAwarenessSetCallback          = "setCallback"
	MethodIOccupantAwarenessGetLatestDetection   = "getLatestDetection"
)
View Source
const (
	IOccupantAwarenessCapNone                      int32 = 0
	IOccupantAwarenessCapPresenceDetection         int32 = (1 << 0)
	IOccupantAwarenessCapGazeDetection             int32 = (1 << 1)
	IOccupantAwarenessCapDriverMonitoringDetection int32 = (1 << 2)
)
View Source
const (
	TransactionIOccupantAwarenessClientCallbackOnSystemStatusChanged = binder.FirstCallTransaction + 0
	TransactionIOccupantAwarenessClientCallbackOnDetectionEvent      = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIOccupantAwarenessClientCallbackOnSystemStatusChanged = "onSystemStatusChanged"
	MethodIOccupantAwarenessClientCallbackOnDetectionEvent      = "onDetectionEvent"
)
View Source
const DescriptorIOccupantAwareness = "android.hardware.automotive.occupant_awareness.IOccupantAwareness"
View Source
const DescriptorIOccupantAwarenessClientCallback = "android.hardware.automotive.occupant_awareness.IOccupantAwarenessClientCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfidenceLevel

type ConfidenceLevel byte
const (
	ConfidenceLevelNONE ConfidenceLevel = 0
	ConfidenceLevelLOW  ConfidenceLevel = 1
	ConfidenceLevelHIGH ConfidenceLevel = 2
	ConfidenceLevelMAX  ConfidenceLevel = 3
)

type DriverMonitoringDetection

type DriverMonitoringDetection struct {
	ConfidenceScore    ConfidenceLevel
	IsLookingOnRoad    bool
	GazeDurationMillis int64
}

func (*DriverMonitoringDetection) MarshalParcel

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

func (*DriverMonitoringDetection) UnmarshalParcel

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

type GazeDetection

type GazeDetection struct {
	GazeConfidence      ConfidenceLevel
	HeadPosition        []float64
	HeadAngleUnitVector []float64
	GazeAngleUnitVector []float64
	GazeTarget          VehicleRegion
	CustomGazeTarget    string
	TimeOnTargetMillis  int64
}

func (*GazeDetection) MarshalParcel

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

func (*GazeDetection) UnmarshalParcel

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

type IOccupantAwareness

type IOccupantAwareness interface {
	AsBinder() binder.IBinder
	StartDetection(ctx context.Context) (OccupantAwarenessStatus, error)
	StopDetection(ctx context.Context) (OccupantAwarenessStatus, error)
	GetCapabilityForRole(ctx context.Context, occupantRole Role) (int32, error)
	GetState(ctx context.Context, occupantRole Role, detectionCapability int32) (OccupantAwarenessStatus, error)
	SetCallback(ctx context.Context, callback IOccupantAwarenessClientCallback) error
	GetLatestDetection(ctx context.Context, detections OccupantDetections) error
}

func NewOccupantAwarenessStub

func NewOccupantAwarenessStub(
	impl IOccupantAwarenessServer,
) IOccupantAwareness

NewOccupantAwarenessStub creates a server-side IOccupantAwareness wrapping the given server implementation. The returned value satisfies IOccupantAwareness 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 IOccupantAwarenessClientCallback

type IOccupantAwarenessClientCallback interface {
	AsBinder() binder.IBinder
	OnSystemStatusChanged(ctx context.Context, detectionFlags int32, status OccupantAwarenessStatus) error
	OnDetectionEvent(ctx context.Context, detections OccupantDetections) error
}

func NewOccupantAwarenessClientCallbackStub

func NewOccupantAwarenessClientCallbackStub(
	impl IOccupantAwarenessClientCallbackServer,
) IOccupantAwarenessClientCallback

NewOccupantAwarenessClientCallbackStub creates a server-side IOccupantAwarenessClientCallback wrapping the given server implementation. The returned value satisfies IOccupantAwarenessClientCallback 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 IOccupantAwarenessClientCallbackServer

type IOccupantAwarenessClientCallbackServer interface {
	OnSystemStatusChanged(ctx context.Context, detectionFlags int32, status OccupantAwarenessStatus) error
	OnDetectionEvent(ctx context.Context, detections OccupantDetections) error
}

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

type IOccupantAwarenessServer

type IOccupantAwarenessServer interface {
	StartDetection(ctx context.Context) (OccupantAwarenessStatus, error)
	StopDetection(ctx context.Context) (OccupantAwarenessStatus, error)
	GetCapabilityForRole(ctx context.Context, occupantRole Role) (int32, error)
	GetState(ctx context.Context, occupantRole Role, detectionCapability int32) (OccupantAwarenessStatus, error)
	SetCallback(ctx context.Context, callback IOccupantAwarenessClientCallback) error
	GetLatestDetection(ctx context.Context, detections OccupantDetections) error
}

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

type OccupantAwarenessClientCallbackProxy

type OccupantAwarenessClientCallbackProxy struct {
	Remote binder.IBinder
}

func NewOccupantAwarenessClientCallbackProxy

func NewOccupantAwarenessClientCallbackProxy(
	remote binder.IBinder,
) *OccupantAwarenessClientCallbackProxy

func (*OccupantAwarenessClientCallbackProxy) AsBinder

func (*OccupantAwarenessClientCallbackProxy) OnDetectionEvent

func (p *OccupantAwarenessClientCallbackProxy) OnDetectionEvent(
	ctx context.Context,
	detections OccupantDetections,
) error

func (*OccupantAwarenessClientCallbackProxy) OnSystemStatusChanged

func (p *OccupantAwarenessClientCallbackProxy) OnSystemStatusChanged(
	ctx context.Context,
	detectionFlags int32,
	status OccupantAwarenessStatus,
) error

type OccupantAwarenessClientCallbackStub

type OccupantAwarenessClientCallbackStub struct {
	Impl      IOccupantAwarenessClientCallback
	Transport binder.VersionAwareTransport
}

OccupantAwarenessClientCallbackStub dispatches incoming binder transactions to a typed IOccupantAwarenessClientCallback implementation.

func (*OccupantAwarenessClientCallbackStub) Descriptor

func (*OccupantAwarenessClientCallbackStub) OnTransaction

type OccupantAwarenessProxy

type OccupantAwarenessProxy struct {
	Remote binder.IBinder
}

func NewOccupantAwarenessProxy

func NewOccupantAwarenessProxy(
	remote binder.IBinder,
) *OccupantAwarenessProxy

func (*OccupantAwarenessProxy) AsBinder

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

func (*OccupantAwarenessProxy) GetCapabilityForRole

func (p *OccupantAwarenessProxy) GetCapabilityForRole(
	ctx context.Context,
	occupantRole Role,
) (int32, error)

func (*OccupantAwarenessProxy) GetLatestDetection

func (p *OccupantAwarenessProxy) GetLatestDetection(
	ctx context.Context,
	detections OccupantDetections,
) error

func (*OccupantAwarenessProxy) GetState

func (p *OccupantAwarenessProxy) GetState(
	ctx context.Context,
	occupantRole Role,
	detectionCapability int32,
) (OccupantAwarenessStatus, error)

func (*OccupantAwarenessProxy) SetCallback

func (*OccupantAwarenessProxy) StartDetection

func (*OccupantAwarenessProxy) StopDetection

type OccupantAwarenessStatus

type OccupantAwarenessStatus byte
const (
	OccupantAwarenessStatusREADY          OccupantAwarenessStatus = 0
	OccupantAwarenessStatusNotSupported   OccupantAwarenessStatus = 1
	OccupantAwarenessStatusNotInitialized OccupantAwarenessStatus = 2
	OccupantAwarenessStatusFAILURE        OccupantAwarenessStatus = 3
)

type OccupantAwarenessStub

type OccupantAwarenessStub struct {
	Impl      IOccupantAwareness
	Transport binder.VersionAwareTransport
}

OccupantAwarenessStub dispatches incoming binder transactions to a typed IOccupantAwareness implementation.

func (*OccupantAwarenessStub) Descriptor

func (s *OccupantAwarenessStub) Descriptor() string

func (*OccupantAwarenessStub) OnTransaction

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

type OccupantDetection

type OccupantDetection struct {
	Role          Role
	PresenceData  []PresenceDetection
	GazeData      []GazeDetection
	AttentionData []DriverMonitoringDetection
}

func (*OccupantDetection) MarshalParcel

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

func (*OccupantDetection) UnmarshalParcel

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

type OccupantDetections

type OccupantDetections struct {
	TimeStampMillis int64
	Detections      []OccupantDetection
}

func (*OccupantDetections) MarshalParcel

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

func (*OccupantDetections) UnmarshalParcel

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

type PresenceDetection

type PresenceDetection struct {
	IsOccupantDetected      bool
	DetectionDurationMillis int64
}

func (*PresenceDetection) MarshalParcel

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

func (*PresenceDetection) UnmarshalParcel

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

type Role

type Role int32
const (
	RoleINVALID             Role = 0
	RoleUNKNOWN             Role = (1 << 0)
	RoleFrontPassenger      Role = (1 << 1)
	RoleDRIVER              Role = (1 << 2)
	RoleRow2PassengerLeft   Role = (1 << 3)
	RoleRow2PassengerCenter Role = (1 << 4)
	RoleRow2PassengerRight  Role = (1 << 5)
	RoleRow3PassengerLeft   Role = (1 << 6)
	RoleRow3PassengerCenter Role = (1 << 7)
	RoleRow3PassengerRight  Role = (1 << 8)
	RoleFrontOccupants      Role = ((1 << 1) | (1 << 2))
	RoleRow2Occupants       Role = (((1 << 3) | (1 << 4)) | (1 << 5))
	RoleRow3Occupants       Role = (((1 << 6) | (1 << 7)) | (1 << 8))
	RoleAllOccupants        Role = 511
)

type VehicleRegion

type VehicleRegion int32
const (
	VehicleRegionUNKNOWN           VehicleRegion = 0
	VehicleRegionInstrumentCluster VehicleRegion = 1
	VehicleRegionRearViewMirror    VehicleRegion = 2
	VehicleRegionLeftSideMirror    VehicleRegion = 3
	VehicleRegionRightSideMirror   VehicleRegion = 4
	VehicleRegionForwardRoadway    VehicleRegion = 5
	VehicleRegionLeftRoadway       VehicleRegion = 6
	VehicleRegionRightRoadway      VehicleRegion = 7
	VehicleRegionHeadUnitDisplay   VehicleRegion = 8
	VehicleRegionCustomTarget      VehicleRegion = 200
)

Jump to

Keyboard shortcuts

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