RDK Documentation (Open Sourced RDK Components)

Description

Described herein are the IARM-Bus HAL types and functions that are part of the Power Manager application. This manager monitors Power IR key events and reacts to power state changes based on RDK Power Management Specification. It dispatches Power Mode Change events to IARM-Bus. All listeners should releases resources when entering POWER OFF/STANDBY state and re-acquire them when entering POWER ON state.

Modules

 IARM-Bus HAL Power Manager API.
 

Data Structures

struct  _PWRMgr_EventData_t
 Structure which holds the event data. More...
 
union  _PWRMgr_EventData_t.data
 
struct  _MODE_DATA.data.state
 
struct  _IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t
 Structure which holds the Deep sleep timeout value. More...
 
struct  _IARM_BUS_PWRMgr_WareHouseOpn_EventData_t
 Structure which holds warehouse opn status value. More...
 
struct  _IARM_Bus_PWRMgr_SetPowerState_Param_t
 Structure which holds the new powerstate to be set to the device. More...
 
struct  _IARM_Bus_PWRMgr_GetPowerState_Param_t
 Structure which holds the current power state of the CPE. More...
 
struct  _IARM_Bus_PWRMgr_WareHouseReset_Param_t
 Structure which holds the ware house reset time. More...
 
struct  _IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t
 Structure which holds the timeout value to set for Deep sleep. More...
 
struct  _IARM_Bus_PWRMgr_SleepTimer_Param_t
 Structure which holds the sleep timer information. More...
 
struct  _IARM_Bus_PWRMgr_StandbyVideoState_Param_t
 
struct  _IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t
 
struct  _IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t
 Structure which holds the power state before reboot of the CPE. More...
 
struct  _IARM_Bus_PWRMgr_RebootParam_t
 Structure to pass reboot reason argument with the reboot call. More...
 

Macros

#define IARM_BUS_PWRMGR_NAME   "PWRMgr"
 
#define IARM_BUS_PWRMGR_API_SetPowerState   "SetPowerState"
 
#define IARM_BUS_PWRMGR_API_GetPowerState   "GetPowerState"
 
#define IARM_BUS_PWRMGR_API_WareHouseReset   "WareHouseReset"
 
#define IARM_BUS_PWRMGR_API_WareHouseClear   "WarehouseClear"
 
#define IARM_BUS_PWRMGR_API_ColdFactoryReset   "ColdFactoryReset"
 
#define IARM_BUS_PWRMGR_API_FactoryReset   "FactoryReset"
 
#define IARM_BUS_PWRMGR_API_UserFactoryReset   "UserFactoryReset"
 
#define IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut   "SetDeepSleepTimeOut"
 
#define IARM_BUS_PWRMGR_API_SetSleepTimer   "SetSleepTimer"
 
#define IARM_BUS_PWRMGR_API_GetSleepTimer   "GetSleepTimer"
 
#define PWRMGR_MAX_VIDEO_PORT_NAME_LENGTH   16
 Structure which holds the setting for whether video port is enabled in standby.
 
#define IARM_BUS_PWRMGR_API_SetStandbyVideoState   "SetStandbyVideoState"
 
#define IARM_BUS_PWRMGR_API_GetStandbyVideoState   "GetStandbyVideoState"
 
#define IARM_BUS_PWRMGR_API_SetNetworkStandbyMode   "SetNetworkStandbyMode"
 
#define IARM_BUS_PWRMGR_API_GetNetworkStandbyMode   "GetNetworkStandbyMode"
 
#define MAX_PWR_STATE_BEF_REBOOR_STR_LEN   (32)
 
#define IARM_BUS_PWRMGR_API_GetPowerStateBeforeReboot   "GetPowerStateBeforeReboot"
 
#define PWRMGR_MAX_REBOOT_REASON_LENGTH   100
 
#define PWRMGR_REBOOT_REASON_MAINTENANCE   "MAINTENANCE_REBOOT"
 
