RDK-B
cm_hal.h File Reference
#include <stdint.h>
#include <sys/time.h>
Include dependency graph for cm_hal.h:

Go to the source code of this file.

Data Structures

struct  _CMMGMT_CM_DS_CHANNEL
 
struct  _CMMGMT_CM_US_CHANNEL
 
struct  _CMMGMT_CM_DOCSIS_INFO
 
struct  _CMMGMT_CM_ERROR_CODEWORDS
 
struct  CMMGMT_CM_EventLogEntry_t
 
struct  _CMMGMT_DML_CM_LOG
 
struct  _CMMGMT_DML_DOCSISLOG_FULL
 
struct  _CMMGMT_CM_DHCP_INFO
 
struct  _CMMGMT_CM_IPV6DHCP_INFO
 
struct  _CMMGMT_DML_CPE_LIST
 
struct  _DOCSIF31_CM_DS_OFDM_CHAN
 
struct  _DOCSIF31_CM_US_OFDMA_CHAN
 
struct  _DOCSIF31_CMSTATUSOFDMA_US
 
struct  _fixed_length_buffer
 
struct  _snmpv3_kickstart_row
 
struct  _snmpv3_kickstart_table
 
struct  _CM_DIPLEXER_SETTINGS
 

Macros

#define OFDM_PARAM_STR_MAX_LEN   64
 
#define CHAR   char
 
#define UCHAR   unsigned char
 
#define BOOLEAN   unsigned char
 
#define USHORT   unsigned short
 
#define UINT8   unsigned char
 
#define INT   int
 
#define UINT   unsigned int
 
#define LONG   long
 
#define ULONG   unsigned long
 
#define TRUE   1
 
#define FALSE   0
 
#define ENABLE   1
 
#define RETURN_OK   0
 
#define RETURN_ERR   -1
 
#define IPV4_ADDRESS_SIZE   4
 
#define ANSC_IPV4_ADDRESS
 
#define EVM_MAX_EVENT_TEXT   255
 
#define MAX_KICKSTART_ROWS   5
 

Typedefs

typedef struct _CMMGMT_CM_DS_CHANNEL CMMGMT_CM_DS_CHANNEL
 
typedef struct _CMMGMT_CM_DS_CHANNELPCMMGMT_CM_DS_CHANNEL
 
typedef struct _CMMGMT_CM_US_CHANNEL CMMGMT_CM_US_CHANNEL
 
typedef struct _CMMGMT_CM_US_CHANNELPCMMGMT_CM_US_CHANNEL
 
typedef struct _CMMGMT_CM_DOCSIS_INFO CMMGMT_CM_DOCSIS_INFO
 
typedef struct _CMMGMT_CM_DOCSIS_INFOPCMMGMT_CM_DOCSIS_INFO
 
typedef struct _CMMGMT_CM_ERROR_CODEWORDS CMMGMT_CM_ERROR_CODEWORDS
 
typedef struct _CMMGMT_CM_ERROR_CODEWORDSPCMMGMT_CM_ERROR_CODEWORDS
 
typedef struct _CMMGMT_DML_CM_LOG CMMGMT_DML_CM_LOG
 
typedef struct _CMMGMT_DML_CM_LOGPCMMGMT_DML_CM_LOG
 
typedef struct _CMMGMT_DML_DOCSISLOG_FULL CMMGMT_DML_DOCSISLOG_FULL
 
typedef struct _CMMGMT_DML_DOCSISLOG_FULLPCMMGMT_DML_DOCSISLOG_FULL
 
typedef struct _CMMGMT_CM_DHCP_INFO CMMGMT_CM_DHCP_INFO
 
typedef struct _CMMGMT_CM_DHCP_INFOPCMMGMT_CM_DHCP_INFO
 
typedef struct _CMMGMT_CM_IPV6DHCP_INFO CMMGMT_CM_IPV6DHCP_INFO
 
typedef struct _CMMGMT_CM_IPV6DHCP_INFOPCMMGMT_CM_IPV6DHCP_INFO
 
typedef struct _CMMGMT_DML_CPE_LIST CMMGMT_DML_CPE_LIST
 
typedef struct _CMMGMT_DML_CPE_LISTPCMMGMT_DML_CPE_LIST
 
typedef struct _DOCSIF31_CM_DS_OFDM_CHAN DOCSIF31_CM_DS_OFDM_CHAN
 
typedef struct _DOCSIF31_CM_DS_OFDM_CHANPDOCSIF31_CM_DS_OFDM_CHAN
 
typedef struct _DOCSIF31_CM_US_OFDMA_CHAN DOCSIF31_CM_US_OFDMA_CHAN
 
