RDK Documentation (Open Sourced RDK Components)
webpa_parameter.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 /**
20  * @file webpa_parameter.h
21  *
22  * @description This file describes the Webpa Abstraction Layer
23  *
24  */
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 #include <wdmp-c.h>
30 #ifdef __cplusplus
31 }
32 #endif
33 #include "webpa_adapter.h"
34 
35 
36 #define WEBPA_DATA_MODEL_FILE "/etc/data-model.xml"
37 #define MAX_NUM_PARAMETERS 2048
38 #define MAX_DATATYPE_LENGTH 48
39 #define MAX_PARAM_LENGTH TR69HOSTIFMGR_MAX_PARAM_LEN
40 #define MAX_PARAMETER_LENGTH 512
41 #define MAX_PARAMETERVALUE_LEN 128
42 
43 
44 
45 /**
46  * @brief getValues interface returns the parameter values.
47  *
48  * getValues supports an option to pass wildward parameters. This can be achieved by passing an object name followed by '.'
49  * instead of parameter name.
50  *
51  * @param[in] paramName List of Parameters.
52  * @param[in] paramCount Number of parameters.
53  * @param[out] timeSpan timing_values for each component.
54  * @param[out] paramValArr Two dimentional array of parameter name/value pairs.
55  * @param[out] retValCount List of "number of parameters" for each input paramName. Usually retValCount will be 1 except
56  * for wildcards request where it represents the number of param/value pairs retrieved for the particular wildcard parameter.
57  * @param[out] retStatus List of Return status.
58  */
59 //void getValues(const char *paramName[], const unsigned int paramCount, money_trace_spans *timeSpan, ParamVal ***paramValArr, int *retValCount, WAL_STATUS *retStatus);
60 void getValues (const char *paramName[], const unsigned int paramCount, param_t ***paramValArr,
61  size_t **retValCount, WDMP_STATUS **retStatus);
62 /**
63  * @brief setValues interface sets the parameter value.
64  *
65  * @param[in] paramVal List of Parameter name/value pairs.
66  * @param[in] paramCount Number of parameters.
67  * @param[in] setType Flag to specify the type of set operation.
68  * @param[out] timeSpan timing_values for each component.
69  * @param[out] retStatus List of Return status.
70  */
71 void setValues(const ParamVal paramVal[], const unsigned int paramCount, const WEBPA_SET_TYPE setType, money_trace_spans *timeSpan, WDMP_STATUS **retStatus,char * transaction_id);
webpa_adapter.h
WEBPA_SET_TYPE
WEBPA_SET_TYPE
Set operations supported by WebPA.
Definition: webpa_adapter.h:101
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.
Definition: webpa_parameter.cpp:95
ParamVal
Structure to store Parameter info or Attribute info.
Definition: webpa_adapter.h:159
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.
Definition: webpa_parameter.cpp:68