RDK Documentation (Open Sourced RDK Components)
|
Functions | |
RMH_Handle | RMH_Initialize (const RMH_EventCallback eventCB, void *userContext) |
Initialize the RMH library and return a handle to the instance. More... | |
RMH_Result | RMH_Destroy (RMH_Handle handle) |
Destroy the instance of RMH library which was created by RMH_Initialize. More... | |
RMH_Result | RMH_SetEventCallbacks (RMH_Handle handle, const uint32_t value) |
Set the list of callbacks you wish to receive. More... | |
RMH_Result | RMH_GetEventCallbacks (RMH_Handle handle, uint32_t *response) |
Get the list of events for which the client has registered. More... | |
RMH_Result | RMH_GetAllAPIs (const RMH_Handle handle, RMH_APIList **apiList) |
Return a list of all APIs which are part of RMH. More... | |
RMH_Result | RMH_GetUnimplementedAPIs (const RMH_Handle handle, RMH_APIList **apiList) |
Return a list of all RMH APIs which are unimplemented by the SoC library. More... | |
RMH_Result | RMH_GetAPITags (const RMH_Handle handle, RMH_APITagList **apiTags) |
Return the list of all RMH APIs grouped into lists by their tags. More... | |
const char *const | RMH_ResultToString (const RMH_Result value) |
Convert RMH_Result to a string. More... | |
const char *const | RMH_LinkStatusToString (const RMH_LinkStatus value) |
Convert RMH_LinkStatus to a string. More... | |
const char *const | RMH_AdmissionStatusToString (const RMH_AdmissionStatus value) |
Convert RMH_AdmissionStatus to a string. More... | |
const char *const | RMH_MoCAResetReasonToString (const RMH_MoCAResetReason value) |
Convert RMH_MoCAResetReason to a string. More... | |
const char *const | RMH_SubcarrierProfileToString (const RMH_SubcarrierProfile value) |
Convert RMH_SubcarrierProfile to a string. More... | |
const char *const | RMH_PERModeToString (const RMH_PERMode value) |
Convert RMH_PERMode to a string. More... | |
const char *const | RMH_MoCAVersionToString (const RMH_MoCAVersion value) |
Convert RMH_MoCAVersion to a string. More... | |
const char *const | RMH_PowerModeToString (const uint32_t value, char *responseBuf, const size_t responseBufSize) |
The input value should be a a bitmask of type RMH_PowerMode. More... | |
const char *const | RMH_BandToString (const RMH_Band value) |
Convert value to a printable string. More... | |
const char *const | RMH_LogLevelToString (const uint32_t value, char *responseBuf, const size_t responseBufSize) |
Return the bitmask value as a string. More... | |
const char *const | RMH_EventToString (const uint32_t value, char *responseBuf, const size_t responseBufSize) |
Return the bitmask value as a string. More... | |
const char *const | RMH_MacToString (const RMH_MacAddress_t value, char *responseBuf, const size_t responseBufSize) |
Returns the provided MAC address in value as a string. More... | |
const char *const | RMH_ACATypeToString (const RMH_ACAType value) |
Convert value to a printable string. More... | |
const char *const | RMH_ACAStatusToString (const RMH_ACAStatus value) |
Convert ACA status to a printable string. More... | |
RMH_Result | RMH_Interface_GetEnabled (const RMH_Handle handle, bool *response) |
Check if the MoCA interface is enabled at the kernel level. More... | |
RMH_Result | RMH_Interface_SetEnabled (const RMH_Handle handle, const bool value) |
Set MoCA interface enabled or disabled at the kernel level. More... | |
RMH_Result | RMH_Self_SetEnabledRDK (const RMH_Handle handle) |
Enable MoCA using RDK specific configuration. More... | |
RMH_Result | RMH_Self_GetLinkStatus (const RMH_Handle handle, RMH_LinkStatus *status) |
Current operational status of the MoCA interface [mocaIfStatus]. More... | |
RMH_Result | RMH_Network_GetAssociatedIds (const RMH_Handle handle, RMH_NodeList_Uint32_t *response) |
Return a list of the associated ID for every node on the network. More... | |
RMH_Result | RMH_RemoteNode_GetNodeIdFromAssociatedId (const RMH_Handle handle, const uint32_t associatedId, uint32_t *response) |
Convert an associated Id into a Node Id. More... | |
RMH_Result | RMH_RemoteNode_GetAssociatedIdFromNodeId (const RMH_Handle handle, const uint32_t nodeId, uint32_t *response) |
Convert a node Id into an associated Id. More... | |
RMH_Result | RMH_PQoS_GetMaxEgressBandwidth (const RMH_Handle handle, uint32_t *response) |
Return the node Id with the maximum available bandwidth. More... | |
RMH_Result | RMH_Log_CreateDriverFile (const RMH_Handle handle, char *responseBuf, const size_t responseBufSize) |
Create a new log file in standard RDK format. More... | |
RMH_Result | RMH_Log_PrintStats (const RMH_Handle handle, const char *filename) |
Print a summary of of the Tx/Rx MoCA status. More... | |
RMH_Result | RMH_Log_PrintFlows (const RMH_Handle handle, const char *filename) |
Print a generic status summary of the MoCA flows. More... | |
RMH_Result | RMH_Log_PrintModulation (const RMH_Handle handle, const char *filename) |
Print a summary of the sub carrier modulation bitloading information. More... | |
RMH_Handle RMH_Initialize | ( | const RMH_EventCallback | eventCB, |
void * | userContext | ||
) |
Initialize the RMH library and return a handle to the instance.
This handle will be used in all future communication with the RMH library. This function will fail if the MoCA driver is not properly installed or is not able to operate. Multiple simultaneous instances of RMH_Initialize are supported in single and multiprocess environments.
[in] | eventCB | A pointer to a function which will handle any callbacks from the RMH MoCA library A value of NULL is permitted if you do not wish to receive callbacks. |
[in] | userContext | A pointer to some data that will be passed back with each callback. A value of NULL is permitted if the client requires no context during callbacks. |
Definition at line 23 of file librmh_api_no_wrap.c.
RMH_Result RMH_Destroy | ( | RMH_Handle | handle | ) |
RMH_Result RMH_SetEventCallbacks | ( | RMH_Handle | handle, |
const uint32_t | value | ||
) |
Set the list of callbacks you wish to receive.
For each callback a call will be made to eventCB which is provided in the call to RMH_Initialize. By default all callbacks are disabled. Any subsequent calls to this API will overwrite previous calls. For example, if you originally set value to 'RMH_API_PRINT' and later set to LINK_STATUS_CHANGED | MOCA_VERSION_CHANGED' you will stop receiving callbacks for 'RMH_API_PRINT'.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[in] | value | A bitmask list of RMH_Event indicating the callbacks to be received. |
RMH_Result RMH_GetEventCallbacks | ( | RMH_Handle | handle, |
uint32_t * | response | ||
) |
RMH_Result RMH_GetAllAPIs | ( | const RMH_Handle | handle, |
RMH_APIList ** | apiList | ||
) |
RMH_Result RMH_GetUnimplementedAPIs | ( | const RMH_Handle | handle, |
RMH_APIList ** | apiList | ||
) |
RMH_Result RMH_GetAPITags | ( | const RMH_Handle | handle, |
RMH_APITagList ** | apiTags | ||
) |
const char* const RMH_ResultToString | ( | const RMH_Result | value | ) |
Convert RMH_Result to a string.
[in] | value | Value to be printed as a string. |
Definition at line 84 of file librmh_api_no_wrap.c.
const char* const RMH_LinkStatusToString | ( | const RMH_LinkStatus | value | ) |
Convert RMH_LinkStatus to a string.
[in] | value | Value to be printed as a string. |
Definition at line 88 of file librmh_api_no_wrap.c.
const char* const RMH_AdmissionStatusToString | ( | const RMH_AdmissionStatus | value | ) |
Convert RMH_AdmissionStatus to a string.
[in] | value | Value to be printed as a string. |
Definition at line 92 of file librmh_api_no_wrap.c.
const char* const RMH_MoCAResetReasonToString | ( | const RMH_MoCAResetReason | value | ) |
Convert RMH_MoCAResetReason to a string.
[in] | value | Value to be printed as a string. |
Definition at line 108 of file librmh_api_no_wrap.c.
const char* const RMH_SubcarrierProfileToString | ( | const RMH_SubcarrierProfile | value | ) |
Convert RMH_SubcarrierProfile to a string.
[in] | value | Value to be printed as a string. |
Definition at line 112 of file librmh_api_no_wrap.c.
const char* const RMH_PERModeToString | ( | const RMH_PERMode | value | ) |
Convert RMH_PERMode to a string.
[in] | value | Value to be printed as a string. |
Definition at line 116 of file librmh_api_no_wrap.c.
const char* const RMH_MoCAVersionToString | ( | const RMH_MoCAVersion | value | ) |
Convert RMH_MoCAVersion to a string.
[in] | value | Value to be printed as a string. |
Definition at line 122 of file librmh_api_no_wrap.c.
const char* const RMH_PowerModeToString | ( | const uint32_t | value, |
char * | responseBuf, | ||
const size_t | responseBufSize | ||
) |
The input value should be a a bitmask of type RMH_PowerMode.
This will be converted to a printable string.
[in] | value | A bitmask of RMH_PowerMode to be printed as a string. |
[out] | responseBuf | A buffer where the log level string will be written. |
[in] | responseBufSize | The size in bytes of the buffer <responseBuf>. |
Definition at line 162 of file librmh_api_no_wrap.c.
const char* const RMH_BandToString | ( | const RMH_Band | value | ) |
Convert value to a printable string.
[in] | value | Value to be printed as a string. |
Definition at line 96 of file librmh_api_no_wrap.c.
const char* const RMH_LogLevelToString | ( | const uint32_t | value, |
char * | responseBuf, | ||
const size_t | responseBufSize | ||
) |
Return the bitmask value as a string.
The bitmask is expected to contain one or more of RMH_LogLevel.
[in] | value | A bitmask of RMH_LogLevel to be printed as a string. |
[out] | responseBuf | A buffer where the log level string will be written. |
[in] | responseBufSize | The size in bytes of the buffer responseBuf. |
Definition at line 166 of file librmh_api_no_wrap.c.
const char* const RMH_EventToString | ( | const uint32_t | value, |
char * | responseBuf, | ||
const size_t | responseBufSize | ||
) |
Return the bitmask value as a string.
The bitmask is expected to contain one or more of RMH_Event.
[in] | value | A bitmask of RMH_LogLevel to be printed as a string. |
[out] | responseBuf | A buffer where the log level string will be written. |
[in] | responseBufSize | The size in bytes of the buffer responseBuf. |
Definition at line 170 of file librmh_api_no_wrap.c.
const char* const RMH_MacToString | ( | const RMH_MacAddress_t | value, |
char * | responseBuf, | ||
const size_t | responseBufSize | ||
) |
Returns the provided MAC address in value as a string.
[in] | value | A byte array MAC address. |
[out] | responseBuf | A buffer where the MAC string will be written. |
[in] | responseBufSize | The size in bytes of the buffer responseBuf. |
Definition at line 174 of file librmh_api_no_wrap.c.
const char* const RMH_ACATypeToString | ( | const RMH_ACAType | value | ) |
Convert value to a printable string.
[in] | value | A byte array MAC address. |
[out] | responseBuf | A buffer where the MAC string will be written. |
[in] | responseBufSize | The size in bytes of the buffer <responseBuf>. |
Definition at line 100 of file librmh_api_no_wrap.c.
const char* const RMH_ACAStatusToString | ( | const RMH_ACAStatus | value | ) |
Convert ACA status to a printable string.
[in] | value | Value to be printed as a string. |
Definition at line 104 of file librmh_api_no_wrap.c.
RMH_Result RMH_Interface_GetEnabled | ( | const RMH_Handle | handle, |
bool * | response | ||
) |
Check if the MoCA interface is enabled at the kernel level.
Do not confuse with RMH_Self_GetEnabled which checks if the MoCA driver is active.
RMH_Result RMH_Interface_SetEnabled | ( | const RMH_Handle | handle, |
const bool | value | ||
) |
Set MoCA interface enabled or disabled at the kernel level.
Do not confuse with RMH_Self_SetEnabled which checks if the MoCA driver is active.
RMH_Result RMH_Self_SetEnabledRDK | ( | const RMH_Handle | handle | ) |
Enable MoCA using RDK specific configuration.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
RMH_Result RMH_Self_GetLinkStatus | ( | const RMH_Handle | handle, |
RMH_LinkStatus * | status | ||
) |
Current operational status of the MoCA interface [mocaIfStatus].
This API combines all known information about the MoCA device, including the driver, MoCA link, interface status, etc to determine if the link is functional. RMH_LINK_STATUS_UP indicates MoCA is ready for use.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[out] | status | The current link state of MoCA. |
RMH_Result RMH_Network_GetAssociatedIds | ( | const RMH_Handle | handle, |
RMH_NodeList_Uint32_t * | response | ||
) |
Return a list of the associated ID for every node on the network.
This is a one-based index of every remote node on the network. The self node is not included in this list.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[out] | response | The index is the node Id, if nodePresent is 'true', nodeValue is the associated Id for that node. |
RMH_Result RMH_RemoteNode_GetNodeIdFromAssociatedId | ( | const RMH_Handle | handle, |
const uint32_t | associatedId, | ||
uint32_t * | response | ||
) |
Convert an associated Id into a Node Id.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[in] | associatedId | The associated Id of the node. |
[out] | response | The node Id. |
RMH_Result RMH_RemoteNode_GetAssociatedIdFromNodeId | ( | const RMH_Handle | handle, |
const uint32_t | nodeId, | ||
uint32_t * | response | ||
) |
Convert a node Id into an associated Id.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[in] | nodeId | The node Id of the remote node to inspect. |
[out] | response | The associated Id of the node. |
RMH_Result RMH_PQoS_GetMaxEgressBandwidth | ( | const RMH_Handle | handle, |
uint32_t * | response | ||
) |
Return the node Id with the maximum available bandwidth.
[in] | handle | The RMH handle as returned by RMH_Initialize. |
[out] | response | The node Id with the maximum egress bandwidth. |
RMH_Result RMH_Log_CreateDriverFile | ( | const RMH_Handle | handle, |
char * | responseBuf, | ||
const size_t | responseBufSize | ||
) |
Create a new log file in standard RDK format.
This will:
[in] | handle | The RMH handle as returned by RMH_Initialize. NULL is valid for this API. |
[in] | responseBuf | The file name. |
[in] | responseBufSize | The size in bytes of the buffer responseBuf. |
RMH_Result RMH_Log_PrintStats | ( | const RMH_Handle | handle, |
const char * | filename | ||
) |
Print a summary of of the Tx/Rx MoCA status.
If filename is NULL all log messages are printed with RMH_LOG_MESSAGE. If it is not NULL the status will be appended to that file.
[in] | handle | The RMH handle as returned by RMH_Initialize. NULL is valid for this API. |
[in] | filename | The file name where to write the status. If this is NULL the status will be written to RMH_LOG_MESSAGE. |
RMH_Result RMH_Log_PrintFlows | ( | const RMH_Handle | handle, |
const char * | filename | ||
) |
Print a generic status summary of the MoCA flows.
If filename is NULL all log messages are printed with RMH_LOG_MESSAGE with RMH_LOG_MESSAGE. If it is not NULL the status will be appended to that file.
[in] | handle | The RMH handle as returned by RMH_Initialize. NULL is valid for this API. |
[in] | filename | The file name where to write the status. If this is NULL the status will be written to RMH_LOG_MESSAGE. |
RMH_Result RMH_Log_PrintModulation | ( | const RMH_Handle | handle, |
const char * | filename | ||
) |
Print a summary of the sub carrier modulation bitloading information.
[in] | handle | The RMH handle as returned by RMH_Initialize. NULL is valid for this API. |
[in] | filename | The file name where to write the status. If this is NULL the status will be written to RMH_LOG_MESSAGE. |