typedef struct _DOCSIF31_CM_US_OFDMA_CHANPDOCSIF31_CM_US_OFDMA_CHAN
 
typedef struct _DOCSIF31_CMSTATUSOFDMA_US DOCSIF31_CMSTATUSOFDMA_US
 
typedef struct _DOCSIF31_CMSTATUSOFDMA_USPDOCSIF31_CMSTATUSOFDMA_US
 
typedef struct _fixed_length_buffer fixed_length_buffer_t
 
typedef struct _snmpv3_kickstart_row snmp_kickstart_row_t
 
typedef struct _snmpv3_kickstart_table snmpv3_kickstart_table_t
 
typedef struct _CM_DIPLEXER_SETTINGS CM_DIPLEXER_SETTINGS
 
typedef int(* cm_hal_DiplexerVariationCallback) (CM_DIPLEXER_SETTINGS stCMDiplexerValue)
 

Functions

int cm_hal_InitDB (void)
 
int docsis_InitDS (void)
 
int docsis_InitUS (void)
 
int docsis_getCMStatus (char *cm_status)
 
int docsis_GetDSChannel (PCMMGMT_CM_DS_CHANNEL *ppinfo)
 
int docsis_GetUsStatus (unsigned short i, PCMMGMT_CM_US_CHANNEL pinfo)
 
int docsis_GetUSChannel (PCMMGMT_CM_US_CHANNEL *ppinfo)
 
int docsis_GetDOCSISInfo (PCMMGMT_CM_DOCSIS_INFO pinfo)
 
int docsis_GetNumOfActiveTxChannels (unsigned long *cnt)
 
int docsis_GetNumOfActiveRxChannels (unsigned long *cnt)
 
int docsis_GetErrorCodewords (PCMMGMT_CM_ERROR_CODEWORDS *ppinfo)
 
int docsis_GetMddIpModeOverride (char *pValue)
 
int docsis_SetMddIpModeOverride (char *pValue)
 
unsigned char docsis_GetUSChannelId (void)
 
void docsis_SetUSChannelId (int index)
 
unsigned long docsis_GetDownFreq (void)
 
void docsis_SetStartFreq (unsigned long value)
 
int docsis_GetDocsisEventLogItems (CMMGMT_CM_EventLogEntry_t *entryArray, int len)
 
int docsis_ClearDocsisEventLog (void)
 
int cm_hal_GetDHCPInfo (PCMMGMT_CM_DHCP_INFO pInfo)
 
int cm_hal_GetIPv6DHCPInfo (PCMMGMT_CM_IPV6DHCP_INFO pInfo)
 
int cm_hal_GetCPEList (PCMMGMT_DML_CPE_LIST *ppCPEList, unsigned long *InstanceNum, char *LanMode)
 
int cm_hal_GetMarket (char *market)
 
int cm_hal_Set_HTTP_Download_Url (char *pHttpUrl, char *pfilename)
 
int cm_hal_Get_HTTP_Download_Url (char *pHttpUrl, char *pfilename)
 
int cm_hal_Set_HTTP_Download_Interface (unsigned int interface)
 
int cm_hal_Get_HTTP_Download_Interface (unsigned int *pinterface)
 
int cm_hal_HTTP_Download ()
 
int cm_hal_Get_HTTP_Download_Status ()
 
int cm_hal_Reboot_Ready (unsigned long *pValue)
 
int cm_hal_HTTP_Download_Reboot_Now ()
 
int cm_hal_FWupdateAndFactoryReset (char *pUrl, char *pImagename)
 
int cm_hal_ReinitMac ()
 
int docsis_GetProvIpType (char *pValue)
 
int docsis_GetCert (char *pCert)
 
int docsis_GetCertStatus (unsigned long *pVal)
 
int cm_hal_Get_CableModemResetCount (unsigned long *resetcnt)
 
int cm_hal_Get_LocalResetCount (unsigned long *resetcnt)
 
int cm_hal_Get_DocsisResetCount (unsigned long *resetcnt)
 
int cm_hal_Get_ErouterResetCount (unsigned long *resetcnt)
 
int cm_hal_HTTP_LED_Flash (unsigned char LedFlash)
 
int docsis_GetDsOfdmChanTable (PDOCSIF31_CM_DS_OFDM_CHAN *ppinfo, int *output_NumberOfEntries)
 
int docsis_GetUsOfdmaChanTable (PDOCSIF31_CM_US_OFDMA_CHAN *ppinfo, int *output_NumberOfEntries)
 
int docsis_GetStatusOfdmaUsTable (PDOCSIF31_CMSTATUSOFDMA_US *ppinfo, int *output_NumberOfEntries)
 
