Telematics SDK - Interface Specification
v1.27.0
|
Data Structures | |
class | telux::power::PowerFactory |
PowerFactory allows creation of TCU-activity manager instance. More... | |
class | telux::power::ITcuActivityListener |
Listener class for getting notifications related to TCU-activity state and also the updates related to TCU-activity service status. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe. More... | |
class | telux::power::ITcuActivityManager |
ITcuActivityManager provides interface to register and de-register listeners (to get TCU-activity state updates). And also API to initiate TCU-activity state transition. More... | |
This section contains APIs related to TCU activity state management.
class telux::power::PowerFactory |
PowerFactory allows creation of TCU-activity manager instance.
Public Member Functions | |
std::shared_ptr < ITcuActivityManager > | getTcuActivityManager () |
~PowerFactory () | |
Static Public Member Functions | |
static PowerFactory & | getInstance () |
telux::power::PowerFactory::~PowerFactory | ( | ) |
|
static |
API to get the factory instance for TCU-activity management
std::shared_ptr<ITcuActivityManager> telux::power::PowerFactory::getTcuActivityManager | ( | ) |
API to get the TCU-activity Manager instance
class telux::power::ITcuActivityListener |
Listener class for getting notifications related to TCU-activity state and also the updates related to TCU-activity service status. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe.
Public Member Functions | |
virtual void | onTcuActivityStateUpdate (TcuActivityState state) |
virtual | ~ITcuActivityListener () |
|
virtual |
Destructor of ITcuActivityListener
|
virtual |
This function is called when the TCU-activity state is going to change.
[in] | state | TCU-activity state that system is about to enter |
class telux::power::ITcuActivityManager |
ITcuActivityManager provides interface to register and de-register listeners (to get TCU-activity state updates). And also API to initiate TCU-activity state transition.
Public Member Functions | |
virtual bool | isReady ()=0 |
virtual std::future< bool > | onReady ()=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< ITcuActivityListener > listener)=0 |
virtual telux::common::Status | deregisterListener (std::weak_ptr< ITcuActivityListener > listener)=0 |
virtual telux::common::Status | registerServiceStateListener (std::weak_ptr< telux::common::IServiceStatusListener > listener)=0 |
virtual telux::common::Status | deregisterServiceStateListener (std::weak_ptr< telux::common::IServiceStatusListener > listener)=0 |
virtual telux::common::Status | setActivityState (TcuActivityState state, telux::common::ResponseCallback callback=nullptr)=0 |
virtual TcuActivityState | getActivityState ()=0 |
virtual telux::common::Status | sendActivityStateAck (TcuActivityStateAck ack)=0 |
virtual | ~ITcuActivityManager () |
|
virtual |
Destructor of ITcuActivityManager
|
pure virtual |
Checks the status of TCU-activity services and if the other APIs are ready for use, and returns the result.
|
pure virtual |
Wait for TCU-activity services to be ready.
|
pure virtual |
Register a listener for updates on TCU-activity state changes.
[in] | listener | Pointer of ITcuActivityListener object that processes the notification |
|
pure virtual |
Remove a previously registered listener.
[in] | listener | Previously registered ITcuActivityListener that needs to be removed |
|
pure virtual |
Register a listener for updates on TCU-activity management service status.
[in] | listener | Pointer of IServiceStatusListener object that processes the notification |
|
pure virtual |
Remove a previously registered listener for service status updates.
[in] | listener | Previously registered IServiceStatusListener that needs to be removed |
|
pure virtual |
Initiate a TCU-activity state transition.
This API needs to be used cautiously, as it could change the power-state of the system and may affect other processes.
[in] | state | TCU-activity state that the System is intended to enter |
[in] | callback | Optional callback to get the response for the TCU-activity state transition command |
|
pure virtual |
Get the current TCU-activity state.
|
pure virtual |
API to send the acknowledgement, after processing a TCU-activity state notification. This indicates that the client is prepared for state transition.Only one acknowledgement is expected from a single client process(may have multiple listeners).
[in] | ack | Acknowledgement for a TCU-activity state notification. |
|
strong |
|
strong |
Defines the acknowledgements to TCU-activity states.The client process sends this after processing the TcuActivityState notification, indicating that it is prepared for state transition
Acknowledgement for TcuActivityState::RESUME is not required, as the state transition has already happened.
Enumerator | |
---|---|
SUSPEND_ACK |
processed TcuActivityState::SUSPEND notification |
SHUTDOWN_ACK |
processed TcuActivityState::SHUTDOWN notification |