Documentation
¶
Index ¶
- Constants
- type ApState
- type IRemoteAccess
- type IRemoteAccessServer
- type IRemoteTaskCallback
- type IRemoteTaskCallbackServer
- type RemoteAccessProxy
- func (p *RemoteAccessProxy) AsBinder() binder.IBinder
- func (p *RemoteAccessProxy) ClearRemoteTaskCallback(ctx context.Context) error
- func (p *RemoteAccessProxy) GetAllPendingScheduledTasks(ctx context.Context, clientId string) ([]ScheduleInfo, error)
- func (p *RemoteAccessProxy) GetProcessorId(ctx context.Context) (string, error)
- func (p *RemoteAccessProxy) GetSupportedTaskTypesForScheduling(ctx context.Context) ([]TaskType, error)
- func (p *RemoteAccessProxy) GetVehicleId(ctx context.Context) (string, error)
- func (p *RemoteAccessProxy) GetWakeupServiceName(ctx context.Context) (string, error)
- func (p *RemoteAccessProxy) IsTaskScheduleSupported(ctx context.Context) (bool, error)
- func (p *RemoteAccessProxy) IsTaskScheduled(ctx context.Context, clientId string, scheduleId string) (bool, error)
- func (p *RemoteAccessProxy) NotifyApStateChange(ctx context.Context, state ApState) error
- func (p *RemoteAccessProxy) ScheduleTask(ctx context.Context, scheduleInfo ScheduleInfo) error
- func (p *RemoteAccessProxy) SetRemoteTaskCallback(ctx context.Context, callback IRemoteTaskCallback) error
- func (p *RemoteAccessProxy) UnscheduleAllTasks(ctx context.Context, clientId string) error
- func (p *RemoteAccessProxy) UnscheduleTask(ctx context.Context, clientId string, scheduleId string) error
- type RemoteAccessStub
- type RemoteTaskCallbackProxy
- type RemoteTaskCallbackStub
- type ScheduleInfo
- type TaskType
Constants ¶
const ( TransactionIRemoteAccessGetVehicleId = binder.FirstCallTransaction + 0 TransactionIRemoteAccessGetWakeupServiceName = binder.FirstCallTransaction + 1 TransactionIRemoteAccessGetProcessorId = binder.FirstCallTransaction + 2 TransactionIRemoteAccessSetRemoteTaskCallback = binder.FirstCallTransaction + 3 TransactionIRemoteAccessClearRemoteTaskCallback = binder.FirstCallTransaction + 4 TransactionIRemoteAccessNotifyApStateChange = binder.FirstCallTransaction + 5 TransactionIRemoteAccessIsTaskScheduleSupported = binder.FirstCallTransaction + 6 TransactionIRemoteAccessGetSupportedTaskTypesForScheduling = binder.FirstCallTransaction + 7 TransactionIRemoteAccessScheduleTask = binder.FirstCallTransaction + 8 TransactionIRemoteAccessUnscheduleTask = binder.FirstCallTransaction + 9 TransactionIRemoteAccessUnscheduleAllTasks = binder.FirstCallTransaction + 10 TransactionIRemoteAccessIsTaskScheduled = binder.FirstCallTransaction + 11 TransactionIRemoteAccessGetAllPendingScheduledTasks = binder.FirstCallTransaction + 12 )
const ( MethodIRemoteAccessGetVehicleId = "getVehicleId" MethodIRemoteAccessGetWakeupServiceName = "getWakeupServiceName" MethodIRemoteAccessGetProcessorId = "getProcessorId" MethodIRemoteAccessSetRemoteTaskCallback = "setRemoteTaskCallback" MethodIRemoteAccessClearRemoteTaskCallback = "clearRemoteTaskCallback" MethodIRemoteAccessNotifyApStateChange = "notifyApStateChange" MethodIRemoteAccessIsTaskScheduleSupported = "isTaskScheduleSupported" MethodIRemoteAccessGetSupportedTaskTypesForScheduling = "getSupportedTaskTypesForScheduling" MethodIRemoteAccessScheduleTask = "scheduleTask" MethodIRemoteAccessUnscheduleTask = "unscheduleTask" MethodIRemoteAccessUnscheduleAllTasks = "unscheduleAllTasks" MethodIRemoteAccessIsTaskScheduled = "isTaskScheduled" MethodIRemoteAccessGetAllPendingScheduledTasks = "getAllPendingScheduledTasks" )
const DescriptorIRemoteAccess = "android.hardware.automotive.remoteaccess.IRemoteAccess"
const DescriptorIRemoteTaskCallback = "android.hardware.automotive.remoteaccess.IRemoteTaskCallback"
const (
MethodIRemoteTaskCallbackOnRemoteTaskRequested = "onRemoteTaskRequested"
)
const (
ScheduleInfoMaxTaskDataSizeInBytes int32 = 10240
)
const (
TransactionIRemoteTaskCallbackOnRemoteTaskRequested = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IRemoteAccess ¶
type IRemoteAccess interface {
AsBinder() binder.IBinder
GetVehicleId(ctx context.Context) (string, error)
GetWakeupServiceName(ctx context.Context) (string, error)
GetProcessorId(ctx context.Context) (string, error)
SetRemoteTaskCallback(ctx context.Context, callback IRemoteTaskCallback) error
ClearRemoteTaskCallback(ctx context.Context) error
NotifyApStateChange(ctx context.Context, state ApState) error
IsTaskScheduleSupported(ctx context.Context) (bool, error)
GetSupportedTaskTypesForScheduling(ctx context.Context) ([]TaskType, error)
ScheduleTask(ctx context.Context, scheduleInfo ScheduleInfo) error
UnscheduleTask(ctx context.Context, clientId string, scheduleId string) error
UnscheduleAllTasks(ctx context.Context, clientId string) error
IsTaskScheduled(ctx context.Context, clientId string, scheduleId string) (bool, error)
GetAllPendingScheduledTasks(ctx context.Context, clientId string) ([]ScheduleInfo, error)
}
func NewRemoteAccessStub ¶
func NewRemoteAccessStub( impl IRemoteAccessServer, ) IRemoteAccess
NewRemoteAccessStub creates a server-side IRemoteAccess wrapping the given server implementation. The returned value satisfies IRemoteAccess 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 IRemoteAccessServer ¶
type IRemoteAccessServer interface {
GetVehicleId(ctx context.Context) (string, error)
GetWakeupServiceName(ctx context.Context) (string, error)
GetProcessorId(ctx context.Context) (string, error)
SetRemoteTaskCallback(ctx context.Context, callback IRemoteTaskCallback) error
ClearRemoteTaskCallback(ctx context.Context) error
NotifyApStateChange(ctx context.Context, state ApState) error
IsTaskScheduleSupported(ctx context.Context) (bool, error)
GetSupportedTaskTypesForScheduling(ctx context.Context) ([]TaskType, error)
ScheduleTask(ctx context.Context, scheduleInfo ScheduleInfo) error
UnscheduleTask(ctx context.Context, clientId string, scheduleId string) error
UnscheduleAllTasks(ctx context.Context, clientId string) error
IsTaskScheduled(ctx context.Context, clientId string, scheduleId string) (bool, error)
GetAllPendingScheduledTasks(ctx context.Context, clientId string) ([]ScheduleInfo, error)
}
IRemoteAccessServer is the server-side interface that user implementations provide to NewRemoteAccessStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IRemoteTaskCallback ¶
type IRemoteTaskCallback interface {
AsBinder() binder.IBinder
OnRemoteTaskRequested(ctx context.Context, clientId string, data []byte) error
}
func NewRemoteTaskCallbackStub ¶
func NewRemoteTaskCallbackStub( impl IRemoteTaskCallbackServer, ) IRemoteTaskCallback
NewRemoteTaskCallbackStub creates a server-side IRemoteTaskCallback wrapping the given server implementation. The returned value satisfies IRemoteTaskCallback 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 IRemoteTaskCallbackServer ¶
type IRemoteTaskCallbackServer interface {
OnRemoteTaskRequested(ctx context.Context, clientId string, data []byte) error
}
IRemoteTaskCallbackServer is the server-side interface that user implementations provide to NewRemoteTaskCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type RemoteAccessProxy ¶
func NewRemoteAccessProxy ¶
func NewRemoteAccessProxy( remote binder.IBinder, ) *RemoteAccessProxy
func (*RemoteAccessProxy) AsBinder ¶
func (p *RemoteAccessProxy) AsBinder() binder.IBinder
func (*RemoteAccessProxy) ClearRemoteTaskCallback ¶
func (p *RemoteAccessProxy) ClearRemoteTaskCallback( ctx context.Context, ) error
func (*RemoteAccessProxy) GetAllPendingScheduledTasks ¶
func (p *RemoteAccessProxy) GetAllPendingScheduledTasks( ctx context.Context, clientId string, ) ([]ScheduleInfo, error)
func (*RemoteAccessProxy) GetProcessorId ¶
func (p *RemoteAccessProxy) GetProcessorId( ctx context.Context, ) (string, error)
func (*RemoteAccessProxy) GetSupportedTaskTypesForScheduling ¶
func (p *RemoteAccessProxy) GetSupportedTaskTypesForScheduling( ctx context.Context, ) ([]TaskType, error)
func (*RemoteAccessProxy) GetVehicleId ¶
func (p *RemoteAccessProxy) GetVehicleId( ctx context.Context, ) (string, error)
func (*RemoteAccessProxy) GetWakeupServiceName ¶
func (p *RemoteAccessProxy) GetWakeupServiceName( ctx context.Context, ) (string, error)
func (*RemoteAccessProxy) IsTaskScheduleSupported ¶
func (p *RemoteAccessProxy) IsTaskScheduleSupported( ctx context.Context, ) (bool, error)
func (*RemoteAccessProxy) IsTaskScheduled ¶
func (*RemoteAccessProxy) NotifyApStateChange ¶
func (p *RemoteAccessProxy) NotifyApStateChange( ctx context.Context, state ApState, ) error
func (*RemoteAccessProxy) ScheduleTask ¶
func (p *RemoteAccessProxy) ScheduleTask( ctx context.Context, scheduleInfo ScheduleInfo, ) error
func (*RemoteAccessProxy) SetRemoteTaskCallback ¶
func (p *RemoteAccessProxy) SetRemoteTaskCallback( ctx context.Context, callback IRemoteTaskCallback, ) error
func (*RemoteAccessProxy) UnscheduleAllTasks ¶
func (p *RemoteAccessProxy) UnscheduleAllTasks( ctx context.Context, clientId string, ) error
func (*RemoteAccessProxy) UnscheduleTask ¶
type RemoteAccessStub ¶
type RemoteAccessStub struct {
Impl IRemoteAccess
Transport binder.VersionAwareTransport
}
RemoteAccessStub dispatches incoming binder transactions to a typed IRemoteAccess implementation.
func (*RemoteAccessStub) Descriptor ¶
func (s *RemoteAccessStub) Descriptor() string
func (*RemoteAccessStub) OnTransaction ¶
func (s *RemoteAccessStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type RemoteTaskCallbackProxy ¶
func NewRemoteTaskCallbackProxy ¶
func NewRemoteTaskCallbackProxy( remote binder.IBinder, ) *RemoteTaskCallbackProxy
func (*RemoteTaskCallbackProxy) AsBinder ¶
func (p *RemoteTaskCallbackProxy) AsBinder() binder.IBinder
func (*RemoteTaskCallbackProxy) OnRemoteTaskRequested ¶
type RemoteTaskCallbackStub ¶
type RemoteTaskCallbackStub struct {
Impl IRemoteTaskCallback
Transport binder.VersionAwareTransport
}
RemoteTaskCallbackStub dispatches incoming binder transactions to a typed IRemoteTaskCallback implementation.
func (*RemoteTaskCallbackStub) Descriptor ¶
func (s *RemoteTaskCallbackStub) Descriptor() string
func (*RemoteTaskCallbackStub) OnTransaction ¶
func (s *RemoteTaskCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type ScheduleInfo ¶
type ScheduleInfo struct {
ClientId string
ScheduleId string
TaskType TaskType
TaskData []byte
Count int32
StartTimeInEpochSeconds int64
PeriodicInSeconds int64
}
func (*ScheduleInfo) MarshalParcel ¶
func (s *ScheduleInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*ScheduleInfo) UnmarshalParcel ¶
func (s *ScheduleInfo) UnmarshalParcel( p *parcel.Parcel, ) error