示例#1
0
EXPORT_C void T_LbsUtils::GetConfigured_ModuleUpdateOptionsL(const TDesC& aConfigFileName, const TDesC& aConfigSection, TPositionUpdateOptions& aUpdateOpts)
/** Fills a module updata options class/structure with values read from a configuration ini file.

@param aConfigFileName	The name of the ini file to read. If the file name is empty (0 length) then
						default values will be used.
@param aConfigSection	The section within the ini file to read data from.
@param aUpdateOpts		The modified update options structure.
*/
	{
	// Use default values if file name not given.
	if (aConfigFileName.Length() == 0)
		{
		aUpdateOpts.SetUpdateInterval(0);
		aUpdateOpts.SetUpdateTimeOut(0);
		aUpdateOpts.SetMaxUpdateAge(0);
		aUpdateOpts.SetAcceptPartialUpdates(EFalse);			
		}
	
	else
		{
		CUpdateOptsConfigReader* reader;
	
		reader = CUpdateOptsConfigReader::NewL(aConfigFileName, aConfigSection, aUpdateOpts);
		CleanupStack::PushL(reader);
		
		reader->ProcessL();
	
		CleanupStack::PopAndDestroy(reader);
		}
	}
void CTTGPSLoggerPositionRequester::StartL()
	{
	Stop();
	//RDebug::Print(_L("%d\n"), __LINE__);

#ifdef POSMETH
	TPositionModuleInfo info;
	if ( (iPositioningMethod>0) &&
				((iPositionServer.GetModuleInfoByIndex(iPositioningMethod-1,info) == KErrNone) && (info.IsAvailable())) )
			{
			User::LeaveIfError(iPositioner.Open(iPositionServer, info.ModuleId()));
			}
	else
#endif
		User::LeaveIfError(iPositioner.Open(iPositionServer));
	
	//RDebug::Print(_L("%d\n"), __LINE__);
	User::LeaveIfError(iPositioner.SetRequestor(CRequestor::ERequestorService, CRequestor::EFormatApplication, KRequestor));
	//RDebug::Print(_L("%d\n"), __LINE__);
	const TTimeIntervalMicroSeconds KUpdateInterval(1000000);
	const TTimeIntervalMicroSeconds KTimeOut(2000000);
	const TTimeIntervalMicroSeconds KMaxUpdateAge(0);
	TPositionUpdateOptions options;
	options.SetUpdateInterval(KUpdateInterval);
	options.SetUpdateTimeOut(KTimeOut);
	options.SetMaxUpdateAge(KMaxUpdateAge);
	options.SetAcceptPartialUpdates(ETrue);
	//RDebug::Print(_L("%d\n"), __LINE__);
	User::LeaveIfError(iPositioner.SetUpdateOptions(options));
	//RDebug::Print(_L("%d\n"), __LINE__);
	iPositioner.NotifyPositionUpdate(*iPositionInfo, iStatus);
	//RDebug::Print(_L("%d\n"), __LINE__);
	SetActive();
	}