#define IARM_BUS_PWRMGR_API_Reboot   "performReboot"
 
#define IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup   "handleDeepsleepTimeoutWakeup"
 

Typedefs

typedef enum _PWRMgr_EventId_t IARM_Bus_PWRMgr_EventId_t
 Represents the published Events from PWR Manager.
 
typedef enum _IARM_Bus_PWRMgr_ThermalState_t IARM_Bus_PWRMgr_ThermalState_t
 Enumerator which represents the possible temeperature states.
 
typedef enum _IARM_Bus_PWRMgr_WareHouseOps_t IARM_Bus_PWRMgr_WareHouseOps_t
 Enumerator which represents the possible warehouse ops.
 
typedef enum _IARM_Bus_PWRMgr_WareHouseOpsStatus_t IARM_Bus_PWRMgr_WareHouseOpsStatus_t
 Enumerator which represents the possible warehouse ops.
 
typedef struct _PWRMgr_EventData_t IARM_Bus_PWRMgr_EventData_t
 Structure which holds the event data.
 
typedef struct _IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t
 Structure which holds the Deep sleep timeout value.
 
typedef struct _IARM_BUS_PWRMgr_WareHouseOpn_EventData_t IARM_BUS_PWRMgr_WareHouseOpn_EventData_t
 Structure which holds warehouse opn status value.
 
typedef struct _IARM_Bus_PWRMgr_SetPowerState_Param_t IARM_Bus_PWRMgr_SetPowerState_Param_t
 Structure which holds the new powerstate to be set to the device.
 
typedef struct _IARM_Bus_PWRMgr_GetPowerState_Param_t IARM_Bus_PWRMgr_GetPowerState_Param_t
 Structure which holds the current power state of the CPE.
 
typedef struct _IARM_Bus_PWRMgr_WareHouseReset_Param_t IARM_Bus_PWRMgr_WareHouseReset_Param_t
 Structure which holds the ware house reset time.
 
typedef struct _IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t
 Structure which holds the timeout value to set for Deep sleep.
 
typedef struct _IARM_Bus_PWRMgr_SleepTimer_Param_t IARM_Bus_PWRMgr_SleepTimer_Param_t
 Structure which holds the sleep timer information.
 
typedef struct _IARM_Bus_PWRMgr_StandbyVideoState_Param_t IARM_Bus_PWRMgr_StandbyVideoState_Param_t
 
typedef struct _IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t
 
typedef struct _IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t
 Structure which holds the power state before reboot of the CPE.
 
typedef struct _IARM_Bus_PWRMgr_RebootParam_t IARM_Bus_PWRMgr_RebootParam_t
 Structure to pass reboot reason argument with the reboot call.
 

Enumerations

enum  _PWRMgr_EventId_t
 Represents the published Events from PWR Manager. More...
 
enum  _IARM_Bus_PWRMgr_ThermalState_t
 Enumerator which represents the possible temeperature states.
 
enum  _IARM_Bus_PWRMgr_WareHouseOps_t
 Enumerator which represents the possible warehouse ops.
 
enum  _IARM_Bus_PWRMgr_WareHouseOpsStatus_t
 Enumerator which represents the possible warehouse ops.
 

Data Structure Documentation

◆ _PWRMgr_EventData_t

struct _PWRMgr_EventData_t

Structure which holds the event data.

Definition at line 117 of file pwrMgr.h.

Collaboration diagram for _PWRMgr_EventData_t:
Collaboration graph
Data Fields
union _PWRMgr_EventData_t data

◆ _PWRMgr_EventData_t.data

union _PWRMgr_EventData_t.data

Definition at line 118 of file pwrMgr.h.

Collaboration diagram for _PWRMgr_EventData_t.data:
Collaboration graph
Data Fields
data state
bool bNetworkStandbyMode
int32_t reset_sequence_progress

◆ _PWRMgr_EventData_t::_MODE_DATA.data.state

struct _PWRMgr_EventData_t::_MODE_DATA.data.state

