Telematics SDK - Interface Specification  v1.38.19
Thermal Management

Data Structures

class  telux::therm::ThermalFactory
 ThermalFactory allows creation of thermal manager. More...
 
struct  telux::therm::BoundCoolingDevice
 
class  telux::therm::IThermalManager
 IThermalManager provides interface to get thermal zone and cooling device information. More...
 
class  telux::therm::ITripPoint
 ITripPoint provides interface to get trip point type, trip point temperature and hysteresis value for that trip point. More...
 
class  telux::therm::IThermalZone
 IThermalZone provides interface to get type of the sensor, the current temperature reading, trip points and the cooling devices binded etc. More...
 
class  telux::therm::ICoolingDevice
 ICoolingDevice provides interface to get type of the cooling device, the maximum throttle state and the currently requested throttle state of the cooling device. More...
 
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)>
 

Enumerations

enum  telux::therm::AutoShutdownMode { telux::therm::AutoShutdownMode::UNKNOWN, telux::therm::AutoShutdownMode::ENABLE, telux::therm::AutoShutdownMode::DISABLE }
 
enum  telux::therm::TripType {
  telux::therm::TripType::UNKNOWN, telux::therm::TripType::CRITICAL, telux::therm::TripType::HOT, telux::therm::TripType::PASSIVE,
  telux::therm::TripType::ACTIVE, telux::therm::TripType::CONFIGURABLE_HIGH, telux::therm::TripType::CONFIGURABLE_LOW
}
 

Variables

const uint32_t telux::therm::DEFAULT_TIMEOUT = 30
 

Detailed Description

This section contains APIs related to Thermal Management such as read list of thermal zones, cooling devices and binding info.

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::ThermalFactory

ThermalFactory allows creation of thermal manager.

Public Member Functions

std::shared_ptr< IThermalManagergetThermalManager ()
 
std::shared_ptr< IThermalShutdownManagergetThermalShutdownManager ()
 

Static Public Member Functions

static ThermalFactorygetInstance ()
 

Member Function Documentation

static ThermalFactory& telux::therm::ThermalFactory::getInstance ( )
static

Get Thermal Factory instance.

std::shared_ptr<IThermalManager> telux::therm::ThermalFactory::getThermalManager ( )

Get thermal manager instance to get list of thermal zones (sensors) and cooling devices supported by the device

Returns
Pointer of IThermalManager object.
std::shared_ptr<IThermalShutdownManager> telux::therm::ThermalFactory::getThermalShutdownManager ( )

Get thermal shutdown manager instance to control automatic thermal shutdown and get relevant notifications

Returns
Pointer of IThermalShutdownManager object.
struct telux::therm::BoundCoolingDevice

Defines the trip points to which cooling device is bound.

Data Fields
int coolingDeviceId

Cooling device Id associated with trip points

vector< shared_ptr< ITripPoint > > bindingInfo

List of trippoints bound to the cooling device

class telux::therm::IThermalManager

IThermalManager provides interface to get thermal zone and cooling device information.

Public Member Functions

virtual std::vector< std::shared_ptr< IThermalZone > > getThermalZones ()=0
 
virtual std::vector< std::shared_ptr< ICoolingDevice > > getCoolingDevices ()=0
 
virtual std::shared_ptr< IThermalZonegetThermalZone (int thermalZoneId)=0
 
virtual std::shared_ptr< ICoolingDevicegetCoolingDevice (int coolingDeviceId)=0
 
virtual ~IThermalManager ()
 

Constructor & Destructor Documentation

virtual telux::therm::IThermalManager::~IThermalManager ( )
virtual

Destructor of IThermalManager

Member Function Documentation

virtual std::vector<std::shared_ptr<IThermalZone> > telux::therm::IThermalManager::getThermalZones ( )
pure virtual

Retrieves the list of thermal zone info like type, temperature and trip points.

Returns
List of thermal zones.
virtual std::vector<std::shared_ptr<ICoolingDevice> > telux::therm::IThermalManager::getCoolingDevices ( )
pure virtual

Retrieves the list of thermal cooling device info like type, maximum throttle state and currently requested throttle state.

Returns
List of cooling devices.
virtual std::shared_ptr<IThermalZone> telux::therm::IThermalManager::getThermalZone ( int  thermalZoneId)
pure virtual

Retrieves the thermal zone details like temperature, type and trip point info for the given thermal zone identifier.

Parameters
[in]thermalZoneIdThermal zone identifier
Returns
Pointer to thermal zone.
virtual std::shared_ptr<ICoolingDevice> telux::therm::IThermalManager::getCoolingDevice ( int  coolingDeviceId)
pure virtual

Retrieves the cooling device details like type of the device, maximum cooling level and current cooling level for the given cooling device identifier.

Parameters
[in]coolingDeviceIdCooling device identifier
Returns
Pointer to cooling device.
class telux::therm::ITripPoint

ITripPoint provides interface to get trip point type, trip point temperature and hysteresis value for that trip point.

Public Member Functions

virtual TripType getType ()=0
 
virtual int getThresholdTemp ()=0
 
virtual int getHysteresis ()=0
 
virtual ~ITripPoint ()
 

Constructor & Destructor Documentation

virtual telux::therm::ITripPoint::~ITripPoint ( )
virtual