示例#3
0
//////////////////////////////////////////////////////////////
// Sets the interval for getting the regular notification   //
// the time interval set is in milli seconds                      //
//////////////////////////////////////////////////////////////
int CQMLBackendAO::setUpdateInterval(int aMilliSec)
{
#if !defined QT_NO_DEBUG
	qDebug() << "CQMLBackendAO::setUpdateInterval\n" ;
#endif
    int minimumUpdateInterval = 0;
    TInt64 mUpdateInterval = 0 ;


    if (mRequester)
        minimumUpdateInterval = mRequester->minimumUpdateInterval();
    else
        minimumUpdateInterval = mRequesterSatellite->minimumUpdateInterval();

    if (minimumUpdateInterval < 0)
        minimumUpdateInterval = 100;
    // if the current requesttype is  regular updates
    // then set the updateinterval otherwise ignore
    //if(mRequestType != REQ_REG_UPDATE)
    //    return;

    TPositionUpdateOptions  aPosOption;

    TInt error = mPositioner.GetUpdateOptions(aPosOption);

    // TTimeIntervalMicroSeconds is converted seconds
    TInt currentUpdateInterval  = aPosOption.UpdateInterval().Int64() / 1000;

    // If msec is not 0 and is less than the value returned by minimumUpdateInterval(),
    // the interval will be set to the minimum interval.
    // if (aMilliSec != 0 && aMilliSec <= minimumUpdateInterval) {
    // workaround, not accepting zero as value, see QTMOBILITY-995
    if (aMilliSec <= minimumUpdateInterval) {
        mUpdateInterval = minimumUpdateInterval;
    } else {
        mUpdateInterval = aMilliSec;
    }

    // if the same value is being set then just ignore it.
    if (currentUpdateInterval == mUpdateInterval) {
        return mUpdateInterval;
    }

    // will set Either zero, minimum or +ve value
    // seconds converted to TTimeIntervalMicroSeconds
    aPosOption.SetUpdateInterval(TTimeIntervalMicroSeconds(mUpdateInterval * 1000));
    // set the timeout to the smaller of 150% of interval or update interval + 10 seconds
    TInt64 mUpdateTimeout = (mUpdateInterval * 3) / 2;
    if (mUpdateTimeout > mUpdateInterval + 10000)
        mUpdateTimeout = mUpdateInterval + 10000;

    if (aMilliSec > 0)
        aPosOption.SetUpdateTimeOut(TTimeIntervalMicroSeconds(mUpdateTimeout * 1000));

    error = mPositioner.SetUpdateOptions(aPosOption);

    return mUpdateInterval;
}
// ---------------------------------------------------------
// CT_LbsClientPosTp272::SetPeriodicUpdateL
//
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsClientPosTp272::SetPeriodicUpdateL(const TInt& aUpdateInterval)
    {
    _LIT(KUpdateErr, "Error when setting update interval, %d");

    TPositionUpdateOptions updateOptions;
	updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(aUpdateInterval));
    TInt err = iPositioner.SetUpdateOptions(updateOptions);
	AssertTrueL(err == KErrNone, KUpdateErr, err);   

    }
示例#5
0
void CPosition::ConstructL()
{
    User::LeaveIfError(iServer.Connect());
    User::LeaveIfError(iPositioner.Open(iServer));

    _LIT(KRequestor, "OpenMAR" );
    User::LeaveIfError(iPositioner.SetRequestor(CRequestor::ERequestorService, CRequestor::EFormatApplication, KRequestor));

    const TInt KSecond = 1000000;
    TPositionUpdateOptions updateOptions;
    updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(10 * KSecond));
    updateOptions.SetUpdateTimeOut(TTimeIntervalMicroSeconds(30 * KSecond));
    updateOptions.SetMaxUpdateAge(TTimeIntervalMicroSeconds(1 * KSecond));
    updateOptions.SetAcceptPartialUpdates(EFalse);

    User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
}
示例#6
0
//requestUpdate : request for position update once
void CQMLBackendAO::requestUpdate(int aTimeout)
{
#if !defined QT_NO_DEBUG
	qDebug() << "CQMLBackendAO::requestUpdate\n" ;
#endif
    TPositionUpdateOptions  aPosOption;

    mPositioner.GetUpdateOptions(aPosOption);

    aPosOption.SetUpdateInterval(TTimeIntervalMicroSeconds(0));

    aPosOption.SetUpdateTimeOut(TTimeIntervalMicroSeconds(aTimeout * 1000));

    mPositioner.SetUpdateOptions(aPosOption);

    startUpdates();
}
示例#7
0
void CCxxPositioner::ConstructL()
{
  LEAVE_IF_ERROR_OR_SET_SESSION_OPEN(iPositionServer, iPositionServer.Connect());

  LEAVE_IF_ERROR_OR_SET_SESSION_OPEN(iPositioner, iPositioner.Open(iPositionServer, iModuleId));

  _LIT(KRequestor, "pytwink");
  User::LeaveIfError(iPositioner.SetRequestor(CRequestor::ERequestorService,
					      CRequestor::EFormatApplication, 
					      KRequestor));

  TPositionUpdateOptions updateOptions;
  updateOptions.SetAcceptPartialUpdates(EFalse);
  updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(0)); // not periodic
  updateOptions.SetUpdateTimeOut(TTimeIntervalMicroSeconds(iUpdateTimeOut));
  updateOptions.SetMaxUpdateAge(TTimeIntervalMicroSeconds(iMaxUpdateAge));
  User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
}
/** NetSim callbacks given for a MoLr, which we invoke as a result of the notify position update.
*/
void CT_LbsConflictStep_selflocatex3ppush::Connected()
	{
	// Call base implementation.
	CT_LbsConflictStep::Connected();
	
	// Kick off first pos update.
	
	// Create a posinfo and store in our shared array for later verification.
	RPointerArray<TAny>& posInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
	TPositionInfo* posInfo = new(ELeave) TPositionInfo();

	T_LbsUtils utils;
	utils.ResetAndDestroy_PosInfoArr(posInfoArr);	// Clear previous entries before new entry is appended.

	posInfoArr.Append(posInfo);

	// Kick off pos update.
	TInt testCaseId;
	if (GetIntFromConfig(ConfigSection(), KTestCaseId, testCaseId))
		{
			switch (testCaseId)
			{
			// Test case LBS-UpdateOptions-001
			case 7:
				{
				TPositionUpdateOptions optsA;
				TTimeIntervalMicroSeconds interval = 30 * 1000000; // tracking!

				optsA.SetUpdateInterval(interval);
				iDoPosUpdate->SetOptions(optsA);
				break;
				}
				
			}
		}
			
	iDoPosUpdate->StartL(*posInfo);
	iState = EReqPosUpdate;
	}