Definition at line 119 of file pwrMgr.h.

Collaboration diagram for _MODE_DATA.data.state:
Collaboration graph
Data Fields
IARM_Bus_PWRMgr_PowerState_t curState

Power manager current power state

IARM_Bus_PWRMgr_PowerState_t newState

Power manager new power state

bool nwStandbyMode

◆ _IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t

struct _IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t

Structure which holds the Deep sleep timeout value.

Definition at line 143 of file pwrMgr.h.

Collaboration diagram for _IARM_BUS_PWRMgr_DeepSleepTimeout_EventData_t:
Collaboration graph
Data Fields
unsigned int timeout

Timeout for deep sleep in seconds

◆ _IARM_BUS_PWRMgr_WareHouseOpn_EventData_t

struct _IARM_BUS_PWRMgr_WareHouseOpn_EventData_t

Structure which holds warehouse opn status value.

Definition at line 150 of file pwrMgr.h.

Collaboration diagram for _IARM_BUS_PWRMgr_WareHouseOpn_EventData_t:
Collaboration graph
Data Fields
IARM_Bus_PWRMgr_WareHouseOps_t wareHouseOpn

WareHouse operation

IARM_Bus_PWRMgr_WareHouseOpsStatus_t status

WareHouse operation status

◆ _IARM_Bus_PWRMgr_SetPowerState_Param_t

struct _IARM_Bus_PWRMgr_SetPowerState_Param_t

Structure which holds the new powerstate to be set to the device.

Definition at line 163 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_SetPowerState_Param_t:
Collaboration graph
Data Fields
IARM_Bus_PWRMgr_PowerState_t newState

[in] New powerstate to be set

int keyCode

[in] Key code for the last key Pressed

◆ _IARM_Bus_PWRMgr_GetPowerState_Param_t

struct _IARM_Bus_PWRMgr_GetPowerState_Param_t

Structure which holds the current power state of the CPE.

Definition at line 173 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_GetPowerState_Param_t:
Collaboration graph
Data Fields
IARM_Bus_PWRMgr_PowerState_t curState

Current powerstate of the box

IARM_Bus_PWRMgr_PowerState_t prevState

Current powerstate of the box

◆ _IARM_Bus_PWRMgr_WareHouseReset_Param_t

struct _IARM_Bus_PWRMgr_WareHouseReset_Param_t

Structure which holds the ware house reset time.

Definition at line 183 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_WareHouseReset_Param_t:
Collaboration graph
Data Fields
bool suppressReboot

STB should not be rebooted

◆ _IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t

struct _IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t

Structure which holds the timeout value to set for Deep sleep.

Definition at line 198 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_SetDeepSleepTimeOut_Param_t:
Collaboration graph
Data Fields
unsigned int timeout

Timeout for deep sleep in seconds

◆ _IARM_Bus_PWRMgr_SleepTimer_Param_t

struct _IARM_Bus_PWRMgr_SleepTimer_Param_t

Structure which holds the sleep timer information.

Definition at line 208 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_SleepTimer_Param_t:
Collaboration graph
Data Fields
double time

timer duration

int start

timer state, started=1 or stopped=0

◆ _IARM_Bus_PWRMgr_StandbyVideoState_Param_t

struct _IARM_Bus_PWRMgr_StandbyVideoState_Param_t

Definition at line 273 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_StandbyVideoState_Param_t:
Collaboration graph
Data Fields
char port[16]
int isEnabled
int result

◆ _IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t

struct _IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t

Definition at line 283 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_NetworkStandbyMode_Param_t:
Collaboration graph
Data Fields
bool bStandbyMode

Standby mode to set and get

◆ _IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t

struct _IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t

Structure which holds the power state before reboot of the CPE.

Definition at line 292 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_GetPowerStateBeforeReboot_Param_t:
Collaboration graph
Data Fields
char powerStateBeforeReboot[(32)]

Powerstate before reboot of the box

◆ _IARM_Bus_PWRMgr_RebootParam_t