Destructor of ITripPoint

Member Function Documentation

virtual TripType telux::therm::ITripPoint::getType ( )
pure virtual

Retrieves trip point type.

Returns
Type of trip point if available else return UNKNOWN.
virtual int telux::therm::ITripPoint::getThresholdTemp ( )
pure virtual

Retrieves the temperature above which certain trip point will be fired.

  • Units: MilliDegree Celsius
Returns
Threshold temperature
virtual int telux::therm::ITripPoint::getHysteresis ( )
pure virtual

Retrieves hysteresis value that is the difference between current temperature of the device and the temperature above which certain trip point will be fired. Units: MilliDegree Celsius

Returns
Hysteresis value
class telux::therm::IThermalZone

IThermalZone provides interface to get type of the sensor, the current temperature reading, trip points and the cooling devices binded etc.

Public Member Functions

virtual int getId ()=0
 
virtual std::string getDescription ()=0
 
virtual int getCurrentTemp ()=0
 
virtual int getPassiveTemp ()=0
 
virtual std::vector< std::shared_ptr< ITripPoint > > getTripPoints ()=0
 
virtual std::vector< BoundCoolingDevicegetBoundCoolingDevices ()=0
 
virtual ~IThermalZone ()
 

Constructor & Destructor Documentation

virtual telux::therm::IThermalZone::~IThermalZone ( )
virtual

Destructor of IThermalZone

Member Function Documentation

virtual int telux::therm::IThermalZone::getId ( )
pure virtual

Retrieves the identifier for thermal zone.

Returns
Identifier for thermal zone
virtual std::string telux::therm::IThermalZone::getDescription ( )
pure virtual

Retrieves the type of sensor.

Returns
Sensor type
virtual int telux::therm::IThermalZone::getCurrentTemp ( )
pure virtual

Retrieves the current temperature of the device. Units: MilliDegree Celsius

Returns
Current temperature
virtual int telux::therm::IThermalZone::getPassiveTemp ( )
pure virtual

Retrieves the temperature of passive trip point for the zone. Default value is 0. Valid values: 0 (disabled) or greater than 1000 (enabled), Units: MilliDegree Celsius

Returns
Temperature of passive trip point
virtual std::vector<std::shared_ptr<ITripPoint> > telux::therm::IThermalZone::getTripPoints ( )
pure virtual

Retrieves trip point information like trip type, trip temperature and hysteresis.

Returns
Trip point info list
virtual std::vector<BoundCoolingDevice> telux::therm::IThermalZone::getBoundCoolingDevices ( )
pure virtual

Retrieves the list of cooling device and the associated trip points bound to cooling device in given thermal zone.

Returns
List of bound cooling device for the given thermal zone.
class telux::therm::ICoolingDevice

ICoolingDevice provides interface to get type of the cooling device, the maximum throttle state and the currently requested throttle state of the cooling device.

Public Member Functions

virtual int getId ()=0
 
virtual std::string getDescription ()=0
 
virtual int getMaxCoolingLevel ()=0
 
virtual int getCurrentCoolingLevel ()=0
 
virtual ~ICoolingDevice ()
 

Constructor & Destructor Documentation

virtual telux::therm::ICoolingDevice::~ICoolingDevice ( )
virtual

Destructor of ICoolingDevice

Member Function Documentation

virtual int telux::therm::ICoolingDevice::getId ( )
pure virtual

Retrieves the identifier of the thermal cooling device.

Returns
Cooling device identifier
virtual std::string telux::therm::ICoolingDevice::getDescription ( )
pure virtual

Retrieves the type of the cooling device.

Returns
Cooling device type
virtual int telux::therm::ICoolingDevice::getMaxCoolingLevel ( )
pure virtual

Retrieves the maximum cooling level of the cooling device.

Returns
Maximum cooling level of the thermal cooling device
virtual int telux::therm::ICoolingDevice::getCurrentCoolingLevel ( )
pure virtual

Retrieves the current cooling level of the cooling device. This value can be between 0 and max cooling level. Max cooling level is different for different cooling devices like fan, processor etc.

Returns
Current cooling level of the thermal cooling device
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

Enumeration Type Documentation

Defines the status of automatic thermal shutdown

Enumerator
UNKNOWN 

Automatic thermal shutdown status is unknown

ENABLE 

Automatic thermal shutdown is enabled

DISABLE 

Automatic thermal shutdown is disabled

Defines the type of trip points, it can be one of the values for ACPI (Advanced Configuration and Power Interface) thermal zone

Enumerator
UNKNOWN 

Trip type is unknown

CRITICAL 

Trip point at which system shuts down

HOT 

Trip point to notify emergency

PASSIVE 

Trip point at which kernel lowers the CPU's frequency and throttle the processor down

ACTIVE 

Trip point at which processor fan turns on

CONFIGURABLE_HIGH 

Triggering threshold at which mitigation starts. This type is added to support legacy targets

CONFIGURABLE_LOW 

Clearing threshold at which mitigation stops. This type is added to support legacy targets

Variable Documentation

const uint32_t telux::therm::DEFAULT_TIMEOUT = 30

Default time out (in seconds) for thermal auto-shutdown service to re-enable thermal auto-shutdown.