void CAzqInternalGPSReader::StartL()
	{

	Cancel();


	_LIT(KOurAppName,"AzenqosTester");
	User::LeaveIfError(iPositioner.SetRequestor(
	        CRequestor::ERequestorService, CRequestor::EFormatApplication, KOurAppName));

	TPositionUpdateOptions options;

	// Frequency of updates in microseconds
	const TTimeIntervalMicroSeconds KUpdateInterval(3*KMillion);
	// How long the application is willing to wait before timing out the request
	const TTimeIntervalMicroSeconds KTimeOut(60*KMillion);

	// The maximum acceptable age of the information in an update
	const TTimeIntervalMicroSeconds KMaxUpdateAge(2*KMillion);

	options.SetUpdateInterval(KUpdateInterval);
	options.SetUpdateTimeOut(KTimeOut);
	options.SetMaxUpdateAge(KMaxUpdateAge);
	options.SetAcceptPartialUpdates(EFalse);

	User::LeaveIfError(iPositioner.SetUpdateOptions(options));

	/* Now when the application requests location information
	it will be provided with these options */

	iState = EReading;

	iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
	SetActive();

	}
void CT_LbsClientPosTp178::TestOptionL()
    {
    SetupPsyL(iUidTestPsy3);
    
    RPositioner positioner;
    
    ConnectL();
    
    User::LeaveIfError(positioner.Open(iPosServer,iUidTestPsy3));
    CleanupClosePushL(positioner);
    
    _LIT(KKalle, "Kalle");
    positioner.SetRequestor(CRequestor::ERequestorService,
        CRequestor::EFormatApplication, KKalle);
    
    TPositionUpdateOptions updateOptions;
    
    TTimeIntervalMicroSeconds timeoutInterval(4000000);
    TTimeIntervalMicroSeconds periodicInterval(7000000);
    
    updateOptions.SetUpdateTimeOut(timeoutInterval);
    updateOptions.SetUpdateInterval(periodicInterval);
    TInt err = positioner.SetUpdateOptions(updateOptions);
    if (err != KErrArgument)
        {
        _LIT(KErrArg, "Possible to set timout < update interval, error code = %d");
        TBuf<100> buf;
        buf.Format(KErrArg, err);
        INFO_PRINTF1(buf);
        LogErrorAndLeaveL(buf);
        }

    //should never be runned;
    CleanupStack::PopAndDestroy(1); //positioner
    Disconnect();
    }
