void RMmCustomAPI::FillFDDSpecificFrequencyMode(TMmCellInfo::TCellMeasuredResult& aCellMeasuredResult,TInt aOption,TInt aReadIndex) { TMmCellInfo::TFddInfo fddInfo; if(aOption == 0) { fddInfo.iPrimaryCPICH = KPrimaryCPICH; fddInfo.iCpichEcN0 = KCpichEcN0; fddInfo.iCichRscp = KCichRscp; fddInfo.iPathloss = KPathloss; #ifdef _READ_FROM_FILE_ fddInfo.iPrimaryCPICH = GetParameterValue(22,aReadIndex); fddInfo.iCpichEcN0 = GetParameterValue(23,aReadIndex); fddInfo.iCichRscp = GetParameterValue(24,aReadIndex); fddInfo.iPathloss = GetParameterValue(25,aReadIndex); #endif } else { fddInfo.iPrimaryCPICH = -1; fddInfo.iCpichEcN0 = -1; fddInfo.iCichRscp = -1; fddInfo.iPathloss = -1; } aCellMeasuredResult.iFddInfo = fddInfo; }
void UParticleModuleParameterDynamic::SpawnEx(FParticleEmitterInstance* Owner, int32 Offset, float SpawnTime, struct FRandomStream* InRandomStream, FBaseParticle* ParticleBase) { SPAWN_INIT; { PARTICLE_ELEMENT(FEmitterDynamicParameterPayload, DynamicPayload); DynamicPayload.DynamicParameterValue[0] = GetParameterValue(DynamicParams[0], Particle, Owner, InRandomStream); DynamicPayload.DynamicParameterValue[1] = GetParameterValue(DynamicParams[1], Particle, Owner, InRandomStream); DynamicPayload.DynamicParameterValue[2] = GetParameterValue(DynamicParams[2], Particle, Owner, InRandomStream); DynamicPayload.DynamicParameterValue[3] = GetParameterValue(DynamicParams[3], Particle, Owner, InRandomStream); } }
RMmCustomAPI::TMmCellInfo::TNmr RMmCustomAPI::GetTNmr() { RMmCustomAPI::TMmCellInfo::TNmr tNmr; tNmr.iARFCN = iInitialTNmr; tNmr.iBSIC = iInitialTNmr; tNmr.RxLEV = iInitialTNmr; iInitialTNmr++; #ifdef _READ_FROM_FILE_ tNmr.iARFCN = GetParameterValue(6,iInitialTNmr); tNmr.iBSIC = GetParameterValue(7,iInitialTNmr); tNmr.RxLEV = GetParameterValue(8,iInitialTNmr); #endif return tNmr; }
void RMmCustomAPI::ConstructL() { iFileError = iFs.Connect(); iRTimer.CreateLocal(); iSUPLNwMode = ESUPLWCDMA; #ifdef _READ_FROM_FILE_ iSUPLNwMode = (TSUPLNwMode)GetParameterValue(1); #endif iInitialTNmr = 0; iSUPLFrequecyMode = EFDD; iSUPLFrequecyMode = ETDD; #ifdef _READ_FROM_FILE_ iSUPLFrequecyMode = (TSUPLFrequecyMode)GetParameterValue(16); #endif iNoOfCells = GetParameterValue(2); }
void RMmCustomAPI::FillTDDSpecificFrequencyMode(TMmCellInfo::TCellMeasuredResult& aCellMeasuredResult,TInt aOption,TInt aReadIndex) { TMmCellInfo::TTddInfo tddInfo; if(aOption == 0) { tddInfo.iCellParamID = KCellParamID; tddInfo.iProposedTGSN= KProposedTGSN; tddInfo.iPrimaryCcpchRscp = KPrimaryCcpchRscp; tddInfo.iPathloss = KPathloss; tddInfo.iProposedTGSN= -1; tddInfo.iPrimaryCcpchRscp = -1; tddInfo.iPathloss = -1; #ifdef _READ_FROM_FILE_ tddInfo.iCellParamID = GetParameterValue(26,aReadIndex); tddInfo.iProposedTGSN= GetParameterValue(27,aReadIndex); tddInfo.iPrimaryCcpchRscp = GetParameterValue(28,aReadIndex); tddInfo.iPathloss = GetParameterValue(29,aReadIndex); #endif for(TInt i = 0;i < KMaxTimeSlotIscpAmount; i++ ) { #ifdef _READ_FROM_FILE_ tddInfo.iTimeslotISCP[ i ] = GetParameterValue(30,i+1); #endif } } else { tddInfo.iCellParamID = -1; tddInfo.iProposedTGSN= -1; tddInfo.iPrimaryCcpchRscp = -1; tddInfo.iPathloss = -1; for(TInt i = 0;i < KMaxTimeSlotIscpAmount; i++ ) { tddInfo.iTimeslotISCP[ i ] = -1; } } aCellMeasuredResult.iTddInfo = tddInfo; }
void RMmCustomAPI::FillFrequencyMode(TMmCellInfo::TFrequencyInfo& aFrequencyInfo,TInt aUsedFor,TInt aInnerOuter) { if( iSUPLFrequecyMode == EFDD) { aFrequencyInfo.iFddUL = KFddUL; // 0..16383 In case of fdd( iFddUL, iFddDL), aFrequencyInfo.iFddUL = -1; aFrequencyInfo.iFddDL = KFddDL; // 0..16383 iFddUL is optional while iFddDL is mandatory. #ifdef _READ_FROM_FILE_ if(aInnerOuter == 0) { aFrequencyInfo.iFddUL = GetParameterValue(12,aUsedFor); aFrequencyInfo.iFddDL = GetParameterValue(13,aUsedFor); } else { aFrequencyInfo.iFddUL = GetParameterValue(17,aUsedFor); aFrequencyInfo.iFddDL = GetParameterValue(18,aUsedFor); } #endif } else { aFrequencyInfo.iTddNt = KTddDt; // 0..16383 aFrequencyInfo.iFddUL = -1; aFrequencyInfo.iFddDL = -1; #ifdef _READ_FROM_FILE_ if(aInnerOuter == 0) aFrequencyInfo.iTddNt = GetParameterValue(14,aUsedFor); else aFrequencyInfo.iTddNt = GetParameterValue(19,aUsedFor); #endif } }
void RMmCustomAPI::FillMeasureRequestList(TMmCellInfo::TWCDMACellInfo& aWcdmaCellInfo) { // for(TInt i = 0; i < KMaxFrequency; i++) iTotalCellCount = 1; iCellMeasuredResults = GetParameterValue(3); iCount = 1; for(TInt i = 0; i < iNoOfCells; i++) { aWcdmaCellInfo.iNwkMeasureReport[i] = GetMeasureRequest((i + 1) * iCount); iCount++; } }
void RMmCustomAPI::FillGSMCellInfo ( TMmCellInfo& aCellInfo ) { aCellInfo.iGsmCellInfo.iTA = KTA; #ifdef _READ_FROM_FILE_ aCellInfo.iGsmCellInfo.iTA = GetParameterValue(9); #endif iInitialTNmr = 0; for(TInt i = 0; i < KMaxNmrAmount; i++) { aCellInfo.iGsmCellInfo.iNmr[i] = GetTNmr(); } aCellInfo.iMode = TMmCellInfo::EGSM; }
void RMmCustomAPI::FillWCDMACellInfo ( TMmCellInfo& aCellInfo ) { TMmCellInfo::TWCDMACellInfo wcdmaCellInfo; TMmCellInfo::TFrequencyInfo frequencyInfo; FillMeasureRequestList(wcdmaCellInfo); FillFrequencyMode(frequencyInfo,1,0); // 0 means Freq info used for wcdmaCellInfo struct aCellInfo.iMode = TMmCellInfo::EWCDMA; wcdmaCellInfo.iPrimaryScrambilingCode = KPrimaryScrambilingCode; #ifdef _READ_FROM_FILE_ wcdmaCellInfo.iPrimaryScrambilingCode = GetParameterValue(15); #endif wcdmaCellInfo.iFrequencyInfo = frequencyInfo; aCellInfo.iWcdmaCellInfo = wcdmaCellInfo; }
RMmCustomAPI::TMmCellInfo::TNetworkMeasureReport RMmCustomAPI::GetMeasureRequest(TInt /*i*/) { TMmCellInfo::TNetworkMeasureReport measureReport; TMmCellInfo::TFrequencyInfo frequencyInfo; FillFrequencyMode(frequencyInfo,iCount,1);// 1 means Freq info used for MeasuredResults struct measureReport.iCarrierRSSI = KCarrierRSSI; measureReport.iCarrierRSSI = -1; #ifdef _READ_FROM_FILE_ measureReport.iCarrierRSSI = GetParameterValue(20,iCount); #endif measureReport.iFrequencyInfo = frequencyInfo; FillCellMeasuredResultsList(measureReport); return measureReport; }
void dynModuleExecutionImpl::GetAllParameters() { std::vector<ModuleParameterGroup>::iterator itGroup; itGroup = m_Module->GetParameterGroups().begin(); while (itGroup != m_Module->GetParameterGroups().end()) { std::vector<ModuleParameter>::iterator itParam; itParam = itGroup->GetParameters().begin(); while (itParam != itGroup->GetParameters().end()) { GetParameterValue( &(*itParam) ); ++itParam; } ++itGroup; } }
status_t ESDSinkNode::GetConfigurationFor(BMessage * into_message) { CALLED(); BParameter *parameter = NULL; void *buffer; size_t size = 128; bigtime_t last_change; status_t err; if (!into_message) return B_BAD_VALUE; buffer = malloc(size); for(int32 i=0; i<fWeb->CountParameters(); i++) { parameter = fWeb->ParameterAt(i); if(parameter->Type() != BParameter::B_CONTINUOUS_PARAMETER && parameter->Type() != BParameter::B_DISCRETE_PARAMETER) continue; PRINT(("getting parameter %li\n", parameter->ID())); size = 128; while((err = GetParameterValue(parameter->ID(), &last_change, buffer, &size))==B_NO_MEMORY) { size += 128; free(buffer); buffer = malloc(size); } if(err == B_OK && size > 0) { into_message->AddInt32("parameterID", parameter->ID()); into_message->AddData("parameterData", B_RAW_TYPE, buffer, size, false); } else { PRINT(("parameter %li err : %s\n", parameter->ID(), strerror(err))); } } //PRINT_OBJECT(*into_message); return B_OK; }
RMmCustomAPI::TMmCellInfo::TCellMeasuredResult RMmCustomAPI::GetCellMeasuredResults(TInt aReadIndex) { TMmCellInfo::TCellMeasuredResult cellMeasuredResult; cellMeasuredResult.iCID = KMeasuredCID; #ifdef _READ_FROM_FILE_ cellMeasuredResult.iCID = GetParameterValue(21,aReadIndex); #endif if( iSUPLFrequecyMode == EFDD) { FillFDDSpecificFrequencyMode(cellMeasuredResult,0,aReadIndex); FillTDDSpecificFrequencyMode(cellMeasuredResult,-1,aReadIndex); } else { FillTDDSpecificFrequencyMode(cellMeasuredResult,0,aReadIndex); FillFDDSpecificFrequencyMode(cellMeasuredResult,-1,aReadIndex); } return cellMeasuredResult; }
void UParticleModuleParameterDynamic::Update(FParticleEmitterInstance* Owner, int32 Offset, float DeltaTime) { if (UpdateFlags == EDPU_UPDATE_NONE) { // Nothing to do here - they are all spawntime only return; } if ((Owner == NULL) || (Owner->ActiveParticles <= 0) || (Owner->ParticleData == NULL) || (Owner->ParticleIndices == NULL)) { return; } // int32 ParameterIndex = ParticleDynamicParameter_GetIndexFromFlag(UpdateFlags); FPlatformMisc::Prefetch(Owner->ParticleData, (Owner->ParticleIndices[0] * Owner->ParticleStride)); FPlatformMisc::Prefetch(Owner->ParticleData, (Owner->ParticleIndices[0] * Owner->ParticleStride) + PLATFORM_CACHE_LINE_SIZE); switch (UpdateFlags) { case EDPU_UPDATE_0: case EDPU_UPDATE_1: case EDPU_UPDATE_2: case EDPU_UPDATE_3: { // Only one parameter is updating... check(ParameterIndex != INDEX_NONE); FEmitterDynamicParameter& DynParam = DynamicParams[ParameterIndex]; if (bUsesVelocity == false) { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[ParameterIndex] = GetParameterValue_UserSet(DynParam, Particle, Owner, NULL); } END_UPDATE_LOOP; } else { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[ParameterIndex] = GetParameterValue(DynParam, Particle, Owner, NULL); } END_UPDATE_LOOP; } } break; case EDPU_UPDATE_01: { // Just 0 and 1 need to be updated... FEmitterDynamicParameter& DynParam0 = DynamicParams[0]; FEmitterDynamicParameter& DynParam1 = DynamicParams[1]; if (bUsesVelocity == false) { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue_UserSet(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue_UserSet(DynParam1, Particle, Owner, NULL); } END_UPDATE_LOOP; } else { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue(DynParam1, Particle, Owner, NULL); } END_UPDATE_LOOP; } } break; case EDPU_UPDATE_012: { // Just 0, 1 and 2 need to be updated... FEmitterDynamicParameter& DynParam0 = DynamicParams[0]; FEmitterDynamicParameter& DynParam1 = DynamicParams[1]; FEmitterDynamicParameter& DynParam2 = DynamicParams[2]; if (bUsesVelocity == false) { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue_UserSet(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue_UserSet(DynParam1, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[2] = GetParameterValue_UserSet(DynParam2, Particle, Owner, NULL); } END_UPDATE_LOOP; } else { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue(DynParam1, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[2] = GetParameterValue(DynParam2, Particle, Owner, NULL); } END_UPDATE_LOOP; } } break; case EDPU_UPDATE_ALL: { FEmitterDynamicParameter& DynParam0 = DynamicParams[0]; FEmitterDynamicParameter& DynParam1 = DynamicParams[1]; FEmitterDynamicParameter& DynParam2 = DynamicParams[2]; FEmitterDynamicParameter& DynParam3 = DynamicParams[3]; if (bUsesVelocity == false) { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue_UserSet(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue_UserSet(DynParam1, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[2] = GetParameterValue_UserSet(DynParam2, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[3] = GetParameterValue_UserSet(DynParam3, Particle, Owner, NULL); } END_UPDATE_LOOP; } else { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = GetParameterValue(DynParam0, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[1] = GetParameterValue(DynParam1, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[2] = GetParameterValue(DynParam2, Particle, Owner, NULL); DynamicPayload.DynamicParameterValue[3] = GetParameterValue(DynParam3, Particle, Owner, NULL); } END_UPDATE_LOOP; } } break; default: { FEmitterDynamicParameter& DynParam0 = DynamicParams[0]; FEmitterDynamicParameter& DynParam1 = DynamicParams[1]; FEmitterDynamicParameter& DynParam2 = DynamicParams[2]; FEmitterDynamicParameter& DynParam3 = DynamicParams[3]; if (bUsesVelocity == false) { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = (UpdateFlags & EDPU_UPDATE_0) ? GetParameterValue_UserSet(DynParam0, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[0]; DynamicPayload.DynamicParameterValue[1] = (UpdateFlags & EDPU_UPDATE_1) ? GetParameterValue_UserSet(DynParam1, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[1]; DynamicPayload.DynamicParameterValue[2] = (UpdateFlags & EDPU_UPDATE_2) ? GetParameterValue_UserSet(DynParam2, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[2]; DynamicPayload.DynamicParameterValue[3] = (UpdateFlags & EDPU_UPDATE_3) ? GetParameterValue_UserSet(DynParam3, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[3]; } END_UPDATE_LOOP; } else { BEGIN_UPDATE_LOOP; { FEmitterDynamicParameterPayload& DynamicPayload = *((FEmitterDynamicParameterPayload*)(ParticleBase + CurrentOffset)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride)); FPlatformMisc::Prefetch(ParticleData, (ParticleIndices[i+1] * ParticleStride) + PLATFORM_CACHE_LINE_SIZE); DynamicPayload.DynamicParameterValue[0] = (UpdateFlags & EDPU_UPDATE_0) ? GetParameterValue(DynParam0, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[0]; DynamicPayload.DynamicParameterValue[1] = (UpdateFlags & EDPU_UPDATE_1) ? GetParameterValue(DynParam1, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[1]; DynamicPayload.DynamicParameterValue[2] = (UpdateFlags & EDPU_UPDATE_2) ? GetParameterValue(DynParam2, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[2]; DynamicPayload.DynamicParameterValue[3] = (UpdateFlags & EDPU_UPDATE_3) ? GetParameterValue(DynParam3, Particle, Owner, NULL) : DynamicPayload.DynamicParameterValue[3]; } END_UPDATE_LOOP; } } break; } }
const char* csTerrainModifiableDataFeederProperties::GetParameterValue (size_t index) { return GetParameterValue (GetParameterName (index)); }