Input Power Supply Monitoring API

API Reference


The IPS API is used to get monitoring information related to the platform power supply and set warning and critical thresholds.

IPC interfaces binding

All the functions of this API are provided by the modemService.

Here's a code sample binding to modem services:

bindings:
{
   clientExe.clientComponent.le_ips -> modemService.le_ips
}

Input power supply monitoring

This functionality allows to retrieve data related to the platform power supply, so that the application can use the information to diagnose why the modem isn't fully functioning.

The application can retrieve the following power supply information:

In case the device is powered by an external battery monitored by an application, this application can set the battery level with the le_ips_SetBatteryLevel() API. This value will then be used when the battery level is requested through the le_ips_GetBatteryLevel() API.

Note
The value set by le_ips_SetBatteryLevel() will be reported by le_ips_GetBatteryLevel() until Legato is restarted.

Platform input voltage thresholds

Warning
When a critical event occurs, some platform may automatically switch off.
On some platforms, the thresholds parameters are persistent and a platform reboot is required for thresholds change takes effect.

Four thresholds are set to decide the state: the critical, warning, normal and high critical platform input voltage thresholds.

if the platform input voltage decreases below the:

  • "High critical threshold - 1 " but still higher than "Warning threshold", LE_IPS_VOLTAGE_NORMAL event occurs.
  • "Warning threshold" but still higher than "Critical threshold", LE_IPS_VOLTAGE_WARNING event occurs.
  • "Critical threshold", a LE_IPS_VOLTAGE_CRITICAL event occurs.

if the platform input voltage goes up and it reaches the:

  • "Normal threshold", a LE_IPS_VOLTAGE_NORMAL event occurs.
  • "High critical thresholds", a LE_IPS_HI_VOLTAGE_CRITICAL event occurs.
Note
The threshold values range is platform dependent.