示例#11
0
// ---------------------------------------------------------
// CT_LbsClientPosTp1::StartL
//
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsClientPosTp1::StartL()
    {
    ConnectL();
    
    CPosModules* db = CPosModules::OpenL();
    CleanupStack::PushL(db); 

    SetupPsyL(iUidMultiPsy);

    _LIT(KSetupPSY, "TP1: Has Setup Multi PSY");
    INFO_PRINTF1(KSetupPSY);
    
    //setting priority
	TPositionModuleInfo moduleInfoHp;//Hp - high prio;
	TPositionModuleInfo moduleInfoLp;//Lp - low prio;

    CPosModuleIdList* prioList = db->ModuleIdListLC();	
    db->GetModuleInfoL(prioList->At(0), moduleInfoHp);

    CPosModuleUpdate* moduleUpdate = CPosModuleUpdate::NewLC();
    moduleUpdate->SetUpdateAvailability(ETrue);

    if (iUidMultiPsy.iUid == moduleInfoHp.ModuleId().iUid)
		{
		// Case when Multi PSY has highest prio: 
		// Ensuring it is enabled
	    _LIT(KMultiHighest, "TP1: Case when Multi PSY has highest prio");
	    INFO_PRINTF1(KMultiHighest);	    
		db->UpdateModuleL((*prioList)[0], *moduleUpdate);
		}
	else
		{
		// Case when Multi PSY has not highest prio: 
		// 
	    _LIT(KMultiNotHighest, "TP1: Case when Multi PSY has NOT highest prio");	    
	    INFO_PRINTF1(KMultiNotHighest);	    
        db->GetModuleInfoL(iUidMultiPsy, moduleInfoLp);
		// Ensuring it is enabled
		db->UpdateModuleL(iUidMultiPsy, *moduleUpdate);

		TUint hp = db->PriorityL(moduleInfoHp.ModuleId());
		TUint lp = db->PriorityL(moduleInfoLp.ModuleId());

		// Changing prio of highest prio PSY and Multi PSY.
		// Setting Multi PSY to highest prio
		db->SetModulePriorityL(iUidMultiPsy, hp);
        db->SetModulePriorityL((*prioList)[0], lp); 
		}

	_LIT(KTestPSY1On, "TP1: Enabling Test PSY 1");
    INFO_PRINTF1(KTestPSY1On);	    
	db -> UpdateModuleL(iUidTestPsy1, *moduleUpdate);
	_LIT(KTestPSY2On, "TP1: Enabling Test PSY 2");
    INFO_PRINTF1(KTestPSY2On);
	db -> UpdateModuleL(iUidTestPsy2, *moduleUpdate);
    
	CleanupStack::PopAndDestroy(moduleUpdate);
	CleanupStack::PopAndDestroy(2, db); // db, prioList

    User::LeaveIfError(OpenPositioner());

    // Request data from default psy should be Multi psy
    _LIT(KService, "service");
    TPositionInfo posInfo = TPositionInfo();
    TInt err = PerformSyncRequest(KService, &posInfo);
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "The request was not completed with KErrNone");
        LogErrorAndLeaveL(KErrorRequest, err);
        }
	
    if (iUidMultiPsy.iUid != posInfo.ModuleId().iUid)
		{
		_LIT(KIncorrectPsyError, "TP1. Position from wrong PSY received");
		LogErrorAndLeaveL(KIncorrectPsyError);
		}

	HPositionGenericInfo* genericInfo = HPositionGenericInfo::NewLC();
	err = PerformSyncRequest(KService, &(*genericInfo));
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "The request was not completed with KErrNone");
        LogErrorAndLeaveL(KErrorRequest);
        }

	 if (iUidMultiPsy.iUid != (genericInfo -> ModuleId()).iUid)
		{
		_LIT(KIncorrectPsyError,
           "TP1. Position from wrong PSY received");
		LogErrorAndLeaveL(KIncorrectPsyError);
		}

	TPositionCourseInfo courseInfo = TPositionCourseInfo();
	err = PerformSyncRequest(KService, &courseInfo);
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "Course info supported by default, but request failed");
        LogErrorAndLeaveL(KErrorRequest);
        }

	TPositionSatelliteInfo satelliteInfo = TPositionSatelliteInfo();
	err = PerformSyncRequest(KService, &satelliteInfo);
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "Satellite info supported by default, but request failed");
        LogErrorAndLeaveL(KErrorRequest);
        }	

    //Changing the priority and verifiy that it still possilbe
    //to request updated from a psy if basic position information
    //is used and that it is not possilbe to request sat or cource
    //any more.
    SetupPsyL(iUidTestPsy2);
    User::After(3000000);

    // Request data from default psy should be test psy 2 now
    err = PerformSyncRequest(KService, &posInfo);
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "The request was not completed with KErrNone");
        LogErrorAndLeaveL(KErrorRequest);
        }
	
    if (iUidTestPsy2.iUid != posInfo.ModuleId().iUid)
		{
		_LIT(KIncorrectPsyError,
           "TP1. Position from wrong PSY received");
		LogErrorAndLeaveL(KIncorrectPsyError);
		}

	err = PerformSyncRequest(KService, &(*genericInfo));
    if (err != KErrNone)
        {
        _LIT(KErrorRequest, "The request was not completed with KErrNone");
        LogErrorAndLeaveL(KErrorRequest);
        }

	 if (iUidTestPsy2.iUid != (genericInfo -> ModuleId()).iUid)
		{
		_LIT(KIncorrectPsyError,
           "TP1. Position from wrong PSY received");
		LogErrorAndLeaveL(KIncorrectPsyError);
        }

    err = PerformSyncRequest(KService, &courseInfo);
    if (err != KErrArgument)
        {
        _LIT(KErrorRequest, "Course info not supported by default, KErrArgument not returned");
        LogErrorAndLeaveL(KErrorRequest);
        }


	err = PerformSyncRequest(KService, &satelliteInfo);
    if (err != KErrArgument)
        {
        _LIT(KErrorRequest, "Satellite info not supported by default, KErrArgument not returned");
        LogErrorAndLeaveL(KErrorRequest);
        }

    //check that it is possilbe to change the different
    //type of class info during periodic request and
    //that the periodic update will fail if the class
    //type is incorrect.
    TTimeIntervalMicroSeconds interval = TTimeIntervalMicroSeconds(1000000);
    TPositionUpdateOptions posOption;
	posOption.SetUpdateInterval(interval);
	_LIT(KUpdateErr, "Error when setting update interval,  %d");
	err = iPositioner.SetUpdateOptions(posOption);
    AssertTrueL(err == KErrNone, KUpdateErr, err);

    _LIT(KErrPeriodic, "The periodic request did not return KErrNone, %d");
    err = PerformSyncRequest(KService, &posInfo);
    AssertTrueL(err == KErrNone , KErrPeriodic, err);
    
    _LIT(KErrPeriodicArr, "The periodic request did not return KErrArgument, %d");
    err = PerformSyncRequest(KService, &satelliteInfo);
    AssertTrueL(err == KErrArgument , KErrPeriodicArr, err);
    SetupPsyL(iUidMultiPsy);
    User::After(3000000);
    err = PerformSyncRequest(KService, &satelliteInfo);
    AssertTrueL(err == KErrNone , KErrPeriodic, err);

    CleanupStack::PopAndDestroy(genericInfo);
    ClosePositioner();
    Disconnect();
    }
