|
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 // @file ctlbsx3pstepconflict.cpp |
|
15 // This is the class implementation for the Module Information Tests |
|
16 // EPOC includes. |
|
17 // |
|
18 // |
|
19 |
|
20 // LBS includes. |
|
21 #include <lbs.h> |
|
22 #include <lbs/lbsnetcommon.h> |
|
23 //#include <kernel.h> |
|
24 // LBS test includes. |
|
25 //#include <lbs/test/lbsnetsimtest.h> |
|
26 #include "ctlbsx3pstepconflict.h" |
|
27 #include <lbs/test/tlbsutils.h> |
|
28 |
|
29 const TInt KLbsKeepAlivePeriod1=10*1000000; |
|
30 |
|
31 _LIT(KDestIDL, "07725547323"); |
|
32 _LIT(KDestIDH, "07703125837"); |
|
33 _LIT(KDestIDM, "07703103066"); |
|
34 const TUint priorityL = X3P_PRIORITY_TIMER; |
|
35 const TUint priorityM = X3P_PRIORITY_MENU; |
|
36 const TUint priorityH = X3P_PRIORITY_PUSH; |
|
37 //TPositionInfo postitionInfo; |
|
38 static TUint iterator=0; |
|
39 |
|
40 /** |
|
41 * Destructor |
|
42 */ |
|
43 CT_LbsX3PStep_Conflict::~CT_LbsX3PStep_Conflict() |
|
44 { |
|
45 iDoPosUpdate->Cancel(); |
|
46 delete iDoPosUpdate; |
|
47 if(iDoTransmitPosAO!=NULL) |
|
48 delete iDoTransmitPosAO; |
|
49 if(iDoTransmitPosAO2 != NULL) |
|
50 delete iDoTransmitPosAO2; |
|
51 |
|
52 iTransmitPositioner2.Close(); |
|
53 iTransmitPositioner.Close(); |
|
54 iServer.Close(); |
|
55 |
|
56 iTSArray.Close(); |
|
57 } |
|
58 |
|
59 |
|
60 /** |
|
61 * Constructor |
|
62 */ |
|
63 CT_LbsX3PStep_Conflict::CT_LbsX3PStep_Conflict(CT_LbsX3PServer& aParent) : CT_LbsX3PStep(aParent) |
|
64 { |
|
65 SetTestStepName(KLbsX3PStep_Conflict); |
|
66 } |
|
67 |
|
68 |
|
69 /** |
|
70 Static Constructor |
|
71 */ |
|
72 CT_LbsX3PStep_Conflict* CT_LbsX3PStep_Conflict::New(CT_LbsX3PServer& aParent) |
|
73 { |
|
74 CT_LbsX3PStep_Conflict* testStep = new CT_LbsX3PStep_Conflict(aParent); |
|
75 // Note the lack of ELeave. |
|
76 // This means that having insufficient memory will return NULL; |
|
77 if (testStep) |
|
78 { |
|
79 TInt err = KErrNone; |
|
80 |
|
81 TRAP(err, testStep->ConstructL()); |
|
82 if (err) |
|
83 { |
|
84 delete testStep; |
|
85 testStep = NULL; |
|
86 } |
|
87 } |
|
88 |
|
89 return testStep; |
|
90 } |
|
91 |
|
92 void CT_LbsX3PStep_Conflict::ConstructL() |
|
93 { |
|
94 CT_LbsX3PStep::ConstructL(); |
|
95 |
|
96 //The active object wrapper for the notify position update. |
|
97 iDoPosUpdate = CT_LbsDoPosUpdate::NewL(this); |
|
98 } |
|
99 |
|
100 |
|
101 /** |
|
102 * @return - TVerdict code |
|
103 * Override of base class pure virtual |
|
104 * Our implementation only gets called if the base class doTestStepPreambleL() did |
|
105 * not leave. That being the case, the current test result value will be EPass. |
|
106 */ |
|
107 TVerdict CT_LbsX3PStep_Conflict::doTestStepL() |
|
108 { |
|
109 // Generic test step used to test the LBS Client Notify position update API. |
|
110 INFO_PRINTF1(_L(">>CT_LbsX3PStep_Conflict::doTestStepL()")); |
|
111 |
|
112 if (TestStepResult() == EPass) |
|
113 { |
|
114 //TInt err = KErrNone; |
|
115 //RLbsTransmitPositionServer server; |
|
116 |
|
117 //TInt testCaseId; |
|
118 TRequestStatus aStatus; |
|
119 TLbsTransmitPositionOptions tOptions; |
|
120 |
|
121 // Carry out common test actions (such as connecting to a server). |
|
122 iStateX3P = EX3POk; |
|
123 User::LeaveIfError(iServer.Connect()); |
|
124 //CleanupClosePushL(server); |
|
125 |
|
126 INFO_PRINTF1(_L("server opened")); |
|
127 |
|
128 User::LeaveIfError(iTransmitPositioner.Open(iServer)); |
|
129 //CleanupClosePushL(iTransmitPositioner); |
|
130 |
|
131 //second transmit positioner is used for test case 7-10 |
|
132 User::LeaveIfError(iTransmitPositioner2.Open(iServer)); |
|
133 //CleanupClosePushL(iTransmitPositioner2); |
|
134 |
|
135 iDoTransmitPosAO = CT_LbsX3PDoTransmitPos::NewL(this, iTransmitPositioner); |
|
136 iDoTransmitPosAO2 = CT_LbsX3PDoTransmitPos::NewL(this, iTransmitPositioner2); |
|
137 |
|
138 //define local variables to point current and verify arrays. |
|
139 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
140 RPointerArray<TAny>& curPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr; |
|
141 |
|
142 T_LbsUtils utils; |
|
143 RPointerArray<TTime> doTransmitPosTime; |
|
144 RPointerArray<TTime> notifyMRLocationTime; |
|
145 RPointerArray<TTime> doPosUpdateTime; |
|
146 RPointerArray<TTime> notifyMCLocationTime; |
|
147 RPointerArray<TTime> notifyReleaseLcsMoLrTime; |
|
148 |
|
149 TModuleDataIn modDataInTimeout; // Used to send test information to the test module. |
|
150 const TInt KLbsTestModuleTimeOut = 1000000; |
|
151 // The module request type - time out value. |
|
152 modDataInTimeout.iRequestType = TModuleDataIn::EModuleRequestTimeOut; |
|
153 // Micro seconds time value to delay the return position update from the module. |
|
154 modDataInTimeout.iTimeOut = KLbsTestModuleTimeOut; |
|
155 |
|
156 TModuleDataIn modDataInAssDataOn; |
|
157 modDataInAssDataOn.iRequestType = TModuleDataIn::EModuleRequestTestMode; |
|
158 modDataInAssDataOn.iAssDataEventType = TModuleDataIn::EAssDataEventExpectSingle; |
|
159 modDataInAssDataOn.iAssDataTestMode = TModuleDataIn::EModuleTestModeAssDataOn; |
|
160 |
|
161 iNetSim.ConnectL(this); // Once we have connected, we will get NetSim callbacks. |
|
162 iNetSim.SetStepMode(ETrue); //To run NetSim in step mode |
|
163 |
|
164 // Create reference location: |
|
165 // Location to use. |
|
166 TPositionInfo* srcPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]); |
|
167 TPosition srcPos; |
|
168 srcPosInfo->GetPosition(srcPos); |
|
169 |
|
170 if (!iNetSim.SetReferenceLocation(srcPos)) |
|
171 { |
|
172 INFO_PRINTF1(_L("Failed test, can't set NetSim's reference location.")); |
|
173 SetTestStepResult(EFail); |
|
174 iNetSim.Close(); |
|
175 return TestStepResult(); |
|
176 } |
|
177 |
|
178 // Set the position quality required by the network. |
|
179 TTimeIntervalMicroSeconds maxFixTime(20*1000000); |
|
180 TLbsNetPosRequestQuality netPosQuality; |
|
181 |
|
182 netPosQuality.SetMaxFixTime(maxFixTime); |
|
183 netPosQuality.SetMinHorizontalAccuracy(srcPos.HorizontalAccuracy()); |
|
184 netPosQuality.SetMinVerticalAccuracy(srcPos.VerticalAccuracy()); |
|
185 |
|
186 if (!iNetSim.SetQuality(netPosQuality)) |
|
187 { |
|
188 INFO_PRINTF1(_L("Failed test, can't set NetSim's quality.")); |
|
189 SetTestStepResult(EFail); |
|
190 iNetSim.Close(); |
|
191 return TestStepResult(); |
|
192 } |
|
193 |
|
194 // Set plugin to use. |
|
195 TUid pluginUid; |
|
196 if(iParent.iSharedData->iTestModuleInUse) |
|
197 { |
|
198 pluginUid = TUid::Uid(KSimpleAssistanceDataProviderPluginUidValue); |
|
199 } |
|
200 else |
|
201 { |
|
202 pluginUid = TUid::Uid(KSuplAssistanceDataProviderPluginUidValue); |
|
203 } |
|
204 |
|
205 if (!iNetSim.SetAssistanceDataProvider(pluginUid)) |
|
206 { |
|
207 INFO_PRINTF1(_L("Failed test, can't set NetSim's assistance data plugin uid.")); |
|
208 SetTestStepResult(EFail); |
|
209 iNetSim.Close(); |
|
210 return TestStepResult(); |
|
211 } |
|
212 |
|
213 //Timeout for Transmit Location |
|
214 TLbsTransmitPositionOptions transmitOptions; |
|
215 transmitOptions.SetTimeOut(20*1000000); |
|
216 |
|
217 iTransmitPositioner.SetTransmitOptions(transmitOptions); |
|
218 |
|
219 //Reset iterator value |
|
220 iterator=0; |
|
221 |
|
222 // Kick off the keep alive timer. |
|
223 TTimeIntervalMicroSeconds32 interval(KLbsKeepAlivePeriod1); |
|
224 iKeepAliveTimer->SetTimer(interval); |
|
225 |
|
226 // Carry out unique test actions. |
|
227 if (GetIntFromConfig(ConfigSection(), KTestCaseId, iTestCaseId)) |
|
228 { |
|
229 switch (iTestCaseId) |
|
230 { |
|
231 // Test case LBS-X3P-Conflict-0001 |
|
232 case 1: |
|
233 break; |
|
234 |
|
235 // Test case LBS-X3P-Conflict-0002 |
|
236 case 2: |
|
237 case 3: |
|
238 case 4: |
|
239 { |
|
240 //Set assistence data mode flag to on so that MoLr gets all notifications. |
|
241 utils.NotifyModuleOfConfigChangeL(modDataInAssDataOn); |
|
242 |
|
243 // Kick off test. |
|
244 CActiveScheduler::Start(); |
|
245 |
|
246 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
247 AnalyseCallbackFlags( KLbsCallback_Got_DoPosUpdate, doPosUpdateTime); |
|
248 |
|
249 TBool bResult; |
|
250 if(iParent.iSharedData->iTestModuleInUse) |
|
251 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
252 else |
|
253 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
254 |
|
255 if(doTransmitPosTime.Count() !=1 ||doPosUpdateTime.Count() != 0 || !bResult) |
|
256 { |
|
257 INFO_PRINTF1(_L("<FONT><B>MoLr wasn't cancelled after getting X3P(Push)</B></FONT>")); |
|
258 SetTestStepResult(EFail); |
|
259 } |
|
260 } |
|
261 break; |
|
262 |
|
263 case 5: |
|
264 case 12: |
|
265 { |
|
266 //Set assistence data mode flag to on so that MoLr gets all notifications. |
|
267 utils.NotifyModuleOfConfigChangeL(modDataInAssDataOn); |
|
268 |
|
269 // Kick off test. |
|
270 CActiveScheduler::Start(); |
|
271 |
|
272 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
273 AnalyseCallbackFlags( KLbsCallback_Got_DoPosUpdate, doPosUpdateTime); |
|
274 |
|
275 TBool bResult; |
|
276 if(iParent.iSharedData->iTestModuleInUse) |
|
277 { |
|
278 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
279 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
280 } |
|
281 else |
|
282 { |
|
283 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
284 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
285 } |
|
286 |
|
287 if(doTransmitPosTime.Count() !=1 ||doPosUpdateTime.Count() != 1 ||doPosUpdateTime[0]->Int64() > doTransmitPosTime[0]->Int64() || !bResult) |
|
288 { |
|
289 INFO_PRINTF1(_L("<FONT><B>X3P didn't complete before MoLr</B></FONT>")); |
|
290 SetTestStepResult(EFail); |
|
291 } |
|
292 } |
|
293 break; |
|
294 |
|
295 |
|
296 case 21: |
|
297 case 22: |
|
298 case 54: //Check that X3P(Push) completes after X3P(Menu) as it was too late to cancel X3P(Menu) by X3P(Push) |
|
299 case 62: //Check |
|
300 case 102: |
|
301 case 94: |
|
302 { |
|
303 // Kick off test. |
|
304 CActiveScheduler::Start(); |
|
305 |
|
306 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
307 |
|
308 TBool bResult; |
|
309 if(iParent.iSharedData->iTestModuleInUse) |
|
310 { |
|
311 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
312 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
313 } |
|
314 else |
|
315 { |
|
316 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
317 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
318 } |
|
319 |
|
320 if(doTransmitPosTime.Count() !=2 || !bResult) |
|
321 { |
|
322 INFO_PRINTF1(_L("<FONT><B>X3P(Push) wasn't completed before X3P(Timer)</B></FONT>")); |
|
323 SetTestStepResult(EFail); |
|
324 } |
|
325 } |
|
326 break; |
|
327 |
|
328 |
|
329 case 31: |
|
330 case 32: |
|
331 case 34: |
|
332 |
|
333 case 72: |
|
334 case 74: |
|
335 |
|
336 case 112: |
|
337 case 114: |
|
338 { |
|
339 //Set minimum response time for a-gps |
|
340 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
341 |
|
342 // Kick off test. |
|
343 CActiveScheduler::Start(); |
|
344 |
|
345 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
346 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation, notifyMCLocationTime); |
|
347 |
|
348 TBool bResult; |
|
349 if(iParent.iSharedData->iTestModuleInUse) |
|
350 { |
|
351 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
352 } |
|
353 else |
|
354 { |
|
355 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
356 } |
|
357 |
|
358 //Check that X3P(push) complets and MTLR doesn't start |
|
359 //There should be one transmit position flag |
|
360 //There should be just one NotifyMeasurementControlLocation flag to make sure that MTLR is not even started |
|
361 if(doTransmitPosTime.Count() !=1 ||notifyMCLocationTime.Count() !=1 || ! bResult) |
|
362 { |
|
363 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
364 SetTestStepResult(EFail); |
|
365 } |
|
366 } |
|
367 break; |
|
368 |
|
369 case 35: |
|
370 case 75: |
|
371 case 115: |
|
372 { |
|
373 //Set minimum response time for a-gps |
|
374 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
375 |
|
376 // Kick off test. |
|
377 CActiveScheduler::Start(); |
|
378 |
|
379 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
380 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
381 |
|
382 TBool bResult; |
|
383 if(iParent.iSharedData->iTestModuleInUse) |
|
384 { |
|
385 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
386 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
387 } |
|
388 else |
|
389 { |
|
390 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
391 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
392 } |
|
393 |
|
394 //Check that X3P(Push) completes followed by MTLR |
|
395 //There should be one transmit position flag |
|
396 //there should be two notifyMeasurementReportLocation flags |
|
397 //second notifymesurementreportlocation flag should come after transmitPostion flag |
|
398 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=2 ||doTransmitPosTime[0]->Int64() > notifyMRLocationTime[1]->Int64() || !bResult) |
|
399 { |
|
400 INFO_PRINTF1(_L("<FONT><B>MTLR didnt follow X3P(Push) </B></FONT>")); |
|
401 SetTestStepResult(EFail); |
|
402 } |
|
403 } |
|
404 break; |
|
405 |
|
406 |
|
407 case 42: |
|
408 case 43: |
|
409 |
|
410 case 82: //0082 |
|
411 case 83: //0083 |
|
412 |
|
413 case 122: //0122 |
|
414 case 123: //0123 |
|
415 |
|
416 case 1001: |
|
417 { |
|
418 //Set minimum response time for a-gps |
|
419 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
420 |
|
421 // Kick off test. |
|
422 CActiveScheduler::Start(); |
|
423 |
|
424 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
425 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
426 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, notifyReleaseLcsMoLrTime); |
|
427 |
|
428 TBool bResult; |
|
429 if(iParent.iSharedData->iTestModuleInUse) |
|
430 { |
|
431 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
432 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
433 } |
|
434 else |
|
435 { |
|
436 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
437 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
438 } |
|
439 |
|
440 //Check that E-MTLR interrupts X3P(Push) and complets before X3P(Push) |
|
441 //There should be one transmit position flag |
|
442 //There should be two notifiyMeasurementReportLocation flags |
|
443 //The time stamp of second mesurementreportlocation flag is before transmit position flag. |
|
444 //There should be two releaseLcsMoLr flags |
|
445 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=2 || notifyReleaseLcsMoLrTime.Count() !=2 || |
|
446 doTransmitPosTime[0]->Int64() < notifyMRLocationTime[1]->Int64() || !bResult) |
|
447 { |
|
448 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
449 SetTestStepResult(EFail); |
|
450 } |
|
451 } |
|
452 break; |
|
453 |
|
454 case 44: |
|
455 case 84: //0084 |
|
456 case 124: //0124 |
|
457 { |
|
458 // Kick off test. |
|
459 CActiveScheduler::Start(); |
|
460 |
|
461 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
462 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
463 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, notifyReleaseLcsMoLrTime); |
|
464 |
|
465 TBool bResult; |
|
466 if(iParent.iSharedData->iTestModuleInUse) |
|
467 { |
|
468 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
469 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
470 } |
|
471 else |
|
472 { |
|
473 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
474 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
475 } |
|
476 |
|
477 //Check that E-MTLR interrupts X3P(Push) and complets before X3P(Push) |
|
478 //There should be one transmit position flag |
|
479 //There should be three notifiyMeasurementReportLocation flags |
|
480 //The time stamp of third mesurementreportlocation flag is before transmit position flag. |
|
481 //There should be two releaseLcsMoLr flags |
|
482 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=3 || notifyReleaseLcsMoLrTime.Count() !=2 || |
|
483 doTransmitPosTime[0]->Int64() < notifyMRLocationTime[1]->Int64() || !bResult) |
|
484 { |
|
485 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
486 SetTestStepResult(EFail); |
|
487 } |
|
488 } |
|
489 break; |
|
490 |
|
491 case 45: |
|
492 case 85: //0085 |
|
493 case 125: //0125 |
|
494 { |
|
495 //Set minimum response time for a-gps |
|
496 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
497 |
|
498 // Kick off test. |
|
499 CActiveScheduler::Start(); |
|
500 |
|
501 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
502 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
503 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, notifyReleaseLcsMoLrTime); |
|
504 |
|
505 TBool bResult; |
|
506 if(iParent.iSharedData->iTestModuleInUse) |
|
507 { |
|
508 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
509 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
510 } |
|
511 else |
|
512 { |
|
513 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
514 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
515 } |
|
516 |
|
517 //Check that E-MTLR interrupts X3P(Push) and complets before X3P(Push) |
|
518 //There should be one transmit position flag |
|
519 //There should be two notifiyMeasurementReportLocation flags |
|
520 //The time stamp of second mesurementreportlocation flag is after transmit position flag. |
|
521 //There should be one releaseLcsMoLr flags |
|
522 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=2 || notifyReleaseLcsMoLrTime.Count() !=1 || |
|
523 doTransmitPosTime[0]->Int64() > notifyMRLocationTime[1]->Int64() || !bResult) |
|
524 { |
|
525 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
526 SetTestStepResult(EFail); |
|
527 } |
|
528 } |
|
529 break; |
|
530 |
|
531 |
|
532 case 51: |
|
533 //TBD |
|
534 break; |
|
535 |
|
536 case 53: |
|
537 { |
|
538 // Kick off test. |
|
539 CActiveScheduler::Start(); |
|
540 |
|
541 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
542 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation, notifyMCLocationTime); |
|
543 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, notifyReleaseLcsMoLrTime); |
|
544 |
|
545 TBool bResult; |
|
546 if(iParent.iSharedData->iTestModuleInUse) |
|
547 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
548 else |
|
549 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
550 |
|
551 //Check that X3P(Push) cancels X3P(Menu) |
|
552 //There should be one transmit position flag |
|
553 //There should be two notifiyMeasurementControlLocation flags |
|
554 //There should be two releaseLcsMoLr flags |
|
555 if(doTransmitPosTime.Count() !=1 ||notifyMCLocationTime.Count() !=2 || notifyReleaseLcsMoLrTime.Count() !=2 || !bResult) |
|
556 { |
|
557 INFO_PRINTF1(_L("<FONT><B>X3P(Push) didn't cancel X3P(Menu) </B></FONT>")); |
|
558 SetTestStepResult(EFail); |
|
559 } |
|
560 } |
|
561 break; |
|
562 |
|
563 |
|
564 case 61: |
|
565 break; |
|
566 |
|
567 |
|
568 case 71: |
|
569 break; |
|
570 |
|
571 |
|
572 case 81: //0081 |
|
573 break; |
|
574 |
|
575 |
|
576 case 93: //0093 |
|
577 { |
|
578 // Kick off test. |
|
579 CActiveScheduler::Start(); |
|
580 |
|
581 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
582 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation, notifyMCLocationTime); |
|
583 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, notifyReleaseLcsMoLrTime); |
|
584 |
|
585 TBool bResult; |
|
586 if(iParent.iSharedData->iTestModuleInUse) |
|
587 { |
|
588 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
589 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
590 } |
|
591 else |
|
592 { |
|
593 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
594 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
595 } |
|
596 |
|
597 //X3P(Push) should interupt X3P(Timer) and X3P(Timer) should complete after X3P(Push) |
|
598 //There should be two transmit position flags |
|
599 //There should be three release flags |
|
600 if(doTransmitPosTime.Count() !=2 ||notifyMCLocationTime.Count() !=3 || notifyReleaseLcsMoLrTime.Count() !=3 || !bResult) |
|
601 { |
|
602 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
603 SetTestStepResult(EFail); |
|
604 } |
|
605 } |
|
606 break; |
|
607 |
|
608 |
|
609 case 111: |
|
610 break; |
|
611 |
|
612 |
|
613 case 121: //0121 |
|
614 break; |
|
615 |
|
616 |
|
617 case 133: |
|
618 { |
|
619 //Set minimum response time for a-gps |
|
620 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
621 |
|
622 // Kick off test. |
|
623 CActiveScheduler::Start(); |
|
624 |
|
625 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
626 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation, notifyMCLocationTime); |
|
627 |
|
628 TBool bResult; |
|
629 if(iParent.iSharedData->iTestModuleInUse) |
|
630 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
631 else |
|
632 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
633 |
|
634 //X3P(Push) should cancel MTLR when X3P(Push) called at |
|
635 //There should be one transmit position flags |
|
636 //There should be one MeasurementControlLocation flag |
|
637 if(doTransmitPosTime.Count() !=1 ||notifyMCLocationTime.Count() !=1 || !bResult) |
|
638 { |
|
639 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
640 SetTestStepResult(EFail); |
|
641 } |
|
642 } |
|
643 break; |
|
644 |
|
645 case 134: |
|
646 { |
|
647 //Set minimum response time for a-gps |
|
648 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
649 |
|
650 // Kick off test. |
|
651 CActiveScheduler::Start(); |
|
652 |
|
653 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
654 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
655 |
|
656 TBool bResult; |
|
657 if(iParent.iSharedData->iTestModuleInUse) |
|
658 { |
|
659 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
660 } |
|
661 else |
|
662 { |
|
663 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
664 } |
|
665 |
|
666 //X3P(Push) should cancel MTLR when X3P(Push) called at |
|
667 //There should be one transmit position flags |
|
668 //There should be one MeasurementReportLocation flag |
|
669 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=1 || !bResult) |
|
670 { |
|
671 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
672 SetTestStepResult(EFail); |
|
673 } |
|
674 } |
|
675 break; |
|
676 |
|
677 case 135: //0135 |
|
678 |
|
679 case 143: |
|
680 case 144: |
|
681 { |
|
682 //Set minimum response time for a-gps |
|
683 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
684 |
|
685 // Kick off test. |
|
686 CActiveScheduler::Start(); |
|
687 |
|
688 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
689 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
690 |
|
691 TBool bResult; |
|
692 if(iParent.iSharedData->iTestModuleInUse) |
|
693 { |
|
694 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
695 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
696 } |
|
697 else |
|
698 { |
|
699 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
700 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
701 } |
|
702 |
|
703 //X3P(Push) should complete after MTLR as its too late to cancel MTLR. |
|
704 //There should be one transmit position flags |
|
705 //There should be two MeasurementReportLocation flag |
|
706 //The time stamp of Transmit position should be after second MeasurementReportLocation flag |
|
707 if(doTransmitPosTime.Count() !=1 ||notifyMRLocationTime.Count() !=2 || |
|
708 doTransmitPosTime[0]->Int64() < notifyMRLocationTime[1]->Int64() || !bResult) |
|
709 { |
|
710 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
711 SetTestStepResult(EFail); |
|
712 } |
|
713 } |
|
714 break; |
|
715 |
|
716 |
|
717 case 1002: |
|
718 { |
|
719 //Set minimum response time for a-gps |
|
720 utils.NotifyModuleOfConfigChangeL(modDataInTimeout); |
|
721 |
|
722 //Kick off test. |
|
723 CActiveScheduler::Start(); |
|
724 |
|
725 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
726 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
727 |
|
728 TBool bResult; |
|
729 if(iParent.iSharedData->iTestModuleInUse) |
|
730 { |
|
731 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[2])), T_LbsUtils::EExactAccuracy); |
|
732 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::EExactAccuracy); |
|
733 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[2])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::EExactAccuracy); |
|
734 } |
|
735 else |
|
736 { |
|
737 bResult = utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[2])), T_LbsUtils::ERoughAccuracy); |
|
738 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[1])), T_LbsUtils::ERoughAccuracy); |
|
739 bResult &= utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[2])), *(reinterpret_cast<TPositionInfo*>(curPosInfoArr[0])), T_LbsUtils::ERoughAccuracy); |
|
740 } |
|
741 |
|
742 //X3P(Push) should cancel MTLR when X3P(Push) called at |
|
743 //There should be one transmit position flags |
|
744 //There should be one MeasurementReportLocation flag |
|
745 if(doTransmitPosTime.Count() !=2 ||notifyMRLocationTime.Count() !=3 || |
|
746 doTransmitPosTime[0]->Int64() < notifyMRLocationTime[1]->Int64() || !bResult) |
|
747 { |
|
748 INFO_PRINTF1(_L("<FONT><B>MTLR wasn't get cancelled </B></FONT>")); |
|
749 SetTestStepResult(EFail); |
|
750 } |
|
751 } |
|
752 break; |
|
753 |
|
754 case 1003: |
|
755 //TBD |
|
756 ASSERT(FALSE); |
|
757 break; |
|
758 |
|
759 case 1004: |
|
760 //TBD |
|
761 ASSERT(FALSE); |
|
762 break; |
|
763 |
|
764 |
|
765 default: |
|
766 { |
|
767 User::Panic(KLbsX3PStep_Conflict, KErrUnknown); |
|
768 } |
|
769 } |
|
770 } |
|
771 // Clean up. |
|
772 iNetSim.Close(); |
|
773 //CleanupStack::PopAndDestroy(&iTransmitPositioner2); |
|
774 //CleanupStack::PopAndDestroy(&iTransmitPositioner); |
|
775 //CleanupStack::PopAndDestroy(&server); |
|
776 } |
|
777 |
|
778 |
|
779 INFO_PRINTF1(_L("<<CT_LbsX3PStep_Conflict::doTestStepL()")); |
|
780 |
|
781 return TestStepResult(); |
|
782 } |
|
783 |
|
784 void CT_LbsX3PStep_Conflict::MT_LbsX3PDoRefPosCallback(const TRequestStatus& aStatus,const TPositionInfo& aRefPosInfo) |
|
785 { |
|
786 (void)aStatus; |
|
787 (void)aRefPosInfo; |
|
788 } |
|
789 |
|
790 |
|
791 |
|
792 /** |
|
793 Transmit Position callback. |
|
794 **/ |
|
795 |
|
796 void CT_LbsX3PStep_Conflict::MT_LbsX3PDoTransmitPosCallback(TRequestStatus& aStatus, CT_LbsX3PDoTransmitPos* aDoTransmitPosAO) |
|
797 { |
|
798 INFO_PRINTF1(_L("Got - Transmit Position - Callback Event.")); |
|
799 |
|
800 //We can check callback completion order here in the case of two X3Ps |
|
801 |
|
802 switch(iTestCaseId) |
|
803 { |
|
804 case 22: |
|
805 case 54: |
|
806 case 62: |
|
807 case 94: |
|
808 case 102: |
|
809 { |
|
810 if(iterator==0 && aDoTransmitPosAO != iDoTransmitPosAO) |
|
811 iStateX3P=EX3PErrorReported; |
|
812 else if(iterator==1 && aDoTransmitPosAO != iDoTransmitPosAO2) |
|
813 iStateX3P=EX3PErrorReported; |
|
814 else if(aStatus.Int() != KErrNone) |
|
815 iStateX3P=EX3PErrorReported; |
|
816 } |
|
817 break; |
|
818 |
|
819 case 53: |
|
820 { |
|
821 if(iterator==0 && aStatus.Int() != KErrCancel) |
|
822 iStateX3P=EX3PErrorReported; |
|
823 else if(iterator==1 && aDoTransmitPosAO != iDoTransmitPosAO2) |
|
824 iStateX3P=EX3PErrorReported; |
|
825 else if(aStatus.Int() != KErrNone) |
|
826 iStateX3P=EX3PErrorReported; |
|
827 } |
|
828 break; |
|
829 |
|
830 case 93: //Might have to modify as Timer and Menu priorities are same in the case of MOAP |
|
831 { |
|
832 if(iterator==0 && aDoTransmitPosAO != iDoTransmitPosAO && aStatus.Int() != KErrCancel) |
|
833 iStateX3P=EX3PErrorReported; |
|
834 else if(iterator==1 && aDoTransmitPosAO != iDoTransmitPosAO2) |
|
835 iStateX3P=EX3PErrorReported; |
|
836 else if(iterator==2 && aDoTransmitPosAO != iDoTransmitPosAO) |
|
837 iStateX3P=EX3PErrorReported; |
|
838 else if(aStatus.Int() != KErrNone) |
|
839 iStateX3P=EX3PErrorReported; |
|
840 } |
|
841 break; |
|
842 |
|
843 //For the following cases, the error code should never be cancel or anything else... |
|
844 case 32: |
|
845 case 34: |
|
846 case 35: |
|
847 case 45: |
|
848 |
|
849 case 72: |
|
850 case 74: |
|
851 case 75: |
|
852 case 85: |
|
853 |
|
854 case 112: |
|
855 case 114: |
|
856 case 115: |
|
857 case 125: |
|
858 |
|
859 case 133: |
|
860 case 134: |
|
861 case 135: |
|
862 case 143: |
|
863 case 144: |
|
864 { |
|
865 if(aStatus.Int() != KErrNone) |
|
866 iStateX3P=EX3PErrorReported; |
|
867 } |
|
868 break; |
|
869 |
|
870 case 42: |
|
871 case 43: |
|
872 case 44: |
|
873 |
|
874 case 82: |
|
875 case 83: |
|
876 case 84: |
|
877 |
|
878 case 122: |
|
879 case 123: |
|
880 case 124: |
|
881 { |
|
882 if(iterator==0 && aStatus.Int() != KErrCancel) |
|
883 iStateX3P=EX3PErrorReported; |
|
884 else if(aStatus.Int() != KErrNone) |
|
885 iStateX3P=EX3PErrorReported; |
|
886 } |
|
887 break; |
|
888 |
|
889 default: |
|
890 break; |
|
891 } |
|
892 |
|
893 if(iStateX3P == EX3PErrorReported) |
|
894 { |
|
895 INFO_PRINTF1(_L("Error in X3P Completion")); |
|
896 SetTestStepResult(EFail); |
|
897 } |
|
898 |
|
899 SetCallbackFlag(KLbsCallback_Got_NotifyDoTransmitPos); |
|
900 } |
|
901 |
|
902 void CT_LbsX3PStep_Conflict::MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus) |
|
903 { |
|
904 INFO_PRINTF1(_L("Got - Notify Update - Callback Event.")); |
|
905 |
|
906 switch(iTestCaseId) |
|
907 { |
|
908 case 2: |
|
909 case 3: |
|
910 case 4: |
|
911 if(aStatus.Int() != KErrCancel) |
|
912 iStateX3P = EX3PErrorReported; |
|
913 break; |
|
914 |
|
915 case 5: |
|
916 case 12: |
|
917 if(aStatus.Int() != KErrNone || !TestCallbackFlags(KLbsCallback_Got_NotifyDoTransmitPos)) |
|
918 iStateX3P = EX3PErrorReported; |
|
919 |
|
920 iState = EWaiting; |
|
921 break; |
|
922 |
|
923 default: |
|
924 iStateX3P = EX3PErrorReported; |
|
925 } |
|
926 |
|
927 if(iStateX3P==EX3PErrorReported) |
|
928 { |
|
929 INFO_PRINTF1(_L("Failed in Notify Update")); |
|
930 SetTestStepResult(EFail); |
|
931 } |
|
932 |
|
933 SetCallbackFlag(KLbsCallback_Got_DoPosUpdate); |
|
934 } |
|
935 |
|
936 /** Keep alive timer callback. |
|
937 Check the state machine to determine when to halt the test. Once all the callbacks |
|
938 have been received the test can end. |
|
939 This function should just monitor iState and nothing else releated to the test. |
|
940 **/ |
|
941 |
|
942 void CT_LbsX3PStep_Conflict::HandleTimerL(TInt aTimerId, const TTime& aTargetTime) |
|
943 { |
|
944 (void)aTimerId; |
|
945 (void)aTargetTime; |
|
946 |
|
947 INFO_PRINTF1(_L("Got - Keep Alive Timer - Callback Event.")); |
|
948 |
|
949 RPointerArray<TTime> doTransmitPosTime; |
|
950 RPointerArray<TTime> releaseLcsMoLrTime; |
|
951 RPointerArray<TTime> notifyMRLocationTime; |
|
952 |
|
953 AnalyseCallbackFlags( KLbsCallback_Got_NotifyDoTransmitPos, doTransmitPosTime); |
|
954 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation, notifyMRLocationTime); |
|
955 AnalyseCallbackFlags( KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr, releaseLcsMoLrTime); |
|
956 |
|
957 //Setting termination condition |
|
958 switch(iTestCaseId) |
|
959 { |
|
960 case 2: |
|
961 case 3: |
|
962 case 4: |
|
963 { |
|
964 if(doTransmitPosTime.Count()==1) |
|
965 iState = EWaiting; |
|
966 } |
|
967 break; |
|
968 |
|
969 case 5: //These cases are already handled in MT_LbsDoPosUpdateCallback() function |
|
970 case 12: |
|
971 break; |
|
972 |
|
973 //If we got two Transmit positions, we can terminate |
|
974 case 22: |
|
975 case 53: |
|
976 case 54: |
|
977 case 62: |
|
978 case 94: |
|
979 case 102: |
|
980 { |
|
981 if(doTransmitPosTime.Count()==2) |
|
982 iState = EWaiting; |
|
983 } |
|
984 break; |
|
985 |
|
986 case 93: |
|
987 { |
|
988 if(doTransmitPosTime.Count()==3) |
|
989 iState = EWaiting; |
|
990 } |
|
991 break; |
|
992 |
|
993 //The second MTLR request should be cancelled so if we get one Transmit Position, we can terminate |
|
994 case 32: |
|
995 case 34: |
|
996 case 72: |
|
997 case 74: |
|
998 case 112: |
|
999 case 114: |
|
1000 |
|
1001 case 133: |
|
1002 case 134: |
|
1003 { |
|
1004 if(doTransmitPosTime.Count()==1) |
|
1005 iState = EWaiting; |
|
1006 } |
|
1007 break; |
|
1008 |
|
1009 //When X3P is interrupted by (E)MTLR, if we get one transmit position and two ReleaseLcsMoLr, we can terminate |
|
1010 case 42: |
|
1011 case 43: |
|
1012 case 44: |
|
1013 |
|
1014 case 82: //0082 |
|
1015 case 83: //0083 |
|
1016 case 84: //0084 |
|
1017 |
|
1018 case 122: //0122 |
|
1019 case 123: //0123 |
|
1020 case 124: //0124 |
|
1021 { |
|
1022 if(doTransmitPosTime.Count()==2 && releaseLcsMoLrTime.Count()==2) |
|
1023 iState = EWaiting; |
|
1024 } |
|
1025 break; |
|
1026 |
|
1027 //When X3P is finished followed by (E)MTLR, if we get one transmit position and one ReleaseLcsMoLr, we can terminate |
|
1028 case 35: |
|
1029 case 45: |
|
1030 case 75: |
|
1031 case 85: //0085 |
|
1032 case 115: |
|
1033 case 125: //0125 |
|
1034 { |
|
1035 if(doTransmitPosTime.Count()==1 && releaseLcsMoLrTime.Count()==1) |
|
1036 iState = EWaiting; |
|
1037 } |
|
1038 break; |
|
1039 |
|
1040 //If MTLR is finished followed by X3P, we should get one transmitposition and one Measurementcontrolreport to terminate |
|
1041 case 135: //0135 |
|
1042 case 143: |
|
1043 case 144: |
|
1044 { |
|
1045 if(doTransmitPosTime.Count()==1 && notifyMRLocationTime.Count()==1) |
|
1046 iState = EWaiting; |
|
1047 } |
|
1048 break; |
|
1049 |
|
1050 default: |
|
1051 { |
|
1052 INFO_PRINTF1(_L("Unknown Error")); |
|
1053 SetTestStepResult(EFail); |
|
1054 } |
|
1055 break; |
|
1056 } |
|
1057 |
|
1058 |
|
1059 // We stop test from here when in the correct state and , there should not be anything outstanding. |
|
1060 if (iStateX3P == EX3PErrorReported ||iState == EWaiting) //(iState != EDone && (iStateX3P == EX3PDone || iStateX3P == EX3PNormal) && (TestCallbackFlags(KLbsCallback_Got_NotifyDoTransmitPos) ||TestCallbackFlags(KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation)))) |
|
1061 { |
|
1062 iState = EDone; |
|
1063 iStateX3P = EX3POk; |
|
1064 CActiveScheduler::Stop(); |
|
1065 } |
|
1066 else // Keep going, still waiting for callbacks. |
|
1067 { |
|
1068 TTimeIntervalMicroSeconds32 interval(KLbsKeepAlivePeriod1); |
|
1069 iKeepAliveTimer->SetTimer(interval); |
|
1070 } |
|
1071 } |
|
1072 |
|
1073 void CT_LbsX3PStep_Conflict::Connected() |
|
1074 { |
|
1075 INFO_PRINTF1(_L("Got - NetSim Connect - Callback Event.")); |
|
1076 |
|
1077 // Create a posinfo and store in our shared array for later verification. |
|
1078 RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr; |
|
1079 iPosInfo0 = new(ELeave) TPositionInfo(); |
|
1080 iPosInfo1 = new(ELeave) TPositionInfo(); |
|
1081 |
|
1082 T_LbsUtils utils; |
|
1083 utils.ResetAndDestroy_PosInfoArr(posInfoArr); // Clear previous entries before new entry is appended. |
|
1084 posInfoArr.Append(iPosInfo0); |
|
1085 posInfoArr.Append(iPosInfo1); |
|
1086 |
|
1087 switch(iTestCaseId) |
|
1088 { |
|
1089 |
|
1090 case 2: |
|
1091 case 3: |
|
1092 case 4: |
|
1093 case 5: |
|
1094 |
|
1095 case 12: |
|
1096 { |
|
1097 iDoPosUpdate->StartL(*iPosInfo0); |
|
1098 } |
|
1099 break; |
|
1100 |
|
1101 case 21: |
|
1102 case 22: |
|
1103 |
|
1104 case 31: |
|
1105 case 32: |
|
1106 case 34: |
|
1107 case 35: |
|
1108 |
|
1109 //case 0041: |
|
1110 case 42: |
|
1111 case 43: |
|
1112 case 44: |
|
1113 |
|
1114 case 1001: |
|
1115 { |
|
1116 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, *iPosInfo0); |
|
1117 |
|
1118 if(iTestCaseId == 21) |
|
1119 iDoTransmitPosAO2->TransmitPosition( KDestIDL, priorityL, *iPosInfo1); |
|
1120 else if(iTestCaseId == 31 || iTestCaseId == 41) |
|
1121 { |
|
1122 //Do we need to put some sleep - TBD |
|
1123 //Ask Netsim to send MTLR |
|
1124 TLbsNetPosRequestPrivacy reqType; |
|
1125 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1126 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1127 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1128 |
|
1129 if(iTestCaseId == 41) |
|
1130 iNetSim.SetEmergenyStatus(ETrue); |
|
1131 |
|
1132 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1133 } |
|
1134 } |
|
1135 break; |
|
1136 |
|
1137 //case 51: |
|
1138 case 53: |
|
1139 case 54: |
|
1140 |
|
1141 //case 61: |
|
1142 case 62: |
|
1143 |
|
1144 //case 0071: |
|
1145 case 72: |
|
1146 case 74: |
|
1147 case 75: |
|
1148 |
|
1149 //case 81: //0081 - I dont know why but compiler gives error if I write it case 0081 :( |
|
1150 case 82: //0082 |
|
1151 case 83: //0083 |
|
1152 case 84: //0084 |
|
1153 { |
|
1154 iDoTransmitPosAO->TransmitPosition( KDestIDM, priorityM, *iPosInfo0); |
|
1155 |
|
1156 #if 0 //will have to look later |
|
1157 if(iTestCaseId == 51) |
|
1158 { |
|
1159 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1160 } |
|
1161 else if(iTestCaseId == 61) |
|
1162 { |
|
1163 iDoTransmitPosAO->TransmitPosition( KDestIDL, priorityL, *iPosInfo1); |
|
1164 } |
|
1165 else if(iTestCaseId == 71 || iTestCaseId == 81) |
|
1166 { |
|
1167 //Do we need to put some sleep - TBD |
|
1168 //Ask Netsim to send MTLR |
|
1169 TLbsNetPosRequestPrivacy reqType; |
|
1170 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1171 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1172 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1173 |
|
1174 if(iTestCaseId == 81) |
|
1175 iNetSim.SetEmergenyStatus(ETrue); |
|
1176 |
|
1177 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1178 } |
|
1179 #endif |
|
1180 |
|
1181 } |
|
1182 break; |
|
1183 |
|
1184 case 93: //0093 |
|
1185 case 94: //0094 |
|
1186 |
|
1187 case 102: |
|
1188 |
|
1189 //case 111: |
|
1190 case 112: |
|
1191 case 114: |
|
1192 case 115: |
|
1193 |
|
1194 //case 121: //0121 - Now compiler cries as constant used *more than once* if I write it as 0121 :( |
|
1195 case 122: //0122 |
|
1196 case 123: //0123 |
|
1197 case 124: //0124 |
|
1198 { |
|
1199 iDoTransmitPosAO->TransmitPosition( KDestIDL, priorityL, *iPosInfo0); |
|
1200 |
|
1201 #if 0 //will have to look later |
|
1202 if(iTestCaseId == 111 || iTestCaseId == 121) |
|
1203 { |
|
1204 //Do we need to put some sleep - TBD |
|
1205 //Ask Netsim to send MTLR |
|
1206 TLbsNetPosRequestPrivacy reqType; |
|
1207 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1208 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1209 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1210 |
|
1211 if(iTestCaseId == 121) |
|
1212 iNetSim.SetEmergenyStatus(ETrue); |
|
1213 |
|
1214 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1215 } |
|
1216 #endif |
|
1217 } |
|
1218 break; |
|
1219 |
|
1220 case 133: |
|
1221 case 134: |
|
1222 case 135: //0135 |
|
1223 |
|
1224 case 143: |
|
1225 case 144: |
|
1226 { |
|
1227 //Ask Netsim to send MTLR |
|
1228 TLbsNetPosRequestPrivacy reqType; |
|
1229 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1230 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1231 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1232 |
|
1233 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1234 } |
|
1235 break; |
|
1236 |
|
1237 case 1002: |
|
1238 { |
|
1239 //TPositionInfo* posInfo2; |
|
1240 //posInfo2= new(ELeave) TPositionInfo(); |
|
1241 //posInfoArr.Append(posInfo2); |
|
1242 |
|
1243 iDoTransmitPosAO->TransmitPosition( KDestIDL, priorityL, *iPosInfo0); |
|
1244 iDoTransmitPosAO2->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1245 } |
|
1246 break; |
|
1247 |
|
1248 default: |
|
1249 iStateX3P = EX3PErrorReported; |
|
1250 break; |
|
1251 } |
|
1252 |
|
1253 SetCallbackFlag(KLbsCallback_NetSim_Got_Connect); |
|
1254 } |
|
1255 |
|
1256 void CT_LbsX3PStep_Conflict::NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult) |
|
1257 { |
|
1258 (void)aResult; |
|
1259 |
|
1260 INFO_PRINTF1(_L("Got - NetSim NotifyReleaseLcsLocationNotification - Callback Event.")); |
|
1261 |
|
1262 switch(iTestCaseId) |
|
1263 { |
|
1264 //case 0031: |
|
1265 case 32: |
|
1266 case 34: |
|
1267 |
|
1268 //case 0071: |
|
1269 case 72: |
|
1270 case 74: |
|
1271 |
|
1272 //case 0111: |
|
1273 case 112: |
|
1274 case 114: |
|
1275 |
|
1276 case 1001: //This case is network induced request (call StartNetworkLocationRequest()) |
|
1277 iStateX3P = EX3PErrorReported; |
|
1278 break; |
|
1279 |
|
1280 case 35: |
|
1281 case 75: |
|
1282 case 115: |
|
1283 { |
|
1284 iNetSim.StartNetworkLocationRequest(); |
|
1285 break; |
|
1286 } |
|
1287 |
|
1288 //case 0041: |
|
1289 case 42: |
|
1290 case 43: |
|
1291 case 44: |
|
1292 case 45: |
|
1293 |
|
1294 //case 81: //0081 |
|
1295 case 82: //0082 |
|
1296 case 83: //0083 |
|
1297 case 84: //0084 |
|
1298 case 85: //0085 |
|
1299 |
|
1300 //case 121: //0121 |
|
1301 case 122: //0122 |
|
1302 case 123: //0123 |
|
1303 case 124: //0124 |
|
1304 case 125: //0125 |
|
1305 { |
|
1306 //Do we need to set emergency flag here also for MTLR - TBD |
|
1307 iNetSim.StartNetworkLocationRequest(); |
|
1308 break; |
|
1309 } |
|
1310 |
|
1311 case 133: |
|
1312 { |
|
1313 iNetSim.StartNetworkLocationRequest(); |
|
1314 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1315 } |
|
1316 break; |
|
1317 |
|
1318 case 134: |
|
1319 { |
|
1320 iNetSim.StartNetworkLocationRequest(); |
|
1321 iDoTransmitPosAO->TransmitPosition( KDestIDL, priorityL, *iPosInfo1); |
|
1322 } |
|
1323 break; |
|
1324 |
|
1325 default: |
|
1326 iStateX3P = EX3PErrorReported; |
|
1327 break; |
|
1328 } |
|
1329 |
|
1330 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyReleaseLcsLocationNotification); |
|
1331 iNetSim.Next(KErrNone); |
|
1332 } |
|
1333 |
|
1334 /** |
|
1335 The response to an MoLr (FROM: Gateway) |
|
1336 @param aPosition the position |
|
1337 */ |
|
1338 void CT_LbsX3PStep_Conflict::NotifyMeasurementReportLocation(const TPositionInfo& aPosition) |
|
1339 { |
|
1340 INFO_PRINTF1(_L("Got - NetSim NotifyMeasurementReportLocation - Callback Event.")); |
|
1341 |
|
1342 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
1343 //TPositionInfo* verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]); |
|
1344 T_LbsUtils utils; |
|
1345 |
|
1346 switch(iTestCaseId) |
|
1347 { |
|
1348 case 2: |
|
1349 case 3: |
|
1350 |
|
1351 case 53: |
|
1352 { |
|
1353 if(iterator==0) |
|
1354 { |
|
1355 iStateX3P=EX3PErrorReported; |
|
1356 } |
|
1357 if(iterator==1) |
|
1358 { |
|
1359 if(iParent.iSharedData->iTestModuleInUse) |
|
1360 { |
|
1361 //temp code -braj |
|
1362 //TPositionInfo* pos = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1]); |
|
1363 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1364 iStateX3P=EX3PErrorReported; |
|
1365 } |
|
1366 else |
|
1367 { |
|
1368 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1369 iStateX3P=EX3PErrorReported; |
|
1370 } |
|
1371 } |
|
1372 else |
|
1373 iStateX3P=EX3PErrorReported; |
|
1374 } |
|
1375 break; |
|
1376 |
|
1377 case 4: |
|
1378 case 54: |
|
1379 case 94: //0094 |
|
1380 case 135: |
|
1381 |
|
1382 case 5: |
|
1383 case 12: |
|
1384 case 22: |
|
1385 case 62: |
|
1386 case 102: |
|
1387 case 35: |
|
1388 case 45: |
|
1389 case 75: |
|
1390 case 85: //0085 |
|
1391 case 115: |
|
1392 case 125: //0125 |
|
1393 |
|
1394 case 143: |
|
1395 case 144: |
|
1396 { |
|
1397 if(iterator==0) |
|
1398 { |
|
1399 if(iParent.iSharedData->iTestModuleInUse) |
|
1400 { |
|
1401 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1402 iStateX3P=EX3PErrorReported; |
|
1403 } |
|
1404 else |
|
1405 { |
|
1406 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1407 iStateX3P=EX3PErrorReported; |
|
1408 } |
|
1409 |
|
1410 if(iTestCaseId==4 || iTestCaseId== 54 || iTestCaseId== 94 ||iTestCaseId== 135) |
|
1411 iDoTransmitPosAO2->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1412 } |
|
1413 else if(iterator==1) |
|
1414 { |
|
1415 if(iParent.iSharedData->iTestModuleInUse) |
|
1416 { |
|
1417 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1418 iStateX3P=EX3PErrorReported; |
|
1419 } |
|
1420 else |
|
1421 { |
|
1422 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1423 iStateX3P=EX3PErrorReported; |
|
1424 } |
|
1425 } |
|
1426 else |
|
1427 iStateX3P=EX3PErrorReported; |
|
1428 } |
|
1429 break; |
|
1430 |
|
1431 //case 31: |
|
1432 case 32: |
|
1433 |
|
1434 case 71: |
|
1435 case 72: |
|
1436 |
|
1437 case 111: |
|
1438 case 112: |
|
1439 |
|
1440 case 34: |
|
1441 case 74: |
|
1442 case 114: |
|
1443 { |
|
1444 if(iterator==0) |
|
1445 { |
|
1446 //compare position with the second entry in verify array. |
|
1447 if(iParent.iSharedData->iTestModuleInUse) |
|
1448 { |
|
1449 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1450 iStateX3P=EX3PErrorReported; |
|
1451 } |
|
1452 else |
|
1453 { |
|
1454 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1455 iStateX3P=EX3PErrorReported; |
|
1456 } |
|
1457 |
|
1458 if(iTestCaseId == 34 || iTestCaseId == 74 || iTestCaseId == 114) |
|
1459 { |
|
1460 //Ask Netsim to send MTLR |
|
1461 TLbsNetPosRequestPrivacy reqType; |
|
1462 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1463 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1464 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1465 |
|
1466 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1467 } |
|
1468 } |
|
1469 else |
|
1470 iStateX3P = EX3PErrorReported; |
|
1471 } |
|
1472 break; |
|
1473 |
|
1474 case 42: |
|
1475 case 43: |
|
1476 case 44: |
|
1477 |
|
1478 case 82: //0082 |
|
1479 case 83: //0083 |
|
1480 case 84: |
|
1481 |
|
1482 case 93: //0093 |
|
1483 |
|
1484 case 122: //0122 |
|
1485 case 123: //0123 |
|
1486 case 124: |
|
1487 |
|
1488 case 1001: |
|
1489 { |
|
1490 if(iterator==0) |
|
1491 { |
|
1492 iStateX3P = EX3PErrorReported; |
|
1493 } |
|
1494 else if(iterator==1) |
|
1495 { |
|
1496 //This should return E-MTLR location |
|
1497 //compare position with the second entry in verify array. |
|
1498 if(iParent.iSharedData->iTestModuleInUse) |
|
1499 { |
|
1500 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1501 iStateX3P=EX3PErrorReported; |
|
1502 } |
|
1503 else |
|
1504 { |
|
1505 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1506 iStateX3P=EX3PErrorReported; |
|
1507 } |
|
1508 } |
|
1509 else if(iterator==2) |
|
1510 { |
|
1511 //This should return X3P location |
|
1512 //compare position with the second entry in verify array. |
|
1513 if(iParent.iSharedData->iTestModuleInUse) |
|
1514 { |
|
1515 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1516 iStateX3P=EX3PErrorReported; |
|
1517 } |
|
1518 else |
|
1519 { |
|
1520 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1521 iStateX3P=EX3PErrorReported; |
|
1522 } |
|
1523 } |
|
1524 else |
|
1525 iStateX3P = EX3PErrorReported; |
|
1526 } |
|
1527 break; |
|
1528 |
|
1529 case 133: |
|
1530 case 134: |
|
1531 { |
|
1532 if(iterator==0) |
|
1533 { |
|
1534 //compare position with the second entry in verify array. |
|
1535 //This should return X3P(Push) location as MTLR is cancelled |
|
1536 if(iParent.iSharedData->iTestModuleInUse) |
|
1537 { |
|
1538 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1539 iStateX3P=EX3PErrorReported; |
|
1540 } |
|
1541 else |
|
1542 { |
|
1543 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1544 iStateX3P=EX3PErrorReported; |
|
1545 } |
|
1546 } |
|
1547 else |
|
1548 iStateX3P = EX3PErrorReported; |
|
1549 } |
|
1550 break; |
|
1551 |
|
1552 case 1002: |
|
1553 { |
|
1554 if(iterator==0) |
|
1555 { |
|
1556 //This should return E-MTLR location |
|
1557 //compare position with the second entry in verify array. |
|
1558 if(iParent.iSharedData->iTestModuleInUse) |
|
1559 { |
|
1560 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[2])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1561 iStateX3P=EX3PErrorReported; |
|
1562 } |
|
1563 else |
|
1564 { |
|
1565 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[2])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1566 iStateX3P=EX3PErrorReported; |
|
1567 } |
|
1568 } |
|
1569 else if(iterator==1) |
|
1570 { |
|
1571 //This should return X3P location |
|
1572 //compare position with the second entry in verify array. |
|
1573 if(iParent.iSharedData->iTestModuleInUse) |
|
1574 { |
|
1575 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1576 iStateX3P=EX3PErrorReported; |
|
1577 } |
|
1578 else |
|
1579 { |
|
1580 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1581 iStateX3P=EX3PErrorReported; |
|
1582 } |
|
1583 } |
|
1584 else if(iterator==2) |
|
1585 { |
|
1586 //This should return X3P location |
|
1587 //compare position with the second entry in verify array. |
|
1588 if(iParent.iSharedData->iTestModuleInUse) |
|
1589 { |
|
1590 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1591 iStateX3P=EX3PErrorReported; |
|
1592 } |
|
1593 else |
|
1594 { |
|
1595 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1596 iStateX3P=EX3PErrorReported; |
|
1597 } |
|
1598 } |
|
1599 else |
|
1600 iStateX3P = EX3PErrorReported; |
|
1601 } |
|
1602 break; |
|
1603 |
|
1604 |
|
1605 default: |
|
1606 break; |
|
1607 } |
|
1608 |
|
1609 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation); |
|
1610 |
|
1611 if(iStateX3P==EX3PErrorReported) |
|
1612 { |
|
1613 INFO_PRINTF1(_L("Failed test, position incorrect.")); |
|
1614 SetTestStepResult(EFail); |
|
1615 } |
|
1616 //Increment iterator in case of MTLR test cases. For only X3P conflicts, it should be incremented in NotifyReleaseLcsMoLr - TBD |
|
1617 if(iTestCaseId==143 || iTestCaseId==144 || iTestCaseId==1002) |
|
1618 iterator++; |
|
1619 iNetSim.Next(KErrNone); |
|
1620 } |
|
1621 |
|
1622 void CT_LbsX3PStep_Conflict::NotifyMeasurementControlLocation(const TPositionInfo& aPosition, |
|
1623 const RLbsAssistanceDataBuilderSet& aData, |
|
1624 const TLbsNetPosRequestQuality& aQuality) |
|
1625 { |
|
1626 (void)aPosition; |
|
1627 (void)aData; |
|
1628 (void)aQuality; |
|
1629 |
|
1630 INFO_PRINTF1(_L("Got - NetSim NotifyMeasurementControlLocation - Callback Event.")); |
|
1631 |
|
1632 switch(iTestCaseId) |
|
1633 { |
|
1634 case 3: |
|
1635 case 93: //0093 |
|
1636 { |
|
1637 if(iterator==0) |
|
1638 { |
|
1639 INFO_PRINTF1(_L("Iterator = 0; calling TransmitPosition() from NotifyMeasurementControlLocation callback.")); |
|
1640 iDoTransmitPosAO2->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1641 } |
|
1642 |
|
1643 break; |
|
1644 } |
|
1645 |
|
1646 case 43: |
|
1647 case 83: //0083 |
|
1648 case 123: //0123 |
|
1649 { |
|
1650 if(iterator==0) |
|
1651 { |
|
1652 //Ask Netsim to send MTLR |
|
1653 TLbsNetPosRequestPrivacy reqType; |
|
1654 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1655 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1656 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1657 |
|
1658 iNetSim.SetEmergenyStatus(ETrue); |
|
1659 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1660 } |
|
1661 } |
|
1662 break; |
|
1663 |
|
1664 case 53: |
|
1665 case 134: |
|
1666 { |
|
1667 if(iterator==0) |
|
1668 { |
|
1669 INFO_PRINTF1(_L("Iterator = 0; calling TransmitPosition() from NotifyMeasurementControlLocation callback.")); |
|
1670 iDoTransmitPosAO2->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1671 } |
|
1672 } |
|
1673 break; |
|
1674 |
|
1675 case 144: |
|
1676 { |
|
1677 if(iterator==0) |
|
1678 { |
|
1679 INFO_PRINTF1(_L("Iterator = 0; calling TransmitPosition() from NotifyMeasurementControlLocation callback.")); |
|
1680 iDoTransmitPosAO2->TransmitPosition( KDestIDL, priorityL, *iPosInfo1); |
|
1681 } |
|
1682 } |
|
1683 break; |
|
1684 |
|
1685 default: |
|
1686 break; |
|
1687 } |
|
1688 |
|
1689 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation); |
|
1690 iNetSim.Next(KErrNone); |
|
1691 } |
|
1692 |
|
1693 void CT_LbsX3PStep_Conflict::NotifyRegisterLcsMoLr(const TDesC& aData) |
|
1694 { |
|
1695 INFO_PRINTF1(_L("Got - NetSim NotifyRegisterLcsMoLr - Callback Event.")); |
|
1696 |
|
1697 switch(iTestCaseId) |
|
1698 { |
|
1699 case 2: |
|
1700 { |
|
1701 if(iterator==0) |
|
1702 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1703 else if(iterator==1) |
|
1704 { |
|
1705 if(aData.Compare(KDestIDH) !=0) |
|
1706 iStateX3P = EX3PErrorReported; |
|
1707 } |
|
1708 else |
|
1709 iStateX3P = EX3PErrorReported; |
|
1710 } |
|
1711 break; |
|
1712 |
|
1713 case 3: |
|
1714 case 4: |
|
1715 case 5: |
|
1716 { |
|
1717 if(iterator == 1) |
|
1718 { |
|
1719 if(aData.Compare(KDestIDH) != 0) |
|
1720 iStateX3P = EX3PErrorReported; |
|
1721 } |
|
1722 else if (iterator == 2) |
|
1723 { |
|
1724 iStateX3P = EX3PErrorReported; |
|
1725 } |
|
1726 } |
|
1727 break; |
|
1728 |
|
1729 case 12: |
|
1730 case 22: |
|
1731 |
|
1732 case 62: |
|
1733 |
|
1734 case 102: |
|
1735 { |
|
1736 if(iterator==0) |
|
1737 iDoTransmitPosAO2->TransmitPosition( KDestIDL, priorityL, *iPosInfo1); |
|
1738 else if(iterator==1) |
|
1739 { |
|
1740 if(aData.Compare(KDestIDL) !=0) |
|
1741 iStateX3P= EX3PErrorReported; |
|
1742 } |
|
1743 else |
|
1744 iStateX3P = EX3PErrorReported; |
|
1745 } |
|
1746 break; |
|
1747 |
|
1748 case 32: |
|
1749 case 42: |
|
1750 case 72: |
|
1751 case 82: //0082 |
|
1752 case 112: |
|
1753 case 122: //0122 |
|
1754 { |
|
1755 if(iterator==0) |
|
1756 { |
|
1757 //Ask Netsim to send MTLR |
|
1758 TLbsNetPosRequestPrivacy reqType; |
|
1759 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1760 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1761 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1762 |
|
1763 if(iTestCaseId == 42 || iTestCaseId == 82 || iTestCaseId == 122) |
|
1764 iNetSim.SetEmergenyStatus(ETrue); |
|
1765 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1766 } |
|
1767 else if(iterator==1 && (iTestCaseId == 32 || iTestCaseId == 42)) |
|
1768 { |
|
1769 if(aData.Compare(KDestIDH) != 0) |
|
1770 iStateX3P = EX3PErrorReported; |
|
1771 } |
|
1772 else if(iterator==1 && (iTestCaseId == 72 || iTestCaseId == 82)) |
|
1773 { |
|
1774 if(aData.Compare(KDestIDM) != 0) |
|
1775 iStateX3P = EX3PErrorReported; |
|
1776 } |
|
1777 else if(iterator==1 && (iTestCaseId == 112 || iTestCaseId == 122)) |
|
1778 { |
|
1779 if(aData.Compare(KDestIDL) != 0) |
|
1780 iStateX3P = EX3PErrorReported; |
|
1781 } |
|
1782 else |
|
1783 iStateX3P = EX3PErrorReported; |
|
1784 |
|
1785 } |
|
1786 break; |
|
1787 |
|
1788 case 1001: |
|
1789 { |
|
1790 if(iterator==0) |
|
1791 { |
|
1792 //Ask Netsim to send network induced emergency request |
|
1793 iNetSim.SetEmergenyStatus(ETrue); |
|
1794 iNetSim.StartNetworkLocationRequest(); |
|
1795 } |
|
1796 else if(iterator==1) |
|
1797 { |
|
1798 if(aData.Compare(KDestIDH) != 0) |
|
1799 iStateX3P = EX3PErrorReported; |
|
1800 } |
|
1801 else |
|
1802 iStateX3P = EX3PErrorReported; |
|
1803 |
|
1804 } |
|
1805 break; |
|
1806 |
|
1807 case 1002: |
|
1808 { |
|
1809 if(iterator==0) |
|
1810 { |
|
1811 //Ask Netsim to send network induced emergency request |
|
1812 iNetSim.SetEmergenyStatus(ETrue); |
|
1813 iNetSim.StartNetworkLocationRequest(); |
|
1814 } |
|
1815 else if(iterator==1) |
|
1816 { |
|
1817 if(aData.Compare(KDestIDH) != 0) |
|
1818 iStateX3P = EX3PErrorReported; |
|
1819 } |
|
1820 else if(iterator==2) |
|
1821 { |
|
1822 if(aData.Compare(KDestIDL) != 0) |
|
1823 iStateX3P = EX3PErrorReported; |
|
1824 } |
|
1825 else |
|
1826 iStateX3P = EX3PErrorReported; |
|
1827 |
|
1828 } |
|
1829 |
|
1830 |
|
1831 default: |
|
1832 break; |
|
1833 |
|
1834 } |
|
1835 |
|
1836 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyRegisterLcsMoLr); |
|
1837 iNetSim.Next(KErrNone); |
|
1838 } |
|
1839 |
|
1840 void CT_LbsX3PStep_Conflict::NotifyReleaseLcsMoLr(TInt aReason) |
|
1841 { |
|
1842 INFO_PRINTF1(_L("Got - NetSim NotifyReleaseLcsMoLr - Callback Event.")); |
|
1843 |
|
1844 switch(iTestCaseId) |
|
1845 { |
|
1846 case 2: |
|
1847 case 3: |
|
1848 case 4: |
|
1849 { |
|
1850 if(iterator ==0) |
|
1851 { |
|
1852 if(aReason != KErrCancel) |
|
1853 iStateX3P = EX3PErrorReported; |
|
1854 } |
|
1855 else |
|
1856 { |
|
1857 if(aReason != KErrNone) |
|
1858 iStateX3P = EX3PErrorReported; |
|
1859 } |
|
1860 } |
|
1861 break; |
|
1862 |
|
1863 case 35: |
|
1864 case 75: |
|
1865 case 115: |
|
1866 { |
|
1867 if(iterator==0) |
|
1868 { |
|
1869 //Ask Netsim to send MTLR |
|
1870 TLbsNetPosRequestPrivacy reqType; |
|
1871 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1872 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1873 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1874 |
|
1875 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1876 } |
|
1877 |
|
1878 if(aReason!=KErrNone) |
|
1879 iStateX3P = EX3PErrorReported; |
|
1880 } |
|
1881 break; |
|
1882 |
|
1883 case 45: |
|
1884 case 85: |
|
1885 case 125: |
|
1886 { |
|
1887 if(iterator==0) |
|
1888 { |
|
1889 //Ask Netsim to send MTLR |
|
1890 TLbsNetPosRequestPrivacy reqType; |
|
1891 reqType.SetRequestAction(TLbsNetPosRequestPrivacy::ERequestActionAllow); // Request will be accepted |
|
1892 reqType.SetRequestAdvice(TLbsNetPosRequestPrivacy::ERequestAdviceSilent); // No user involvement. |
|
1893 TLbsExternalRequestInfo reqInfo; // Hope default values are good enough. |
|
1894 |
|
1895 iNetSim.SetEmergenyStatus(ETrue); |
|
1896 iNetSim.StartNetworkPrivacyRequest(reqType, reqInfo); |
|
1897 } |
|
1898 |
|
1899 if(aReason!=KErrNone) |
|
1900 iStateX3P = EX3PErrorReported; |
|
1901 } |
|
1902 break; |
|
1903 |
|
1904 default: |
|
1905 if(aReason!=KErrNone) |
|
1906 iStateX3P = EX3PErrorReported; |
|
1907 break; |
|
1908 } |
|
1909 |
|
1910 if(iTestCaseId != 143 && iTestCaseId != 144) |
|
1911 iterator++; |
|
1912 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr); |
|
1913 iNetSim.Next(KErrNone); |
|
1914 } |
|
1915 |
|
1916 void CT_LbsX3PStep_Conflict::NotifyMeasurementReportControlFailure(TInt aReason) |
|
1917 { |
|
1918 (void)aReason; |
|
1919 |
|
1920 INFO_PRINTF1(_L("Got - NetSim NotifyMeasurementReportControlFailure - Callback Event.")); |
|
1921 |
|
1922 switch(iTestCaseId) |
|
1923 { |
|
1924 case 3: |
|
1925 break; |
|
1926 |
|
1927 default: |
|
1928 //Panic |
|
1929 iStateX3P = EX3PErrorReported; |
|
1930 break; |
|
1931 } |
|
1932 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyMeasurementReportControlFailure); |
|
1933 iNetSim.Next(KErrNone); |
|
1934 |
|
1935 } |
|
1936 |
|
1937 void CT_LbsX3PStep_Conflict::NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition) |
|
1938 { |
|
1939 INFO_PRINTF1(_L("Got - NetSim NotifyFacilityLcsMoLrResult - Callback Event.")); |
|
1940 |
|
1941 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
1942 T_LbsUtils utils; |
|
1943 |
|
1944 switch(iTestCaseId) |
|
1945 { |
|
1946 case 5: |
|
1947 if(iterator==0) |
|
1948 { |
|
1949 //the MoLr request would have been completed by now and position should be received. |
|
1950 if(iParent.iSharedData->iTestModuleInUse) |
|
1951 { |
|
1952 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1953 iStateX3P=EX3PErrorReported; |
|
1954 } |
|
1955 else |
|
1956 { |
|
1957 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1958 iStateX3P=EX3PErrorReported; |
|
1959 } |
|
1960 |
|
1961 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, *iPosInfo1); |
|
1962 } |
|
1963 else if(iterator==1) |
|
1964 { |
|
1965 if(iParent.iSharedData->iTestModuleInUse) |
|
1966 { |
|
1967 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::EExactAccuracy)) |
|
1968 iStateX3P=EX3PErrorReported; |
|
1969 } |
|
1970 else |
|
1971 { |
|
1972 if (!utils.Compare_PosInfo(*(reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[1])), aPosition, T_LbsUtils::ERoughAccuracy)) |
|
1973 iStateX3P=EX3PErrorReported; |
|
1974 } |
|
1975 } |
|
1976 else |
|
1977 iStateX3P=EX3PErrorReported; |
|
1978 |
|
1979 default: |
|
1980 break; |
|
1981 } |
|
1982 |
|
1983 if(aReason != KErrNone || iStateX3P==EX3PErrorReported) |
|
1984 { |
|
1985 INFO_PRINTF1(_L("<FONT><B>NotifyFacilityLcsMoLrResult returned error</B></FONT>")); |
|
1986 SetTestStepResult(EFail); |
|
1987 } |
|
1988 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyFacilityLcsMoLrResult); |
|
1989 iNetSim.Next(KErrNone); |
|
1990 } |
|
1991 |
|
1992 // Below function might be needed later...... |
|
1993 TInt64 CT_LbsX3PStep_Conflict::CallbackTime(TLbsCallbackFlags aCallbackFlag) |
|
1994 { |
|
1995 for(TInt i=0; i<iTSArray.Count();++i) |
|
1996 { |
|
1997 if(iTSArray[i]->flag == aCallbackFlag) |
|
1998 return iTSArray[i]->sysTime.Int64(); |
|
1999 } |
|
2000 return -1; |
|
2001 } |
|
2002 |
|
2003 void CT_LbsX3PStep_Conflict::SetCallbackFlag(TLbsCallbackFlags aCallbackFlag) |
|
2004 { |
|
2005 //Set Timestamp |
|
2006 TIME_STAMP *timeStamp = new TIME_STAMP; |
|
2007 timeStamp->flag = aCallbackFlag; |
|
2008 timeStamp->sysTime.UniversalTime(); |
|
2009 iTSArray.Append(timeStamp); |
|
2010 |
|
2011 //Call Baseclass function |
|
2012 CT_LbsX3PStep::SetCallbackFlag(aCallbackFlag); |
|
2013 } |
|
2014 |
|
2015 void CT_LbsX3PStep_Conflict::AnalyseCallbackFlags(TLbsCallbackFlags aCallbackFlag, RPointerArray<TTime> & aCallbackTime) |
|
2016 { |
|
2017 for(int i=0; i<iTSArray.Count(); ++i) |
|
2018 { |
|
2019 if(iTSArray[i]->flag == aCallbackFlag) |
|
2020 { |
|
2021 aCallbackTime.Append(&(iTSArray[i]->sysTime)); |
|
2022 } |
|
2023 } |
|
2024 } |
|
2025 |
|
2026 //End of used code |
|
2027 |
|
2028 #if 0 |
|
2029 void CT_LbsX3PStep_Conflict::NotifyRegisterLcsMoLr(const TDesC& aData) |
|
2030 { |
|
2031 //(void)aData; |
|
2032 |
|
2033 INFO_PRINTF1(_L("Got - NetSim NotifyRegisterLcsMoLr - Callback Event.")); |
|
2034 switch(iStateX3P) |
|
2035 { |
|
2036 case EX3PNormal: |
|
2037 //Normal call...do nothing |
|
2038 break; |
|
2039 |
|
2040 case EX3PPriorityInterrupt: |
|
2041 { |
|
2042 //Request X3P with high priority |
|
2043 //set state to EX3PAny |
|
2044 if(iState != EStartMolrTransmitInNotifyMeasurementControlLocation && |
|
2045 iState != EStartMolrTransmitInNotifyMeasurementReportLocation) |
|
2046 { |
|
2047 //Release the signalstatus so that the handler can call transmit position |
|
2048 //TRequestStatus *stat = &iDummyAO->iStatus; |
|
2049 //User::RequestComplete(stat, KErrNone); |
|
2050 iDoTransmitPosAO->TransmitPosition( KDestIDH, priorityH, postitionInfo); |
|
2051 } |
|
2052 iStateX3P = EX3PAny; |
|
2053 } |
|
2054 break; |
|
2055 |
|
2056 case EX3PPriorityNormal: |
|
2057 { |
|
2058 //Release the signalstatus so that the handler can call transmit position |
|
2059 //TRequestStatus *stat = &iDummyAO->iStatus; |
|
2060 //User::RequestComplete(stat, KErrNone); |
|
2061 iDoTransmitPosAO->TransmitPosition( KDestIDL, priorityL, postitionInfo); |
|
2062 iStateX3P = EX3PPhaseOneOK; |
|
2063 } |
|
2064 break; |
|
2065 |
|
2066 case EX3PControlCancel: |
|
2067 { |
|
2068 //compare aData with high priority api destination data |
|
2069 //if different, something is wrong - set state to EX3PErrorReported |
|
2070 //else - set state to EX3PPhaseOneOK |
|
2071 } |
|
2072 break; |
|
2073 #if 0 |
|
2074 case ENormalNotifyDone: |
|
2075 { |
|
2076 //compare adata with second priority api destination data |
|
2077 //if different, something is wrong - set state to EErrorReported |
|
2078 //else - set state to ECorrectTwo |
|
2079 } |
|
2080 break; |
|
2081 #endif |
|
2082 case EX3PNotifyReleaseDone: |
|
2083 { |
|
2084 //compare adata with low priority api destination data |
|
2085 //if different, something is wrong - set state to EX3PErrorReported |
|
2086 //else - set state to EX3PPhaseTwoOK |
|
2087 if(aData.Compare(KDestIDL)) |
|
2088 iStateX3P= EX3PPhaseTwoOK; |
|
2089 else |
|
2090 iStateX3P = EX3PErrorReported; |
|
2091 } |
|
2092 break; |
|
2093 |
|
2094 default: |
|
2095 //Panic - set state to EX3PErrorReported |
|
2096 iStateX3P = EX3PErrorReported; |
|
2097 break; |
|
2098 |
|
2099 } |
|
2100 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyRegisterLcsMoLr); |
|
2101 } |
|
2102 |
|
2103 void CT_LbsX3PStep_Conflict::NotifyReleaseLcsMoLr(TInt aReason) |
|
2104 { |
|
2105 (void)aReason; |
|
2106 |
|
2107 INFO_PRINTF1(_L("Got - NetSim NotifyReleaseLcsMoLr - Callback Event.")); |
|
2108 switch(iStateX3P) |
|
2109 { |
|
2110 case EX3PNormal: |
|
2111 //Normal call - dont do anything |
|
2112 break; |
|
2113 |
|
2114 case EX3PPhaseOneOK: |
|
2115 { |
|
2116 //change state to EX3PNotifyReleaseDone |
|
2117 iStateX3P = EX3PNotifyReleaseDone; |
|
2118 } |
|
2119 break; |
|
2120 #if 0 |
|
2121 case ENormalCorrect: |
|
2122 { |
|
2123 //change state to ENormalNotifyDone |
|
2124 } |
|
2125 break; |
|
2126 #endif |
|
2127 case EX3PPhaseTwoOK: |
|
2128 { |
|
2129 iStateX3P = EX3PDone; |
|
2130 //SetCallbackFlag(/*special flag for these test cases*/); |
|
2131 } |
|
2132 break; |
|
2133 |
|
2134 default: |
|
2135 //Panic - set state to EX3PErrorReported |
|
2136 iStateX3P = EX3PErrorReported; |
|
2137 break; |
|
2138 } |
|
2139 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr); |
|
2140 |
|
2141 } |
|
2142 |
|
2143 void CT_LbsX3PStep_Conflict::NotifyMeasurementReportControlFailure(TInt aReason) |
|
2144 { |
|
2145 (void)aReason; |
|
2146 |
|
2147 INFO_PRINTF1(_L("Got - NetSim NotifyMeasurementReportControlFailure - Callback Event.")); |
|
2148 switch(iStateX3P) |
|
2149 { |
|
2150 case EX3PNormal: |
|
2151 //Normal call - dont do anything |
|
2152 break; |
|
2153 |
|
2154 case EX3PAny: |
|
2155 //Set state to EControlCancel: |
|
2156 iStateX3P = EX3PControlCancel; |
|
2157 break; |
|
2158 |
|
2159 default: |
|
2160 //Panic |
|
2161 iStateX3P = EX3PErrorReported; |
|
2162 break; |
|
2163 } |
|
2164 SetCallbackFlag(KLbsCallback_NetSim_Got_NotifyMeasurementReportControlFailure); |
|
2165 |
|
2166 } |
|
2167 #endif |
|
2168 |
|
2169 #if 0 |
|
2170 switch(aCallbackFlag) |
|
2171 { |
|
2172 case KLbsCallback_NetSim_Got_Connect: |
|
2173 break; |
|
2174 |
|
2175 case KLbsCallback_NetSim_Got_Disconnect: |
|
2176 break; |
|
2177 |
|
2178 case KLbsCallback_NetSim_Got_NotifyRegisterLcsMoLr: |
|
2179 break; |
|
2180 |
|
2181 case KLbsCallback_NetSim_Got_NotifyReleaseLcsMoLr: |
|
2182 break; |
|
2183 |
|
2184 case KLbsCallback_NetSim_Got_NotifyMeasurementReportLocation: |
|
2185 break; |
|
2186 |
|
2187 case KLbsCallback_NetSim_Got_NotifyMeasurementControlLocation: |
|
2188 break; |
|
2189 |
|
2190 case KLbsCallback_NetSim_Got_NotifyReleaseLcsLocationNotification: |
|
2191 break; |
|
2192 |
|
2193 case KLbsCallback_NetSim_Got_NotifyFacilityLcsMoLrResult: |
|
2194 break; |
|
2195 |
|
2196 case KLbsCallback_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData: |
|
2197 break; |
|
2198 |
|
2199 case KLbsCallback_NetSim_Got_NotifyMeasurementReportControlFailure: |
|
2200 break; |
|
2201 |
|
2202 |
|
2203 case KLbsCallback_Got_NotifyDoTransmitPos: |
|
2204 break; |
|
2205 |
|
2206 default: |
|
2207 break; |
|
2208 |
|
2209 } |
|
2210 #endif |
|
2211 |
|
2212 |