• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TPositionInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中TPositionInfo的典型用法代码示例。如果您正苦于以下问题:C++ TPositionInfo类的具体用法?C++ TPositionInfo怎么用?C++ TPositionInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TPositionInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NotifyPositionUpdate

// ---------------------------------------------------------
// CT_LbsTestTimerPsy::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsTestTimerPsy::NotifyPositionUpdate(
	TPositionInfoBase& aPosInfo,
    TRequestStatus& aStatus)
	{
    TPositionInfo* position = NULL;
    position = static_cast<TPositionInfo*> (&aPosInfo);
    iStatus = &aStatus;
    *iStatus = KRequestPending;

  	TUid implUid = { KPosImplementationUid };
	position->SetModuleId(implUid);

    if (iTrackingEnabled)
        {
        // Set this position when tracking is enabled (on-going)
        TCoordinate coor(55.0, 55.0, 55.0);
        TLocality loc (coor, 1.0, 1.0);
        TPosition pos (loc, TTime(0));
        position -> SetPosition(pos);
        }
    else
        {
	    // Set a dummy position
        TCoordinate coor(20.0, 20.0, 20.0);
        TLocality loc (coor, 1.0, 1.0);
        TPosition pos (loc, TTime(0));
        position -> SetPosition(pos);

        User::RequestComplete(iStatus, KErrNone);
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:37,代码来源:ctlbstesttimerpsy.cpp


示例2: returned

/**
GetLastPosition

@param aPos	container for the position being returned (with KErrNone return)	
@param aOldestValidTime	 the oldest valid time for a position being returned. If there is a valid position no older than this time, it should be returned.
@param aAllowPartial	whether partial updates should be considered
@return ETrue if the fix fulfills the requirements, 
*/
TBool CNETResponseHandler::GetLastPosition(TPositionInfoBase& aPos, TTime aOldestValidTime, TBool aAllowPartial)
	{
	TBool ret = EFalse;

	TTime actualTime;
	TPositionInfo posInfo;
 	TPosition pos;	 	
 	TInt err;
	
 	err = iNETDataBus->GetLastPositionInfo(posInfo, actualTime);
	if( err == KErrNone && actualTime >= aOldestValidTime)	// got a recent enough position
		{
		posInfo.GetPosition(pos);
		if(aAllowPartial || !Partial(pos))// complete enough
			{
			TRAPD(error, CopyPositionTypes(aPos, posInfo));
			if(!error)
				{
				ret = ETrue;
				}
			else
				{
				LBSLOG(ELogP1, "CNetResponseHandler::GetLastPosition() failed to copy position ");
				ret = EFalse;
				}			
			}
		}	
	return ret;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:37,代码来源:cnetresponsehandler.cpp


示例3: latitude

//
// This test checks that a SetLastKnowPosition request
// results in a request to store a position sent to the DB
//
TVerdict CTe_LocMonitorStep11::doTestStepL()
	{
 	if (TestStepResult()==EPass)
 		{
 		TPositionInfo positionInfo;
 		TPosition position;
		TReal64 latitude(11), longitude(21);
		position.SetCoordinate(latitude, longitude);
		positionInfo.SetPosition(position);
			
		RLbsLocMonitorSession locMonSession;
 		User::LeaveIfError(locMonSession.Connect()); 		
 		RLbsLocMonitorAreaPositioner areaPositioner;
 		areaPositioner.OpenL(locMonSession);
 		CleanupClosePushL(areaPositioner);

 		iLocMonDbListener->ListenForLocMonDbFeedback();
 		areaPositioner.SetLastKnownPosition(positionInfo);
 		iLocMonDbListener->WaitForDbFeedback(); 		
		
		// Check that the position received by the DB is the position
		// sent by the test
		TESTL(latitude == iLocMonDbListener->iDbData.iPosition.Latitude());
		TESTL(longitude == iLocMonDbListener->iDbData.iPosition.Longitude());
		
		CleanupStack::PopAndDestroy(&areaPositioner);
 		locMonSession.Close();
 		}

	  return TestStepResult();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:te_locmonitorstep11.cpp


示例4: TransmitPosition

void RNrhSession::TransmitPosition(const TDesC& aDestinationId,
								   TUint aTransmitPriority,
								   TRequestStatus& aStatus, 
								   TPositionInfo& aTransmittedPosInfo)
	{	
	// iDestinationId is too big to fit in the buffer;
	// complete the request early with an error code	
	if (aDestinationId.Length() > iTransmitPositionParams.iDestinationId.MaxLength())
		{
		TRequestStatus* status = &aStatus;
		User::RequestComplete(status, KErrTooBig);
		}
	
	iTransmitPositionParams.iDestinationId = aDestinationId;
	iTransmitPositionParams.iPriority = aTransmitPriority;
	iTransmitPositionParams.iPositionInfoClassType = aTransmittedPosInfo.PositionClassType();
	iTransmitPositionParams.iPositionInfoClassSize = aTransmittedPosInfo.PositionClassSize();
	
	iTransmitPositionParamsPtr.Set(reinterpret_cast<TUint8*>(&iTransmitPositionParams),
								   sizeof(iTransmitPositionParams),
								   sizeof(iTransmitPositionParams));
	iTransmittedPosInfoPtr.Set(reinterpret_cast<TUint8*>(&aTransmittedPosInfo), 
							   aTransmittedPosInfo.PositionClassSize(),
							   aTransmittedPosInfo.PositionClassSize());
	TIpcArgs args(&iTransmitPositionParamsPtr, &iTransmittedPosInfoPtr);
	SendReceive(EX3pTransmitPosition, args, aStatus);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:27,代码来源:LbsX3PImpl.cpp


示例5:

// ---------------------------------------------------------
// CT_LbsInstallPsyTp273::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsInstallPsyTp273::NotifyPositionUpdate(
	TPositionInfoBase& aPosInfo,
    TRequestStatus& aStatus)
	{
	TInt err = KErrNone;
    
    TTime tt;
    tt.UniversalTime();
    //Request ID must be unique, use universalime as seed
    // to give a random number
    TInt64 seed = tt.Int64();
    TReal lat = 90 * Math::FRand(seed);
    TReal lon = 90 * Math::FRand(seed);
    TReal32 alt = (TReal32)(90 * Math::FRand(seed));
    TPositionInfo* position = static_cast<TPositionInfo*> (&aPosInfo);
    TUid implUid = { KPosImplementationUid };
    position->SetModuleId(implUid);

    TTime now;
    now.UniversalTime();          

    TPosition posse;
    posse.SetCoordinate(lat, lon, alt);
    posse.SetTime(now);
    position->SetPosition(posse);

    TRequestStatus* status = &aStatus;
	User::RequestComplete(status, err);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:ctlbsinstallpsytp273.cpp


示例6: NotifyPositionUpdate

// ---------------------------------------------------------
// CT_LbsTestPsySimulateIsa::NotifyPositionUpdate
//
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsTestPsySimulateIsa::NotifyPositionUpdate(
	TPositionInfoBase& aPosInfo, 
	TRequestStatus& /*aStatus*/)
    {
    TPositionInfo* iPosition = static_cast<TPositionInfo*> (&aPosInfo);
    TUid implUid = { KPosImplementationUid };
    iPosition->SetModuleId(implUid);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:14,代码来源:ctlbstestpsysimulateisa.cpp


示例7: NotifyPositionUpdate

// ---------------------------------------------------------
// CT_LbsStubPositioner::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsStubPositioner::NotifyPositionUpdate(
	TPositionInfoBase& aPosInfo,
    TRequestStatus& aStatus)
	{
    TPositionInfo* position = static_cast<TPositionInfo*> (&aPosInfo);

	TUid implUid = { KPosImplementationUid };
	position->SetModuleId(implUid);
	TRequestStatus* status = &aStatus;
	User::RequestComplete(status, KErrNone);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:17,代码来源:ctlbsstubpositioner.cpp


示例8: ReportReferenceLocation

void RNrhSession::ReportReferenceLocation(TRequestStatus& aRefPosStatus, TPositionInfo& aReferencePosInfo)
	{

	iReferencePositionParams.iPositionInfoClassType = aReferencePosInfo.PositionClassType();
	iReferencePositionParams.iPositionInfoClassSize = aReferencePosInfo.PositionClassSize();
	
	iReferencePositionParamsPtr.Set(reinterpret_cast<TUint8*>(&iReferencePositionParams),
								   sizeof(iReferencePositionParams),
								   sizeof(iReferencePositionParams));
								   
	iReferencePosInfoPtr.Set(reinterpret_cast<TUint8*>(&aReferencePosInfo), 
							   aReferencePosInfo.PositionClassSize(),
							   aReferencePosInfo.PositionClassSize());
	TIpcArgs args(&iReferencePositionParamsPtr, &iReferencePosInfoPtr);
	SendReceive(EX3pReportReferenceLocation , args, aRefPosStatus);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:16,代码来源:LbsX3PImpl.cpp


示例9: switch

// ---------------------------------------------------------
// CTestPsy4Positioner::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsTestProxyPsy4Positioner::NotifyPositionUpdate(TPositionInfoBase& aPosInfo, TRequestStatus& aStatus)
	{
    TPositionInfo* posInfo = static_cast<TPositionInfo*> (&aPosInfo);

    TUint32 request = posInfo->UpdateType();
    switch (request)
        {
        case 12:
            iRequestHandler->SetErrorCode(KErrNone);
            break;
        default:
            iRequestHandler->SetErrorCode(KErrUnknown);
            break;
        }

	iRequestHandler->NotifyPositionUpdate(posInfo, &aStatus);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:23,代码来源:ctlbstestproxypsy4positioner.cpp


示例10: CompleteRequest

void CNetworkPsy2::CompleteRequestByDefault()
    {
    if(!iRequestStatus)
        {
        return;
        }
        
    if(iPositionInfoBase->PositionClassType() & EPositionInfoClass)
        {
        TPositionInfo* posInfo = static_cast<TPositionInfo*>(iPositionInfoBase);
        TPosition pos;
        pos.SetCoordinate(1.0, 1.0, 1.0);
        pos.SetAccuracy(1.0, 1.0);
        posInfo->SetPosition(pos);
        }
        
    CompleteRequest(KErrNone);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:18,代码来源:networkpsy2.cpp


示例11: GetLastPositionInfo

/**
Get the last position from the bus 
 */
TInt CFinalNetDataBus::GetLastPositionInfo(TPositionInfo& aFNPInfo, TTime& aActualTime)
	{
	TLbsNetSessionIdInt sessionId;
	TTime targetTime;
	
	TInt error = iFinalNetDataBus.GetPositionInfo(sessionId, aFNPInfo, targetTime, aActualTime);
	if(error == KErrNone && (aFNPInfo.PositionMode() & TPositionModuleInfo::ETechnologyTerminal))
		{
		error = KErrNotFound;	// filter out terminal assisted FNPs
		}
	return error;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:15,代码来源:cfinalnetdatabus.cpp


示例12: _L

QGeoPositionInfo CPsyContainer::lastKnownPosition(bool aFromSatellitePositioningMethodsOnly)
{
    QGeoPositionInfo posUpdate;
    TPosition pos;
    TInt error = KErrNone;
    RPositioner lastKnownpositioner;
    TRequestStatus status;

    error = lastKnownpositioner.Open(PosServer());
    //request for lastknown position update and wait for the request to complete
    if (error == KErrNone) {
        TPositionInfo posInfo;
        lastKnownpositioner.SetRequestor(CRequestor::ERequestorService ,
                                         CRequestor::EFormatApplication, _L("QTmobility_Location"));
        lastKnownpositioner.GetLastKnownPosition(posInfo, status);

        //Sub-optimal implementation inherited from the previous implementation
        //Since this is a 'once in a while' usecase, this should be ok
        //An optimal implementation will be much more complex and will need changes
        //in the symbian locaiton stack
        User::WaitForRequest(status);

        error = status.Int();
        lastKnownpositioner.Close();

        if ((error == KErrNone) || (error == KPositionPartialUpdate)) {
            TPositionModuleInfo modInfo;
            iPosServer.GetModuleInfoById(posInfo.ModuleId(), modInfo);

            if (!aFromSatellitePositioningMethodsOnly ||
                    (aFromSatellitePositioningMethodsOnly && (modInfo.Capabilities() & TPositionModuleInfo::ECapabilitySatellite))) {
                PsyUtils::TPositionInfo2QGeoPositionInfo(posInfo, posUpdate);
            }
        }
    }
    return posUpdate;
}
开发者ID:RobinD42,项目名称:qt-mobility,代码行数:37,代码来源:symbian_lbsfacade.cpp


示例13:

void CLcfPsyDummy1::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
    {
    // The position info object is at least a TPositionInfo
    TPositionInfo* posInfo =
        static_cast<TPositionInfo*>(&aPosInfo);

    TPosition pos;
    // Calculate the position and fill in the position info
    // object
    // Latitude, Longtitude, altitude
    pos.SetCoordinate(57.1, 11.3, 32.5);
    
    // set horizontal and vertical accuracy
    pos.SetAccuracy(40.0, 40.0);
    
    // set time of fix
    pos.SetCurrentTime();

    // Set position in position info.
    posInfo->SetPosition(pos);

    // Set the implementation uid     
    posInfo->SetModuleId(ImplementationUid());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy1.cpp


示例14: INFO_PRINTF1

/** Called at the end of the test to verify the correct position data has been returned to the
	client.
	
	Each test case SHOULD implement a version of this.
*/
void CT_LbsConflictStep_X3PMenuPush::VerifyPosInfos()
	{
	T_LbsUtils utils;
    RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
	RPointerArray<TAny>& currPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
	TPositionInfo* currPosInfo;
	
	// Verify both the self locate and X3P MOLR position information.
	
	// Verify entry 0 for the self locate. We expect a position containing NaNs.
	currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[0]);
	TPosition pos;
	currPosInfo->GetPosition(pos);
	if (!Math::IsNaN(pos.Latitude()))
		{
		INFO_PRINTF1(_L("Failed test, Position does not contain NANs"));

		SetTestStepResult(EFail);
		}
	if (!Math::IsNaN(pos.Longitude()))
		{
		INFO_PRINTF1(_L("Failed test, Position does not contain NANs"));

		SetTestStepResult(EFail);
		}

	// Verify entry 1 for the X3P. We expect a real location value, compare using the data
	// sent to the test APGS module.
	TPositionInfo* verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
	currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[1]);
	if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo))
		{
		INFO_PRINTF1(_L("Failed test, X3P position incorrect."));
		SetTestStepResult(EFail);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:41,代码来源:ctlbsconflictstepx3pmenupush.cpp


示例15:

void CLcfPsyDummy3::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
    {
    // The position info object is at least a TPositionInfo
    TPositionInfo* posInfo =
        static_cast<TPositionInfo*>(&aPosInfo);

    TPosition pos;
    // Calculate the position and fill in the position info
    // object
    pos.SetCoordinate(67.567, -12.34, 45.32);

    // set horizontal and vertical accuracy
    pos.SetAccuracy(150.0, 500.0);

    // set time of fix
    pos.SetCurrentTime();

    // Set position in position info.
    posInfo->SetPosition(pos);

    // Set the implementation uid

    posInfo->SetModuleId(ImplementationUid());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy3.cpp


示例16: ProcessNetworkPositionUpdate

void CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(TUint /*aRequestId*/, const TPositionInfo& aPosInfo)
	{
	if(iState==EPrivacyCheckOk)
		{
		iState=ERefLocReceived;	
		INFO_PRINTF1(_L("&gt;&gt;CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(RefPosition)"));
		}
	else if(iState==ERefLocReceived)
		{
		// Test for $update,1,2,51.5015,-0.105,50,2,3*
		TPosition getPos;
		aPosInfo.GetPosition(getPos);
		if(getPos.Latitude()==51.5015 && getPos.Longitude()==-0.105 && getPos.Altitude()==50 && getPos.HorizontalAccuracy()==2 && getPos.VerticalAccuracy()==3) 		
			{
			INFO_PRINTF1(_L("&gt;&gt;CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(GpsPosition)"));
			iState=EGpsLocReceived;	
			}
		}
	ReturnToTestStep();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:20,代码来源:ctlbshybridueassistedmtlrtimeout.cpp


示例17: PrintPosInfo

EXPORT_C void MTe_LbsPsyStaticData::PrintPosInfo(const TPositionInfo& aPosInfo) const
	{	
	_LIT(KTimeFormat, "%H:%T:%S.%C");
	TBuf<100> cTimeStr;
	
	INFO_PRINTF2(_L("classSize=%d"), aPosInfo.PositionClassSize());
	INFO_PRINTF2(_L("classType=0x%x"), aPosInfo.PositionClassType());
	INFO_PRINTF2(_L("moduleId=0x%x"), aPosInfo.ModuleId());
	INFO_PRINTF2(_L("updateType=%d"), aPosInfo.UpdateType());
	INFO_PRINTF2(_L("positionMode=%d"), aPosInfo.PositionMode());
	INFO_PRINTF2(_L("positionModeReason=%d"), aPosInfo.PositionModeReason());
	
	TPosition pos;
	aPosInfo.GetPosition(pos);
	INFO_PRINTF2(_L("pos altitude=%f"), pos.Altitude());
	INFO_PRINTF2(_L("pos latitude=%f"), pos.Latitude());
	INFO_PRINTF2(_L("pos longitude=%f"), pos.Longitude());
	INFO_PRINTF2(_L("pos datum=0x%x"), pos.Datum());
	INFO_PRINTF2(_L("pos horAccuracy=%f"), pos.HorizontalAccuracy());
	INFO_PRINTF2(_L("pos verAccuracy=%f"), pos.VerticalAccuracy());
						
	TRAP_IGNORE(pos.Time().FormatL(cTimeStr, KTimeFormat);)
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:22,代码来源:te_lbspsystaticdata.cpp


示例18: Verify_PositionIsValid

/**
 *  Verifies that the supplied position is 'reasonable'
 *
 */
EXPORT_C TBool T_LbsUtils::Verify_PositionIsValid(TPositionInfo& aPosInfo)
	{
	TBool valid = TRUE;
	TPosition pos;
	TReal32 alt;
	TReal64 lat, longt;
	
	aPosInfo.GetPosition(pos);
	
	alt = pos.Altitude();
	lat = pos.Latitude();
	longt = pos.Longitude();
	
	// TO DO figure out what values are reasonable here (in Milton somewhere!?)
	// We could use the normal verify posinfo stuff, and check to see if the values are roughly equal.
	// Either update this func (add a parameter) or new func like the compare posinfo func we have
	if(alt == 0 || lat == 0 || longt == 0)
		{
		valid = FALSE;
		}
	
	
	return valid;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:28,代码来源:tlbsutils.cpp


示例19: INFO_PRINTF1

TVerdict CT_LbsHybridUEBasedX3PGPSFutile::doTestStepL()
	{
	// Generic test step used to test the LBS Client Notify position update API.
	INFO_PRINTF1(_L("CT_LbsHybridUEBasedX3PGPSFutile::doTestStepL()"));

	// Stop the test if the preamble failed
	TESTL(TestStepResult() == EPass);
	
	
	const TInt KTimeOut = 30*1000*1000;
	const TInt KAdviceSystemStatusTimeout = 40*1000*1000;
	const TInt KSmallTimeOut = 3*1000*1000; 

	
	// Carryout unique test actions.
	if (GetIntFromConfig(ConfigSection(), KTestCaseId, iTestCaseId))
		{
		INFO_PRINTF2(_L("Test id %d."), iTestCaseId);
		}
			
	// >> AdviceSystemStatus(0)
	TESTL(iProxy->WaitForResponse(KAdviceSystemStatusTimeout) == ENetMsgGetCurrentCapabilitiesResponse);
	CLbsNetworkProtocolBase::TLbsSystemStatus status;
	CleanupStack::PopAndDestroy(iProxy->GetArgsLC(ENetMsgGetCurrentCapabilitiesResponse, &status));
	TESTL(status == CLbsNetworkProtocolBase::ESystemStatusNone);
	
    //Initiate X3P start
	// TransmitPosition()
	_LIT(KThirdParty,"+4407463842101"); 
	const TInt KPriority= 1;
	TLbsTransmitPositionOptions options(TTimeIntervalMicroSeconds(50*1000*1000));
	TRequestStatus refPosStatus=KRequestPending;
	TRequestStatus transPosStatus=KRequestPending;
	TPositionInfo refPosInfo;
	TPositionInfo transPosInfo;
	iTransmitter.SetTransmitOptions(options);
	iTransmitter.TransmitPosition(KThirdParty, KPriority, refPosStatus, refPosInfo, transPosStatus, transPosInfo);
	
	// RequestTransmitLocation()
	TESTL(iProxy->WaitForResponse(KTimeOut) == ENetMsgRequestTransmitLocation);
	TBufC16<14> thirdParty(KThirdParty);
	TPtr16 ptr = thirdParty.Des(); 
	HBufC16* getThirdParty = NULL;
	TLbsNetSessionId* getSessionId = NULL;
	TInt getPriority(0);
	TInt cleanupCnt;
	cleanupCnt = iProxy->GetArgsLC(ENetMsgRequestTransmitLocation, &getSessionId, &getThirdParty, &getPriority); 
	TESTL(ptr.Compare(*getThirdParty)==KErrNone);	
	TESTL(getPriority == KPriority);
	iSessionId = *getSessionId; //session ID is initialised by LBS
	CleanupStack::PopAndDestroy(cleanupCnt);

	// ProcessStatusUpdate()
	MLbsNetworkProtocolObserver::TLbsNetProtocolService service = MLbsNetworkProtocolObserver::EServiceTransmitThirdParty;		
	iProxy->CallL(ENetMsgProcessStatusUpdate, &service);
//End Initiate

//Reference Position Notification Start	
	// ProcessLocationUpdate()
	refPosInfo = ArgUtils::ReferencePositionInfo();
	iProxy->CallL(ENetMsgProcessLocationUpdate, &iSessionId, &refPosInfo);
//Reference Position Notification End

	
//Assistance Data Notification Start
	// ProcessAssistanceData()
	TLbsAsistanceDataGroup dataRequestMask = EAssistanceDataReferenceTime;
	RLbsAssistanceDataBuilderSet assistanceData;
	ArgUtils::PopulateLC(assistanceData);
	TInt reason = KErrNone;
	iProxy->CallL(ENetMsgProcessAssistanceData, &dataRequestMask, &assistanceData, &reason);
	CleanupStack::PopAndDestroy(1); //assistanceData
// Assistance Data Notification End
	
// Network Location Request Start
	// ProcessLocationRequest()
	const TBool emergency(EFalse);
	TLbsNetPosRequestQuality quality = ArgUtils::QualityAlpha2();
	TLbsNetPosRequestMethod method;
	
	if (iTestCaseId == 1)
	{
	method   = ArgUtils::RequestHybridMethod();
	}
	else if (iTestCaseId == 2)
	{
	method   = ArgUtils::RequestMethod();
	}
	iProxy->CallL(ENetMsgProcessLocationRequest, &iSessionId, &emergency, &service, &quality, &method);
// Network Location Request Stop

	// RequestAssistanceData(0)
	TESTL(iProxy->WaitForResponse(KSmallTimeOut) == ENetMsgRequestAssistanceData); 
	TLbsAsistanceDataGroup dataGroup;
	CleanupStack::PopAndDestroy(iProxy->GetArgsLC(ENetMsgRequestAssistanceData, &dataGroup));
	TESTL(dataGroup == EAssistanceDataNone);

	// User expects Reference Position
	User::WaitForRequest(refPosStatus); 
	TESTL(refPosStatus==KErrNone);
//.........这里部分代码省略.........
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:101,代码来源:ctlbshybriduebasedx3pgpsfutile.cpp


示例20: response


//.........这里部分代码省略.........
						sessionId = NULL;
		
						TTimeIntervalMicroSeconds microseconds;
						TTime stopTime;
						stopTime.HomeTime();
						microseconds = stopTime.MicroSecondsFrom(iAlpha2StartTime); 
						TInt64 timeElapsed = microseconds.Int64();
	
						// Test that we do not get response before alpha2 has expired:
						TInt timeOut = KAlphaTimer - timeElapsed - KDelta > 0 ? KAlphaTimer - timeElapsed - KDelta : 0;
						iProxy->WaitForResponseL(timeOut, iStatus);
						SetActive();
						}
					break;
					}
				case ENetMsgTimeoutExpired:
					{
					// >> Alpha2 timeout
					iStep.INFO_PRINTF1(_L("NetworkProtocolProxy - Network expecting measurements after timeout"));
					
					iNetworkProtocolProxyStep = ENetworkProtocolProxyStepSessionWaitingForFirstMeasurments;
					iProxy->WaitForResponseL(2 * 1000* KDelta, iStatus);
					SetActive();
					break;
					}
				case ENetMsgRespondLocationRequest:
					{ // If the module sends an accurate enough position then the Alpha2 timer might not time-out so check we received positions
					// >> RespondLocationRequest(gpspos)
					iStep.INFO_PRINTF1(_L("NetworkProtocolProxy >> RespondLocationRequest(gpspos)"));
					RequestNetworkMethod();
					DecideWhatNetworkDoesntReceive();
					iStep.TESTL(iNetworkExpectsPositions);
					TLbsNetSessionId* sessionId = NULL;
					TPositionInfo* positionInfo = NULL;
					TInt reason;
					TInt cleanupCnt = iProxy->GetArgsLC(ENetMsgRespondLocationRequest, &sessionId, &reason, &positionInfo);
					
					// check it is a position
					iStep.TESTL(positionInfo->PositionClassType() == (EPositionInfoClass|EPositionCourseInfoClass|EPositionSatelliteInfoClass|EPositionExtendedSatelliteInfoClass));
					iStep.TESTL(sessionId->SessionNum() == iSessionId.SessionNum());
					iStep.TESTL(reason == KErrNone);
					
					// << ProcessLocationUpdate(FNP)
					iStep.INFO_PRINTF1(_L("NetworkProtocolProxy << ProcessLocationUpdate(SessionId, FinalNetworkPosition)"));
					iProxy->CallL(ENetMsgProcessLocationUpdate, &iSessionId, positionInfo);
					CleanupStack::PopAndDestroy(cleanupCnt);

					iNetworkProtocolProxyStep = ENetworkProtocolProxyStepSessionPositionSent;
					iProxy->WaitForResponseL(KSmallTimeOut, iStatus);
					SetActive();
					break;
					}
				default:
					{
					iStep.INFO_PRINTF2(_L("Network in state ENetworkProtocolProxyStepSessionWaitingForFirstMeasurmentsTimeOut received unexpected response: %d"), response);
					User::Leave(KErrNotSupported);
					}
				}
			break;
			}
		case ENetworkProtocolProxyStepSessionWaitingForFirstMeasurments:
			{
			switch(response)
				{
				case ENetMsgRequestAssistanceData:
					{
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:67,代码来源:ctlbsnetprotocol.cpp



注:本文中的TPositionInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TProfile类代码示例发布时间:2022-05-31
下一篇:
C++ TPosition类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap