RDK Documentation (Open Sourced RDK Components)

Description

Data Structures

struct  _DeviceStatus_t
 

Macros

#define MAX_LENGTH_OF_OSD_NAME   15
 

Typedefs

typedef struct _DeviceStatus_t DeviceStatus_t
 

Functions

static IARM_Result_t _PowerPreChange (void *arg)
 
static IARM_Result_t _SetDevMgrStatus (void *arg)
 
static IARM_Result_t _SetOSDName (void *arg)
 
static IARM_Result_t _GetOSDName (void *arg)
 
static IARM_Result_t _GetDevStatus (void *arg)
 
static void _hdmiEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len)
 
static void _powerEventHandler (const char *owner, IARM_EventId_t eventId, void *data, size_t len)
 
CECHost_Err_t CECHost_Init (const char *name)
 This function is used to initialize CEC host device by registering event handlers and calls like status, name etc. More...
 
CECHost_Err_t CECHost_Term (void)
 This function is used to de-initialize CEC host device, disconnects and terminates the CEC connection. More...
 
CECHost_Err_t CECHost_SetCallback (CECHost_Callback_t cb)
 This function is used to set the callback function. It is called by Device Manager application to set Dev manager status, OSD name, hot plug event handler, power state event handler etc. More...
 
CECHost_Err_t CECHost_GetHdmiOuputPhysicalAddress (uint8_t *byte0, uint8_t *byte1, uint8_t *byte2, uint8_t *byte3)
 This function is used to get the physical address of the HDMI output port byte by byte. More...
 
CECHost_Err_t CECHost_IsHdmiOutputConnected (int32_t *connect)
 This function is used to check whether the HDMI output is connected or not. More...
 
CECHost_Err_t CECHost_GetPowerState (int32_t *state)
 This function is used to get the state of power whether it is ON or in STANDBY state. More...
 
CECHost_Err_t CECHost_SetDeviceStatus (int logicalAddress, CECHost_DeviceStatus_t *devices)
 This function is used to set and update the device status like power status, logical address, osd name etc based on status type. More...
 
CECHost_Err_t CECHost_SetPowerState (int32_t state)
 This function is used to set the device power state to be ON or STANDBY. More...
 
CECHost_Err_t CECHost_GetOSDName (uint8_t *buf, size_t *len)
 This function is used to get OSD name of Host module. Here 'buf' need not to be null terminated. If it is, the 'len' does not include the 'null' termintator. More...
 
CECHost_Err_t CECHost_IsActive (int32_t *active)
 This function is used to check whether host device is active or not. More...
 

Variables

static int powerState
 
static CECHost_Callback_t hostCb = {0}
 
static pthread_mutex_t devStatMutex = PTHREAD_MUTEX_INITIALIZER
 
static DeviceStatus_t _deviceStatus [14] = {0}
 
static char osdName [14+1] = "SettopBox"
 

Data Structure Documentation

◆ _DeviceStatus_t

struct _DeviceStatus_t

Definition at line 58 of file RDK.cpp.

Collaboration diagram for _DeviceStatus_t:
Collaboration graph
Data Fields
int logicalAddress
int powerState
int isConnected
char osdName[14+1]

Function Documentation

◆ CECHost_Init()

CECHost_Err_t CECHost_Init ( const char *  name)

This function is used to initialize CEC host device by registering event handlers and calls like status, name etc.

Parameters
[in]nameOSD name.
Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 97 of file RDK.cpp.

◆ CECHost_Term()

CECHost_Err_t CECHost_Term ( void  )

This function is used to de-initialize CEC host device, disconnects and terminates the CEC connection.

Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 134 of file RDK.cpp.

◆ CECHost_SetCallback()

CECHost_Err_t CECHost_SetCallback ( CECHost_Callback_t  cb)

This function is used to set the callback function. It is called by Device Manager application to set Dev manager status, OSD name, hot plug event handler, power state event handler etc.

Parameters
[in]cbCECHost_Callback_t type structure.
Return values
CECHost_ERR_NONEReturns for successful condition.

Definition at line 153 of file RDK.cpp.

◆ CECHost_GetHdmiOuputPhysicalAddress()

CECHost_Err_t CECHost_GetHdmiOuputPhysicalAddress ( uint8_t *  byte0,
uint8_t *  byte1,
uint8_t *  byte2,
uint8_t *  byte3 
)

This function is used to get the physical address of the HDMI output port byte by byte.

Parameters
[out]byte0First byte of physical address.
[out]byte1Second byte of physical address.
[out]byte2Third byte of physical address.
[out]byte3Fourth byte of physical address.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_STATEReturns on error condition.

Definition at line 171 of file RDK.cpp.

◆ CECHost_IsHdmiOutputConnected()

CECHost_Err_t CECHost_IsHdmiOutputConnected ( int32_t *  connect)

This function is used to check whether the HDMI output is connected or not.

Parameters
[out]connectState of connection, 1 for connected and 0 for not connected..
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 202 of file RDK.cpp.

◆ CECHost_GetPowerState()

CECHost_Err_t CECHost_GetPowerState ( int32_t *  state)

This function is used to get the state of power whether it is ON or in STANDBY state.

Parameters
[out]stateState of power, ON or STANDBY.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 232 of file RDK.cpp.

◆ CECHost_SetDeviceStatus()

CECHost_Err_t CECHost_SetDeviceStatus ( int  logicalAddress,
CECHost_DeviceStatus_t devices 
)

This function is used to set and update the device status like power status, logical address, osd name etc based on status type.

Parameters
[in]logicalAddressLogical address of cec device.
[in]devicesCECHost_DeviceStatus_t type pointer containing info about device.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 254 of file RDK.cpp.

◆ CECHost_SetPowerState()

CECHost_Err_t CECHost_SetPowerState ( int32_t  state)

This function is used to set the device power state to be ON or STANDBY.

Parameters
[in]statePower state value to be updated.
Return values
CECHost_ERR_NONEReturns for successful condition.
CECHost_ERR_HOSTReturns on fail condition.

Definition at line 319 of file RDK.cpp.

◆ CECHost_GetOSDName()

CECHost_Err_t CECHost_GetOSDName ( uint8_t *  buf,
size_t *  len 
)

This function is used to get OSD name of Host module. Here 'buf' need not to be null terminated. If it is, the 'len' does not include the 'null' termintator.

Parameters
[in]bufThe ASCII bytes of the OSD name
[in]lenThe number of ASCII bytes.
Return values
CECHost_ERR_NONEReturns for success condition.
CECHost_ERR_INVALIDReturns for failure condition.

Definition at line 337 of file RDK.cpp.

◆ CECHost_IsActive()

CECHost_Err_t CECHost_IsActive ( int32_t *  active)

This function is used to check whether host device is active or not.

Parameters
[out]activeVariable that stores the state of box.
Return values
CECHost_ERR_NONEBy default it returns success condition.

Definition at line 357 of file RDK.cpp.