|
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 ctlbsassdatastepmain.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 <lbssatellite.h> |
|
24 #include <lbs/lbsnetprotocolbase.h> |
|
25 #include <lbs/lbsassistancedatabuilderset.h> |
|
26 #include <e32math.h> |
|
27 |
|
28 // LBS test includes. |
|
29 #include "ctlbsconflictstepexample.h" |
|
30 #include <lbs/test/tlbsutils.h> |
|
31 |
|
32 |
|
33 /** Test case development notes |
|
34 =========================== |
|
35 |
|
36 It was decided to aid readablity each test class shall only support a single test case. |
|
37 This example has been produced to show how a typical conflict test case should be coded. |
|
38 |
|
39 |
|
40 Net Sim and Sequence Events |
|
41 --------------------------- |
|
42 Every test case implementation will use the ctlbsconflictstep class which supports Net Sim |
|
43 interactions and a way to ensure Net Sim events and client completion events have a occured |
|
44 in the correct order. An array is used to hold the expected sequence event values, and a second |
|
45 array contains the actual events produced during the test. Once the test moves into the EWaiting |
|
46 state typically after all the client requests have been made, the event arrays are compared to |
|
47 ensure the correct events were given. |
|
48 |
|
49 To set the expected sequence events populate the array in the SetExpectedSeq() function. |
|
50 |
|
51 |
|
52 Async wappers |
|
53 ------------- |
|
54 Each Lbs client async request is wappared in a active object class, to allow a number of |
|
55 outstanding async requests during the test. Any async calls you wish to make should also |
|
56 be wrapped in the same way, see CT_LbsDoX3P and CT_LbsDoPosUpdate for examples. |
|
57 These classes are constructed in the test class ConstructL, and maybe started or cancelled |
|
58 during the test at any point. |
|
59 |
|
60 |
|
61 Verify Position Information |
|
62 --------------------------- |
|
63 A test should verify each client call which expected a location to be returned. The |
|
64 location data should be validation to ensure it's correct. See VerifyPosInfos. |
|
65 */ |
|
66 |
|
67 |
|
68 /** |
|
69 Static Constructor |
|
70 */ |
|
71 CT_LbsConflictStep_Example* CT_LbsConflictStep_Example::New(CT_LbsConflictServer& aParent) |
|
72 { |
|
73 // Note the lack of ELeave. |
|
74 // This means that having insufficient memory will return NULL; |
|
75 CT_LbsConflictStep_Example* testStep = new CT_LbsConflictStep_Example(aParent); |
|
76 if (testStep) |
|
77 { |
|
78 TInt err = KErrNone; |
|
79 |
|
80 TRAP(err, testStep->ConstructL()); |
|
81 if (err) |
|
82 { |
|
83 delete testStep; |
|
84 testStep = NULL; |
|
85 } |
|
86 } |
|
87 return testStep; |
|
88 } |
|
89 |
|
90 |
|
91 /** |
|
92 * Constructor |
|
93 */ |
|
94 CT_LbsConflictStep_Example::CT_LbsConflictStep_Example(CT_LbsConflictServer& aParent) : CT_LbsConflictStep(aParent) |
|
95 { |
|
96 SetTestStepName(KLbsConflictStep_Example); |
|
97 } |
|
98 |
|
99 |
|
100 void CT_LbsConflictStep_Example::ConstructL() |
|
101 { |
|
102 // Create the base class objects. |
|
103 CT_LbsConflictStep::ConstructL(); |
|
104 |
|
105 // Self locate async wrapper. |
|
106 iDoPosUpdate = CT_LbsDoPosUpdate::NewL(this); |
|
107 |
|
108 // X3P async wrapper. |
|
109 iDoX3P = CT_LbsDoX3P::NewL(this); |
|
110 } |
|
111 |
|
112 |
|
113 /** |
|
114 * Destructor |
|
115 */ |
|
116 CT_LbsConflictStep_Example::~CT_LbsConflictStep_Example() |
|
117 { |
|
118 iDoPosUpdate->Cancel(); |
|
119 delete iDoPosUpdate; |
|
120 |
|
121 iDoX3P->Cancel(); |
|
122 delete iDoX3P; |
|
123 } |
|
124 |
|
125 |
|
126 /** Called at the start of the test... |
|
127 |
|
128 Each test case MUST implement this. |
|
129 |
|
130 The table below describes the expcted order that the callbacks should be called |
|
131 during the test. |
|
132 |
|
133 Note that the tests deliberateley do NOT check the order that the client requests |
|
134 are completed. This is because the delivery order is not guaranteed by LBS. |
|
135 The tests will check that all client requests are completed with the correct error |
|
136 code and position at the end of the test. |
|
137 */ |
|
138 void CT_LbsConflictStep_Example::SetExpectedSeq() |
|
139 { |
|
140 // Self locate MOLR (iState = ERegPosUpdate) |
|
141 SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr); // --> To Net |
|
142 SetVerifySeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr); // --> To Net |
|
143 |
|
144 // followed by a X3P MOLR (after X3P register iState = ERegX3P), |
|
145 SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyRegisterLcsMoLr); // --> To Net |
|
146 SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementControlLocation); // <-- From Net |
|
147 SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportLocation); // --> To Net |
|
148 // JCM this should be here! SetVerifySeqEvent(EX3P_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult); // <-- From Net |
|
149 // but test fails bercause not yet implemented in LBS! |
|
150 SetVerifySeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyReleaseLcsMoLr); // --> To Net |
|
151 |
|
152 // (after X3P release iState = EWaiting). |
|
153 } |
|
154 |
|
155 |
|
156 |
|
157 /** Called at the end of the test to verify the correct position data has been returned to the |
|
158 client. |
|
159 |
|
160 Each test case SHOULD implement a version of this. |
|
161 */ |
|
162 void CT_LbsConflictStep_Example::VerifyPosInfos() |
|
163 { |
|
164 T_LbsUtils utils; |
|
165 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
166 RPointerArray<TAny>& currPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr; |
|
167 TPositionInfo* currPosInfo; |
|
168 |
|
169 // Verify both the self locate and X3P MOLR position information. |
|
170 |
|
171 // Verify entry 0 for the self locate. We expect a position containing NaNs. |
|
172 currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[0]); |
|
173 TPosition pos; |
|
174 currPosInfo->GetPosition(pos); |
|
175 if (!Math::IsNaN(pos.Latitude())) |
|
176 { |
|
177 INFO_PRINTF1(_L("Failed test, Position does not contain NANs")); |
|
178 |
|
179 SetTestStepResult(EFail); |
|
180 } |
|
181 if (!Math::IsNaN(pos.Longitude())) |
|
182 { |
|
183 INFO_PRINTF1(_L("Failed test, Position does not contain NANs")); |
|
184 |
|
185 SetTestStepResult(EFail); |
|
186 } |
|
187 |
|
188 // Verify entry 1 for the X3P. We expect a real location value, compare using the data |
|
189 // sent to the test APGS module. |
|
190 TPositionInfo* verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]); |
|
191 currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[1]); |
|
192 if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo)) |
|
193 { |
|
194 INFO_PRINTF1(_L("Failed test, X3P position incorrect.")); |
|
195 SetTestStepResult(EFail); |
|
196 } |
|
197 } |
|
198 |
|
199 |
|
200 /** A standard TEF test case doTestStepL, this SHOULD only support a single test case. |
|
201 |
|
202 Typically the function will look much like this. |
|
203 */ |
|
204 TVerdict CT_LbsConflictStep_Example::doTestStepL() |
|
205 { |
|
206 // Generic test step used to test the LBS Client Notify position update API. |
|
207 INFO_PRINTF1(_L(">>CT_LbsConflictStep_Example::doTestStepL()")); |
|
208 |
|
209 if (TestStepResult() == EPass) |
|
210 { |
|
211 // Setup the expected sequence events for the test. |
|
212 SetExpectedSeq(); |
|
213 |
|
214 // Open and setup net sim. |
|
215 OpenNetSim(this); |
|
216 |
|
217 // Kick off the test abort and keep alive timers. |
|
218 TTimeIntervalMicroSeconds32 abortInterval(KLbsAbortPeriod); |
|
219 TTimeIntervalMicroSeconds32 keepAliveInterval(KLbsKeepAlivePeriod); |
|
220 |
|
221 iAbortTimer->SetTimer(abortInterval); |
|
222 iKeepAliveTimer->SetTimer(keepAliveInterval); |
|
223 |
|
224 // Kick off test. |
|
225 CActiveScheduler::Start(); |
|
226 |
|
227 // Verify location data. |
|
228 VerifyPosInfos(); |
|
229 |
|
230 // Clean up. |
|
231 CloseNetSim(); |
|
232 } |
|
233 |
|
234 INFO_PRINTF1(_L("<<CT_LbsConflictStep_Example::doTestStepL()")); |
|
235 |
|
236 return TestStepResult(); |
|
237 } |
|
238 |
|
239 |
|
240 /** NetSim callbacks given for a MoLr, which we invoke as a result of the notify position update. |
|
241 */ |
|
242 void CT_LbsConflictStep_Example::Connected() |
|
243 { |
|
244 // Call base implementation. |
|
245 CT_LbsConflictStep::Connected(); |
|
246 |
|
247 // Kick off first pos update. |
|
248 |
|
249 // Create a posinfo and store in our shared array for later verification. |
|
250 RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr; |
|
251 TPositionInfo* posInfo = new(ELeave) TPositionInfo(); |
|
252 |
|
253 T_LbsUtils utils; |
|
254 utils.ResetAndDestroy_PosInfoArr(posInfoArr); // Clear previous entries before new entry is appended. |
|
255 |
|
256 posInfoArr.Append(posInfo); |
|
257 |
|
258 // Kick off pos update. |
|
259 TInt testCaseId; |
|
260 if (GetIntFromConfig(ConfigSection(), KTestCaseId, testCaseId)) |
|
261 { |
|
262 switch (testCaseId) |
|
263 { |
|
264 // Test case LBS-UpdateOptions-001 |
|
265 case 7: |
|
266 { |
|
267 TPositionUpdateOptions optsA; |
|
268 TTimeIntervalMicroSeconds interval = 30 * 1000000; // tracking! |
|
269 |
|
270 optsA.SetUpdateInterval(interval); |
|
271 iDoPosUpdate->SetOptions(optsA); |
|
272 break; |
|
273 } |
|
274 |
|
275 } |
|
276 } |
|
277 |
|
278 iDoPosUpdate->StartL(*posInfo); |
|
279 iState = EReqPosUpdate; |
|
280 } |
|
281 |
|
282 |
|
283 void CT_LbsConflictStep_Example::Disconnected() |
|
284 { |
|
285 // Call base implementation. |
|
286 CT_LbsConflictStep::Disconnected(); |
|
287 } |
|
288 |
|
289 |
|
290 void CT_LbsConflictStep_Example::NotifyRegisterLcsMoLr(const TDesC& aData) |
|
291 { |
|
292 // Determine and record the sequence event. A blank aData indicates a self locate |
|
293 // MOLR, otherwise we have a X3P MOLR. Also the current test state indicates which |
|
294 // type MOLR is being carried out. |
|
295 if (aData != KNullDesC) |
|
296 { |
|
297 INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Register Lcs MoLr - Event.")); |
|
298 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyRegisterLcsMoLr); |
|
299 |
|
300 // Verify telephone number. |
|
301 if (aData.Compare(KTransmitPushDestination)) |
|
302 { |
|
303 INFO_PRINTF1(_L("Failed test, bad X3P register data.")); |
|
304 SetTestStepResult(EFail); |
|
305 } |
|
306 |
|
307 // Mark as started now it has, to ensure the self MOLR are not recorded incorrectly. |
|
308 iState = EReqX3P; |
|
309 } |
|
310 |
|
311 else if ((aData == KNullDesC) && (iState == EReqPosUpdate)) |
|
312 { |
|
313 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Register Lcs MoLr - Event.")); |
|
314 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyRegisterLcsMoLr); |
|
315 } |
|
316 |
|
317 // Start the X3P. |
|
318 if (iState == EReqPosUpdate) |
|
319 { |
|
320 // Create a posinfo and store in our shared array for later verification. |
|
321 RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr; |
|
322 TPositionInfo* posInfo = new(ELeave) TPositionInfo(); |
|
323 |
|
324 posInfoArr.Append(posInfo); |
|
325 |
|
326 // Start X3P. |
|
327 TLbsTransmitPositionOptions transOpts; |
|
328 |
|
329 iDoX3P->SetOptions(transOpts); // Set timeout value to 0, to disable the timeout. |
|
330 iDoX3P->StartL(KTransmitPushDestination, KTransmitPushPriority, *posInfo); |
|
331 } |
|
332 } |
|
333 |
|
334 |
|
335 void CT_LbsConflictStep_Example::NotifyReleaseLcsMoLr(TInt aReason) |
|
336 { |
|
337 TInt expectedErr = KErrNone; |
|
338 |
|
339 // Determine and set sequence event. |
|
340 if (iState == EReqPosUpdate) |
|
341 { |
|
342 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Release Lcs MoLr - Event.")); |
|
343 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsMoLr); |
|
344 |
|
345 expectedErr = KErrPositionHighPriorityReceive; |
|
346 } |
|
347 |
|
348 else if(iState == EReqX3P) |
|
349 { |
|
350 INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Release Lcs MoLr - Event.")); |
|
351 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyReleaseLcsMoLr); |
|
352 |
|
353 iState = EWaiting; // End of test. |
|
354 } |
|
355 |
|
356 // Verify reason code. |
|
357 if (aReason != expectedErr) |
|
358 { |
|
359 INFO_PRINTF2(_L("Failed test, bad release reason %d."), aReason); |
|
360 SetTestStepResult(EFail); |
|
361 } |
|
362 } |
|
363 |
|
364 |
|
365 void CT_LbsConflictStep_Example::NotifyMeasurementControlLocation(const TPositionInfo& aPosition, |
|
366 const RLbsAssistanceDataBuilderSet& aData, |
|
367 const TLbsNetPosRequestQuality& aQuality) |
|
368 { |
|
369 T_LbsUtils utils; |
|
370 TInt err; |
|
371 |
|
372 // Determine and record sequence event. |
|
373 if (iState == EReqPosUpdate) |
|
374 { |
|
375 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Control Location - Event.")); |
|
376 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementControlLocation); |
|
377 } |
|
378 |
|
379 else if(iState == EReqX3P) |
|
380 { |
|
381 INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Measurement Control Location - Event.")); |
|
382 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementControlLocation); |
|
383 } |
|
384 |
|
385 |
|
386 // Verify the reference position. |
|
387 TPositionInfo verifyRefPosInfo; |
|
388 |
|
389 verifyRefPosInfo.SetPosition(iRefPos); |
|
390 if (!utils.Compare_PosInfo(verifyRefPosInfo, aPosition)) |
|
391 { |
|
392 INFO_PRINTF1(_L("Failed test, position incorrect.")); |
|
393 SetTestStepResult(EFail); |
|
394 } |
|
395 |
|
396 |
|
397 // Verify the assistance data. |
|
398 RLbsAssistanceDataBuilderSet& data = const_cast<RLbsAssistanceDataBuilderSet&>(aData); |
|
399 RUEPositioningGpsReferenceTimeBuilder* refTimeBuilder = NULL; |
|
400 |
|
401 data.GetDataBuilder(refTimeBuilder); |
|
402 |
|
403 // Create a reader from the builder's data to allow us to verify the actual |
|
404 // assistance data. |
|
405 RUEPositioningGpsReferenceTimeReader refTimeReader; |
|
406 |
|
407 TRAP(err, refTimeReader.OpenL()); |
|
408 if (err == KErrNone) |
|
409 { |
|
410 refTimeReader.DataBuffer() = refTimeBuilder->DataBuffer(); |
|
411 |
|
412 if (!utils.VerifySimpleAssistanceData(refTimeReader)) |
|
413 { |
|
414 INFO_PRINTF1(_L("Failed test, assistance data incorrect.")); |
|
415 SetTestStepResult(EFail); |
|
416 } |
|
417 refTimeReader.Close(); |
|
418 } |
|
419 |
|
420 else |
|
421 { |
|
422 INFO_PRINTF2(_L("Failed test, assistance data reader err %d."), err); |
|
423 SetTestStepResult(EFail); |
|
424 } |
|
425 |
|
426 |
|
427 // TODO: Check if we can verify aQuality in any way. |
|
428 (void)aQuality; |
|
429 } |
|
430 |
|
431 |
|
432 void CT_LbsConflictStep_Example::NotifyReleaseLcsLocationNotification(const CLbsNetworkProtocolBase::TLbsPrivacyResponse& aResult) |
|
433 { |
|
434 (void)aResult; |
|
435 |
|
436 // Unexpected callback for this test log the sequence event to fail test. |
|
437 if (iState == EReqPosUpdate) |
|
438 { |
|
439 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Release Lcs Location Notification - Event.")); |
|
440 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsLocationNotification); |
|
441 } |
|
442 |
|
443 else |
|
444 { |
|
445 INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Release Lcs Location Notification - Event.")); |
|
446 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyReleaseLcsLocationNotification); |
|
447 } |
|
448 } |
|
449 |
|
450 |
|
451 void CT_LbsConflictStep_Example::NotifyFacilityLcsMoLrResult(TInt aReason, const TPositionInfo& aPosition) |
|
452 { |
|
453 // Determine and record sequence event, only get this for self locate MOLR. |
|
454 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Facility Lcs MoLr Result - Event.")); |
|
455 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyFacilityLcsMoLrResult); |
|
456 |
|
457 // Verify reason code.. |
|
458 if (aReason != KErrNone) |
|
459 { |
|
460 INFO_PRINTF2(_L("Failed test, bad release reason %d."), aReason); |
|
461 SetTestStepResult(EFail); |
|
462 } |
|
463 |
|
464 // Verify the real position returned from the network, this will be the same position |
|
465 // we sent to the network as the result of the MO-LR, thus use the entry given by |
|
466 // the test module. |
|
467 T_LbsUtils utils; |
|
468 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
469 TPositionInfo* verifyRealPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]); |
|
470 |
|
471 if (!utils.Compare_PosInfo(*verifyRealPosInfo, aPosition)) |
|
472 { |
|
473 INFO_PRINTF1(_L("Failed test, position incorrect.")); |
|
474 SetTestStepResult(EFail); |
|
475 } |
|
476 } |
|
477 |
|
478 |
|
479 void CT_LbsConflictStep_Example::NotifyMeasurementReportLocation(const TPositionInfo& aPosition) |
|
480 { |
|
481 // Determine and record sequence event. |
|
482 if (iState == EReqPosUpdate) |
|
483 { |
|
484 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Report - Event.")); |
|
485 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportLocation); |
|
486 } |
|
487 |
|
488 else if(iState == EReqX3P) |
|
489 { |
|
490 INFO_PRINTF1(_L("Got - X3P MOLR - NetSim Notify Measurement Report - Event.")); |
|
491 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportLocation); |
|
492 } |
|
493 |
|
494 |
|
495 // Verify the real position given to the network, this will be the same position |
|
496 // returned as the result of the MO-LR, thus use the entry given by |
|
497 // the test module. |
|
498 T_LbsUtils utils; |
|
499 RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr; |
|
500 TPositionInfo* verifyRealPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]); |
|
501 |
|
502 if (!utils.Compare_PosInfo(*verifyRealPosInfo, aPosition)) |
|
503 { |
|
504 INFO_PRINTF1(_L("Failed test, position incorrect.")); |
|
505 SetTestStepResult(EFail); |
|
506 } |
|
507 } |
|
508 |
|
509 |
|
510 void CT_LbsConflictStep_Example::NotifyMeasurementReportRequestMoreAssistanceData(const TLbsAssistanceDataGroup& aFilter) |
|
511 { |
|
512 (void)aFilter; |
|
513 |
|
514 // Unexpected callback for this test, record the sequence event to fail test. |
|
515 if (iState == EReqPosUpdate) |
|
516 { |
|
517 INFO_PRINTF1(_L("Got - Self MOLR - NetSim Notify Measurement Report Request More Assistance Data - Event.")); |
|
518 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData); |
|
519 } |
|
520 |
|
521 else |
|
522 { |
|
523 INFO_PRINTF1(_L("Got - X3P(PUSH) MOLR - NetSim Notify Measurement Report Request More Assistance Data - Event.")); |
|
524 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportRequestMoreAssistanceData); |
|
525 } |
|
526 } |
|
527 |
|
528 |
|
529 void CT_LbsConflictStep_Example::NotifyMeasurementReportControlFailure(TInt aReason) |
|
530 { |
|
531 // Unexpected callback for this test, record the sequence event to fail test. |
|
532 if (iState == EReqPosUpdate) |
|
533 { |
|
534 INFO_PRINTF2(_L("Got - Self MOLR - Net Sim Notify Measurement Report Control Failure - Event. Reason = %d"), aReason); |
|
535 SetCurrentSeqEvent(ESelf_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure); |
|
536 } |
|
537 |
|
538 else |
|
539 { |
|
540 INFO_PRINTF2(_L("Got - X3P MOLR(PUSH) - Net Sim Notify Measurement Report Control Failure - Event. Reason = %d"), aReason); |
|
541 SetCurrentSeqEvent(EX3P_PUSH_MOLR_NetSim_Got_NotifyMeasurementReportControlFailure); |
|
542 } |
|
543 } |
|
544 |
|
545 |
|
546 /** Notify position update callback. |
|
547 |
|
548 The notify position update has completed. |
|
549 */ |
|
550 void CT_LbsConflictStep_Example::MT_LbsDoPosUpdateCallback(TRequestStatus& aStatus) |
|
551 { |
|
552 INFO_PRINTF1(_L("Got - Client Notify Update Complete - Callback Event.")); |
|
553 |
|
554 // Expect the self locate MOLR to be stopped because of the X3P. |
|
555 if (KErrPositionHighPriorityReceive != aStatus.Int()) |
|
556 { |
|
557 INFO_PRINTF2(_L("Failed test, pos info request err = %d."), aStatus.Int()); |
|
558 SetTestStepResult(EFail); |
|
559 } |
|
560 } |
|
561 |
|
562 |
|
563 /** X3P transmit callback. |
|
564 |
|
565 The X3P transmit request has completed. |
|
566 */ |
|
567 void CT_LbsConflictStep_Example::MT_LbsDoX3PCallback(TInt aTransmitId, TRequestStatus& aStatus) |
|
568 { |
|
569 (void)aTransmitId; |
|
570 |
|
571 INFO_PRINTF1(_L("Got - Client X3P Complete - Callback Event.")); |
|
572 |
|
573 if (KErrNone != aStatus.Int()) |
|
574 { |
|
575 INFO_PRINTF2(_L("Failed test, X3P transmit request err = %d."), aStatus.Int()); |
|
576 SetTestStepResult(EFail); |
|
577 iState = EWaiting; |
|
578 } |
|
579 } |
|
580 |
|
581 |