TVerdict CTrackingSessionStep::doTestStepL()
/**
 * @return - TVerdict code
 * Override of base class pure virtual
 * Our implementation only gets called if the base class doTestStepPreambleL() did
 * not leave. That being the case, the current test result value will be EPass.
 */
	{
    StandardPrepareL();

    const TInt KInterval = 1 * KSecondsToMicro;
    const TTimeIntervalMicroSeconds KFirstRequestDelay = 200 * 1000; // 0.2 sec
    const TTimeIntervalMicroSeconds KNormalRequestDelay = 200 * 1000; // 0.2 sec
    const TInt KDiff = 200 * 1000; // 0.2 sec
    const TInt KIntervalError = 100 * 1000; // 0.1 sec

    TRequestStatus status;
    TWatch watch;
    TTime secondRequest, stopTracking;
    TInt interval;

    HPositionGenericInfo* genInfo = HPositionGenericInfo::NewLC();

    // setup : only PSY6
    ToggleModuleL(KUidLcfPsy1, EFalse);
    ToggleModuleL(KUidLcfPsy3, EFalse);
    
    User::After(KSecond * 7);
        
    InitPsyListInDefaultProxyL();

    // make one request to allow default proxy rebuild its database
    // this will guarantee that first request will be as fast as possible
    TPositionCourseInfo courseInfo;
    PositionRequestWithCheck(courseInfo, KErrArgument, KNullUid);

    // setup tracking session
    TPositionUpdateOptions updateOptions;
    updateOptions.SetUpdateInterval(KInterval);
    iPositioner.SetUpdateOptions(updateOptions);

    // 1st request
    // first request must be quick
    watch.Tick();
    PositionRequestWithCheck(*genInfo, KErrNone, KUidLcfPsy6);
    if(watch.ElapsedFromTick() > KFirstRequestDelay)
        {
        ERR_PRINTF1(KFirstDelayTooLong);
        SetTestStepResult(EFail);
        }
    
    // drop delay and make 2nd and 3rd requests
    genInfo->ClearRequestedFields();
    {
        watch.Tick();
        PositionRequestWithCheck(*genInfo, KErrNone, KUidLcfPsy6);
        secondRequest.UniversalTime();
        interval = (TInt) watch.ElapsedFromTick().Int64();
        if(Abs(interval - KInterval) > KIntervalError)
            {
            ERR_PRINTF1(KSecondDelayOutOfRange);
            SetTestStepResult(EFail);
            }
        
        watch.Tick();
        PositionRequestWithCheck(*genInfo, KErrNone, KUidLcfPsy6);
        interval = watch.ElapsedFromTick().Int64();
        if(Abs(interval - KInterval) > KIntervalError)
            {
            ERR_PRINTF1(KThirdDelayOutOfRange);
            SetTestStepResult(EFail);
            }
    }

    // stop tracking
    updateOptions.SetUpdateInterval(TTimeIntervalMicroSeconds(0));
    iPositioner.SetUpdateOptions(updateOptions);
    stopTracking.UniversalTime();

    // psy6 must return event log
    genInfo->SetRequestedField(KPSY6FieldEventLog);
    watch.Tick();
    PositionRequestWithCheck(*genInfo, KErrNone, KUidLcfPsy6);
    if(watch.ElapsedFromTick() > KNormalRequestDelay)
        {
        ERR_PRINTF1(KNormalDelayTooBig);
        SetTestStepResult(EFail);
        }
    
    // Analyze event log from PSY6
    TQueryEvent* eventArray = GetPsy6EventLogL(*genInfo);

    TInt32 logSize;
    if(KErrNone != genInfo->GetValue(KPSY6FieldEventLogSize, logSize))
        {
        ERR_PRINTF1(KFailedReadLogsize);
        SetTestStepResult(EFail);
        return TestStepResult();
        }
    
    TUint expectedEvents[] = {EUpdate, 
                              ETrackingStart,
                              EUpdate,
                              EUpdate,
                              ETrackingStop, 
                              EUpdate};
    TUint numExpectedEvents = sizeof(expectedEvents) / sizeof(TUint);

    CheckExpectedResult(logSize, numExpectedEvents, KWrongEventNumberPSY6);

    // check event types
    for (TInt32 index = 0; index < Min(logSize, numExpectedEvents); index++)
        {
        TQueryEvent& event = *(eventArray + index);
        CheckExpectedResult(event.iEventType, expectedEvents[index], KUnexpectedEvent);
        }

    // check event times
    if(logSize != numExpectedEvents)
        {
        ERR_PRINTF1(KCannotCheckEventTimes);
        SetTestStepResult(EFail);
        return TestStepResult();
        }
    
    
    // ( ETrackingStart should have happenned right after first
    // request was completed )
    // Harley: Because of intelligent Default Proxy change, the tracking start
    // shall happen just before the second location request is issued to the PSY.
    TQueryEvent& event = *(eventArray + 1);
    if(Abs(secondRequest.MicroSecondsFrom(event.iTime).Int64()) > KDiff)
        {
        ERR_PRINTF1(KStartEventBeyondExpectendRange);
        SetTestStepResult(EFail);
        }
    
    // ETrackingStop should have happenned right after second
    // SetUpdateOptions
    event = *(eventArray + 4);

    if(Abs(stopTracking.MicroSecondsFrom(event.iTime).Int64()) > KDiff)
        {
        ERR_PRINTF1(KStopEventBeyondExpectendRange);
        SetTestStepResult(EFail);
        }
    // cleanup
    CleanupStack::PopAndDestroy(genInfo);
    StandardCleanup();
	return TestStepResult();
	}