struct _IARM_Bus_PWRMgr_RebootParam_t

Structure to pass reboot reason argument with the reboot call.

Definition at line 302 of file pwrMgr.h.

Collaboration diagram for _IARM_Bus_PWRMgr_RebootParam_t:
Collaboration graph
Data Fields
char reboot_reason_custom[100]
char reboot_reason_other[100]
char requestor[100]

Macro Definition Documentation

◆ IARM_BUS_PWRMGR_NAME

#define IARM_BUS_PWRMGR_NAME   "PWRMgr"

Power manager IARM bus name

Definition at line 54 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_SetPowerState

#define IARM_BUS_PWRMGR_API_SetPowerState   "SetPowerState"

Declare RPC API names and their arguments Sets the powerstate of the device

Definition at line 158 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_GetPowerState

#define IARM_BUS_PWRMGR_API_GetPowerState   "GetPowerState"

Retrives current power state of the box

Definition at line 168 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_WareHouseReset

#define IARM_BUS_PWRMGR_API_WareHouseReset   "WareHouseReset"

Reset the box to warehouse state

Definition at line 178 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_ColdFactoryReset

#define IARM_BUS_PWRMGR_API_ColdFactoryReset   "ColdFactoryReset"

Reset the box to cold factory state

Definition at line 189 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_FactoryReset

#define IARM_BUS_PWRMGR_API_FactoryReset   "FactoryReset"

Reset the box to factory state

Definition at line 190 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_UserFactoryReset

#define IARM_BUS_PWRMGR_API_UserFactoryReset   "UserFactoryReset"

Reset the box to user factory state

Definition at line 191 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut

#define IARM_BUS_PWRMGR_API_SetDeepSleepTimeOut   "SetDeepSleepTimeOut"

Sets the timeout for deep sleep

Definition at line 193 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_SetSleepTimer

#define IARM_BUS_PWRMGR_API_SetSleepTimer   "SetSleepTimer"

Sets sleep timer state and timeout

Definition at line 202 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_GetSleepTimer

#define IARM_BUS_PWRMGR_API_GetSleepTimer   "GetSleepTimer"

Gets sleep timer state and remaining

Definition at line 203 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_GetPowerStateBeforeReboot

#define IARM_BUS_PWRMGR_API_GetPowerStateBeforeReboot   "GetPowerStateBeforeReboot"

Retrives power state before reboot

Definition at line 288 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_Reboot

#define IARM_BUS_PWRMGR_API_Reboot   "performReboot"

Reboots device.

Definition at line 307 of file pwrMgr.h.

◆ IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup

#define IARM_BUS_PWRMGR_API_handleDeepsleepTimeoutWakeup   "handleDeepsleepTimeoutWakeup"

Declare RPC API names and their arguments Invoke when deepsleep timeout occurs

Definition at line 323 of file pwrMgr.h.

Enumeration Type Documentation

◆ _PWRMgr_EventId_t

Represents the published Events from PWR Manager.

Enumerator
IARM_BUS_PWRMGR_EVENT_MODECHANGED 

Event to notify power mode change

IARM_BUS_PWRMGR_EVENT_DEEPSLEEP_TIMEOUT 

Event to notify deepsleep timeout

IARM_BUS_PWRMGR_EVENT_RESET_SEQUENCE 

Event to notify progress of reset key sequence

IARM_BUS_PWRMGR_EVENT_REBOOTING 

Event to notify that the device is about to reboot.

IARM_BUS_PWRMGR_EVENT_THERMAL_MODECHANGED 

Event to notify temperature level change

IARM_BUS_PWRMGR_EVENT_WAREHOUSEOPS_STATUSCHANGED 

Event to notify ware house operation status changed

IARM_BUS_PWRMGR_EVENT_NETWORK_STANDBYMODECHANGED 

Event to notify that the network standby mode changed.

IARM_BUS_PWRMGR_EVENT_MAX 

Max event id from this module

Definition at line 59 of file pwrMgr.h.