|
1 // Copyright (c) 2008-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 // te_lbspsyposupdateerrstep.cpp |
|
15 // The test step testing the notify position update scenarios with errors. |
|
16 // |
|
17 // |
|
18 |
|
19 #include "te_lbsagpspsyposupdateerrstep.h" |
|
20 #include "te_lbspsypositioner.h" |
|
21 #include "te_lbspsyresponse.h" |
|
22 #include "te_lbspsyrequest.h" |
|
23 |
|
24 #include "psypanic.h" |
|
25 |
|
26 EXPORT_C CTe_LbsAgpsNotifyPositionUpdateErrStep* CTe_LbsAgpsNotifyPositionUpdateErrStep::NewL( |
|
27 MTe_LbsPsyStaticData* aPsyStaticData) |
|
28 { |
|
29 CTe_LbsAgpsNotifyPositionUpdateErrStep* self = new(ELeave) CTe_LbsAgpsNotifyPositionUpdateErrStep(aPsyStaticData); |
|
30 return self; |
|
31 } |
|
32 |
|
33 CTe_LbsAgpsNotifyPositionUpdateErrStep::CTe_LbsAgpsNotifyPositionUpdateErrStep(MTe_LbsPsyStaticData* aPsyStaticData) |
|
34 : CTe_LbsNotifyPositionUpdateErrStep(aPsyStaticData) |
|
35 { |
|
36 } |
|
37 |
|
38 EXPORT_C CTe_LbsAgpsNotifyPositionUpdateErrStep::~CTe_LbsAgpsNotifyPositionUpdateErrStep() |
|
39 { |
|
40 } |
|
41 |
|
42 void CTe_LbsAgpsNotifyPositionUpdateErrStep::ReallyDoTestStepImpL() |
|
43 { |
|
44 CTe_LbsNotifyPositionUpdateErrStep::ReallyDoTestStepImpL(); |
|
45 |
|
46 //POSITION UPDATE FUTILE ERROR - AUTONOMOUS MODE (Scenario 3.1) |
|
47 CTe_PsyPositioner* positioner = MakePositionerLC(); |
|
48 CTe_PsyRequest* updateRequest = CTe_PsyRequest::NewLC(*this); |
|
49 |
|
50 INFO_PRINTF1(_L("POSITION UPDATE FUTILE ERROR - AUTONOMOUS MODE (Scenario 3.1) START")); |
|
51 INFO_PRINTF1(_L("Create positioner and the position update object")); |
|
52 |
|
53 INFO_PRINTF1(_L("Call NotifyPositionUpdate() PSY->ALM")); |
|
54 updateRequest->NotifyPsyRequest(); |
|
55 positioner->NotifyPositionUpdate(); |
|
56 StartSchedulerWaitL(KUsualTimeout, 1); |
|
57 |
|
58 updateRequest->ExpectDefaultUpdateRequest(); |
|
59 updateRequest->UpdateRequest().NewClient() = ETrue; |
|
60 updateRequest->CheckPosUpdateOrReqReceivedL(); |
|
61 |
|
62 INFO_PRINTF1(_L("Set a position update on the bus ALM->PSY")); |
|
63 CTe_PsyResponse* errUpdate = CTe_PsyResponse::IssueErrPosUpdateLC(KPositionCalculationFutile, |
|
64 TPositionModuleInfo::ETechnologyTerminal); |
|
65 |
|
66 INFO_PRINTF2(_L("Start the active scheduler for %d microsec"), KUsualTimeout); |
|
67 StartSchedulerWaitL(KUsualTimeout, 1); |
|
68 INFO_PRINTF1(_L("The active scheduler stopped")); |
|
69 |
|
70 positioner->CheckPosUpdateFailedL(KPositionQualityLoss); |
|
71 CleanupStack::PopAndDestroy(errUpdate); |
|
72 |
|
73 INFO_PRINTF1(_L("POSITION UPDATE FUTILE ERROR - AUTONOMOUS MODE (Scenario 3.1) END")); |
|
74 |
|
75 CleanupStack::PopAndDestroy(updateRequest); |
|
76 CleanupStack::PopAndDestroy(positioner); |
|
77 |
|
78 } |