24
|
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 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
*/
|
|
19 |
|
|
20 |
#include "TE_EtelMMTestStepBase.h"
|
|
21 |
#include "testdef.h"
|
|
22 |
|
|
23 |
|
|
24 |
/**
|
|
25 |
Preamble for all CEtelMMLbsTestStepBase
|
|
26 |
*/
|
|
27 |
TVerdict CEtelMMLbsTestStepBase::doTestStepPreambleL()
|
|
28 |
{
|
|
29 |
//base class preamble
|
|
30 |
CEtelMMTestStepBase::doTestStepPreambleL();
|
|
31 |
TInt ret=iPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
32 |
TEST(ret==KErrNone);
|
|
33 |
TInt lbsOpenFlag ;
|
|
34 |
TBool existsLbsOpenFlag = GetIntFromConfig(ConfigSection(), _L("LbsOpenFlag"), lbsOpenFlag);
|
|
35 |
if(!existsLbsOpenFlag)
|
|
36 |
{
|
|
37 |
ret=iLocationSvc.Open(iPhone);
|
|
38 |
TEST(ret == KErrNone);
|
|
39 |
INFO_PRINTF2(_L("Test %d - RMobileLocationServices::Open request"), ret);
|
|
40 |
}
|
|
41 |
return TestStepResult() ;
|
|
42 |
}
|
|
43 |
|
|
44 |
/**
|
|
45 |
Postamble for all CEtelMMLbsTestStepBase
|
|
46 |
*/
|
|
47 |
TVerdict CEtelMMLbsTestStepBase::doTestStepPostambleL()
|
|
48 |
{
|
|
49 |
TInt lbsCloseFlag ;
|
|
50 |
TBool existsLbsCloseFlag = GetIntFromConfig(ConfigSection(), _L("LbsCloseFlag"), lbsCloseFlag);
|
|
51 |
if(!existsLbsCloseFlag)
|
|
52 |
{
|
|
53 |
iLocationSvc.Close();
|
|
54 |
INFO_PRINTF1(_L("Test- RMobileLocationServices::Close request"));
|
|
55 |
}
|
|
56 |
iPhone.Close();
|
|
57 |
|
|
58 |
//base class postamble
|
|
59 |
CEtelMMTestStepBase::doTestStepPostambleL();
|
|
60 |
return TestStepResult() ;
|
|
61 |
}
|
|
62 |
|
|
63 |
void CEtelMMLbsTestStepBase::ValidateMCRefTimeParams()
|
|
64 |
{
|
|
65 |
TInt expectedGpsWeek ;
|
|
66 |
GetIntFromConfig(ConfigSection(), _L("expectedGpsWeek"), expectedGpsWeek );
|
|
67 |
|
|
68 |
TInt expectedGpsTowOneMsce ;
|
|
69 |
GetIntFromConfig(ConfigSection(), _L("expectedGpsTowOneMsce"), expectedGpsTowOneMsce );
|
|
70 |
|
|
71 |
TBool expectedReftimeRequest;
|
|
72 |
GetBoolFromConfig(ConfigSection(), _L("expectedReftimeRequest"), expectedReftimeRequest);
|
|
73 |
|
|
74 |
TInt expectedRefTimeLsPart ;
|
|
75 |
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeLsPart"), expectedRefTimeLsPart );
|
|
76 |
|
|
77 |
TInt expectedRefTimeMsPart ;
|
|
78 |
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeMsPart"), expectedRefTimeMsPart );
|
|
79 |
|
|
80 |
TInt expectedRefTimeSfn ;
|
|
81 |
GetIntFromConfig(ConfigSection(), _L("expectedRefTimeSfn"), expectedRefTimeSfn );
|
|
82 |
|
|
83 |
TBool expectedAcqAsstRequest;
|
|
84 |
GetBoolFromConfig(ConfigSection(), _L("expectedAcqAsstRequest"), expectedAcqAsstRequest);
|
|
85 |
|
|
86 |
TBool expectedIntegrityRequest;
|
|
87 |
GetBoolFromConfig(ConfigSection(), _L("expectedIntegrityRequest"), expectedIntegrityRequest);
|
|
88 |
|
|
89 |
TInt expectedAcqAsstTime ;
|
|
90 |
GetIntFromConfig(ConfigSection(), _L("expectedAcqAsstTime"), expectedAcqAsstTime );
|
|
91 |
|
|
92 |
TInt expectedModePrimaryCode ;
|
|
93 |
GetIntFromConfig(ConfigSection(), _L("expectedModePrimaryCode"), expectedModePrimaryCode );
|
|
94 |
|
|
95 |
TInt expectedModeCellId ;
|
|
96 |
GetIntFromConfig(ConfigSection(), _L("expectedModeCellId"), expectedModeCellId );
|
|
97 |
|
|
98 |
TBool expectedModeStatusRequest;
|
|
99 |
GetBoolFromConfig(ConfigSection(), _L("expectedModeStatusRequest"), expectedModeStatusRequest);
|
|
100 |
|
|
101 |
//Reference Time Data populated and status is false
|
|
102 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iGpsWeek == expectedGpsWeek);
|
|
103 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iGpsTowOneMsec == expectedGpsTowOneMsce );
|
|
104 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iReferenceTimeRequest == expectedReftimeRequest);
|
|
105 |
|
|
106 |
// Acquisition Assistance Data populated and status is false
|
|
107 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iLsPart == expectedRefTimeLsPart);
|
|
108 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iMsPart == expectedRefTimeMsPart);
|
|
109 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iSfn == expectedRefTimeSfn);
|
|
110 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iAcquisitionAssistanceReq == expectedAcqAsstRequest);
|
|
111 |
|
|
112 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iRealTimeIntegrityRequest == expectedIntegrityRequest);
|
|
113 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iGpsReferenceTime == expectedAcqAsstTime );
|
|
114 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iUtranGpsReferenceTime.iPrimaryScramblingCode == expectedModePrimaryCode);
|
|
115 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAcquisitionAssistance.iUtranGpsReferenceTime.iCellParametersID == expectedModeCellId);
|
|
116 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iModeSpecificInfoStatus == expectedModeStatusRequest);
|
|
117 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferencTime.iUtranGpsRefTime.iModeSpecificInfo.iPrimaryScramblingCode == expectedModeCellId);
|
|
118 |
}
|
|
119 |
|
|
120 |
|
|
121 |
void CEtelMMLbsTestStepBase::ValidateMCRefLocParams()
|
|
122 |
{
|
|
123 |
TInt expectedRefLocLatSign ;
|
|
124 |
GetIntFromConfig(ConfigSection(), _L("expectedRefLocLatSign"), expectedRefLocLatSign );
|
|
125 |
|
|
126 |
TInt expectedRefLocLongSign ;
|
|
127 |
GetIntFromConfig(ConfigSection(), _L("expectedRefLocLongSign"), expectedRefLocLongSign );
|
|
128 |
|
|
129 |
TBool expectedRefLocRequest;
|
|
130 |
GetBoolFromConfig(ConfigSection(), _L("expectedRefLocRequest"), expectedRefLocRequest);
|
|
131 |
|
|
132 |
// Reference Location data populated and status is false
|
|
133 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferenceLocation.iLatitudeSign == DMMTSY_PHONE_LCS_MC_GPS_REFLOC_LATSIGN1);
|
|
134 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferenceLocation.iLatitude == expectedRefLocLatSign);
|
|
135 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iReferenceLocation.iLongitude == expectedRefLocLongSign) ;
|
|
136 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iReferenceLocationRequest == expectedRefLocRequest);
|
|
137 |
}
|
|
138 |
|
|
139 |
|
|
140 |
void CEtelMMLbsTestStepBase::ValidateMCModelParams()
|
|
141 |
{
|
|
142 |
TInt expectedNavEphemeris ;
|
|
143 |
GetIntFromConfig(ConfigSection(), _L("expectedNavEphemeris"), expectedNavEphemeris );
|
|
144 |
|
|
145 |
TInt expectedNavSatId ;
|
|
146 |
GetIntFromConfig(ConfigSection(), _L("expectedNavSatId"), expectedNavSatId );
|
|
147 |
|
|
148 |
TBool expectedNavModelRequest;
|
|
149 |
GetBoolFromConfig(ConfigSection(), _L("expectedNavModelRequest"), expectedNavModelRequest);
|
|
150 |
|
|
151 |
// NavigationModel data populated and status is false
|
|
152 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iNavigationModel.iEphemerisParameter.iCodeOnL2 == expectedNavEphemeris);
|
|
153 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iNavigationModel.iSatID == expectedNavSatId);
|
|
154 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iNavigationModel.iSatelliteStatus == DMMTSY_PHONE_LCS_MC_GPS_NAVIGATION_SATSTATUS1);
|
|
155 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iNavigationModelRequest == expectedNavModelRequest);
|
|
156 |
|
|
157 |
TInt expectedIonModel ;
|
|
158 |
GetIntFromConfig(ConfigSection(), _L("expectedIonModel"), expectedIonModel );
|
|
159 |
|
|
160 |
TBool expectedIonModelRequest;
|
|
161 |
GetBoolFromConfig(ConfigSection(), _L("expectedIonModelRequest"), expectedIonModelRequest);
|
|
162 |
|
|
163 |
// Ionospheric data populated and status is false
|
|
164 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iIonosphericModel.iAlfa1 == expectedIonModel);
|
|
165 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iIonosphericModelRequest == expectedIonModelRequest);
|
|
166 |
|
|
167 |
TInt expectedUtcModel1 ;
|
|
168 |
GetIntFromConfig(ConfigSection(), _L("expectedUtcModel1"), expectedUtcModel1 );
|
|
169 |
|
|
170 |
TBool expectedUtcModelRequest;
|
|
171 |
GetBoolFromConfig(ConfigSection(), _L("expectedUtcModelRequest"), expectedUtcModelRequest);
|
|
172 |
|
|
173 |
//UTC data populated and status is false
|
|
174 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iUtcModel.iA1 == expectedUtcModel1);
|
|
175 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iUtcModelRequest == expectedUtcModelRequest);
|
|
176 |
}
|
|
177 |
|
|
178 |
|
|
179 |
void CEtelMMLbsTestStepBase::ValidateMCParams()
|
|
180 |
{
|
|
181 |
|
|
182 |
TBool isVelocityRequested;
|
|
183 |
GetBoolFromConfig(ConfigSection(), _L("velocityRequested"), isVelocityRequested);
|
|
184 |
|
|
185 |
TInt expectedGpsTow ;
|
|
186 |
GetIntFromConfig(ConfigSection(), _L("expectedGpsTow"), expectedGpsTow );
|
|
187 |
|
|
188 |
TBool expectedCorrectionRequest;
|
|
189 |
GetBoolFromConfig(ConfigSection(), _L("expectedCorrectionRequest"), expectedCorrectionRequest);
|
|
190 |
|
|
191 |
TInt expectedGpsAlmanac ;
|
|
192 |
GetIntFromConfig(ConfigSection(), _L("expectedGpsAlmanac"), expectedGpsAlmanac );
|
|
193 |
|
|
194 |
TBool expectedGpsAlmanacRequest;
|
|
195 |
GetBoolFromConfig(ConfigSection(), _L("expectedGpsAlmanacRequest"), expectedGpsAlmanacRequest);
|
|
196 |
|
|
197 |
TInt expectedBadSatList ;
|
|
198 |
GetIntFromConfig(ConfigSection(), _L("expectedBadSatList"), expectedBadSatList );
|
|
199 |
|
|
200 |
TInt expectedHorAccuracy ;
|
|
201 |
GetIntFromConfig(ConfigSection(), _L("expectedHorAccuracy"), expectedHorAccuracy );
|
|
202 |
|
|
203 |
TInt expectedVertAccuracy ;
|
|
204 |
GetIntFromConfig(ConfigSection(), _L("expectedVertAccuracy"), expectedVertAccuracy );
|
|
205 |
|
|
206 |
TBool expectedAddlAsstDataRequest;
|
|
207 |
GetBoolFromConfig(ConfigSection(), _L("expectedAddlAsstDataRequest"), expectedAddlAsstDataRequest);
|
|
208 |
|
|
209 |
TEST(iMeasurementControl.iVelocityRequested == isVelocityRequested);
|
|
210 |
TEST(iMeasurementControl.iMeasReportTransferMode == DMMTSY_PHONE_LCS_MC_RPTTRANSFERMODE);
|
|
211 |
|
|
212 |
//DGPS corrections data populated and status is false
|
|
213 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iDgpsCorrections.iGpsTow == expectedGpsTow);
|
|
214 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iDgpsCorrectionsRequest == expectedCorrectionRequest);
|
|
215 |
|
|
216 |
//Almanac data populated and status is false
|
|
217 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iAlmanac.iWnA == expectedGpsAlmanac);
|
|
218 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iGpsAddlDataStatus.iAlmanacRequest == expectedGpsAlmanacRequest);
|
|
219 |
|
|
220 |
//RealTime integrity data populated and status is false
|
|
221 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosGpsAssistanceData.iBadSatList[0] == expectedBadSatList);
|
|
222 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iHorzAccuracy == expectedHorAccuracy);
|
|
223 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iVertAccuracy == expectedVertAccuracy);
|
|
224 |
//Additional Assistance Data is not required
|
|
225 |
TEST(iMeasurementControl.iMeasurementCommand.iSetup.iUePosReportingQuantity.iAddlAssistanceDataReq == expectedAddlAsstDataRequest);
|
|
226 |
}
|
|
227 |
|
|
228 |
void CEtelMMLbsTestStepBase::SendCompleteMeasurementReport()
|
|
229 |
{
|
|
230 |
TBool errorStatus;
|
|
231 |
GetBoolFromConfig(ConfigSection(), _L("ErrorStatus"), errorStatus);
|
|
232 |
|
|
233 |
TInt positionEstLatSign;
|
|
234 |
GetIntFromConfig(ConfigSection(), _L("PositionEstLatSign"), positionEstLatSign);
|
|
235 |
|
|
236 |
TInt velocityEstStatus;
|
|
237 |
GetIntFromConfig(ConfigSection(), _L("VelocityEstStatus"), velocityEstStatus);
|
|
238 |
|
|
239 |
TInt velocityEstHorzSpeed;
|
|
240 |
GetIntFromConfig(ConfigSection(), _L("VelocityEstHorzSpeed"), velocityEstHorzSpeed);
|
|
241 |
|
|
242 |
TInt velocityEstHorzBearing ;
|
|
243 |
GetIntFromConfig(ConfigSection(), _L("VelocityEstHorzBearing "), velocityEstHorzBearing );
|
|
244 |
|
|
245 |
TInt positionEstInfo1;
|
|
246 |
GetIntFromConfig(ConfigSection(), _L("PositionEstInfo1"), positionEstInfo1);
|
|
247 |
|
|
248 |
TInt refTimeLsPart;
|
|
249 |
GetIntFromConfig(ConfigSection(), _L("RefTimeLsPart"), refTimeLsPart);
|
|
250 |
|
|
251 |
TInt refTimeMsPart;
|
|
252 |
GetIntFromConfig(ConfigSection(), _L("RefTimeMsPart"), refTimeMsPart);
|
|
253 |
|
|
254 |
TInt refTimeSfn;
|
|
255 |
GetIntFromConfig(ConfigSection(), _L("RefTimeSfn"), refTimeSfn);
|
|
256 |
|
|
257 |
TBool modeStatusRequest;
|
|
258 |
GetBoolFromConfig(ConfigSection(), _L("ModeStatusRequest"), modeStatusRequest);
|
|
259 |
|
|
260 |
TInt modeTDDId;
|
|
261 |
GetIntFromConfig(ConfigSection(), _L("ModeTDDId"), modeTDDId);
|
|
262 |
|
|
263 |
TInt positionEstInfo5;
|
|
264 |
GetIntFromConfig(ConfigSection(), _L("PositionEstInfo5"), positionEstInfo5);
|
|
265 |
|
|
266 |
TInt positionEstElipseLat;
|
|
267 |
GetIntFromConfig(ConfigSection(), _L("PositionEstElipseLat"), positionEstElipseLat);
|
|
268 |
|
|
269 |
TInt positionEstElipseLong;
|
|
270 |
GetIntFromConfig(ConfigSection(), _L("PositionEstElipseLong"), positionEstElipseLong);
|
|
271 |
|
|
272 |
TInt paramListSatId;
|
|
273 |
GetIntFromConfig(ConfigSection(), _L("ParamListSatId"), paramListSatId);
|
|
274 |
|
|
275 |
TInt paramListGpsChips;
|
|
276 |
GetIntFromConfig(ConfigSection(), _L("ParamListGpsChips"), paramListGpsChips);
|
|
277 |
|
|
278 |
TInt paramListPathInd;
|
|
279 |
GetIntFromConfig(ConfigSection(), _L("ParamListPathInd"), paramListPathInd);
|
|
280 |
|
|
281 |
if(positionEstInfo1 == 1)
|
|
282 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateStatus = DMMTSY_PHONE_LCS_MC_GPS_POSESTINFO1;
|
|
283 |
if(positionEstInfo5 == 5)
|
|
284 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateStatus = DMMTSY_PHONE_LCS_MC_GPS_POSESTINFO5;
|
|
285 |
if(positionEstLatSign == 1)
|
|
286 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPostionEstimate.iEllipsoidPoint.iLatitudeSign = DMMTSY_PHONE_LCS_MC_GPS_POSEST_ELIPSOIDPT_LATSIGN1;
|
|
287 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iPosErrorStatus = errorStatus;
|
|
288 |
|
|
289 |
//velocity estimate status is EHorzVelPresent, send report with Horiontal velocity
|
|
290 |
if(velocityEstStatus == 1)
|
|
291 |
iMeasurementReport.iVelEstimateStatus = DMMTSY_PHONE_LCS_MC_GPS_VELOCITYEST_STATUS1;
|
|
292 |
iMeasurementReport.iVelocityEstimate.iHorzVelocity.iHorzSpeed = velocityEstHorzSpeed;
|
|
293 |
iMeasurementReport.iVelocityEstimate.iHorzVelocity.iBearing = velocityEstHorzBearing;
|
|
294 |
|
|
295 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateRefTime.iUtranGpsRefTimeResult.iLsPart = refTimeLsPart;
|
|
296 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateRefTime.iUtranGpsRefTimeResult.iMsPart = refTimeMsPart;
|
|
297 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateRefTime.iUtranGpsRefTimeResult.iSfn = refTimeSfn;
|
|
298 |
|
|
299 |
//Measurement mode status is false so send report with iTddRefID
|
|
300 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateRefTime.iUtranGpsRefTimeResult.iGpsMeasModeStatus = modeStatusRequest;
|
|
301 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPosEstimateRefTime.iUtranGpsRefTimeResult.iGpsMeasModeSpecificInfo.iTddRefID=modeTDDId;
|
|
302 |
|
|
303 |
//Position estimate status is EEllipsoidPointPresent, send report containing position estimate for Ellipsoid point
|
|
304 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPostionEstimate.iEllipsoidPoint.iLatitude = positionEstElipseLat;
|
|
305 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosPositionEstimateInfo.iPostionEstimate.iEllipsoidPoint.iLongitude = positionEstElipseLong;
|
|
306 |
|
|
307 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosGpsMeasurement.iGpsMeasurementParamList[0].iSatID = paramListSatId;
|
|
308 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosGpsMeasurement.iGpsMeasurementParamList[0].iFractionalGpsChips = paramListGpsChips;
|
|
309 |
if(paramListPathInd ==1)
|
|
310 |
iMeasurementReport.iMeasuredResults.iTUePosMeasuredResults.iUePosGpsMeasurement.iGpsMeasurementParamList[0].iMultipathIndicator = DMMTSY_PHONE_LCS_MC_GPS_PARAMLIST_PATHINDICATOR1 ;
|
|
311 |
}
|
|
312 |
|
|
313 |
void CEtelMMLbsTestStepBase::SetMolrParams()
|
|
314 |
{
|
|
315 |
TInt domain;
|
|
316 |
GetIntFromConfig(ConfigSection(), _L("Domain"), domain);
|
|
317 |
|
|
318 |
TInt molrType;
|
|
319 |
GetIntFromConfig(ConfigSection(), _L("Molrtype"), molrType);
|
|
320 |
|
|
321 |
TInt locationestimationtype;
|
|
322 |
GetIntFromConfig(ConfigSection(), _L("locationestimationtype"), locationestimationtype);
|
|
323 |
|
|
324 |
TInt locationMethod;
|
|
325 |
GetIntFromConfig(ConfigSection(), _L("LocationMethods"), locationMethod);
|
|
326 |
|
|
327 |
TInt horizontalAccuracy;
|
|
328 |
GetIntFromConfig(ConfigSection(), _L("HorizontalAccuracy"), horizontalAccuracy);
|
|
329 |
|
|
330 |
TInt verticalAccuracy;
|
|
331 |
GetIntFromConfig(ConfigSection(), _L("VerticalAccuracy"), verticalAccuracy);
|
|
332 |
|
|
333 |
TInt responseTime;
|
|
334 |
GetIntFromConfig(ConfigSection(), _L("ResponseTime"), responseTime);
|
|
335 |
|
|
336 |
TPtrC gpsAssistanceData;
|
|
337 |
GetStringFromConfig(ConfigSection(), _L("GPSAssistanceData"), gpsAssistanceData );
|
|
338 |
|
|
339 |
TPtrC expectedLocationEstimate ;
|
|
340 |
TBool exists1 = GetStringFromConfig(ConfigSection(), _L("expectedLocationEstimate"), expectedLocationEstimate );
|
|
341 |
|
|
342 |
TPtrC expectedVelocityEstimate;
|
|
343 |
GetStringFromConfig(ConfigSection(), _L("expectedVelocityEstimate"), expectedVelocityEstimate );
|
|
344 |
|
|
345 |
TPtrC expectedMolrError;
|
|
346 |
GetStringFromConfig(ConfigSection(), _L("expectedMolrError"), expectedMolrError );
|
|
347 |
|
|
348 |
TPtrC invalidClientIdFlag;
|
|
349 |
TBool existsInvalidClientIdFlag = GetStringFromConfig(ConfigSection(), _L("InvalidClientIdFlag"), invalidClientIdFlag);
|
|
350 |
TInt ret;
|
|
351 |
//set domain to Packet Switched
|
|
352 |
if (domain == 1)
|
|
353 |
{
|
|
354 |
ret = iLocationSvc.SetLcsDomain(DMMTSY_SETLCS_DOMAIN1);
|
|
355 |
}
|
|
356 |
else
|
|
357 |
{
|
|
358 |
ret = iLocationSvc.SetLcsDomain(DMMTSY_SETLCS_DOMAIN2);
|
|
359 |
}
|
|
360 |
|
|
361 |
TEST(ret == KErrNone);
|
|
362 |
|
|
363 |
|
|
364 |
if(molrType == 1)
|
|
365 |
iStartMolr.iMolrType=DMMTSY_MOLR_TYPE1;
|
|
366 |
if(locationestimationtype == 1)
|
|
367 |
iStartMolr.iMolrLocationEstimateType = DMMTSY_MOLR_LOCATION_ESTIMATION_TYPE1;
|
|
368 |
if(locationMethod == 3)
|
|
369 |
iStartMolr.iLocationMethod=DMMTSY_MOLR_LOCATION_METHOD3;
|
|
370 |
if(responseTime == 1)
|
|
371 |
iStartMolr.iQos.iResponseTime = DMMTSY_MOLR_RESPONSE_TIME1;
|
|
372 |
|
|
373 |
iStartMolr.iQos.iHorizontalAccuracy = horizontalAccuracy;
|
|
374 |
iStartMolr.iQos.iVerticalAccuracy = verticalAccuracy;
|
|
375 |
iStartMolr.iGpsAssistanceData.Copy(gpsAssistanceData);
|
|
376 |
if(existsInvalidClientIdFlag)
|
|
377 |
iStartMolr.iLcsClientExternalID=DMMTSY_INVALID_EXTERNAL_CLIENT_ID;
|
|
378 |
}
|
|
379 |
|
|
380 |
|
|
381 |
void CEtelMMLbsTestStepBase::OOMTest_LBS()
|
|
382 |
{
|
|
383 |
const TInt KMaxTests = 1000;
|
|
384 |
TBool oomAvailable = EFalse;
|
|
385 |
TInt failure=1;
|
|
386 |
TRequestStatus mtlrStatus;
|
|
387 |
TRequestStatus reqStatus;
|
|
388 |
RMobileLocationServices::TNotifyMtlrV7 iNotifyMtlr;
|
|
389 |
iNotifyMtlr.iLocationInfo.iLcsClientName.iLcsDataCodingScheme = DMMTSY_DATA_CODING_SCHEME1;
|
|
390 |
RMobileLocationServices::TNotifyMtlrV7Pckg notifyMtlrPckg(iNotifyMtlr);
|
|
391 |
while (!oomAvailable && failure < KMaxTests)
|
|
392 |
{
|
|
393 |
iTelServer.__DbgFailNext(failure);
|
|
394 |
iLocationSvc.NotifyMtlr(mtlrStatus,notifyMtlrPckg);
|
|
395 |
User::WaitForRequest(mtlrStatus);
|
|
396 |
INFO_PRINTF2(_L("Notify MTLR %d "),mtlrStatus.Int());
|
|
397 |
TEST(mtlrStatus==KErrNone);
|
|
398 |
if(mtlrStatus!=KErrNone)
|
|
399 |
{
|
|
400 |
INFO_PRINTF2(_L("Failing after %d Allocs"),failure);
|
|
401 |
}
|
|
402 |
else
|
|
403 |
{
|
|
404 |
INFO_PRINTF2(_L("Passing after %d Allocs"),failure);
|
|
405 |
}
|
|
406 |
iTelServer.__DbgFailNextAvailable(oomAvailable);
|
|
407 |
failure++;
|
|
408 |
}
|
|
409 |
|
|
410 |
// KMaxTests is used to stop the above while statement looping
|
|
411 |
// indefinitely. If KMaxTests is reached then we can guess that something
|
|
412 |
// has gone wrong and the test should be failed.
|
|
413 |
TESTCHECKCONDITION(failure < KMaxTests);
|
|
414 |
|
|
415 |
}
|
|
416 |
|
|
417 |
void CEtelMMLbsTestStepBase::OOMTest_DialEmergencyCall()
|
|
418 |
{
|
|
419 |
const TInt KMaxTests = 1000;
|
|
420 |
RMobilePhone mmPhone;
|
|
421 |
TInt ret=mmPhone.Open(iTelServer,DMMTSY_PHONE_NAME);
|
|
422 |
TEST(ret==KErrNone);
|
|
423 |
RMobileLine mmLine;
|
|
424 |
ret=mmLine.Open(mmPhone,DMMTSY_LINE_VOICE_NAME);
|
|
425 |
TEST(ret==KErrNone);
|
|
426 |
RMobileCall mmCall;
|
|
427 |
TName callName;
|
|
428 |
ret=mmCall.OpenNewCall(mmLine,callName);
|
|
429 |
TEST(ret==KErrNone);
|
|
430 |
TRequestStatus reqStatus;
|
|
431 |
TBuf<RMobileENStore::KEmergencyNumberSize> aNumber(DMMTSY_EN_STORE_AMBULANCE_NUM);
|
|
432 |
|
|
433 |
TBool oomAvailable = EFalse;
|
|
434 |
TInt failure=1;
|
|
435 |
while (!oomAvailable && failure < KMaxTests)
|
|
436 |
{
|
|
437 |
iTelServer.__DbgFailNext(failure);
|
|
438 |
mmCall.DialEmergencyCall(reqStatus, aNumber);
|
|
439 |
User::WaitForRequest(reqStatus);
|
|
440 |
INFO_PRINTF2(_L("mmCall.DialEmergencyCall(reqStatus, aNumber);%d "),reqStatus.Int());
|
|
441 |
TEST(reqStatus==KErrNone);
|
|
442 |
if(reqStatus!=KErrNone)
|
|
443 |
{
|
|
444 |
INFO_PRINTF2(_L("Failing after %d Allocs"),failure);
|
|
445 |
}
|
|
446 |
else
|
|
447 |
{
|
|
448 |
INFO_PRINTF2(_L("Passing after %d Allocs"),failure);
|
|
449 |
}
|
|
450 |
|
|
451 |
iTelServer.__DbgFailNextAvailable(oomAvailable);
|
|
452 |
failure++;
|
|
453 |
}
|
|
454 |
|
|
455 |
// KMaxTests is used to stop the above while statement looping
|
|
456 |
// indefinitely. If KMaxTests is reached then we can guess that something
|
|
457 |
// has gone wrong and the test should be failed.
|
|
458 |
TESTCHECKCONDITION(failure < KMaxTests);
|
|
459 |
|
|
460 |
mmCall.Close();
|
|
461 |
mmLine.Close();
|
|
462 |
mmPhone.Close();
|
|
463 |
}
|