RDK Documentation (Open Sourced RDK Components)
Device_WiFi_Radio_Stats.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_WiFi_Radio_Stats.h
22  *
23  * TR-069 Device.WiFi.Radio.Stats object Public API.
24  */
25 
26 /**
27  * @defgroup TR69_HOSTIF_WIFI_RADIO_STAT TR-069 Object (Device.WiFi.Radio.{i}.Stat.) Public APIs
28  * Throughput statistics for this interface.
29  *
30  * The CPE MUST reset the interface's Stats parameters (unless otherwise stated in individual object or
31  * parameter descriptions) either when the interface becomes operationally down due to a previous
32  * administrative down (i.e. the interface's Status parameter transitions to a down state after the
33  * interface is disabled) or when the interface becomes administratively up (i.e. the interface's Enable
34  * parameter transitions from false to true). Administrative and operational interface status is discussed
35  * in [Section 4.2.2/TR-181i2].
36  *
37  * @ingroup TR69_HOSTIF_WIFI
38  */
39 
40 
41 
42 /**
43 * @defgroup tr69hostif
44 * @{
45 * @defgroup hostif
46 * @{
47 **/
48 
49 
50 #ifndef DEVICE_WIFI_RADIO_STATS_H_
51 #define DEVICE_WIFI_RADIO_STATS_H_
52 
53 #include "hostIf_main.h"
54 #include "hostIf_utils.h"
55 #include "hostIf_tr69ReqHandler.h"
56 #include "hostIf_updateHandler.h"
57 #include "Device_WiFi.h"
58 
59 /** @defgroup TR_069_DEVICE_WIFI API TR-069 Device.WiFi.Radio.Stats object API.
60  * @ingroup TR_069_DEVICE_WIFI_RADIO_API
61  *
62  * Throughput statistics for this interface.
63  *
64  * @{
65  */
66 
68 
69  static GHashTable *ifHash;
70  int dev_id;
71  hostIf_WiFi_Radio_Stats(int dev_id);
73 
74 public:
75  static class hostIf_WiFi_Radio_Stats *getInstance(int dev_id);
76  static GList* getAllAssociateDevs();
77  static void closeInstance(hostIf_WiFi_Radio_Stats *);
78  static void closeAllInstances();
79  int get_Device_WiFi_Radio_Stats_Props_Fields(int radioIndex);
80  void checkWifiRadioPropsFetch(int radioIndex);
81 
82  unsigned long BytesSent;
83  unsigned long BytesReceived;
84  unsigned long PacketsSent;
85  unsigned long PacketsReceived;
86  unsigned int ErrorsSent;
87  unsigned int ErrorsReceived;
88  unsigned int DiscardPacketsSent;
89  unsigned int DiscardPacketsReceived;
90  unsigned int NoiseFloor;
91 
92  /**
93  * @ingroup TR69_HOSTIF_WIFI_RADIO_STAT
94  * @{
95  */
96  /**
97  * @brief Get total number of bytes transmitted out of the interface, including framing characters.
98  *
99  * This function provides the output as unsigned long value available in
100  * Device.WiFi.Radio.{i}.Stats.BytesSent parameter.
101  *
102  * @param[out] stMsgData TR-069 Host interface message request.
103  * @param[in] radioIndex Index number.
104  *
105  * @return Returns 0 on success, otherwise will return the appropriate error code.
106  */
107  int get_Device_WiFi_Radio_Stats_BytesSent(HOSTIF_MsgData_t *stMsgData,int radioIndex );
108 
109  /**
110  * @brief Get the total number of bytes received on the interface, including framing characters.
111  *
112  * This function provides the output as unsigned long value available in
113  * Device.WiFi.Radio.{i}.Stats.BytesReceived parameter.
114  *
115  * @param[out] stMsgData TR-069 Host interface message request.
116  * @param[in] radioIndex Index number.
117  *
118  * @return Returns 0 on success, otherwise will return the appropriate error code.
119  */
120  int get_Device_WiFi_Radio_Stats_BytesReceived(HOSTIF_MsgData_t *stMsgData,int radioIndex );
121 
122  /**
123  * @brief Get the value of 'Device.WiFi.Radio.Stats.PacketsSent'.
124  * This function provides the total number of packets transmitted out of the interface.
125  */
126  /**
127  * @brief Get the total number of packets transmitted out of the interface.
128  *
129  *
130  * This function provides the output as unsigned long value available in
131  * Device.WiFi.Radio.{i}.Stats.PacketsSent parameter.
132  *
133  * @param[out] stMsgData TR-069 Host interface message request.
134  * @param[in] radioIndex Index number.
135  *
136  * @return Returns 0 on success, otherwise will return the appropriate error code.
137  */
138  int get_Device_WiFi_Radio_Stats_PacketsSent(HOSTIF_MsgData_t *stMsgData,int radioIndex );
139 
140  /**
141  * @brief Get the total number of packets received on the interface.
142  *
143  * This function provides the output as unsigned long value available in
144  * Device.WiFi.Radio.{i}.Stats.PacketReceived parameter.
145  *
146  * @param[out] stMsgData TR-069 Host interface message request.
147  * @param[in] radioIndex Index number.
148  *
149  * @return Returns 0 on success, otherwise will return the appropriate error code.
150  */
151  int get_Device_WiFi_Radio_Stats_PacketsReceived(HOSTIF_MsgData_t *stMsgData,int radioIndex );
152 
153  /**
154  * @brief Get the total number of outbound packets that could not be transmitted because of errors.
155  *
156  * This function provides the output as unsigned int value available in
157  * Device.WiFi.Radio.{i}.Stats.ErrorsSent parameter.
158  *
159  * @param[out] stMsgData TR-069 Host interface message request.
160  * @param[in] radioIndex Index number.
161  *
162  * @return Returns 0 on success, otherwise will return the appropriate error code.
163  */
164  int get_Device_WiFi_Radio_Stats_ErrorsSent(HOSTIF_MsgData_t *stMsgData,int radioIndex );
165 
166  /**
167  * @brief Get the total number of inbound packets that contained errors preventing them from being
168  * delivered to a higher-layer protocol.
169  *
170  * This function provides the output as unsigned int value available in
171  * Device.WiFi.Radio.{i}.Stats.ErrorsReceived parameter.
172  *
173  * @param[out] stMsgData TR-069 Host interface message request.
174  * @param[in] radioIndex Index number.
175  *
176  * @return Returns 0 on success, otherwise will return the appropriate error code.
177  */
178  int get_Device_WiFi_Radio_Stats_ErrorsReceived(HOSTIF_MsgData_t *stMsgData,int radioIndex );
179 
180  /**
181  * @brief Get the total number of outbound packets which were chosen to be discarded even though no
182  * errors had been detected to prevent their being transmitted. One possible reason for discarding
183  * such a packet could be to free up buffer space.
184  *
185  * This function provides the output as unsigned int value available in
186  * Device.WiFi.Radio.{i}.Stats.DiscardPacketsSent parameter.
187  *
188  * @param[out] stMsgData TR-069 Host interface message request.
189  * @param[in] radioIndex Index number.
190  *
191  * @return Returns 0 on success, otherwise will return the appropriate error code.
192  */
194 
195  /**
196  * @brief Get the total number of inbound packets which were chosen to be discarded even though no errors
197  * had been detected to prevent their being delivered. One possible reason for discarding such a packet
198  * could be to free up buffer space.
199  *
200  * This function provides the output as unsigned int value available in
201  * Device.WiFi.Radio.{i}.Stats.DiscardPacketsReceived parameter.
202  *
203  * @param[out] stMsgData TR-069 Host interface message request.
204  * @param[in] radioIndex Index number.
205  *
206  * @return Returns 0 on success, otherwise will return the appropriate error code.
207  */
209 
210  int get_Device_WiFi_Radio_Stats_NoiseFloor(HOSTIF_MsgData_t *stMsgData,int radioIndex );
211 
212  /** @ */ //End of Doxygen tag TR69_HOSTIF_WIFI_RADIO_STAT
213 };
214 
215 /* End of DEVICE_WIFI_RADIO_STATS_H_ doxygen group */
216 /**
217  * @}
218  */
219 
220 #endif /* DEVICE_WIFI_RADIO_STATS_H_ */
221 
222 
223 /** @} */
224 /** @} */
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_BytesReceived
int get_Device_WiFi_Radio_Stats_BytesReceived(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of bytes received on the interface, including framing characters.
Device_WiFi.h
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_DiscardPacketsReceived
int get_Device_WiFi_Radio_Stats_DiscardPacketsReceived(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of inbound packets which were chosen to be discarded even though no errors had b...
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_BytesSent
int get_Device_WiFi_Radio_Stats_BytesSent(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get total number of bytes transmitted out of the interface, including framing characters.
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_DiscardPacketsSent
int get_Device_WiFi_Radio_Stats_DiscardPacketsSent(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of outbound packets which were chosen to be discarded even though no errors had ...
_HostIf_MsgData_t
Definition: hostIf_tr69ReqHandler.h:170
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_PacketsSent
int get_Device_WiFi_Radio_Stats_PacketsSent(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the value of 'Device.WiFi.Radio.Stats.PacketsSent'. This function provides the total number of pa...
hostIf_main.h
hostIf_main API.
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_ErrorsReceived
int get_Device_WiFi_Radio_Stats_ErrorsReceived(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of inbound packets that contained errors preventing them from being delivered to...
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_NoiseFloor
int get_Device_WiFi_Radio_Stats_NoiseFloor(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get total number of bytes transmitted out of the interface, including framing characters.
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_ErrorsSent
int get_Device_WiFi_Radio_Stats_ErrorsSent(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of outbound packets that could not be transmitted because of errors.
hostIf_WiFi_Radio_Stats::get_Device_WiFi_Radio_Stats_PacketsReceived
int get_Device_WiFi_Radio_Stats_PacketsReceived(HOSTIF_MsgData_t *stMsgData, int radioIndex)
Get the total number of packets received on the interface.
hostIf_WiFi_Radio_Stats
Definition: Device_WiFi_Radio_Stats.h:67