![]() |
RDK Documentation (Open Sourced RDK Components)
|
#include <stddef.h>#include <stdlib.h>#include <stdint.h>#include "waldb.h"

Go to the source code of this file.
Data Structures | |
| struct | ParamVal |
| Structure to store Parameter info or Attribute info. More... | |
| struct | ParamNotify |
| Structure to return Parameter info in Notification callback. More... | |
| struct | TransData |
| struct | NodeData |
| union | Notify_Data |
| struct | NotifyData |
| struct | WebPaCfg |
| WebPA Configuration parameters. More... | |
Macros | |
| #define | WEBPA_CFG_FILE_NAME "webpa_cfg.json" |
| Platform specific defines. | |
| #define | WEBPA_CFG_SERVER_IP "ServerIP" |
| #define | WEBPA_CFG_SERVER_PORT "ServerPort" |
| #define | WEBPA_CFG_SERVER_SECURE "Secure" |
| #define | WEBPA_CFG_DEVICE_NW_INTERFACE "DeviceNetworkInterface" |
| #define | WEBPA_CFG_RETRY_INTERVAL "RetryIntervalInSec" |
| #define | WEBPA_CFG_PING_WAIT_TIME "MaxPingWaitTimeInSec" |
| #define | WEBPA_CFG_NOTIFY "Notify" |
| #define | WEBPA_CFG_FIRMWARE_VER "oldFirmwareVersion" |
| #define | PARAM_CID "Device.DeviceInfo.Webpa.X_COMCAST-COM_CID" |
| #define | PARAM_CMC "Device.DeviceInfo.Webpa.X_COMCAST-COM_CMC" |
| #define | LOG_PARODUS_IF "LOG.RDK.PARODUSIF" |
| #define | WAL_FREE(__x__) if(__x__ != NULL) { free((void*)(__x__)); __x__ = NULL;} |
| #define | MAX_PARAMETER_LEN 512 |
| #define | RDKC_XPC_SYNC_PARAM_CID |
| #define | MAX_PARAMETERNAME_LEN 256 |
Typedefs | |
| typedef struct ParamVal | AttrVal |
Enumerations | |
| enum | WAL_STATUS |
| WebPA Error codes. More... | |
| enum | PARAMVAL_CHANGE_SOURCE |
| Component or source that changed a param value. More... | |
| enum | WEBPA_SET_TYPE |
| Set operations supported by WebPA. | |
| enum | WAL_DATA_TYPE |
| WebPA Data types. | |
| enum | WCFG_PARAM_NAME |
| WebPA Config params. | |
| enum | NOTIFY_TYPE |
| WEBPA Notification types. | |
Functions | |
| WAL_STATUS | msgBusInit (const char *name) |
| Initializes the Message Bus and registers WebPA component with the stack. More... | |
| void | registerNotifyCallback () |
| Registers the notification callback function. More... | |
| void | setInitialNotifyConfigFile (const char *nofityConfigFile) |
| Set Notify configuration file. More... | |
| void | processRequest (char *reqPayload, char *transactionId, char **resPayload) |
| processRequest processes the request and returns response payload More... | |
| DB_STATUS | LoadDataModel (void) |
| int | getDBHandle () |
| void | setInitialNotify (void) |
| Initializes WebPA configuration file. More... | |
| WAL_STATUS | loadCfgFile (const char *cfgFileName, WebPaCfg *cfg) |
| Loads the WebPA config file, parses it and extracts the WebPA config parameters. More... | |
| void | WALInit () |
| WALInit Initalize wal. | |
| void | LOGInit () |
| LOGInit Initialize RDK Logger. | |
| void | waitForConnectReadyCondition () |
| waitForConnectReadyCondition wait till all dependent components required for connecting to server are initialized | |
| void | waitForOperationalReadyCondition () |
| waitForOperationalReadyCondition wait till all dependent components required for being operational are initialized | |
| void | _WEBPA_LOG (unsigned int level, const char *msg,...) __attribute__((format(printf |
| _WEBPA_LOG WEBPA RDK logger API | |
| void WAL_STATUS | sendIoTMessage (const void *msg) |
| getWebPAConfig interface returns the WebPA config data. More... | |
| void | getCurrentTime (struct timespec *timer) |
| Get Current time. More... | |
@description This header defines the WebPA Abstraction APIs
Definition in file webpa_adapter.h.
| struct ParamVal |
Structure to store Parameter info or Attribute info.
Definition at line 159 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| char * | name | |
| char * | value | |
| WAL_DATA_TYPE | type | |
| struct ParamNotify |
Structure to return Parameter info in Notification callback.
Definition at line 183 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| char * | notifyDest | |
| char * | notifyPayload | |
| struct TransData |
Definition at line 190 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| char * | transId | |
| struct NodeData |
Definition at line 195 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| char * | nodeMacId | |
| char * | status | |
| union Notify_Data |
Definition at line 201 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| ParamNotify * | notify | |
| TransData * | status | |
| NodeData * | node | |
| struct NotifyData |
Definition at line 208 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| NOTIFY_TYPE | type | |
| Notify_Data * | data | |
| struct WebPaCfg |
WebPA Configuration parameters.
Definition at line 218 of file webpa_adapter.h.

| Data Fields | ||
|---|---|---|
| char | interfaceName[16] | |
| char | serverIP[256] | |
| unsigned int | serverPort | |
| int | secureFlag | |
| unsigned int | retryIntervalInSec | |
| unsigned int | maxPingWaitTimeInSec | |
| char | oldFirmwareVersion[256] | |
| enum WAL_STATUS |
WebPA Error codes.
| Enumerator | |
|---|---|
| WAL_SUCCESS | Success. |
| WAL_FAILURE | General Failure |
Definition at line 60 of file webpa_adapter.h.
Component or source that changed a param value.
| Enumerator | |
|---|---|
| CHANGED_BY_FACTORY_DEFAULT | Factory Defaults |
| CHANGED_BY_ACS | ACS/TR-069 |
| CHANGED_BY_WEBPA | WebPA |
| CHANGED_BY_CLI | Command Line Interface (CLI) |
| CHANGED_BY_SNMP | SNMP |
| CHANGED_BY_FIRMWARE_UPGRADE | Firmware Upgrade |
| CHANGED_BY_WEBUI | Local Web UI (HTTP) |
| CHANGED_BY_UNKNOWN | Unknown |
| CHANGED_BY_XPC | xPC |
Definition at line 85 of file webpa_adapter.h.
| WAL_STATUS msgBusInit | ( | const char * | name | ) |
Initializes the Message Bus and registers WebPA component with the stack.
| [in] | name | WebPA Component Name. |
| void registerNotifyCallback | ( | ) |
Registers the notification callback function.
| [in] | cb | Notification callback function. |
Definition at line 83 of file webpa_adapter.cpp.
| void setInitialNotifyConfigFile | ( | const char * | nofityConfigFile | ) |
Set Notify configuration file.
| [in] | config | file name |
Definition at line 74 of file webpa_adapter.cpp.
| void processRequest | ( | char * | reqPayload, |
| char * | transactionId, | ||
| char ** | resPayload | ||
| ) |
processRequest processes the request and returns response payload
| [in] | reqPayload | input request to process |
| [in] | resPayload | retuns response payload |
Definition at line 170 of file webpa_adapter.cpp.
| void setInitialNotify | ( | ) |
Initializes WebPA configuration file.
To turn on notification for the parameters extracted from the notifyList of the config file.
Definition at line 108 of file webpa_adapter.cpp.
| WAL_STATUS loadCfgFile | ( | const char * | cfgFileName, |
| WebPaCfg * | cfg | ||
| ) |
Loads the WebPA config file, parses it and extracts the WebPA config parameters.
| [in] | cfgFileName | Config filename (with absolute path) |
| [out] | cfg | WebPA config parameters |
| void WAL_STATUS sendIoTMessage | ( | const void * | msg | ) |
getWebPAConfig interface returns the WebPA config data.
| [in] | param | WebPA config param name. |
sendIoTMessage interface sends message to IoT.
| [in] | msg | Message to be sent to IoT. |