RDK Documentation (Open Sourced RDK Components)
Device_IP_Diagnostics_UploadDiagnostics.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 /**
21  * @file Device_IP_Diagnostics_UploadDiagnostics.h
22  * @brief The header file provides TR069 device IP diagnostics upload APIs.
23  */
24 
25 /**
26  * @defgroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API TR-069 Object (Device.IP.Diagnostics.UploadDiagnostics) Public APIs
27  * Describe the details about TR-069 Device IP UploadDiagnostics APIs specifications.
28  * @ingroup TR69_HOSTIF_DEVICE_IP
29  */
30 
31 
32 
33 /**
34 * @defgroup tr69hostif
35 * @{
36 * @defgroup hostif
37 * @{
38 **/
39 
40 
41 #ifndef DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_H_
42 #define DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_H_
43 
44 /*****************************************************************************
45  * TR069-SPECIFIC INCLUDE FILES
46  *****************************************************************************/
47 
48 #include "paramaccess.h"
49 #include "parameter.h"
50 
51 #ifdef __cplusplus
52 extern "C"
53 {
54 #endif
55 
56  /** @defgroup TR_069_DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_API TR-069 Device.IP.Diagnostics.UploadDiagnostics object API.
57  * @ingroup TR_069_DEVICE_IP_DIAGNOSTICS_API
58  *
59  * The Device.IP.Diagnostics.UploadDiagnostics object defines the diagnostics
60  * configuration for a HTTP and FTP UploadDiagnostics Test.
61  *
62  * Files sent by the UploadDiagnostics do not require file storage on the CPE
63  * device, and MAY be an arbitrary stream of bytes.
64  *
65  */
66 
67  /** @addtogroup TR_069_DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_SETTER_API TR-069 Device.IP.Diagnostics.UploadDiagnostics Setter API.
68  * @ingroup TR_069_DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_API
69  *
70  * \section dev_ip_diag_uploaddiagnostics_setter TR-069 Device.IP.Diagnostics.UploadDiagnostics object Setter API
71  *
72  * This is the setter group of API for the <b>Device.IP.Diagnostics.UploadDiagnostics</b> object.
73  *
74  * The interface for all functions is identical and is described here.
75  *
76  * @param[in] *name This is the complete path name of the parameter extracted from
77  * soap message, e.g. ::set_Device_IP_Diagnostics_UploadDiagnostics_DiagnosticsState.
78  * In this case, the path is "Device.IP.Diagnostics.UploadDiagnostics.DiagnosticsState".
79  * @param[in] *type Data type of parameter defined for TR-069. This is same as the
80  * data type used in the Xi3 data-model.xml file.
81  * (see parameter.h)
82  * @param[in] *value This is the value to which the parameter requested by the ACS
83  * must be set.
84  * (see paramaccess.h)
85  *
86  * @return The status of the operation.
87  * @retval OK If parameter requested was successfully fetched. (Same as <b>NO_ERROR</b>).
88  * @retval NO_ERROR If parameter requested was successfully fetched. (Same as <b>OK</b>).
89  * @retval DIAG_ERROR Diagnostic error.
90  * @retval ERR_??? Appropriate error value otherwise (see dimark_globals.h).
91  *
92  * @todo Clarify description of DIAG_ERROR.
93  *
94  * @{
95  */
96 
97 /**
98  * @brief This function sets the DiagnosticsState parameter which indicates the availability
99  * of diagnostic data. This is an enumeration of:
100  * -None
101  * -Requested
102  * -Completed
103  * -Error_InitConnectionFailed
104  * -Error_NoResponse
105  * -Error_TransferFailed
106  * -Error_PasswordRequestFailed
107  * -Error_LoginFailed
108  * -Error_NoTransferMode
109  * -Error_NoPASV
110  * -Error_NoCWD
111  * -Error_NoSTOR
112  * -Error_NoTransferComplete
113  *
114  * @note - If the ACS sets the value of this parameter to "Requested",
115  * the CPE MUST initiate the corresponding diagnostic test. When writing,
116  * the only allowed value is "Requested". To ensure the use of the
117  * proper test parameters (the writeable parameters in this object), the
118  * test parameters MUST be set either prior to or at the same time as
119  * (in the same SetParameterValues) setting the DiagnosticsState to
120  * "Requested".
121  *
122  * - When requested, the CPE SHOULD wait until after completion of the
123  * communication session with the ACS before starting the diagnostic.
124  *
125  * - When the test is completed, the value of this parameter MUST be
126  * either "Completed" (if the test completed successfully), or
127  * one of the "Error_xxx" values listed above.
128  *
129  * - If the value of this parameter is anything other than
130  * "Completed", the values of the results parameters for this
131  * test are indeterminate.
132  *
133  * - When the diagnostic initiated by the ACS is completed
134  *(successfully or not), the CPE MUST establish a new connection to
135  * the ACS to allow the ACS to view the results, indicating the Event
136  * code 8 DIAGNOSTICS COMPLETE in the Inform message.
137  *
138  * - After the diagnostic is complete, the value of all result
139  * parameters (all read-only parameters in this object) MUST be
140  * retained by the CPE until either this diagnostic is run again, or
141  * the CPE reboots. After a reboot, if the CPE has not retained the
142  * result parameters from the most recent test, it MUST set the value
143  * of this parameter to "None".
144  *
145  * - Modifying any of the writeable parameters in this object except
146  * for this one MUST result in the value of this parameter being set
147  * to "None".
148  *
149  * - While the test is in progress, modifying any of the writeable
150  * parameters in this object except for this one MUST result in the
151  * test being terminated and the value of this parameter being set to
152  * "None".
153  *
154  * - While the test is in progress, setting this parameter to
155  * "Requested" (and possibly modifying other writeable parameters
156  * in this object) MUST result in the test being terminated and then
157  * restarted using the current values of the test parameters.
158  *
159  *
160  * @param[in] const char Source IP address.
161  * @param[in] ParameterType Type of the valid interface.
162  * @param[in] ParameterValue Valid interface name or empty string.
163  *
164  * @return Returns an Integer value.
165  * @retval 0 If successfully set the status of diagnostic data.
166  * @retval -1 If Not able to set the status of diagnostic data.
167  * @retval -2 If Not handle setting the status of diagnostic data.
168  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
169  */
170 
171  int set_Device_IP_Diagnostics_UploadDiagnostics_DiagnosticsState(const char *, ParameterType, ParameterValue *);
172 
173 /**
174  * @brief This function sets the IP-layer interface over which the test is to be
175  * performed.
176  *
177  * @note - The value of this parameter MUST be either a valid interface or
178  * an empty string. An attempt to set this parameter to a different
179  * value MUST be rejected as an invalid parameter value.
180  *
181  * - If an empty string is specified, the CPE MUST use the default
182  * routing interface.
183  *
184  *
185  * @param[in] const char Source IP address.
186  * @param[in] ParameterType Type of the valid interface.
187  * @param[in] ParameterValue Valid interface name or empty string.
188  *
189  * @return Returns an Integer value.
190  * @retval 0 If successfully set the IP-layer interface.
191  * @retval -1 If Not able to set the IP-layer interface.
192  * @retval -2 If Not handle setting the IP-layer interface.
193  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
194  */
195 
196  int set_Device_IP_Diagnostics_UploadDiagnostics_Interface(const char *, ParameterType, ParameterValue *);
197 
198 /**
199  * @brief This function sets the URL to which CPE is to perform the upload. This
200  * parameter MUST be in the form of a valid HTTP or FTP URL.
201  *
202  * @note
203  * - When using FTP transport, FTP binary transfer MUST be used.
204  *
205  * - When using HTTP transport, persistent connections MUST be used
206  * and pipeline MUST NOT be used.
207  *
208  * - When using HTTP transport the HTTP Authentication MUST NOT be
209  * used.
210  *
211  *
212  * @param[in] const char Source IP address.
213  * @param[in] ParameterType Type of the valid interface.
214  * @param[in] ParameterValue Valid interface name or empty string.
215  *
216  * @return Returns an Integer value.
217  * @retval 0 If successfully set the upload URL.
218  * @retval -1 If Not able to set the upload URL.
219  * @retval -2 If Not handle setting the upload URL.
220  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
221  */
222 
223  int set_Device_IP_Diagnostics_UploadDiagnostics_UploadURL(const char *, ParameterType, ParameterValue *);
224 
225 /**
226  * @brief This function sets the Differentiated Services Code Point (DSCP) to be used for
227  * marking packets transmitted in the test.
228  *
229  * @note The default value SHOULD be zero.
230  *
231  * @param[in] const char Source IP address.
232  * @param[in] ParameterType Type of the valid interface.
233  * @param[in] ParameterValue Valid interface name or empty string.
234  *
235  * @return Returns an Integer value.
236  * @retval 0 If successfully set the DSCP to be used in test.
237  * @retval -1 If Not able to set the DSCP to be used in test.
238  * @retval -2 If Not handle setting the DSCP to be used in test.
239  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
240  */
241 
242  int set_Device_IP_Diagnostics_UploadDiagnostics_DSCP(const char *, ParameterType, ParameterValue *);
243 
244 /**
245  * @brief This function sets the ethernet priority code for marking packets transmitted in the test (if applicable).
246  *
247  * @note The default value SHOULD be zero.
248  *
249  * @param[in] const char Source IP address.
250  * @param[in] ParameterType Type of the valid interface.
251  * @param[in] ParameterValue Valid interface name or empty string.
252  *
253  * @return Returns an Integer value.
254  * @retval 0 If successfully set the ethernet priority code.
255  * @retval -1 If Not able to set the ethernet priority code.
256  * @retval -2 If Not handle setting the ethernet priority code.
257  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
258  */
259 
260  int set_Device_IP_Diagnostics_UploadDiagnostics_EthernetPriority(const char *, ParameterType, ParameterValue *);
261 
262 /**
263  * @brief This function sets the size (in bytes) of the file to be uploaded to the server.
264  *
265  * @note The CPE MUST insure the appropriate number of bytes are sent.
266  *
267  * @param[in] const char Source IP address.
268  * @param[in] ParameterType Type of the valid interface.
269  * @param[in] ParameterValue Valid interface name or empty string.
270  *
271  * @return Returns an Integer value.
272  * @retval 0 If successfully set the size of the file to be uploaded.
273  * @retval -1 If Not able to set the size of the file to be uploaded.
274  * @retval -2 If Not handle setting the size of the file to be uploaded.
275  * @ingroup TR69_HOSTIF_DEVICE_IP_UPLOAD_API
276  */
277 
278  int set_Device_IP_Diagnostics_UploadDiagnostics_TestFileLength(const char *, ParameterType, ParameterValue *);
279 
280  /* End of TR_069_DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_SETTER_API doxygen group */
281  /**
282  * @}
283  */
284 
285 #ifdef __cplusplus
286 }
287 #endif
288 
289 #endif /* DEVICE_IP_DIAGNOSTICS_UPLOADDIAGNOSTICS_H_ */
290 
291 
292 /** @} */
293 /** @} */
set_Device_IP_Diagnostics_UploadDiagnostics_Interface
int set_Device_IP_Diagnostics_UploadDiagnostics_Interface(const char *, ParameterType, ParameterValue *)
This function sets the IP-layer interface over which the test is to be performed.
set_Device_IP_Diagnostics_UploadDiagnostics_DiagnosticsState
int set_Device_IP_Diagnostics_UploadDiagnostics_DiagnosticsState(const char *, ParameterType, ParameterValue *)
This function sets the DiagnosticsState parameter which indicates the availability of diagnostic data...
set_Device_IP_Diagnostics_UploadDiagnostics_UploadURL
int set_Device_IP_Diagnostics_UploadDiagnostics_UploadURL(const char *, ParameterType, ParameterValue *)
This function sets the URL to which CPE is to perform the upload. This parameter MUST be in the form ...
set_Device_IP_Diagnostics_UploadDiagnostics_TestFileLength
int set_Device_IP_Diagnostics_UploadDiagnostics_TestFileLength(const char *, ParameterType, ParameterValue *)
This function sets the size (in bytes) of the file to be uploaded to the server.
set_Device_IP_Diagnostics_UploadDiagnostics_EthernetPriority
int set_Device_IP_Diagnostics_UploadDiagnostics_EthernetPriority(const char *, ParameterType, ParameterValue *)
This function sets the ethernet priority code for marking packets transmitted in the test (if applica...
set_Device_IP_Diagnostics_UploadDiagnostics_DSCP
int set_Device_IP_Diagnostics_UploadDiagnostics_DSCP(const char *, ParameterType, ParameterValue *)
This function sets the Differentiated Services Code Point (DSCP) to be used for marking packets trans...