Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t param;
param.timeout = deep_sleep_delay_in_seconds;
IARM_Bus_BroadcastEvent( IARM_BUS_PWRMGR_NAME, 
		IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT, 
		(void*)&param, sizeof(param));

...

Code Block
IARM_Bus_PWRMgr_EventData_t param;
param.data.state.curState = curState;
param.data.state.newState = newState;
IARM_Bus_BroadcastEvent( IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_EVENT_MODECHANGED,
		(void *)&param, sizeof(param));

RPC Methods

IARM_BUS_PWRMGR_API_SetPowerState

  • Sets the power state of the device
  • Used to set a new power state to the device.
  • The power state can be ON, OFF, STANDBY, STANDBYLIGHT-SLEEP or STANDBY-DEEP-SLEEP
Code Block
IARM_Bus_PWRMgr_SetPowerState_Param_t param;
param.newState = IARM_BUS_PWRMGR_POWERSTATE_ON
IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_API_SetPowerState,
		(void *)&param, sizeof(param));


IARM_BUS_PWRMGR_API_GetPowerState

  • This API is used to retrieve the current power state of the box.
Code Block
IARM_Bus_PWRMgr_GetPowerState_Param_t param;
IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_API_GetPowerState,
		(void *)&param, sizeof(param));