|
1 /* |
|
2 * Copyright (c) 2008-2009 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 "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: Parameter storage for a virtual traffic stream. |
|
15 * |
|
16 */ |
|
17 |
|
18 /* |
|
19 * %version: 1 % |
|
20 */ |
|
21 |
|
22 #ifndef WLANTRAFFICSTREAMPARAMETERS_H |
|
23 #define WLANTRAFFICSTREAMPARAMETERS_H |
|
24 |
|
25 #include <wlanmgmtcommon.h> |
|
26 |
|
27 /** |
|
28 * Parameter storage for a virtual traffic stream. |
|
29 * |
|
30 * This class is used to store the parameters of a virtual traffic stream. |
|
31 * When instantiated, it sets all the parameters to the default values so |
|
32 * the client application only needs to set the parameters it specifically |
|
33 * wants to alter. |
|
34 * |
|
35 * Any parameter left to its default value means that the WLAN subsystem |
|
36 * is free to select a suitable value. |
|
37 */ |
|
38 NONSHARABLE_CLASS( TWlanTrafficStreamParameters ) |
|
39 { |
|
40 |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Bit definitions for parameters. |
|
45 */ |
|
46 enum TWlanParameter |
|
47 { |
|
48 EWlanParameterNone = 0x00000000, |
|
49 EWlanParameterType = 0x00000001, |
|
50 EWlanParameterId = 0x00000002, |
|
51 EWlanParameterDirection = 0x00000004, |
|
52 EWlanParameterNominalMsduSize = 0x00000008, |
|
53 EWlanParameterMaximumMsduSize = 0x00000010, |
|
54 EWlanParameterMinimumServiceInterval = 0x00000020, |
|
55 EWlanParameterMaximumServiceInterval = 0x00000040, |
|
56 EWlanParameterInactivityInterval = 0x00000080, |
|
57 EWlanParameterSuspensionInterval = 0x00000100, |
|
58 EWlanParameterServiceStartTime = 0x00000200, |
|
59 EWlanParameterMinimumDataRate = 0x00000400, |
|
60 EWlanParameterMeanDataRate = 0x00000800, |
|
61 EWlanParameterPeakDataRate = 0x00001000, |
|
62 EWlanParameterMaximumBurstSize = 0x00002000, |
|
63 EWlanParameterDelayBound = 0x00004000, |
|
64 EWlanParameterMinimumPhyRate = 0x00008000, |
|
65 EWlanParameterNominalPhyRate = 0x00010000, |
|
66 EWlanParameterSba = 0x00020000, |
|
67 EWlanParameterIsRetryAllowed = 0x00040000 |
|
68 }; |
|
69 |
|
70 /** |
|
71 * Constructor. |
|
72 * |
|
73 * @param aUserPriority User Priority (0 - 7) admission is requested for. |
|
74 */ |
|
75 inline TWlanTrafficStreamParameters( |
|
76 TUint8 aUserPriority ); |
|
77 |
|
78 /** |
|
79 * Set the traffic pattern used. |
|
80 * |
|
81 * @param aType Traffic pattern used. |
|
82 */ |
|
83 inline void SetTrafficType( |
|
84 TWlanTrafficStreamTrafficType aType ); |
|
85 |
|
86 /** |
|
87 * Set the traffic stream ID used. |
|
88 * |
|
89 * @param aId Traffic Stream ID (0 - 7). |
|
90 */ |
|
91 inline void SetId( |
|
92 TUint8 aId ); |
|
93 |
|
94 /** |
|
95 * Set the traffic stream direction used. |
|
96 * |
|
97 * @param aDirection Traffic stream direction. |
|
98 */ |
|
99 inline void SetDirection( |
|
100 TWlanTrafficStreamDirection aDirection ); |
|
101 |
|
102 /** |
|
103 * Set the nominal MSDU size used. |
|
104 * |
|
105 * @param aMsduSize The nominal size of packets in bytes (0 - 0x7FFF). |
|
106 * @param aIsMsduSizeFixed Whether the size of packets is fixed. |
|
107 */ |
|
108 inline void SetNominalMsduSize( |
|
109 TUint16 aMsduSize, |
|
110 TBool aIsMsduSizeFixed ); |
|
111 |
|
112 /** |
|
113 * Set the maximum MSDU size used. |
|
114 * |
|
115 * @param aMsduSize The maximum size of packets in bytes (0 - 0xFFFF). |
|
116 */ |
|
117 inline void SetMaximumMsduSize( |
|
118 TUint16 aMsduSize ); |
|
119 |
|
120 /** |
|
121 * Set the minimum service interval used. |
|
122 * |
|
123 * @param aServiceInterval The minimum interval between packets in microseconds. |
|
124 */ |
|
125 inline void SetMinimumServiceInterval( |
|
126 TUint32 aServiceInterval ); |
|
127 |
|
128 /** |
|
129 * Set the maximum service interval used. |
|
130 * |
|
131 * @param aServiceInterval The maximum interval between packets in microseconds. |
|
132 */ |
|
133 inline void SetMaximumServiceInterval( |
|
134 TUint32 aServiceInterval ); |
|
135 |
|
136 /** |
|
137 * Set the inactivity interval used. |
|
138 * |
|
139 * @param aInactivityInterval The minimum amount of microseconds that may elapse |
|
140 * without arrival or transfer of packets belonging |
|
141 * to this traffic stream before the traffic stream |
|
142 * is deleted. |
|
143 */ |
|
144 inline void SetInactivityInterval( |
|
145 TUint32 aInactivityInterval ); |
|
146 |
|
147 /** |
|
148 * Set the suspension interval used. |
|
149 * |
|
150 * @param aSuspensionInterval The minimum amount of microseconds that may elapse |
|
151 * without arrival or transfer of packets belonging |
|
152 * to this traffic stream before polling for the |
|
153 * traffic stream is stopped. |
|
154 */ |
|
155 inline void SetSuspensionInterval( |
|
156 TUint32 aSuspensionInterval ); |
|
157 |
|
158 /** |
|
159 * Set the service start time used. |
|
160 * |
|
161 * @param aServiceStartTime The time in microseconds when the service period starts. |
|
162 */ |
|
163 inline void SetServiceStartTime( |
|
164 TUint32 aServiceStartTime ); |
|
165 |
|
166 /** |
|
167 * Set the minimum data rate used. |
|
168 * |
|
169 * @param aRate The lowest data rate in bits per second used for packets |
|
170 * belonging to this traffic stream. |
|
171 */ |
|
172 inline void SetMinimumDataRate( |
|
173 TUint32 aRate ); |
|
174 |
|
175 /** |
|
176 * Set the average data rate used. |
|
177 * |
|
178 * @param aRate The average data rate in bits per second used for packets |
|
179 * belonging to this traffic stream. |
|
180 */ |
|
181 inline void SetMeanDataRate( |
|
182 TUint32 aRate ); |
|
183 |
|
184 /** |
|
185 * Set the maximum data rate used. |
|
186 * |
|
187 * @param aRate The maximum data rate in bits per second used for packets |
|
188 * belonging to this traffic stream. |
|
189 */ |
|
190 inline void SetPeakDataRate( |
|
191 TUint32 aRate ); |
|
192 |
|
193 /** |
|
194 * Set the maximum burst size used. |
|
195 * |
|
196 * @param aBurstSize The maximum burst in bytes that can arrive or be transmitted at |
|
197 * the peak data rate. |
|
198 */ |
|
199 inline void SetMaximumBurstSize( |
|
200 TUint32 aBurstSize ); |
|
201 |
|
202 /** |
|
203 * Set the maximum transport delay used. |
|
204 * |
|
205 * @param aDelay The maximum amount of microseconds allowed to transport |
|
206 * a packet belonging to this traffic stream. |
|
207 */ |
|
208 inline void SetDelayBound( |
|
209 TUint32 aDelay ); |
|
210 |
|
211 /** |
|
212 * Set the minimum WLAN data rate used. |
|
213 * |
|
214 * @param aRate The minimum WLAN data rate in bits per second used for |
|
215 * this traffic stream. |
|
216 */ |
|
217 inline void SetMinimumPhyRate( |
|
218 TWlanRate aRate ); |
|
219 |
|
220 /** |
|
221 * Set the nominal WLAN data rate used. |
|
222 * |
|
223 * @param aRate The nominal WLAN data rate in bits per second used for |
|
224 * this traffic stream. |
|
225 */ |
|
226 inline void SetNominalPhyRate( |
|
227 TWlanRate aRate ); |
|
228 |
|
229 /** |
|
230 * Set the SBA ratio used. |
|
231 * |
|
232 * @param aRatio The excess ratio of actual over-the-air bandwidth to |
|
233 * ideal bandwidth used for transporting packets belonging |
|
234 * to this traffic stream. |
|
235 */ |
|
236 inline void SetSba( |
|
237 TUint16 aRatio ); |
|
238 |
|
239 /** |
|
240 * Set the whether re-creation of traffic streams is allowed. |
|
241 * |
|
242 * @param aIsAllowed Whether re-creation of traffic streams that have been |
|
243 * deleted or refused by the current WLAN access point |
|
244 * can be automatically retried. |
|
245 */ |
|
246 inline void SetAutomaticRetry( |
|
247 TBool aIsAllowed ); |
|
248 |
|
249 public: // data |
|
250 |
|
251 /** |
|
252 * Bitmap of parameters that have been set. |
|
253 */ |
|
254 TUint32 iParameterBitmap; |
|
255 |
|
256 /** |
|
257 * Traffic pattern used. |
|
258 */ |
|
259 TWlanTrafficStreamTrafficType iType; |
|
260 /** |
|
261 * Traffic stream ID used. |
|
262 */ |
|
263 TUint8 iId; |
|
264 /** |
|
265 * Traffic stream direction used. |
|
266 */ |
|
267 TWlanTrafficStreamDirection iDirection; |
|
268 /** |
|
269 * User Priority used. |
|
270 */ |
|
271 TUint8 iUserPriority; |
|
272 /** |
|
273 * Nominal MSDU size used. |
|
274 */ |
|
275 TUint16 iNominalMsduSize; |
|
276 /** |
|
277 * Whether the size of packets is fixed. |
|
278 */ |
|
279 TBool iIsMsduSizeFixed; |
|
280 /** |
|
281 * Maximum MSDU size used. |
|
282 */ |
|
283 TUint16 iMaximumMsduSize; |
|
284 /** |
|
285 * Minimum service interval used. |
|
286 */ |
|
287 TUint32 iMinimumServiceInterval; |
|
288 /** |
|
289 * Maximum service interval used. |
|
290 */ |
|
291 TUint32 iMaximumServiceInterval; |
|
292 /** |
|
293 * Inactivity interval used. |
|
294 */ |
|
295 TUint32 iInactivityInterval; |
|
296 /** |
|
297 * Suspension interval used. |
|
298 */ |
|
299 TUint32 iSuspensionInterval; |
|
300 /** |
|
301 * Service start time used. |
|
302 */ |
|
303 TUint32 iServiceStartTime; |
|
304 /** |
|
305 * Minimum data rate used. |
|
306 */ |
|
307 TUint32 iMinimumDataRate; |
|
308 /** |
|
309 * Average data rate used. |
|
310 */ |
|
311 TUint32 iMeanDataRate; |
|
312 /** |
|
313 * Maximum data rate used. |
|
314 */ |
|
315 TUint32 iPeakDataRate; |
|
316 /** |
|
317 * Maximum burst size used. |
|
318 */ |
|
319 TUint32 iMaximumBurstSize; |
|
320 /** |
|
321 * Maximum transport delay used. |
|
322 */ |
|
323 TUint32 iDelayBound; |
|
324 /** |
|
325 * Minimum WLAN data rate used. |
|
326 */ |
|
327 TWlanRate iMinimumPhyRate; |
|
328 /** |
|
329 * Nominal WLAN data rate used. |
|
330 */ |
|
331 TWlanRate iNominalPhyRate; |
|
332 /** |
|
333 * SBA ratio used. |
|
334 */ |
|
335 TUint16 iSba; |
|
336 /** |
|
337 * Whether re-creation of traffic streams is allowed. |
|
338 */ |
|
339 TBool iIsAutomaticRetryAllowed; |
|
340 }; |
|
341 |
|
342 #include "wlantrafficstreamparameters.inl" |
|
343 |
|
344 #endif // WLANTRAFFICSTREAMPARAMETERS_H |