datasourcemodules/simulationpositioningmodule/test/te_lbssimulationpsy/inc/simpsystep.h
changeset 0 9cfd9a3ee49c
equal deleted inserted replaced
-1:000000000000 0:9cfd9a3ee49c
       
     1 /**
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @file SimPsyStep.h
       
    22  @internalTechnology
       
    23 */
       
    24 #if (!defined __SIMPSY_STEP_H__)
       
    25 #define __SIMPSY_STEP_H__
       
    26 #include <test/testexecutestepbase.h>
       
    27 #include "te_lbssimulationpsysuitestepbase.h"
       
    28 
       
    29 #include <f32file.h>
       
    30 #include <badesca.h>
       
    31 
       
    32 class TPositionInfoBase;
       
    33 class TPositionInfo;
       
    34 class CPosFileReader;
       
    35 
       
    36 
       
    37 class CSimPsyStep : public CTe_LbsSimulationPSYSuiteStepBase
       
    38 	{
       
    39 public:
       
    40 	CSimPsyStep();
       
    41 	~CSimPsyStep();
       
    42 	virtual TVerdict doTestStepPreambleL();
       
    43 	virtual TVerdict doTestStepL();
       
    44 	virtual TVerdict doTestStepPostambleL();
       
    45 
       
    46 
       
    47 private:        
       
    48 	void StartL(TInt aIndex);
       
    49 	virtual void DoTestL(TInt aIndex);
       
    50     void TestSingleRequestL();             
       
    51     void TestSingleCancelTestL();
       
    52     void TestMultipleCancelTestL(
       
    53                     TBool aFirstWillCancel,
       
    54                     TBool aSecondWillCancel,
       
    55                     TBool aThirdWillCancel
       
    56                     );        
       
    57 
       
    58     void TestSimulatedMovementsL(TInt aNumberOfRequests);
       
    59     void TestDeterministicFailureL();        
       
    60     void TestRandomFailureL();        
       
    61     void TestMultipleRequestsL(TInt aNumberOfRequests);
       
    62     void TestMultipleRequestsAndCancelL(
       
    63                     TInt aNumberOfRequests,
       
    64                     TBool aFirstWillCancel,
       
    65                     TBool aSecondWillCancel,
       
    66                     TBool aThirdWillCancel
       
    67                     );        
       
    68     void TestLongitudeWrapAroundL();        
       
    69     void TestBadSimulationDataFileL();        
       
    70     void TestRequestTimeAfterCancelL();
       
    71 	void TestRequestCancelRequestL();
       
    72 	void TestStatusEventL();
       
    73 	void TestModuleInfoL();
       
    74     void TestStandingStillL();
       
    75     TInt ComputeNewLongAndLat(
       
    76                     TPositionInfoBase& aPosition, 
       
    77                     TReal aAlpha, 
       
    78                     TReal& aLon, 
       
    79                     TReal& aLat
       
    80                     );
       
    81     void CheckRequestResultL(
       
    82                     TInt aStatus, 
       
    83                     TPositionInfo& aPosition);
       
    84 	void CheckRequestTimeL(
       
    85                     const TDesC& aSimFile, TBool aPowerUp,
       
    86                     const TPositionInfo& aPos,
       
    87                     TTimeIntervalMicroSeconds& aReqTime, 
       
    88 					TTimeIntervalMicroSeconds aTolerance = TTimeIntervalMicroSeconds(100000));
       
    89 
       
    90     void CheckThatPositionExistsL(TPositionInfoBase& aInfo);        
       
    91     void ReadSimDataFromFileL(const TDesC& aFileName);
       
    92     void SetSimDataFileL(const TDesC& aFileName);
       
    93     TInt Replace(const TDesC& aFilename, const TInt aFileMode);
       
    94 
       
    95 private:
       
    96     TInt64              iSeed;    
       
    97     CDesC8Array*        iSimDataArray;
       
    98     CPosFileReader*     iFileReader;
       
    99 	TPositionInfoBase*	iPositionInfo;
       
   100 	};
       
   101 
       
   102 _LIT(KSimPsyStep,"SimPsyStep");
       
   103 
       
   104 #endif