Power Manager monitors Power key events and reacts to power state changes. It dispatches Power Mode Change events to IARM-Bus.
- Feature Summary
- Persist current power state (on/off) across power cycles.
- If box was shutdown via a scheduled reboot, then restore the last known power state
- If box was shutdown due to crash, then restore the last known power state.
- In all other cases, default to power on at startup.
- Possible power states
Power State | Description |
IARM_BUS_PWRMGR_POWERSTATE_OFF | Power state OFF |
IARM_BUS_PWRMGR_POWERSTATE_STANDBY | Power state STANDBY |
IARM_BUS_PWRMGR_POWERSTATE_ON | Power state ON |
IARM_BUS_PWRMGR_POWERSTATE_STANDBY_LIGHT_SLEEP | Power state Light Sleep |
IARM_BUS_PWRMGR_POWERSTATE_STANDBY_DEEP_SLEEP | Power state Deep Sleep |
- Power manager sends these events to other applications
- IARM_BUS_PWRMGR_EVENT_MODECHANGED
- IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT
- The Event Data contains
IARM_Bus_PWRMgr_PowerState_t curState;
IARM_Bus_PWRMgr_PowerState_t newState;
unsigned int timeout;
- Power Manager: Events
- IARM_BUS_PWRMGR_EVENT_MODECHANGED
Event to notify power mode change. This event is broadcasted in case of power state change.
Along with the current power state and neew state, this event is boradcasted which will be handled by the application.
Example:
param.data.state.curState = curState;
param.data.state.newState = newState;
(void *)¶m, sizeof(param));
- IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT
Event to notify deep sleep timeout. Deep sleep timeout is set for the time set by the IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut API after which this event will be broadcasted.
Example:
param.
timeout = deep_sleep_wakeup_timeout_sec;
(void*)¶m, sizeof(param));
- Power Manager: RPC Methods
Power manager publishes four RPC Methods
- IARM_BUS_PWRMGR_API_SetPowerState
This RPC method is used to set a new power state and the power state can be ON, OFF, STANDBY, STANDY-LIGHT-SLEEP or STANDBY-DEEP-SLEEP
Example:
param.
newState = IARM_BUS_PWRMGR_POWERSTATE_ON
- IARM_BUS_PWRMGR_API_GetPowerState
This API is used to retrieve the current power state of the box
Example:
- IARM_BUS_PWRMGR_API_WareHouseReset
This API is used to perform a Ware House Reset to user data so that STB can be recycled.
Example:
- IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut This API is used to sets the timeout for deep sleep
Example: