RDK Documentation (Open Sourced RDK Components)
webpa_adapter.cpp File Reference
#include <stdlib.h>
#include <string.h>
#include "webpa_adapter.h"
#include "webpa_notification.h"
#include "webpa_attribute.h"
#include "webpa_parameter.h"
#include "rdk_debug.h"
#include "hostIf_NotificationHandler.h"
#include "libpd.h"
#include "safec_lib.h"
#include <wdmp-c.h>
Include dependency graph for webpa_adapter.cpp:

Go to the source code of this file.

Macros

#define WEBPA_DEVICE_REBOOT_PARAM   "Device.X_CISCO_COM_DeviceControl.RebootDevice"
 
#define WEBPA_DEVICE_REBOOT_VALUE   "Device"
 
#define WEBPA_NOTIFICATION_SOURCE   "Unknown"
 

Functions

static WDMP_STATUS validate_parameter (param_t *param, int paramCount)
 validate_parameter validates parameter values More...
 
static void setRebootReason (param_t param, WEBPA_SET_TYPE setType)
 Set Last Reboot Reason. More...
 
void notificationCallBack ()
 
void setInitialNotifyConfigFile (const char *nofityConfigFile)
 Set Notify configuration file. More...
 
void registerNotifyCallback ()
 Registers the notification callback function. More...
 
void setInitialNotify ()
 Initializes WebPA configuration file. More...
 
void processRequest (char *reqPayload, char *transactionId, char **resPayload)
 processRequest processes the request and returns response payload More...
 
void getCurrentTime (struct timespec *timer)
 Get Current time. More...
 

Variables

char * webPANotifySource = NULL
 

yes

@description This file describes the Webpa Adapter for Parodus

@description This file describes the Webpa Attribute request handling

Definition in file webpa_adapter.cpp.

Function Documentation

◆ validate_parameter()

static WDMP_STATUS validate_parameter ( param_t *  param,
int  paramCount 
)
static

validate_parameter validates parameter values

Parameters
[in]paramarry if parameters
[in]paramCountinput cid

Definition at line 428 of file webpa_adapter.cpp.

◆ setRebootReason()

static void setRebootReason ( param_t  param,
WEBPA_SET_TYPE  setType 
)
static

Set Last Reboot Reason.

Parameters
[in]paramarry if parameters
[in]WebPaSet Type

Definition at line 461 of file webpa_adapter.cpp.

◆ setInitialNotifyConfigFile()

void setInitialNotifyConfigFile ( const char *  nofityConfigFile)

Set Notify configuration file.

Parameters
[in]configfile name

Definition at line 74 of file webpa_adapter.cpp.

◆ registerNotifyCallback()

void registerNotifyCallback ( )

Registers the notification callback function.

Parameters
[in]cbNotification callback function.
Returns
WAL_STATUS.

Definition at line 83 of file webpa_adapter.cpp.

◆ setInitialNotify()

void setInitialNotify ( )

Initializes WebPA configuration file.

Returns
void.

To turn on notification for the parameters extracted from the notifyList of the config file.

Definition at line 108 of file webpa_adapter.cpp.

◆ processRequest()

void processRequest ( char *  reqPayload,
char *  transactionId,
char **  resPayload 
)

processRequest processes the request and returns response payload

Parameters
[in]reqPayloadinput request to process
[in]resPayloadretuns response payload

Definition at line 170 of file webpa_adapter.cpp.