|
RDK Documentation (Open Sourced RDK Components)
|
Go to the documentation of this file.
27 #ifndef _WEBPA_ADAPTER_H_
28 #define _WEBPA_ADAPTER_H_
38 #define WEBPA_CFG_FILE_NAME "webpa_cfg.json"
39 #define WEBPA_CFG_SERVER_IP "ServerIP"
40 #define WEBPA_CFG_SERVER_PORT "ServerPort"
41 #define WEBPA_CFG_SERVER_SECURE "Secure"
42 #define WEBPA_CFG_DEVICE_NW_INTERFACE "DeviceNetworkInterface"
43 #define WEBPA_CFG_RETRY_INTERVAL "RetryIntervalInSec"
44 #define WEBPA_CFG_PING_WAIT_TIME "MaxPingWaitTimeInSec"
45 #define WEBPA_CFG_NOTIFY "Notify"
46 #define WEBPA_CFG_FIRMWARE_VER "oldFirmwareVersion"
47 #define PARAM_CID "Device.DeviceInfo.Webpa.X_COMCAST-COM_CID"
48 #define PARAM_CMC "Device.DeviceInfo.Webpa.X_COMCAST-COM_CMC"
50 #define LOG_PARODUS_IF "LOG.RDK.PARODUSIF"
51 #define WAL_FREE(__x__) if(__x__ != NULL) { free((void*)(__x__)); __x__ = NULL;}
53 #define MAX_PARAMETER_LEN 512
54 #define RDKC_XPC_SYNC_PARAM_CID
55 #define MAX_PARAMETERNAME_LEN 256
66 WAL_ERR_INVALID_PARAMETER_NAME,
67 WAL_ERR_INVALID_PARAMETER_TYPE,
68 WAL_ERR_INVALID_PARAMETER_VALUE,
70 WAL_ERR_SETATTRIBUTE_REJECTED,
71 WAL_ERR_NAMESPACE_OVERLAP,
72 WAL_ERR_UNKNOWN_COMPONENT,
73 WAL_ERR_NAMESPACE_MISMATCH,
74 WAL_ERR_UNSUPPORTED_NAMESPACE,
75 WAL_ERR_DP_COMPONENT_VERSION_MISMATCH,
76 WAL_ERR_INVALID_PARAM,
77 WAL_ERR_UNSUPPORTED_DATATYPE,
134 WCFG_COMPONENT_NAME = 0,
137 WCFG_DEVICE_INTERFACE,
139 WCFG_DEVICE_REBOOT_PARAM,
140 WCFG_DEVICE_REBOOT_VALUE,
141 WCFG_XPC_SYNC_PARAM_CID,
142 WCFG_XPC_SYNC_PARAM_CMC,
143 WCFG_FIRMWARE_VERSION,
147 WCFG_XPC_SYNC_PARAM_SPV,
148 WCFG_PARAM_HOSTS_NAME,
149 WCFG_PARAM_HOSTS_VERSION,
150 WCFG_PARAM_SYSTEM_TIME,
151 WCFG_RECONNECT_REASON,
174 CONNECTED_CLIENT_NOTIFY,
175 PARAM_VALUE_CHANGE_NOTIFY,
220 char interfaceName[16];
222 unsigned int serverPort;
224 unsigned int retryIntervalInSec;
225 unsigned int maxPingWaitTimeInSec;
226 char oldFirmwareVersion[256];
260 void processRequest(
char *reqPayload,
char *transactionId,
char **resPayload);
266 DB_STATUS LoadDataModel(
void);
321 void _WEBPA_LOG(
unsigned int level,
const char *msg, ...)
322 __attribute__((format (printf, 2, 3)));
WebPA Configuration parameters.
@ CHANGED_BY_FIRMWARE_UPGRADE
void getCurrentTime(struct timespec *timer)
Get Current time.
WCFG_PARAM_NAME
WebPA Config params.
void WALInit()
WALInit Initalize wal.
@ CHANGED_BY_FACTORY_DEFAULT
WEBPA_SET_TYPE
Set operations supported by WebPA.
WAL_STATUS
WebPA Error codes.
Structure to return Parameter info in Notification callback.
void processRequest(char *reqPayload, char *transactionId, char **resPayload)
processRequest processes the request and returns response payload
void _WEBPA_LOG(unsigned int level, const char *msg,...) __attribute__((format(printf
_WEBPA_LOG WEBPA RDK logger API
WAL_DATA_TYPE
WebPA Data types.
void WAL_STATUS sendIoTMessage(const void *msg)
getWebPAConfig interface returns the WebPA config data.
void setInitialNotifyConfigFile(const char *nofityConfigFile)
Set Notify configuration file.
PARAMVAL_CHANGE_SOURCE
Component or source that changed a param value.
void registerNotifyCallback()
Registers the notification callback function.
WAL_STATUS loadCfgFile(const char *cfgFileName, WebPaCfg *cfg)
Loads the WebPA config file, parses it and extracts the WebPA config parameters.
WAL_STATUS msgBusInit(const char *name)
Initializes the Message Bus and registers WebPA component with the stack.
NOTIFY_TYPE
WEBPA Notification types.
void waitForOperationalReadyCondition()
waitForOperationalReadyCondition wait till all dependent components required for being operational ar...
Structure to store Parameter info or Attribute info.
void setInitialNotify(void)
Initializes WebPA configuration file.
void waitForConnectReadyCondition()
waitForConnectReadyCondition wait till all dependent components required for connecting to server are...
void LOGInit()
LOGInit Initialize RDK Logger.