RDK Documentation (Open Sourced RDK Components)
webpa_parameter.cpp File Reference
#include <string.h>
#include <math.h>
#include <stdio.h>
#include "webpa_parameter.h"
#include "rdk_debug.h"
#include "waldb.h"
#include "hostIf_msgHandler.h"
#include "hostIf_utils.h"
#include "rbus.h"
Include dependency graph for webpa_parameter.cpp:

Go to the source code of this file.

Functions

static WDMP_STATUS GetParamInfo (const char *pParameterName, param_t ***parametervalPtrPtr, int *paramCountPtr, int paramIndex)
 
static WDMP_STATUS get_ParamValues_tr69hostIf (HOSTIF_MsgData_t *ptrParam)
 
int isWildCardParam (const char *paramName)
 Check if Parameter Name ends with . If yes it is a wild card param. More...
 
static void converttohostIfType (char *ParamDataType, HostIf_ParamType_t *pParamType)
 
static void converttoWalType (HostIf_ParamType_t paramType, WAL_DATA_TYPE *pwalType)
 
static WAL_STATUS SetParamInfo (ParamVal paramVal, char *transaction_id)
 
static WAL_STATUS set_ParamValues_tr69hostIf (HOSTIF_MsgData_t *param)
 
static WAL_STATUS convertFaultCodeToWalStatus (faultCode_t faultCode)
 
void getValues (const char *paramName[], const unsigned int paramCount, param_t ***paramValArr, size_t **retValCount, WDMP_STATUS **retStatus)
 getValues interface returns the parameter values. More...
 
void setValues (const ParamVal paramVal[], const unsigned int paramCount, const WEBPA_SET_TYPE setType, money_trace_spans *timeSpan, WDMP_STATUS **retStatus, char *transaction_id)
 setValues interface sets the parameter value. More...
 
static void ensureRbusHandle ()
 
static rbusValueType_t getRbusDataTypefromWebPA (WAL_DATA_TYPE type)
 
static DATA_TYPE mapRbusDataTypeToWebPA (rbusValueType_t type)
 
static WDMP_STATUS rbusGetParamInfo (const char *pParameterName, param_t ***parametervalPtrPtr, int *paramCountPtr, int index)
 
static WAL_STATUS rbusSetParamInfo (ParamVal paramVal, char *transactionID)
 

Variables

rbusHandle_t g_busHandle = 0
 

yes

@description This file describes the Webpa Parameter Request Handling

Definition in file webpa_parameter.cpp.

Function Documentation

◆ get_ParamValues_tr69hostIf()

static WDMP_STATUS get_ParamValues_tr69hostIf ( HOSTIF_MsgData_t ptrParam)
static

generic Api for get HostIf parameters

Definition at line 656 of file webpa_parameter.cpp.

◆ isWildCardParam()

int isWildCardParam ( const char *  paramName)

Check if Parameter Name ends with . If yes it is a wild card param.

Parameters
[in]paramNameName of the Parameter.
[out]retValue0 if present and 1 if not

Definition at line 732 of file webpa_parameter.cpp.

◆ set_ParamValues_tr69hostIf()

static WAL_STATUS set_ParamValues_tr69hostIf ( HOSTIF_MsgData_t ptrParam)
static

generic Api for get HostIf parameters through IARM_TR69Bus

Definition at line 679 of file webpa_parameter.cpp.

◆ getValues()

void getValues ( const char *  paramName[],
const unsigned int  paramCount,
param_t ***  paramValArr,
size_t **  retValCount,
WDMP_STATUS **  retStatus 
)

getValues interface returns the parameter values.

getValues supports an option to pass wildward parameters. This can be achieved by passing an object name followed by '.' instead of parameter name.

Parameters
[in]paramNameList of Parameters.
[in]paramCountNumber of parameters.
[out]paramValArrTwo dimentional array of parameter name/value pairs.
[out]retValCountList of "number of parameters" for each input paramName. Usually retValCount will be 1 except for wildcards request where it represents the number of param/value pairs retrieved for the particular wildcard parameter.
[out]retStatusList of Return status.

Definition at line 68 of file webpa_parameter.cpp.

◆ setValues()

void setValues ( const ParamVal  paramVal[],
const unsigned int  paramCount,
const WEBPA_SET_TYPE  setType,
money_trace_spans *  timeSpan,
WDMP_STATUS **  retStatus,
char *  transaction_id 
)

setValues interface sets the parameter value.

Parameters
[in]paramValList of Parameter name/value pairs.
[in]paramCountNumber of parameters.
[out]retStatusList of Return status.

Definition at line 95 of file webpa_parameter.cpp.