|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // PDP QoS Parameter Mapping functionality here. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include "PDPParamMapper.h" |
|
24 |
|
25 using namespace ESock; |
|
26 const TInt KQoSMappingBorderDelay = 250; |
|
27 |
|
28 #define IN_RANGE_INCLUSIVE(value, left, right) (value >= left && value <= right ) |
|
29 #define IN_RANGE_NOT_INCLUSIVE(value, left, right) (value > left && value < right ) |
|
30 #define MIN(left, right) (left < right ? left : right) |
|
31 |
|
32 TBool MPDPParamMapper::QoSRequested(const RCFParameterFamilyBundleC& aBundle) |
|
33 { |
|
34 RParameterFamily family=aBundle.FindFamily(KSubConQoSFamily); |
|
35 if ( ! family.IsNull()) |
|
36 { |
|
37 if (family.FindParameterSet(STypeId::CreateSTypeId(CSubConQosGenericParamSet::EUid,CSubConQosGenericParamSet::EType), RParameterFamily::ERequested) || |
|
38 family.FindParameterSet(STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR5ParamsType), RParameterFamily::ERequested) || |
|
39 family.FindParameterSet(STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid, KSubConQosR99ParamsType), RParameterFamily::ERequested)) |
|
40 { |
|
41 return ETrue; |
|
42 } |
|
43 } |
|
44 |
|
45 return EFalse; |
|
46 } |
|
47 |
|
48 MPDPParamMapper::TQosParameterRelease |
|
49 MPDPParamMapper::MapQosParamBundleToEtelL(const ESock::RCFParameterFamilyBundleC& aIn, |
|
50 RPacketQoS::TQoSR5Requested& aOut) |
|
51 { |
|
52 //Note: There should probably be const and non-const versions of FindFamily. |
|
53 //There is only non-const, hence casting below. |
|
54 RParameterFamily family = aIn.FindFamily(KSubConQoSFamily); |
|
55 if ( family.IsNull() ) |
|
56 { |
|
57 User::Leave(KErrArgument); |
|
58 } |
|
59 |
|
60 |
|
61 // check the UMTS R5 extension first |
|
62 CSubConQosR5ParamSet* extRequestedR5 = NULL; |
|
63 CSubConQosR5ParamSet* extAcceptableR5 = NULL; |
|
64 |
|
65 extRequestedR5 = static_cast<CSubConQosR5ParamSet*>(family.FindParameterSet( |
|
66 STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), RParameterFamily::ERequested)); |
|
67 |
|
68 extAcceptableR5 = static_cast<CSubConQosR5ParamSet*>(family.FindParameterSet( |
|
69 STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR5ParamsType), RParameterFamily::EAcceptable)); |
|
70 |
|
71 if (extRequestedR5) |
|
72 { |
|
73 MapQosR5ExtensionSetToEtel (*extRequestedR5, extAcceptableR5, aOut); |
|
74 return KParameterRel5; |
|
75 } |
|
76 |
|
77 // No R5 so check the UMTS R99/R4 extension next |
|
78 CSubConQosR99ParamSet* extRequestedR99 = NULL; |
|
79 CSubConQosR99ParamSet* extAcceptableR99 = NULL; |
|
80 extRequestedR99 = static_cast<CSubConQosR99ParamSet*>(family.FindParameterSet( |
|
81 STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), RParameterFamily::ERequested)); |
|
82 |
|
83 extAcceptableR99 = static_cast<CSubConQosR99ParamSet*>(family.FindParameterSet( |
|
84 STypeId::CreateSTypeId(KSubCon3GPPExtParamsFactoryUid,KSubConQosR99ParamsType), RParameterFamily::EAcceptable)); |
|
85 |
|
86 if (extRequestedR99) |
|
87 { |
|
88 MapQosR99ExtensionSetToEtel (*extRequestedR99, extAcceptableR99, aOut); |
|
89 return KParameterRel4Rel99; |
|
90 } |
|
91 |
|
92 |
|
93 // Still nothing specific, try to use the generic params |
|
94 CSubConQosGenericParamSet* genericRequested = |
|
95 static_cast<CSubConQosGenericParamSet*>(family.FindParameterSet( |
|
96 STypeId::CreateSTypeId(CSubConQosGenericParamSet::EUid,CSubConQosGenericParamSet::EType), |
|
97 RParameterFamily::ERequested)); |
|
98 CSubConQosGenericParamSet* genericAcceptable = |
|
99 static_cast<CSubConQosGenericParamSet*>(family.FindParameterSet( |
|
100 STypeId::CreateSTypeId(CSubConQosGenericParamSet::EUid,CSubConQosGenericParamSet::EType), |
|
101 RParameterFamily::EAcceptable)); |
|
102 |
|
103 if (genericRequested) |
|
104 { |
|
105 MapQosGenericSetToEtel (*genericRequested, genericAcceptable, aOut); |
|
106 return KParameterRelGeneric; |
|
107 } |
|
108 |
|
109 // Nothing left that we support |
|
110 User::Leave(KErrNotSupported); |
|
111 return KParameterRelInvalid; |
|
112 } |
|
113 |
|
114 |
|
115 /** |
|
116 Maps given requested and acceptable sets of R99/R4 parameters as defined CSubConQosR99ParamSet |
|
117 into the Etel format (RPacketQoS::TQoSR99_R4Requested). |
|
118 |
|
119 @param aInRequested requested CSubConQosR99ParamSet to be converted |
|
120 @param aInAcceptable optional acceptable CSubConQosR99ParamSet to be converted |
|
121 @param aOut RPacketQoS::TQoSR99_R4Requested derived class to be mapped into. |
|
122 */ |
|
123 void MPDPParamMapper::MapQosR99ExtensionSetToEtel( |
|
124 const CSubConQosR99ParamSet& aInRequested, |
|
125 const CSubConQosR99ParamSet* aInAcceptable, |
|
126 RPacketQoS::TQoSR99_R4Requested& aOut) |
|
127 { |
|
128 aOut.iReqTrafficClass = aInRequested.GetTrafficClass(); |
|
129 aOut.iReqDeliveryOrderReqd = aInRequested.GetDeliveryOrder(); |
|
130 aOut.iReqDeliverErroneousSDU = aInRequested.GetErroneousSDUDelivery(); |
|
131 aOut.iReqBER = aInRequested.GetResidualBitErrorRatio(); |
|
132 aOut.iReqSDUErrorRatio = aInRequested.GetSDUErrorRatio(); |
|
133 aOut.iReqTrafficHandlingPriority = aInRequested.GetTrafficHandlingPriority(); |
|
134 aOut.iReqTransferDelay = aInRequested.GetTransferDelay(); |
|
135 aOut.iReqMaxSDUSize = aInRequested.GetMaxSduSize(); |
|
136 aOut.iReqMaxRate.iUplinkRate = aInRequested.GetMaxBitrateUplink(); |
|
137 aOut.iReqMaxRate.iDownlinkRate = aInRequested.GetMaxBitrateDownlink(); |
|
138 aOut.iReqGuaranteedRate.iUplinkRate = aInRequested.GetGuaBitrateUplink(); |
|
139 aOut.iReqGuaranteedRate.iDownlinkRate = aInRequested.GetGuaBitrateDownlink(); |
|
140 |
|
141 if (!aInAcceptable) |
|
142 { |
|
143 // when aInAcceptable is ommitted the minimum is the requested |
|
144 aInAcceptable = &aInRequested; |
|
145 } |
|
146 |
|
147 aOut.iMinTrafficClass = aInAcceptable->GetTrafficClass(); |
|
148 aOut.iMinDeliveryOrderReqd = aInAcceptable->GetDeliveryOrder(); |
|
149 aOut.iMinDeliverErroneousSDU = aInAcceptable->GetErroneousSDUDelivery(); |
|
150 aOut.iMaxBER = aInAcceptable->GetResidualBitErrorRatio(); |
|
151 aOut.iMaxSDUErrorRatio = aInAcceptable->GetSDUErrorRatio(); |
|
152 aOut.iMinTrafficHandlingPriority = aInAcceptable->GetTrafficHandlingPriority(); |
|
153 aOut.iMaxTransferDelay = aInAcceptable->GetTransferDelay(); |
|
154 aOut.iMinAcceptableMaxSDUSize = aInAcceptable->GetMaxSduSize(); |
|
155 aOut.iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetMaxBitrateUplink(); |
|
156 aOut.iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetMaxBitrateDownlink(); |
|
157 aOut.iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetGuaBitrateUplink(); |
|
158 aOut.iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetGuaBitrateDownlink(); |
|
159 } |
|
160 |
|
161 |
|
162 /** |
|
163 Maps given requested and acceptable sets of R5 parameters as defined CSubConQosR5ParamSet |
|
164 into the Etel format (RPacketQoS::TQoSR5Requested). |
|
165 |
|
166 |
|
167 @param aInRequested requested CSubConQosR5ParamSet to be converted |
|
168 @param aInAcceptable optional acceptable CSubConQosR5ParamSet to be converted |
|
169 @param aOut RPacketQoS::TQoSR5Requested derived class to be mapped into. |
|
170 */ |
|
171 void MPDPParamMapper::MapQosR5ExtensionSetToEtel( |
|
172 const CSubConQosR5ParamSet& aInRequested, |
|
173 const CSubConQosR5ParamSet* aInAcceptable, |
|
174 RPacketQoS::TQoSR5Requested& aOut) |
|
175 { |
|
176 MapQosR99ExtensionSetToEtel(aInRequested,aInAcceptable,aOut); |
|
177 aOut.iSourceStatisticsDescriptor = aInRequested.GetSourceStatisticsDescriptor(); |
|
178 aOut.iSignallingIndication = aInRequested.GetSignallingIndicator(); |
|
179 } |
|
180 |
|
181 |
|
182 |
|
183 /** |
|
184 Given a set of generic parameters, the method derives the R99 value for the traffic class. |
|
185 |
|
186 |
|
187 @param aIn requested CSubConQosGenericParamSet to be converted |
|
188 @return the value of RPacketQoS::TTrafficClass |
|
189 */ |
|
190 RPacketQoS::TTrafficClass MPDPParamMapper::DeriveTrafficClass(const CSubConQosGenericParamSet& aIn ) |
|
191 {/* |
|
192 if ((aIn.GetUpLinkDelay() < 250 && aIn.GetUpLinkDelay() > 0) || |
|
193 (aIn.GetDownLinkDelay() < 250 && aIn.GetDownLinkDelay() > 0)) |
|
194 return RPacketQoS::ETrafficClassConversational; |
|
195 else if (aIn.GetUpLinkDelay() >= 250 || aIn.GetDownLinkDelay() >= 250) |
|
196 return RPacketQoS::ETrafficClassStreaming; |
|
197 else if ((aIn.GetUpLinkPriority() >= 0 && aIn.GetUpLinkPriority() <= 2) || |
|
198 (aIn.GetDownLinkPriority() >= 0 && aIn.GetDownLinkPriority() <= 2)) |
|
199 return RPacketQoS::ETrafficClassInteractive; |
|
200 else |
|
201 return RPacketQoS::ETrafficClassBackground; |
|
202 */ |
|
203 //----------------------------------- |
|
204 // Traffic class |
|
205 //----------------------------------- |
|
206 if (IN_RANGE_NOT_INCLUSIVE(aIn.GetUpLinkDelay(), 0, KQoSMappingBorderDelay) || |
|
207 IN_RANGE_NOT_INCLUSIVE(aIn.GetDownLinkDelay(), 0, KQoSMappingBorderDelay) ) |
|
208 { |
|
209 return RPacketQoS::ETrafficClassConversational; |
|
210 } |
|
211 else if (aIn.GetUpLinkDelay() >= KQoSMappingBorderDelay || |
|
212 aIn.GetDownLinkDelay() >= KQoSMappingBorderDelay ) |
|
213 { |
|
214 return RPacketQoS::ETrafficClassStreaming; |
|
215 } |
|
216 else if (IN_RANGE_INCLUSIVE(aIn.GetUpLinkPriority(), 0, 2) || |
|
217 IN_RANGE_INCLUSIVE(aIn.GetDownLinkPriority(), 0, 2)) |
|
218 { |
|
219 return RPacketQoS::ETrafficClassInteractive; |
|
220 } |
|
221 |
|
222 return RPacketQoS::ETrafficClassBackground; |
|
223 } |
|
224 |
|
225 |
|
226 /** |
|
227 Given a set of generic parameters, the method derives the R99 value for the traffic priority. |
|
228 |
|
229 |
|
230 @param aIn requested CSubConQosGenericParamSet to be converted |
|
231 @return the value of RPacketQoS::TTrafficHandlingPriority |
|
232 */ |
|
233 RPacketQoS::TTrafficHandlingPriority MPDPParamMapper::DeriveTrafficPriority(const CSubConQosGenericParamSet& aIn, TUint aTrafficClass) |
|
234 { |
|
235 // |
|
236 // Traffic handling priority |
|
237 // |
|
238 if (aTrafficClass == RPacketQoS::ETrafficClassInteractive) |
|
239 { |
|
240 if (aIn.GetUpLinkPriority() == 1 || aIn.GetDownLinkPriority() == 1) |
|
241 { |
|
242 return RPacketQoS::ETrafficPriority1; |
|
243 } |
|
244 else if (aIn.GetUpLinkPriority() == 2 || aIn.GetDownLinkPriority() == 2) |
|
245 { |
|
246 return RPacketQoS::ETrafficPriority2; |
|
247 } |
|
248 |
|
249 return RPacketQoS::ETrafficPriority3; |
|
250 } |
|
251 |
|
252 return RPacketQoS::ETrafficPriorityUnspecified; |
|
253 } |
|
254 |
|
255 |
|
256 /** |
|
257 Maps given requested and acceptable sets of generic QoS parameters as defined CSubConQosGenericParamSet |
|
258 into the Etel format (RPacketQoS::TQoSR99_R4Requested). |
|
259 |
|
260 |
|
261 @param aInRequested requested CSubConQosGenericParamSet to be converted |
|
262 @param aInAcceptable optional acceptable CSubConQosGenericParamSet to be converted |
|
263 @param aOut RPacketQoS::TQoSR99_R4Requested to be produced. |
|
264 */ |
|
265 void MPDPParamMapper::MapQosGenericSetToEtel( |
|
266 const CSubConQosGenericParamSet& aInRequested, |
|
267 const CSubConQosGenericParamSet* aInAcceptable, |
|
268 RPacketQoS::TQoSR99_R4Requested& aOut) |
|
269 { |
|
270 aOut.iReqDeliveryOrderReqd = RPacketQoS::EDeliveryOrderUnspecified; |
|
271 aOut.iReqDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired;; |
|
272 aOut.iReqBER = RPacketQoS::EBERUnspecified; |
|
273 aOut.iReqSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified; |
|
274 |
|
275 aOut.iReqTrafficClass = DeriveTrafficClass(aInRequested); |
|
276 aOut.iReqTrafficHandlingPriority = DeriveTrafficPriority(aInRequested, aOut.iReqTrafficClass); |
|
277 aOut.iReqTransferDelay = MIN(aInRequested.GetUpLinkDelay(), aInRequested.GetDownLinkDelay()); |
|
278 aOut.iReqMaxSDUSize = aInRequested.GetUpLinkMaximumPacketSize(); |
|
279 aOut.iReqMaxRate.iUplinkRate = aInRequested.GetUplinkBandwidth(); |
|
280 aOut.iReqMaxRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth(); |
|
281 aOut.iReqGuaranteedRate.iUplinkRate = aInRequested.GetUplinkBandwidth(); |
|
282 aOut.iReqGuaranteedRate.iDownlinkRate = aInRequested.GetDownlinkBandwidth(); |
|
283 |
|
284 if (!aInAcceptable) |
|
285 { |
|
286 // when aInAcceptable is ommitted the minimum is the requested |
|
287 aInAcceptable = &aInRequested; |
|
288 } |
|
289 |
|
290 aOut.iMinDeliveryOrderReqd = RPacketQoS::EDeliveryOrderUnspecified; |
|
291 aOut.iMinDeliverErroneousSDU = RPacketQoS::EErroneousSDUDeliveryNotRequired; |
|
292 aOut.iMaxBER = RPacketQoS::EBERUnspecified; |
|
293 aOut.iMaxSDUErrorRatio = RPacketQoS::ESDUErrorRatioUnspecified; |
|
294 |
|
295 aOut.iMinTrafficClass = DeriveTrafficClass(*aInAcceptable); |
|
296 aOut.iMinTrafficHandlingPriority = DeriveTrafficPriority(*aInAcceptable, aOut.iMinTrafficClass); |
|
297 aOut.iMaxTransferDelay = MIN(aInAcceptable->GetUpLinkDelay(), aInAcceptable->GetDownLinkDelay()); |
|
298 aOut.iMinAcceptableMaxSDUSize = aInAcceptable->GetUpLinkMaximumPacketSize(); |
|
299 aOut.iMinAcceptableMaxRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth(); |
|
300 aOut.iMinAcceptableMaxRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth(); |
|
301 aOut.iMinGuaranteedRate.iUplinkRate = aInAcceptable->GetUplinkBandwidth(); |
|
302 aOut.iMinGuaranteedRate.iDownlinkRate = aInAcceptable->GetDownlinkBandwidth(); |
|
303 } |
|
304 |
|
305 /** |
|
306 Maps QoS parameters received from the network via Etel into a CSubConGenEventParamsGranted class |
|
307 so that it is usable by the RSubConnection API. |
|
308 |
|
309 @param aNetworkQoS - A pointer to an Etel TPacketDataConfigBase class containing the |
|
310 QoS to be mapped into the QoS event. |
|
311 @param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the mapped |
|
312 QoS parameters. |
|
313 */ |
|
314 void MPDPParamMapper::MapQosEtelToGrantedParamsL(TPacketDataConfigBase* aNetworkQoS, |
|
315 CSubConGenEventParamsGranted& aGranted, |
|
316 TQosParameterRelease aRequestedRelease) |
|
317 { |
|
318 ASSERT (aNetworkQoS); |
|
319 |
|
320 // Always set the generic set |
|
321 MapQosEtelToGenericSetL((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted); |
|
322 |
|
323 switch (aRequestedRelease) |
|
324 { |
|
325 case KParameterRel5: |
|
326 // Control client sent us an R5 qos request |
|
327 MapQosEtelToR5SetL((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted); |
|
328 break; |
|
329 case KParameterRelInvalid: |
|
330 // This will be the case if the client hasn't actually requested a level of QoS yet |
|
331 // but the network has notified us of a QoS change. We don't know what the client might |
|
332 // support so return both sets (if the define is set, else just what the code supports) |
|
333 MapQosEtelToR5SetL((static_cast<RPacketQoS::TQoSR5Negotiated*>(aNetworkQoS)), aGranted); |
|
334 MapQosEtelToR99SetL((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted); |
|
335 break; |
|
336 |
|
337 case KParameterRel4Rel99: |
|
338 // Control client sent us an R4/R99 qos request |
|
339 MapQosEtelToR99SetL((static_cast<RPacketQoS::TQoSR99_R4Negotiated*>(aNetworkQoS)), aGranted); |
|
340 break; |
|
341 |
|
342 case KParameterRelGeneric: |
|
343 // Generic set always returned. Done above. |
|
344 break; |
|
345 } |
|
346 } |
|
347 |
|
348 /** |
|
349 Maps QoS parameters received from the network via Etel into a generic set and sets it in the given event. |
|
350 |
|
351 @param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing the QoS |
|
352 to be mapped. |
|
353 @param aFamily - A reference to the CSubConGenEventParamsGranted object that should receive the |
|
354 generic QoS parameters. |
|
355 */ |
|
356 void MPDPParamMapper::MapQosEtelToGenericSetL(RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS, |
|
357 CSubConGenEventParamsGranted& aGranted) |
|
358 { |
|
359 ASSERT (aNetworkQoS); |
|
360 |
|
361 CSubConQosGenericParamSet* genericQoS = CSubConQosGenericParamSet::NewL (); |
|
362 |
|
363 genericQoS->SetDownlinkBandwidth (aNetworkQoS->iGuaranteedRate.iDownlinkRate); |
|
364 genericQoS->SetUplinkBandwidth (aNetworkQoS->iGuaranteedRate.iUplinkRate); |
|
365 genericQoS->SetDownLinkDelay (aNetworkQoS->iTransferDelay); |
|
366 genericQoS->SetUpLinkDelay (aNetworkQoS->iTransferDelay); |
|
367 genericQoS->SetDownLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize); |
|
368 genericQoS->SetUpLinkMaximumPacketSize (aNetworkQoS->iMaxSDUSize); |
|
369 |
|
370 switch (aNetworkQoS->iTrafficHandlingPriority) |
|
371 { |
|
372 case RPacketQoS::ETrafficPriority1: |
|
373 genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority1); |
|
374 genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority1); |
|
375 break; |
|
376 |
|
377 case RPacketQoS::ETrafficPriority2: |
|
378 genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority2); |
|
379 genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority2); |
|
380 break; |
|
381 |
|
382 case RPacketQoS::ETrafficPriority3: |
|
383 genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriority3); |
|
384 genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriority3); |
|
385 break; |
|
386 |
|
387 default: |
|
388 genericQoS->SetDownLinkPriority (RPacketQoS::ETrafficPriorityUnspecified); |
|
389 genericQoS->SetUpLinkPriority (RPacketQoS::ETrafficPriorityUnspecified); |
|
390 break; |
|
391 } |
|
392 |
|
393 aGranted.SetGenericSet (genericQoS); |
|
394 } |
|
395 |
|
396 /** |
|
397 Maps QoS parameters received from the network via Etel into a 3GPP Release R4/R99 set and |
|
398 sets it in the given event. |
|
399 |
|
400 @param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR99_R4Requested derived class containing |
|
401 the QoS to be mapped. |
|
402 @param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the |
|
403 extension QoS parameters. |
|
404 */ |
|
405 void MPDPParamMapper::MapQosEtelToR99SetL(RPacketQoS::TQoSR99_R4Negotiated* aNetworkQoS, |
|
406 CSubConGenEventParamsGranted& aGranted) |
|
407 { |
|
408 ASSERT (aNetworkQoS); |
|
409 |
|
410 CSubConQosR99ParamSet* r99Extension = CSubConQosR99ParamSet::NewL (); |
|
411 CleanupStack::PushL(r99Extension); |
|
412 r99Extension->SetTrafficClass(aNetworkQoS->iTrafficClass); |
|
413 r99Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd); |
|
414 r99Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU); |
|
415 r99Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER); |
|
416 r99Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio); |
|
417 r99Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority); |
|
418 r99Extension->SetTransferDelay(aNetworkQoS->iTransferDelay); |
|
419 r99Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize); |
|
420 r99Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate); |
|
421 r99Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate); |
|
422 r99Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate); |
|
423 r99Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate); |
|
424 |
|
425 aGranted.AddExtensionSetL (r99Extension); |
|
426 CleanupStack::Pop(r99Extension); |
|
427 } |
|
428 |
|
429 /** |
|
430 Maps QoS parameters received from the network via Etel into a 3GPP Release R5 set and |
|
431 sets it in the given event. |
|
432 |
|
433 @param aNetworkQoS - A pointer to an Etel RPacketQoS::TQoSR5Requested derived class containing |
|
434 the QoS to be mapped. |
|
435 @param aGranted - A reference to the CSubConGenEventParamsGranted object that should receive the |
|
436 extension QoS parameters. |
|
437 */ |
|
438 void MPDPParamMapper::MapQosEtelToR5SetL(RPacketQoS::TQoSR5Negotiated* aNetworkQoS, |
|
439 CSubConGenEventParamsGranted& aGranted) |
|
440 { |
|
441 ASSERT (aNetworkQoS); |
|
442 |
|
443 CSubConQosR5ParamSet* r5Extension = CSubConQosR5ParamSet::NewL (); |
|
444 CleanupStack::PushL(r5Extension); |
|
445 r5Extension->SetTrafficClass(aNetworkQoS->iTrafficClass); |
|
446 r5Extension->SetDeliveryOrder(aNetworkQoS->iDeliveryOrderReqd); |
|
447 r5Extension->SetErroneousSDUDelivery(aNetworkQoS->iDeliverErroneousSDU); |
|
448 r5Extension->SetResidualBitErrorRatio(aNetworkQoS->iBER); |
|
449 r5Extension->SetSDUErrorRatio(aNetworkQoS->iSDUErrorRatio); |
|
450 r5Extension->SetTrafficHandlingPriority(aNetworkQoS->iTrafficHandlingPriority); |
|
451 r5Extension->SetTransferDelay(aNetworkQoS->iTransferDelay); |
|
452 r5Extension->SetMaxSduSize(aNetworkQoS->iMaxSDUSize); |
|
453 r5Extension->SetMaxBitrateUplink(aNetworkQoS->iMaxRate.iUplinkRate); |
|
454 r5Extension->SetMaxBitrateDownlink(aNetworkQoS->iMaxRate.iDownlinkRate); |
|
455 r5Extension->SetGuaBitrateUplink(aNetworkQoS->iGuaranteedRate.iUplinkRate); |
|
456 r5Extension->SetGuaBitrateDownlink(aNetworkQoS->iGuaranteedRate.iDownlinkRate); |
|
457 |
|
458 r5Extension->SetSourceStatisticsDescriptor(aNetworkQoS->iSourceStatisticsDescriptor); |
|
459 r5Extension->SetSignallingIndicator(aNetworkQoS->iSignallingIndication); |
|
460 |
|
461 aGranted.AddExtensionSetL (r5Extension); |
|
462 CleanupStack::Pop(r5Extension); |
|
463 } |
|
464 |