You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Overview

IARM (Inter Application Resource Management) is a mechanism for inter-process communication among different RDK applications. Its a platform agnostic inter process communication (IPC) mechanism for the other RDK components. The inter communication is possible between IARM application using events and RPC method.

IARM Manager is an IARM Application that runs as Linux daemon process.The IARM Bus Daemon is a Manager Component with Special privileges to manage resources. Other IARM Manager components include:

  • Power Manager
  • IR Manager
  • Disk Manager
  • Sys Manager
  • DS Manager
  • DeepSleep Manager
  • DeviceUpdate Manager
  • IP Manager
  • vrexManager

IARM-Bus offers two basic functionalities:

  • Send Events to application.
  • Invoke application's RPC methods.

 An IARM Application that runs as a linux daemon process is considered a Manager Component. The IARM-Bus Daemon is a special Manager component that belongs to the IARM core. Such manager components normally register Events and RPC methods for other applications to use.

IARM Manager Components

Power Manager

  • Power Manager monitors Power IR key events and reacts to power state changes.
  • It dispatches Power Mode Change events to IARM-Bus.
  • All listeners should release resources when entering POWER OFF/STANDBY state and re-acquire them when entering POWER ON state.
  • Power manager sends these events to other applications
      • IARM_BUS_PWRMGR_EVENT_MODECHANGED
      • IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT
  • The Event Data contains
      • current power state - IARM_Bus_PWRMgr_PowerState_t curState;
      • new power state and - IARM_Bus_PWRMgr_PowerState_t newState;
      • Timeout - unsigned int timeout;

  • Power manager publishes four RPC Methods:
      • SetPowerState
      • GetPowerState
      • WareHouseReset
      • SetDeepSleepTimeOut

Events

IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT

  • Event to notify deep sleep timeout
  • Deep sleep timeout is set by “IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut” API after which this event will be broadcast.
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));


IARM_BUS_PWRMGR_EVENT_MODECHANGED

  • Event to notify power mode change.
  • This event is broadcast in case of power state change. Along with the current power state and new state, this event is broadcast. This event can be handled by the application.
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
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.
IARM_Bus_PWRMgr_GetPowerState_Param_t param;
IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_API_GetPowerState,
		(void *)&param, sizeof(param));


IARM_BUS_PWRMGR_API_WareHouseReset

  • This API is used to reset the box to warehouse state.
IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_API_WareHouseReset, NULL, 0);


IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut

  • This API is used to sets the timeout for deep sleep
IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t param;
param.timeout = timeOut;
IARM_Bus_Call(IARM_BUS_PWRMGR_NAME,
		IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut,
		(void *)&param, sizeof(param));

IR Manager

  • No labels