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