int cm_hal_snmpv3_kickstart_initialize (snmpv3_kickstart_table_t *pKickstart_Table)
 
int docsis_IsEnergyDetected (unsigned char *pEnergyDetected)
 
int cm_hal_set_ReinitMacThreshold (unsigned long value)
 
int cm_hal_get_ReinitMacThreshold (unsigned long *pValue)
 
int cm_hal_get_DiplexerSettings (CM_DIPLEXER_SETTINGS *pValue)
 
int cm_hal_Register_DiplexerVariationCallback (cm_hal_DiplexerVariationCallback callback_proc)
 

Macro Definition Documentation

◆ OFDM_PARAM_STR_MAX_LEN

#define OFDM_PARAM_STR_MAX_LEN   64

Definition at line 77 of file cm_hal.h.

◆ CHAR

#define CHAR   char

Definition at line 85 of file cm_hal.h.

◆ UCHAR

#define UCHAR   unsigned char

Definition at line 89 of file cm_hal.h.

◆ BOOLEAN

#define BOOLEAN   unsigned char

Definition at line 93 of file cm_hal.h.

◆ USHORT

#define USHORT   unsigned short

Definition at line 97 of file cm_hal.h.

◆ UINT8

#define UINT8   unsigned char

Definition at line 101 of file cm_hal.h.

◆ INT

#define INT   int

Definition at line 105 of file cm_hal.h.

◆ UINT

#define UINT   unsigned int

Definition at line 109 of file cm_hal.h.

◆ LONG

#define LONG   long

Definition at line 113 of file cm_hal.h.

◆ ULONG

#define ULONG   unsigned long

Definition at line 117 of file cm_hal.h.

◆ TRUE

#define TRUE   1

Definition at line 121 of file cm_hal.h.

◆ FALSE

#define FALSE   0

Definition at line 125 of file cm_hal.h.

◆ ENABLE

#define ENABLE   1

Definition at line 129 of file cm_hal.h.

◆ RETURN_OK

#define RETURN_OK   0

Definition at line 133 of file cm_hal.h.

◆ RETURN_ERR

#define RETURN_ERR   -1

Definition at line 137 of file cm_hal.h.

◆ IPV4_ADDRESS_SIZE

#define IPV4_ADDRESS_SIZE   4

Definition at line 141 of file cm_hal.h.

◆ ANSC_IPV4_ADDRESS

#define ANSC_IPV4_ADDRESS
Value:
union \
{ \
unsigned char Dot[IPV4_ADDRESS_SIZE]; \
uint32_t Value; \
}

Definition at line 150 of file cm_hal.h.

Typedef Documentation

◆ cm_hal_DiplexerVariationCallback

typedef int( * cm_hal_DiplexerVariationCallback) (CM_DIPLEXER_SETTINGS stCMDiplexerValue)

@description Receive Current Diplexer Settings via this callback.

Parameters
CM_DIPLEXER_SETTINGSstCMDiplexerValue , value to be received
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

Definition at line 1276 of file cm_hal.h.

Function Documentation

◆ docsis_IsEnergyDetected()

int docsis_IsEnergyDetected ( unsigned char *  pEnergyDetected)

@description Get the docsis energy to detect WAN mode.

Parameters
BOOLEAN*pEnergyDetected , 0 for No Docsis, 1 if DOCSIS is connected
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ cm_hal_set_ReinitMacThreshold()

int cm_hal_set_ReinitMacThreshold ( unsigned long  value)

@description Set ReinitMacThreshold value.

Parameters
ULONGvalue , value to be set
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ cm_hal_get_ReinitMacThreshold()

int cm_hal_get_ReinitMacThreshold ( unsigned long *  pValue)

@description Get ReinitMacThreshold value.

Parameters
ULONG*pValue , value to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ cm_hal_get_DiplexerSettings()

int cm_hal_get_DiplexerSettings ( CM_DIPLEXER_SETTINGS pValue)

@description Get Current Diplexer Settings.

Parameters
CM_DIPLEXER_SETTINGS*pValue , value to be returned
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.

◆ cm_hal_Register_DiplexerVariationCallback()

int cm_hal_Register_DiplexerVariationCallback ( cm_hal_DiplexerVariationCallback  callback_proc)

@description To register callback for receiving dynamic diplexer settings

Parameters
cm_hal_DiplexerVariationCallbackcallback_proc , callback prototype
Returns
The status of the operation.
Return values
RETURN_OKif successful.
RETURN_ERRif any error is detected
Execution:\n Synchronous.
Side Effects:\n None.
IPV4_ADDRESS_SIZE
#define IPV4_ADDRESS_SIZE
Definition: cm_hal.h:141