24
|
1 |
// Copyright (c) 2002-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 |
// EtelPacketTest3G_3.cpp
|
|
15 |
// JetStream Packet data tests.
|
|
16 |
// This file tests the 3G (WCDMA) Packet Service Quality of Service (QoS) functionality:
|
|
17 |
// TestCase 3G.3
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
// Symbian OS includes
|
|
22 |
#include <e32base.h>
|
|
23 |
|
|
24 |
#include <etelpckt.h>
|
|
25 |
#include <pcktcs.h>
|
|
26 |
|
|
27 |
#include "Te_EtelPacketTestStepBase.h"
|
|
28 |
#include <es_sock.h>
|
|
29 |
#include <e32svr.h>
|
|
30 |
#include "etelQoS.h"
|
|
31 |
|
|
32 |
|
|
33 |
#include "testdef.h"
|
|
34 |
|
|
35 |
#include "Te_EtelPacketTest3g_3.h"
|
|
36 |
#include "Te_etelpckt_defs.h"
|
|
37 |
|
|
38 |
CEtelPacketTest3G_3::CEtelPacketTest3G_3()
|
|
39 |
/** Constructor
|
|
40 |
* Stores the name of this test case.
|
|
41 |
*/
|
|
42 |
{
|
|
43 |
SetTestStepName(_L("3GPacketQoS"));
|
|
44 |
}
|
|
45 |
|
|
46 |
|
|
47 |
CEtelPacketTest3G_3::~CEtelPacketTest3G_3()
|
|
48 |
/**
|
|
49 |
* Destructor
|
|
50 |
*/
|
|
51 |
{
|
|
52 |
}
|
|
53 |
|
|
54 |
enum TVerdict CEtelPacketTest3G_3::doTestStepL( void )
|
|
55 |
/**
|
|
56 |
* Test step 3G.3 calls the Packet Service QoS methods (RPacketQoS) using the
|
|
57 |
* Release 99/Release 4 QoS structures and classes.
|
|
58 |
*/
|
|
59 |
{
|
|
60 |
RPhone pcktPhone;
|
|
61 |
TInt ret=pcktPhone.Open(iTelServer,DPCKTTSY_PHONE_NAME);
|
|
62 |
CHECKPOINT_EX(ret==KErrNone,CHP_OPEN_PHONE);
|
|
63 |
|
|
64 |
RPacketService wcdmaService;
|
|
65 |
ret=wcdmaService.Open(pcktPhone);
|
|
66 |
CHECKPOINT(ret,KErrNone,CHP_SRVS_CASE("A.3G1"));
|
|
67 |
|
|
68 |
// Open a Primary Context
|
|
69 |
RPacketContext wcdmaContext;
|
|
70 |
TName contextName;
|
|
71 |
ret=wcdmaContext.OpenNewContext(wcdmaService, contextName);
|
|
72 |
CHECKPOINT(ret,KErrNone,CHP_CNTXT_CASE("B.3G1"));
|
|
73 |
|
|
74 |
// Open a Rel99/Rel4 Quality of Service (QoS) profile
|
|
75 |
RPacketQoS r99r4QoS;
|
|
76 |
TName qosName;
|
|
77 |
ret = r99r4QoS.OpenNewQoS(wcdmaContext, qosName);
|
|
78 |
CHECKPOINT(ret,KErrNone,CHP_QOS_CASE("C.3G1"));
|
|
79 |
CHECKPOINT(qosName.Compare(DPCKTTSY_QOS_NAME),KErrNone,CHP_QOS_CASE("C.3G1"));
|
|
80 |
|
|
81 |
RPacketQoS aQos;
|
|
82 |
ret = aQos.OpenExistingQoS(wcdmaContext, qosName);
|
|
83 |
CHECKPOINT(ret,KErrNone,CHP_QOS_CASE("C.3G2"));
|
|
84 |
aQos.Close();
|
|
85 |
|
|
86 |
// Local TRequestStatus variables used in the tests
|
|
87 |
TRequestStatus reqStatus;
|
|
88 |
TRequestStatus notifyStatus;
|
|
89 |
|
|
90 |
// Post a 'Profile Changed' notification.
|
|
91 |
// Note that although the "Traffic handling priority" is set, it is not required for the
|
|
92 |
// "Conversational" Traffic class.
|
|
93 |
RPacketQoS::TQoSR99_R4Negotiated aNotifyQoS;
|
|
94 |
TPckg<RPacketQoS::TQoSR99_R4Negotiated> aNotifyQoSPckg(aNotifyQoS);
|
|
95 |
|
|
96 |
r99r4QoS.NotifyProfileChanged(notifyStatus, aNotifyQoSPckg);
|
|
97 |
User::WaitForRequest(notifyStatus);
|
|
98 |
|
|
99 |
CHECKPOINT(notifyStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G7"));
|
|
100 |
|
|
101 |
CHECKPOINT(aNotifyQoS.ExtensionId(),TPacketDataConfigBase::KConfigRel99Rel4,CHP_QOS_CASE("C.3G7"));
|
|
102 |
|
|
103 |
CHECKPOINT(aNotifyQoS.iTrafficClass, DPCKTTSY_TRAFFIC_CLASS_MIN, CHP_QOS_CASE("C.3G7"));
|
|
104 |
CHECKPOINT(aNotifyQoS.iDeliveryOrderReqd, DPCKTTSY_DELIVERY_ORDER_MIN, CHP_QOS_CASE("C.3G7"));
|
|
105 |
CHECKPOINT(aNotifyQoS.iDeliverErroneousSDU, DPCKTTSY_ERRONEOUS_SDU_DELIVERY_MIN, CHP_QOS_CASE("C.3G7"));
|
|
106 |
CHECKPOINT(aNotifyQoS.iMaxSDUSize, DPCKTTSY_MAX_SDU_SIZE_MIN, CHP_QOS_CASE("C.3G7"));
|
|
107 |
CHECKPOINT(aNotifyQoS.iMaxRate.iUplinkRate, DPCKTTSY_MAX_UPLINK_BITRATE_MIN, CHP_QOS_CASE("C.3G7"));
|
|
108 |
CHECKPOINT(aNotifyQoS.iMaxRate.iDownlinkRate, DPCKTTSY_MAX_DOWNLINK_BITRATE_MIN, CHP_QOS_CASE("C.3G7"));
|
|
109 |
CHECKPOINT(aNotifyQoS.iBER, DPCKTTSY_BER_MAX, CHP_QOS_CASE("C.3G7"));
|
|
110 |
CHECKPOINT(aNotifyQoS.iSDUErrorRatio, DPCKTTSY_SDU_ERROR_RATIO_MAX, CHP_QOS_CASE("C.3G7"));
|
|
111 |
CHECKPOINT(aNotifyQoS.iTrafficHandlingPriority, DPCKTTSY_TRFFC_HNDLG_PRIORITY_MIN, CHP_QOS_CASE("C.3G7"));
|
|
112 |
CHECKPOINT(aNotifyQoS.iTransferDelay, DPCKTTSY_TRANSFER_DELAY_MAX, CHP_QOS_CASE("C.3G7"));
|
|
113 |
CHECKPOINT(aNotifyQoS.iGuaranteedRate.iUplinkRate, DPCKTTSY_GRNT_UPLINK_BITRATE_MIN, CHP_QOS_CASE("C.3G7"));
|
|
114 |
CHECKPOINT(aNotifyQoS.iGuaranteedRate.iDownlinkRate, DPCKTTSY_GRNT_DOWNLINK_BITRATE_MIN, CHP_QOS_CASE("C.3G7"));
|
|
115 |
|
|
116 |
|
|
117 |
// Cancel Request
|
|
118 |
r99r4QoS.NotifyProfileChanged(notifyStatus, aNotifyQoSPckg);
|
|
119 |
r99r4QoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged);
|
|
120 |
User::WaitForRequest(notifyStatus);
|
|
121 |
CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G7"));
|
|
122 |
|
|
123 |
// Get the Rel99/Rel4 QoS Capabilities
|
|
124 |
RPacketQoS::TQoSCapsR99_R4 aQoSCaps;
|
|
125 |
TPckg<RPacketQoS::TQoSCapsR99_R4> aQoSCapsPckg(aQoSCaps);
|
|
126 |
|
|
127 |
r99r4QoS.GetProfileCapabilities(reqStatus, aQoSCapsPckg);
|
|
128 |
User::WaitForRequest(reqStatus);
|
|
129 |
CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G6"));
|
|
130 |
|
|
131 |
CHECKPOINT(aQoSCaps.ExtensionId(),TPacketDataConfigBase::KConfigRel99Rel4,CHP_QOS_CASE("C.3G6"));
|
|
132 |
CHECKPOINT(aQoSCaps.iTrafficClass,DPCKTTSY_TRAFFIC_CLASS,CHP_QOS_CASE("C.3G6"));
|
|
133 |
CHECKPOINT(aQoSCaps.iDeliveryOrderReqd,DPCKTTSY_DELIVERY_ORDER,CHP_QOS_CASE("C.3G6"));
|
|
134 |
CHECKPOINT(aQoSCaps.iDeliverErroneousSDU,DPCKTTSY_ERRONEOUS_SDU_DELIVERY,CHP_QOS_CASE("C.3G6"));
|
|
135 |
CHECKPOINT(aQoSCaps.iBER,DPCKTTSY_BER,CHP_QOS_CASE("C.3G6"));
|
|
136 |
CHECKPOINT(aQoSCaps.iSDUErrorRatio,DPCKTTSY_SDU_ERROR_RATIO,CHP_QOS_CASE("C.3G6"));
|
|
137 |
CHECKPOINT(aQoSCaps.iTrafficHandlingPriority,DPCKTTSY_TRFFC_HNDLG_PRIORITY,CHP_QOS_CASE("C.3G6"));
|
|
138 |
|
|
139 |
// Cancel Request
|
|
140 |
r99r4QoS.GetProfileCapabilities(reqStatus, aQoSCapsPckg);
|
|
141 |
r99r4QoS.CancelAsyncRequest(EPacketQoSGetProfileCaps);
|
|
142 |
User::WaitForRequest(reqStatus);
|
|
143 |
CHECKPOINT(reqStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G6"));
|
|
144 |
|
|
145 |
// Set Rel99/R4 QoS Profile Parameters
|
|
146 |
RPacketQoS::TQoSR99_R4Requested aQoSReqConfig;
|
|
147 |
TPckg<RPacketQoS::TQoSR99_R4Requested> aQoSReqPckg(aQoSReqConfig);
|
|
148 |
|
|
149 |
aQoSReqConfig.iMinTrafficClass = DPCKTTSY_TRAFFIC_CLASS_MIN;
|
|
150 |
aQoSReqConfig.iMinDeliveryOrderReqd = DPCKTTSY_DELIVERY_ORDER_MIN;
|
|
151 |
aQoSReqConfig.iMinDeliverErroneousSDU = DPCKTTSY_ERRONEOUS_SDU_DELIVERY_MIN;
|
|
152 |
aQoSReqConfig.iMinAcceptableMaxSDUSize = DPCKTTSY_MAX_SDU_SIZE_MIN;
|
|
153 |
aQoSReqConfig.iMinAcceptableMaxRate.iUplinkRate = DPCKTTSY_MAX_UPLINK_BITRATE_MIN;
|
|
154 |
aQoSReqConfig.iMinAcceptableMaxRate.iDownlinkRate = DPCKTTSY_MAX_DOWNLINK_BITRATE_MIN;
|
|
155 |
aQoSReqConfig.iMaxBER = DPCKTTSY_BER_MAX;
|
|
156 |
aQoSReqConfig.iMaxSDUErrorRatio = DPCKTTSY_SDU_ERROR_RATIO_MAX;
|
|
157 |
aQoSReqConfig.iMaxTransferDelay = DPCKTTSY_TRANSFER_DELAY_MAX;
|
|
158 |
aQoSReqConfig.iMinGuaranteedRate.iUplinkRate = DPCKTTSY_GRNT_UPLINK_BITRATE_MIN;
|
|
159 |
aQoSReqConfig.iMinGuaranteedRate.iDownlinkRate = DPCKTTSY_GRNT_DOWNLINK_BITRATE_MIN;
|
|
160 |
|
|
161 |
aQoSReqConfig.iReqTrafficClass = DPCKTTSY_TRAFFIC_CLASS_REQ;
|
|
162 |
aQoSReqConfig.iReqDeliveryOrderReqd = DPCKTTSY_DELIVERY_ORDER_REQ;
|
|
163 |
aQoSReqConfig.iReqDeliverErroneousSDU = DPCKTTSY_ERRONEOUS_SDU_DELIVERY_REQ;
|
|
164 |
aQoSReqConfig.iReqMaxSDUSize = DPCKTTSY_MAX_SDU_SIZE_REQ;
|
|
165 |
aQoSReqConfig.iReqMaxRate.iUplinkRate = DPCKTTSY_MAX_UPLINK_BITRATE_REQ;
|
|
166 |
aQoSReqConfig.iReqMaxRate.iDownlinkRate = DPCKTTSY_MAX_DOWNLINK_BITRATE_REQ;
|
|
167 |
aQoSReqConfig.iReqBER = DPCKTTSY_BER_REQ;
|
|
168 |
aQoSReqConfig.iReqSDUErrorRatio = DPCKTTSY_SDU_ERROR_RATIO_REQ;
|
|
169 |
aQoSReqConfig.iReqTransferDelay = DPCKTTSY_TRANSFER_DELAY_REQ;
|
|
170 |
aQoSReqConfig.iReqGuaranteedRate.iUplinkRate = DPCKTTSY_GRNT_UPLINK_BITRATE_REQ;
|
|
171 |
aQoSReqConfig.iReqGuaranteedRate.iDownlinkRate = DPCKTTSY_GRNT_DOWNLINK_BITRATE_REQ;
|
|
172 |
|
|
173 |
r99r4QoS.SetProfileParameters(reqStatus, aQoSReqPckg);
|
|
174 |
User::WaitForRequest(reqStatus);
|
|
175 |
CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G4"));
|
|
176 |
|
|
177 |
// Cancel Request
|
|
178 |
r99r4QoS.SetProfileParameters(reqStatus, aQoSReqPckg);
|
|
179 |
r99r4QoS.CancelAsyncRequest(EPacketQoSSetProfileParams);
|
|
180 |
User::WaitForRequest(reqStatus);
|
|
181 |
CHECKPOINT(reqStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G4"));
|
|
182 |
|
|
183 |
|
|
184 |
// Get Rel99/R4 QoS Profile Parameters
|
|
185 |
RPacketQoS::TQoSR99_R4Negotiated aQoSNegConfig;
|
|
186 |
TPckg<RPacketQoS::TQoSR99_R4Negotiated> aQoSNegPckg(aQoSNegConfig);
|
|
187 |
|
|
188 |
r99r4QoS.GetProfileParameters(reqStatus, aQoSNegPckg);
|
|
189 |
User::WaitForRequest(reqStatus);
|
|
190 |
CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G5"));
|
|
191 |
|
|
192 |
CHECKPOINT(aQoSNegConfig.ExtensionId(), TPacketDataConfigBase::KConfigRel99Rel4, CHP_QOS_CASE("C.3G5"));
|
|
193 |
CHECKPOINT(aQoSNegConfig.iTrafficClass, DPCKTTSY_TRAFFIC_CLASS_NEG, CHP_QOS_CASE("C.3G5"));
|
|
194 |
CHECKPOINT(aQoSNegConfig.iDeliveryOrderReqd, DPCKTTSY_DELIVERY_ORDER_NEG, CHP_QOS_CASE("C.3G5"));
|
|
195 |
CHECKPOINT(aQoSNegConfig.iDeliverErroneousSDU, DPCKTTSY_ERRONEOUS_SDU_DELIVERY_NEG, CHP_QOS_CASE("C.3G5"));
|
|
196 |
CHECKPOINT(aQoSNegConfig.iMaxSDUSize, DPCKTTSY_MAX_SDU_SIZE_NEG, CHP_QOS_CASE("C.3G5"));
|
|
197 |
CHECKPOINT(aQoSNegConfig.iMaxRate.iUplinkRate, DPCKTTSY_MAX_UPLINK_BITRATE_NEG, CHP_QOS_CASE("C.3G5"));
|
|
198 |
CHECKPOINT(aQoSNegConfig.iMaxRate.iDownlinkRate, DPCKTTSY_MAX_DOWNLINK_BITRATE_NEG, CHP_QOS_CASE("C.3G5"));
|
|
199 |
CHECKPOINT(aQoSNegConfig.iBER, DPCKTTSY_BER_NEG, CHP_QOS_CASE("C.3G5"));
|
|
200 |
CHECKPOINT(aQoSNegConfig.iSDUErrorRatio, DPCKTTSY_SDU_ERROR_RATIO_NEG, CHP_QOS_CASE("C.3G5"));
|
|
201 |
CHECKPOINT(aQoSNegConfig.iTransferDelay, DPCKTTSY_TRANSFER_DELAY_NEG, CHP_QOS_CASE("C.3G5"));
|
|
202 |
CHECKPOINT(aQoSNegConfig.iGuaranteedRate.iUplinkRate, DPCKTTSY_GRNT_UPLINK_BITRATE_NEG, CHP_QOS_CASE("C.3G5"));
|
|
203 |
CHECKPOINT(aQoSNegConfig.iGuaranteedRate.iDownlinkRate, DPCKTTSY_GRNT_DOWNLINK_BITRATE_NEG, CHP_QOS_CASE("C.3G5"));
|
|
204 |
|
|
205 |
// Cancel Request
|
|
206 |
r99r4QoS.GetProfileParameters(reqStatus, aQoSNegPckg);
|
|
207 |
r99r4QoS.CancelAsyncRequest(EPacketQoSGetProfileParams);
|
|
208 |
User::WaitForRequest(reqStatus);
|
|
209 |
CHECKPOINT(reqStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G5"));
|
|
210 |
|
|
211 |
// Post a 'Profile Changed' notification for R5.
|
|
212 |
|
|
213 |
RPacketQoS::TQoSR5Negotiated aNotifyQoSR5;
|
|
214 |
TPckg<RPacketQoS::TQoSR5Negotiated> aNotifyQoSR5Pckg(aNotifyQoSR5);
|
|
215 |
|
|
216 |
r99r4QoS.NotifyProfileChanged(notifyStatus, aNotifyQoSR5Pckg);
|
|
217 |
User::WaitForRequest(notifyStatus);
|
|
218 |
|
|
219 |
CHECKPOINT(notifyStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G8"));
|
|
220 |
|
|
221 |
CHECKPOINT(aNotifyQoSR5.ExtensionId(),TPacketDataConfigBase::KConfigRel5,CHP_QOS_CASE("C.3G8"));
|
|
222 |
|
|
223 |
CHECKPOINT(!aNotifyQoSR5.iSignallingIndication, KErrNone, CHP_QOS_CASE("C.3G8"));
|
|
224 |
CHECKPOINT(aNotifyQoSR5.iSourceStatisticsDescriptor, DPCKTTSY_SRC_STATSDESC, CHP_QOS_CASE("C.3G8"));
|
|
225 |
|
|
226 |
// Cancel Request
|
|
227 |
r99r4QoS.NotifyProfileChanged(notifyStatus, aNotifyQoSR5Pckg);
|
|
228 |
r99r4QoS.CancelAsyncRequest(EPacketQoSNotifyProfileChanged);
|
|
229 |
User::WaitForRequest(notifyStatus);
|
|
230 |
CHECKPOINT(notifyStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G8"));
|
|
231 |
|
|
232 |
// Set R5 QoS Profile Parameters
|
|
233 |
RPacketQoS::TQoSR5Requested aQoSR5ReqConfig;
|
|
234 |
TPckg<RPacketQoS::TQoSR5Requested> aQoSR5ReqPckg(aQoSR5ReqConfig);
|
|
235 |
|
|
236 |
aQoSR5ReqConfig.iSignallingIndication = DPCKTTSY_SIG_IND;
|
|
237 |
aQoSR5ReqConfig.iSourceStatisticsDescriptor = DPCKTTSY_SRC_STATSDESC;
|
|
238 |
|
|
239 |
r99r4QoS.SetProfileParameters(reqStatus, aQoSR5ReqPckg);
|
|
240 |
User::WaitForRequest(reqStatus);
|
|
241 |
CHECKPOINT(reqStatus.Int(),KErrNone,CHP_QOS_CASE("C.3G9"));
|
|
242 |
|
|
243 |
// Cancel Request
|
|
244 |
r99r4QoS.SetProfileParameters(reqStatus, aQoSR5ReqPckg);
|
|
245 |
r99r4QoS.CancelAsyncRequest(EPacketQoSSetProfileParams);
|
|
246 |
User::WaitForRequest(reqStatus);
|
|
247 |
CHECKPOINT(reqStatus.Int(),KErrCancel,CHP_QOS_CASE("C.3G9"));
|
|
248 |
|
|
249 |
r99r4QoS.Close();
|
|
250 |
wcdmaContext.Close();
|
|
251 |
wcdmaService.Close();
|
|
252 |
pcktPhone.Close();
|
|
253 |
|
|
254 |
return TestStepResult();
|
|
255 |
}
|