Telematics SDK - Interface Specification  v1.46.54
Thermal Shutdown Management

Data Structures

class  telux::therm::IThermalShutdownListener
 Listener class for getting notifications when automatic thermal shutdown mode is enabled/ disabled or will be enabled imminently. 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::therm::IThermalShutdownManager
 IThermalShutdownManager class provides interface to enable/disable automatic thermal shutdown. Additionally it facilitates to register for notifications when the automatic shutdown mode changes. More...
 

Typedefs

using telux::therm::GetAutoShutdownModeResponseCb = std::function< void(AutoShutdownMode mode)>
 

Detailed Description

This section contains APIs related to Thermal Shutdown Management such as set/get thermal auto-shutdown mode, receive notifications on every auto-shutdown update.


Data Structure Documentation

class telux::therm::IThermalShutdownListener

Listener class for getting notifications when automatic thermal shutdown mode is enabled/ disabled or will be enabled imminently. 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 onShutdownEnabled ()
 
virtual void onShutdownDisabled ()
 
virtual void onImminentShutdownEnablement (uint32_t imminentDuration)
 
virtual ~IThermalShutdownListener ()
 
- Public Member Functions inherited from telux::common::IServiceStatusListener
virtual void onServiceStatusChange (ServiceStatus status)
 
virtual ~IServiceStatusListener ()
 

Constructor & Destructor Documentation

virtual telux::therm::IThermalShutdownListener::~IThermalShutdownListener ( )
virtual

Destructor of IThermalShutdownListener

Member Function Documentation

virtual void telux::therm::IThermalShutdownListener::onShutdownEnabled ( )
virtual

This function is called when the automatic shutdown mode changes to ENABLE

virtual void telux::therm::IThermalShutdownListener::onShutdownDisabled ( )
virtual

This function is called when the automatic shutdown mode changes to DISABLE

virtual void telux::therm::IThermalShutdownListener::onImminentShutdownEnablement ( uint32_t  imminentDuration)
virtual

This function is called when the automatic shutdown mode is about to change to ENABLE. Clients that want to keep the shutdown mode disabled, needs to set it accordingly with in the imminentDuration time. If disabled successfully within imminentDuration time, the system timer for auto-enablement will be reset.

Parameters
[in]imminentDurationTime elapsed(in seconds) for the shutdown mode to be enabled
class telux::therm::IThermalShutdownManager

IThermalShutdownManager class provides interface to enable/disable automatic thermal shutdown. Additionally it facilitates to register for notifications when the automatic shutdown mode changes.

Public Member Functions

virtual bool isReady ()=0
 
virtual std::future< bool > onReady ()=0
 
virtual telux::common::Status registerListener (std::weak_ptr< IThermalShutdownListener > listener)=0
 
virtual telux::common::Status deregisterListener (std::weak_ptr< IThermalShutdownListener > listener)=0
 
virtual telux::common::Status setAutoShutdownMode (AutoShutdownMode mode, telux::common::ResponseCallback callback=nullptr, uint32_t timeout=DEFAULT_TIMEOUT)=0
 
virtual telux::common::Status getAutoShutdownMode (GetAutoShutdownModeResponseCb callback)=0
 
virtual ~IThermalShutdownManager ()
 

Constructor & Destructor Documentation

virtual telux::therm::IThermalShutdownManager::~IThermalShutdownManager ( )
virtual

Destructor of IThermalShutdownManager

Member Function Documentation

virtual bool telux::therm::IThermalShutdownManager::isReady ( )
pure virtual

Checks the status of thermal shutdown management service and if the other APIs are ready for use and returns the result.

Returns
True if the services are ready otherwise false.
virtual std::future<bool> telux::therm::IThermalShutdownManager::onReady ( )
pure virtual

Wait for thermal shutdown management service to be ready.

Returns
A future that caller can wait on to be notified when thermal shutdown management service is ready.
virtual telux::common::Status telux::therm::IThermalShutdownManager::registerListener ( std::weak_ptr< IThermalShutdownListener listener)
pure virtual

Register a listener for updates on automatic shutdown mode changes

Parameters
[in]listenerPointer of IThermalShutdownListener object that processes the notification
Returns
Status of registerListener i.e success or suitable status code.
virtual telux::common::Status telux::therm::IThermalShutdownManager::deregisterListener ( std::weak_ptr< IThermalShutdownListener listener)
pure virtual

Remove a previously registered listener.

Parameters
[in]listenerPreviously registered IThermalShutdownListener that needs to be removed
Returns
Status of deregisterListener, success or suitable status code
virtual telux::common::Status telux::therm::IThermalShutdownManager::setAutoShutdownMode ( AutoShutdownMode  mode,
telux::common::ResponseCallback  callback = nullptr,
uint32_t  timeout = DEFAULT_TIMEOUT 
)
pure virtual

Set automatic thermal shutdown mode. When set to DISABLE mode successfully, it remains in DISABLE mode briefly and automatically changes to ENABLE mode after notifying the clients.

Parameters
[in]modedesired AutoShutdownMode to be set
[in]callbackOptional callback to get the response of the command
[in]timeoutOptional timeout(in seconds) for which auto-shutdown remains disabled.
Returns
Status of setAutoShutdownMode i.e. success or suitable status code.
virtual telux::common::Status telux::therm::IThermalShutdownManager::getAutoShutdownMode ( GetAutoShutdownModeResponseCb  callback)
pure virtual

Get automatic thermal shutdown mode.

Parameters
[in]callbackGetAutoShutdownModeResponseCb to get response of the request
Returns
Status of getAutoShutdownMode i.e. success or suitable status code.

Typedef Documentation

using telux::therm::GetAutoShutdownModeResponseCb = typedef std::function<void(AutoShutdownMode mode)>

This function is called with the response to getAutoShutdownMode API.

The callback can be invoked from multiple different threads. The implementation should be thread safe.

Parameters
[in]modeAutoShutdownMode