|
1 /* |
|
2 * Copyright (c) 2006-2007 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Class for storing traffic stream parameters. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 6 % |
|
20 */ |
|
21 |
|
22 #ifndef CORE_TRAFFIC_STREAM_H |
|
23 #define CORE_TRAFFIC_STREAM_H |
|
24 |
|
25 #include "core_types.h" |
|
26 |
|
27 /** |
|
28 * Class for storing traffic stream parameters. |
|
29 * |
|
30 * @lib wlmserversrv.dll |
|
31 * @since S60 v3.2 |
|
32 */ |
|
33 NONSHARABLE_CLASS( core_traffic_stream_c ) |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Constructor. |
|
40 * @param tid TID of the traffic stream. |
|
41 * @param user_priority User Priority of the traffic stream. |
|
42 */ |
|
43 core_traffic_stream_c( |
|
44 u8_t tid, |
|
45 u8_t user_priority ); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~core_traffic_stream_c(); |
|
51 |
|
52 /** |
|
53 * Get the TID value of the traffic stream. |
|
54 * |
|
55 * @since S60 v3.2 |
|
56 * @return The TID value of the traffic stream. |
|
57 */ |
|
58 u8_t tid() const; |
|
59 |
|
60 /** |
|
61 * Get the User Priority value of the traffic stream. |
|
62 * |
|
63 * @since S60 v3.2 |
|
64 * @return The User Priority value of the traffic stream. |
|
65 */ |
|
66 u8_t user_priority() const; |
|
67 |
|
68 /** |
|
69 * Get the access class of the traffic stream. |
|
70 * |
|
71 * @since S60 v5.1 |
|
72 * @return The access class of the traffic stream. |
|
73 */ |
|
74 core_access_class_e access_class() const; |
|
75 |
|
76 /** |
|
77 * Set the default traffic values. |
|
78 * |
|
79 * @since S60 v3.2 |
|
80 * @param params Traffic stream parameters. |
|
81 */ |
|
82 void set_default_traffic_values( |
|
83 const core_traffic_stream_params_s& params ); |
|
84 |
|
85 /** |
|
86 * Override the default traffic values with different values. |
|
87 * |
|
88 * @since S60 v3.2 |
|
89 * @param params Traffic stream parameters. |
|
90 */ |
|
91 void set_traffic_values( |
|
92 const core_traffic_stream_params_s& params ); |
|
93 |
|
94 /** |
|
95 * Reset the traffic stream back to default values. |
|
96 * |
|
97 * @since S60 v3.2 |
|
98 */ |
|
99 void reset_to_default_values(); |
|
100 |
|
101 /** |
|
102 * Reset the traffic stream back to previous values. |
|
103 * |
|
104 * @since S60 v3.2 |
|
105 */ |
|
106 void reset_to_previous_values(); |
|
107 |
|
108 /** |
|
109 * Get the current status of the traffic stream. |
|
110 * |
|
111 * @since S60 v3.2 |
|
112 * @return The current status of the traffic stream. |
|
113 */ |
|
114 core_traffic_stream_status_e status() const; |
|
115 |
|
116 /** |
|
117 * Set the current status of the traffic stream. |
|
118 * |
|
119 * @since S60 v3.2 |
|
120 * @param status The current status of the traffic stream. |
|
121 */ |
|
122 void set_status( |
|
123 core_traffic_stream_status_e status ); |
|
124 |
|
125 /** |
|
126 * Return the current amount of virtual traffic streams |
|
127 * referencing this traffic stream. |
|
128 * |
|
129 * @since S60 v3.2 |
|
130 * @return The current reference count. |
|
131 */ |
|
132 u8_t reference_count(); |
|
133 |
|
134 /** |
|
135 * Increase the reference count by one. |
|
136 * |
|
137 * @since S60 v3.2 |
|
138 */ |
|
139 void inc_reference_count(); |
|
140 |
|
141 /** |
|
142 * Decrease the reference count by one. |
|
143 * |
|
144 * @since S60 v3.2 |
|
145 */ |
|
146 void dec_reference_count(); |
|
147 |
|
148 /** |
|
149 * Get the traffic pattern. |
|
150 * |
|
151 * @since S60 v3.2 |
|
152 * @return Whether the traffic pattern is periodic or aperiodic. |
|
153 */ |
|
154 bool_t is_periodic_traffic() const; |
|
155 |
|
156 /** |
|
157 * Return the Direction field of the traffic stream. |
|
158 * |
|
159 * @since S60 v5.1 |
|
160 * @return The Direction field of the frame. |
|
161 */ |
|
162 core_traffic_stream_direction_e direction() const; |
|
163 |
|
164 /** |
|
165 * Get the Nominal MSDU Size of the traffic stream. |
|
166 * |
|
167 * @since S60 v3.2 |
|
168 * @return The Nominal MSDU Size of the traffic stream. |
|
169 */ |
|
170 u16_t nominal_msdu_size() const; |
|
171 |
|
172 /** |
|
173 * Get the Maximum MSDU Size of the traffic stream. |
|
174 * |
|
175 * @since S60 v3.2 |
|
176 * @return The Maximum MSDU Size of the traffic stream. |
|
177 */ |
|
178 u16_t maximum_msdu_size() const; |
|
179 |
|
180 /** |
|
181 * Get the Minimum Service Interval of the traffic stream. |
|
182 * |
|
183 * @since S60 v3.2 |
|
184 * @return The Minimum Service Interval of the traffic stream. |
|
185 */ |
|
186 u32_t minimum_service_interval() const; |
|
187 |
|
188 /** |
|
189 * Get the Maximum Service Interval of the traffic stream. |
|
190 * |
|
191 * @since S60 v3.2 |
|
192 * @return The Maximum Service Interval of the traffic stream. |
|
193 */ |
|
194 u32_t maximum_service_interval() const; |
|
195 |
|
196 /** |
|
197 * Get the Inactivity Interval of the traffic stream. |
|
198 * |
|
199 * @since S60 v3.2 |
|
200 * @return The Inactivity Interval of the traffic stream. |
|
201 */ |
|
202 u32_t inactivity_interval() const; |
|
203 |
|
204 /** |
|
205 * Get the Suspension Interval of the traffic stream. |
|
206 * |
|
207 * @since S60 v3.2 |
|
208 * @return The Suspension Interval of the traffic stream. |
|
209 */ |
|
210 u32_t suspension_interval() const; |
|
211 |
|
212 /** |
|
213 * Get the Service Start Time of the traffic stream. |
|
214 * |
|
215 * @since S60 v3.2 |
|
216 * @return The Service Start Time of the traffic stream. |
|
217 */ |
|
218 u32_t service_start_time() const; |
|
219 |
|
220 /** |
|
221 * Get the Minimum Data Rate of the traffic stream. |
|
222 * |
|
223 * @since S60 v3.2 |
|
224 * @return The Minimum Data Rate of the traffic stream. |
|
225 */ |
|
226 u32_t minimum_data_rate() const; |
|
227 |
|
228 /** |
|
229 * Get the Mean Data Rate of the traffic stream. |
|
230 * |
|
231 * @since S60 v3.2 |
|
232 * @return The Mean Data Rate of the traffic stream. |
|
233 */ |
|
234 u32_t mean_data_rate() const; |
|
235 |
|
236 /** |
|
237 * Get the Peak Data Rate of the traffic stream. |
|
238 * |
|
239 * @since S60 v3.2 |
|
240 * @return The Peak Data Rate of the traffic stream. |
|
241 */ |
|
242 u32_t peak_data_rate() const; |
|
243 |
|
244 /** |
|
245 * Get the Maximum Burst Size of the traffic stream. |
|
246 * |
|
247 * @since S60 v3.2 |
|
248 * @return The Maximum Burst Size of the traffic stream. |
|
249 */ |
|
250 u32_t maximum_burst_size() const; |
|
251 |
|
252 /** |
|
253 * Get the Delay Bound of the traffic stream. |
|
254 * |
|
255 * @since S60 v3.2 |
|
256 * @return The Delay Bound of the traffic stream. |
|
257 */ |
|
258 u32_t delay_bound() const; |
|
259 |
|
260 /** |
|
261 * Get the Minimum PHY Rate of the traffic stream. |
|
262 * |
|
263 * @since S60 v3.2 |
|
264 * @return The Minimum PHY Rate of the traffic stream. |
|
265 */ |
|
266 u32_t minimum_phy_rate() const; |
|
267 |
|
268 /** |
|
269 * Get the Surplus Bandwidth Allowance of the traffic stream. |
|
270 * |
|
271 * @since S60 v3.2 |
|
272 * @return The Surplus Bandwidth Allowance of the traffic stream. |
|
273 */ |
|
274 u16_t surplus_bandwidth_allowance() const; |
|
275 |
|
276 /** |
|
277 * Get the Medium Time of the traffic stream. |
|
278 * |
|
279 * @since S60 v3.2 |
|
280 * @return The Medium Time of the traffic stream. |
|
281 */ |
|
282 u16_t medium_time() const; |
|
283 |
|
284 /** |
|
285 * Get the Nominal PHY Rate of the traffic stream. |
|
286 * |
|
287 * @since S60 v3.2 |
|
288 * @return The Nominal PHY Rate of the traffic stream. |
|
289 */ |
|
290 core_tx_rate_e nominal_phy_rate() const; |
|
291 |
|
292 /** |
|
293 * Get the rates for overriding the tx rate policy. |
|
294 * @since S60 v3.2 |
|
295 * @return The Nominal PHY Rate of the traffic stream, 0 if defaults are used |
|
296 */ |
|
297 u32_t override_rates() const; |
|
298 |
|
299 /** |
|
300 * Get the Maximum Transmit MSDU Lifetime. |
|
301 * @since S60 v3.2 |
|
302 * @return The Maximum Transmit MSDU Lifetime of the traffic stream. |
|
303 */ |
|
304 u32_t max_tx_msdu_lifetime() const; |
|
305 |
|
306 /** |
|
307 * Assignment operator. |
|
308 */ |
|
309 core_traffic_stream_c& operator=( |
|
310 const core_traffic_stream_c& src ); |
|
311 |
|
312 private: // data |
|
313 |
|
314 /** |
|
315 * The TID of the traffic stream. |
|
316 */ |
|
317 u8_t tid_m; |
|
318 |
|
319 /** |
|
320 * The User Priority of the traffic stream. |
|
321 */ |
|
322 u8_t user_priority_m; |
|
323 |
|
324 /** |
|
325 * The default traffic stream parameters. |
|
326 */ |
|
327 core_traffic_stream_params_s default_params_m; |
|
328 |
|
329 /** |
|
330 * The current traffic stream parameters. |
|
331 */ |
|
332 core_traffic_stream_params_s params_m; |
|
333 |
|
334 /** |
|
335 * The previous traffic stream parameters. |
|
336 */ |
|
337 core_traffic_stream_params_s previous_params_m; |
|
338 |
|
339 /** |
|
340 * The current status of the traffic stream. |
|
341 */ |
|
342 core_traffic_stream_status_e status_m; |
|
343 |
|
344 /** |
|
345 * The current amount of virtual traffic streams |
|
346 * referencing this traffic stream. |
|
347 */ |
|
348 u8_t reference_count_m; |
|
349 |
|
350 }; |
|
351 |
|
352 #endif // CORE_TRAFFIC_STREAM_H |