/**
 * @return - TVerdict code
 * Override of base class pure virtual
 * Our implementation only gets called if the base class doTestStepPreambleL() did
 * not leave. That being the case, the current test result value will be EPass.
 */
TVerdict CT_LbsClientStep_PartialUpdate::doTestStepL()
{
    // Generic test step used to test the LBS SetUpdateOptions API.
    INFO_PRINTF1(_L("&gt;&gt;CT_LbsClientStep_PartialUpdate::doTestStepL()"));

    if (TestStepResult()==EPass)
    {
        TInt err = KErrNone;
        iPosUpdateStatus = EPositionUpdateStart;

        //Configure partial Updates
        TPositionUpdateOptions optsA;
        optsA.SetAcceptPartialUpdates(ETrue);

        if(!optsA.AcceptPartialUpdates())
        {
            INFO_PRINTF1(_L("Partial Updates not set."));
            SetTestStepResult(EFail);
        }

        err = iDoPosUpdatePtr->SetOptions(optsA);
        User::LeaveIfError(err);

        CLbsAdmin* lbsAdminApi = CLbsAdmin::NewL();
        CleanupStack::PushL(lbsAdminApi);

        // Carryout unique test actions.
        if (GetIntFromConfig(ConfigSection(), KTestCaseId, iTestCaseId))
        {
            switch (iTestCaseId)
            {
            // Test case LBS-Partial-Update-Options-0001
            case 1:
            {
                CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsAutonomous;
                lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);

                //Configure Partial Update to EFalse
                TPositionUpdateOptions updOpts;
                updOpts.SetUpdateTimeOut(10*1000000);
                updOpts.SetAcceptPartialUpdates(EFalse);
                if(EFalse != updOpts.AcceptPartialUpdates())
                {
                    INFO_PRINTF1(_L("Partial Updates not set."));
                    SetTestStepResult(EFail);
                }

                err = iDoPosUpdatePtr->SetOptions(updOpts);
                User::LeaveIfError(err);

                break;
            }

            // Test case LBS-Partial-Update-Options-0002
            case 2:
            case 3:
            case 4:
            case 5:
            case 6:
            case 7:
            {
                CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsAutonomous;
                lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);

                break;
            }

            case 21:
            case 22:
            case 24:
            case 25:
            case 26:
            {
                CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
                lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);

                break;
            }

            case 23:
            {
                CLbsAdmin::TGpsMode gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
                lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);

                //Configure Partial Update to EFalse
                TPositionUpdateOptions updOpts;
                updOpts.SetAcceptPartialUpdates(EFalse);
                if(EFalse != updOpts.AcceptPartialUpdates())
                {
                    INFO_PRINTF1(_L("Partial Updates not set."));
                    SetTestStepResult(EFail);
                }

                err = iDoPosUpdatePtr->SetOptions(updOpts);
                User::LeaveIfError(err);

                break;
            }

            case 27:
            case 28:
            {
                //Tracking
                CLbsAdmin::TGpsMode gpsMode;
                if(iTestCaseId == 27)
                {
                    gpsMode = CLbsAdmin::EGpsAutonomous;
                }
                else
                {
                    gpsMode = CLbsAdmin::EGpsPreferTerminalBased;
                }

                lbsAdminApi->Set(KLbsSettingHomeGpsMode,gpsMode);

                TPositionUpdateOptions updOpts;
                updOpts.SetUpdateInterval(10*1000000); //Set Update Interval to 10 secs
                updOpts.SetAcceptPartialUpdates(ETrue);

                err = iDoPosUpdatePtr->SetOptions(updOpts);
                User::LeaveIfError(err);

                break;
            }

            default:
                User::Panic(KLbsClientStep_PartialUpdate, KErrUnknown);

            }
        }

        User::LeaveIfError(OpenNetSim());

        // Kick off the test abort and keep alive timers.
        TTimeIntervalMicroSeconds32 keepAliveInterval(KLbsKeepAlivePeriod);
        iKeepAliveTimer->SetTimer(keepAliveInterval);

        // Kick off test.
        CActiveScheduler::Start();

        // Verify location data.
        VerifyPosInfos();

        //Reset Test module timeout
        TModuleDataIn modDataIn;
        modDataIn.iRequestType = TModuleDataIn::EModuleRequestTimeOut;
        modDataIn.iTimeOut = 0;

        T_LbsUtils utils;
        utils.NotifyModuleOfConfigChangeL(modDataIn);

        // Clean up.
        CloseNetSim();

        CleanupStack::PopAndDestroy(lbsAdminApi);
    }

    INFO_PRINTF1(_L("&lt;&lt;CT_LbsClientStep_PartialUpdate::doTestStepL()"));

    return TestStepResult();
}