Input Power Supply Monitoring API
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:
- le_ips_GetInputVoltage() API gives the Platform voltage input.
- le_ips_GetPowerSource() API gives the power source used by the Platform:
- LE_IPS_POWER_SOURCE_EXTERNAL for an external power source
- LE_IPS_POWER_SOURCE_BATTERY for a battery.
- le_ips_GetBatteryLevel() API gives the Platform battery level.
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.
- le_ips_SetVoltageThresholds() API allows the application to set platform input voltage thresholds.
- le_ips_GetVoltageThresholds() API allows the application to get platform input voltage thresholds.
- le_ips_AddThresholdEventHandler() API adds a handler to notify when the platform input voltage threshold is reached.
- le_ips_RemoveThresholdEventHandler() API removes the platform input voltage handler.
Copyright (C) Sierra Wireless Inc.