#include "hdf5Scenario.h" template void Hdf5::datasetBranch(const string &branchPath, T datasetValue[MAX_ARRAY_DEPTH]) { const H5std_string datasetPath(branchPath); DataSet datasetType = _file.openDataSet(datasetPath); datasetType.read(datasetValue, PredType::NATIVE_FLOAT, H5S_ALL, H5S_ALL); datasetType.close(); } void Hdf5::hdf5Path(const string &h5Path) { const H5std_string filePath(h5Path); H5File file (filePath, H5F_ACC_RDONLY); _file = file; } void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams) { // /****************** /sramParameters/frameType ******************/ // datasetBranch ("/sramParameters/frameType", floatArray); // scenParams.frameType = static_cast(floatArray[0]); /****************** /sramParameters/totalTxShotNo ******************/ datasetBranch ("/sramParameters/totalTxShotNo", floatArray); scenParams.totalTxShotNumber = static_cast(floatArray[0]); /******************* /sramParameters/focusTypeNo *******************/ datasetBranch ("/sramParameters/focusTypeNo", floatArray); scenParams.focusTypeNumber = static_cast(floatArray[0]); /******************* /sramParameters/rxBeamformerNo *******************/ datasetBranch ("/sramParameters/rxBeamformerNo", floatArray); scenParams.rxBeamFormerNumber.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.rxBeamFormerNumber.push_back(static_cast(floatArray[var])); /**************** /sramParameters/pulseInterval ********************/ datasetBranch ("/sramParameters/pulseInterval", floatArray); scenParams.pulseInterval.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.pulseInterval.push_back(floatArray[var]); /**************** /sramParameters/indexParameters/shotPropertiesIndex ********************/ datasetBranch ("/sramParameters/indexParameters/shotPropertiesIndex", floatArray); scenParams.indexParams.shotPropertiesIndex.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.shotPropertiesIndex.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/pulsePropertiesIndex ********************/ datasetBranch ("/sramParameters/indexParameters/pulsePropertiesIndex", floatArray); scenParams.indexParams.pulsePropertiesIndex.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.pulsePropertiesIndex.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/receiverConfigurationIndex ********************/ datasetBranch ("/sramParameters/indexParameters/receiverConfigurationIndex", floatArray); scenParams.indexParams.receiverConfigurationIndex.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.receiverConfigurationIndex.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/firstLineInFrame ********************/ datasetBranch ("/sramParameters/indexParameters/firstLineInFrame", floatArray); scenParams.indexParams.firstLineInFrame.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.firstLineInFrame.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/startOfSubBatch ********************/ datasetBranch ("/sramParameters/indexParameters/startOfSubBatch", floatArray); scenParams.indexParams.startOfSubBatch.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.startOfSubBatch.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/endOfSubBatch ********************/ datasetBranch ("/sramParameters/indexParameters/endOfSubBatch", floatArray); scenParams.indexParams.endOfSubBatch.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.endOfSubBatch.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/endOfSubFrame ********************/ datasetBranch ("/sramParameters/indexParameters/endOfSubFrame", floatArray); scenParams.indexParams.endOfSubFrame.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.endOfSubFrame.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/endOfEnsemble ********************/ datasetBranch ("/sramParameters/indexParameters/endOfEnsemble", floatArray); scenParams.indexParams.endOfEnsemble.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.endOfEnsemble.push_back(static_cast(floatArray[var])); /**************** /sramParameters/indexParameters/isLastSubBatch ********************/ datasetBranch ("/sramParameters/indexParameters/isLastSubBatch", floatArray); scenParams.indexParams.isLastSubBatch.clear(); for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++) scenParams.indexParams.isLastSubBatch.push_back(static_cast(floatArray[var])); /**************** /sramParameters/txParameters/txFocusXPos ********************/ datasetBranch ("/sramParameters/txParameters/txFocusXPos", floatArray); scenParams.txParams.txFocusXPos.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.txFocusXPos.push_back(floatArray[var]); /**************** /sramParameters/txParameters/txFocusYPos ********************/ datasetBranch ("/sramParameters/txParameters/txFocusYPos", floatArray); scenParams.txParams.txFocusYPos.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.txFocusYPos.push_back(floatArray[var]); /**************** /sramParameters/txParameters/txFocusZPos ********************/ datasetBranch ("/sramParameters/txParameters/txFocusZPos", floatArray); scenParams.txParams.txFocusZPos.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.txFocusZPos.push_back(floatArray[var]); /**************** /sramParameters/txParameters/txStartActiveElementNo ********************/ datasetBranch ("/sramParameters/txParameters/txStartActiveElementNo", floatArray); scenParams.txParams.txStartActiveElementNumber.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.txStartActiveElementNumber.push_back(static_cast(floatArray[var])); /**************** /sramParameters/txParameters/txActiveElementNo ********************/ datasetBranch ("/sramParameters/txParameters/txActiveElementNo", floatArray); scenParams.txParams.txActiveElementNumber.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.txActiveElementNumber.push_back(static_cast(floatArray[var])); /**************** /sramParameters/txParameters/maxDelayQ ********************/ datasetBranch ("/sramParameters/txParameters/maxDelayQ", floatArray); scenParams.txParams.maxDelayQ.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.txParams.maxDelayQ.push_back(static_cast(floatArray[var])); /**************** /sramParameters/rxParameters/rxR0CenterActiveElementNo ********************/ datasetBranch ("/sramParameters/rxParameters/rxR0CenterActiveElementNo", floatArray); scenParams.rxParams.rxR0CenterActiveElementNumber.clear(); quint32 accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.rxR0CenterActiveElementNumber.push_back(static_cast(floatArray[accum])); accum++; } /**************** /sramParameters/rxParameters/rxR0ActiveElementNo ********************/ datasetBranch ("/sramParameters/rxParameters/rxR0ActiveElementNo", floatArray); scenParams.rxParams.rxR0ActiveElementNumber.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.rxR0ActiveElementNumber.push_back(static_cast(floatArray[accum])); accum++; } /**************** /sramParameters/rxParameters/rxActiveElementStep ********************/ datasetBranch ("/sramParameters/rxParameters/rxActiveElementStep", floatArray); scenParams.rxParams.rxActiveElementStep.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.rxParams.rxActiveElementStep.push_back(floatArray[var]); /**************** /sramParameters/rxParameters/interceptPointFiringTime ********************/ datasetBranch ("/sramParameters/rxParameters/interceptPointFiringTime", floatArray); scenParams.rxParams.interceptPointFiringTime.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.rxParams.interceptPointFiringTime.push_back(static_cast(floatArray[var])); /**************** /sramParameters/rxParameters/rxFocusPointNo ********************/ datasetBranch ("/sramParameters/rxParameters/rxFocusPointNo", floatArray); scenParams.rxParams.rxFocusPointNumber.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.rxParams.rxFocusPointNumber.push_back(static_cast(floatArray[var])); /**************** /sramParameters/rxParameters/r0Position ********************/ datasetBranch ("/sramParameters/rxParameters/r0Position", floatArray); scenParams.rxParams.r0Position.clear(); for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) scenParams.rxParams.r0Position.push_back(floatArray[var]); /**************** /sramParameters/rxParameters/thetaCos ********************/ datasetBranch ("/sramParameters/rxParameters/thetaCos", floatArray); scenParams.rxParams.thetaCos.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.thetaCos.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/thetaSin ********************/ datasetBranch ("/sramParameters/rxParameters/thetaSin", floatArray); scenParams.rxParams.thetaSin.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.thetaSin.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/phiCos ********************/ datasetBranch ("/sramParameters/rxParameters/phiCos", floatArray); scenParams.rxParams.phiCos.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.phiCos.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/phiSin ********************/ datasetBranch ("/sramParameters/rxParameters/phiSin", floatArray); scenParams.rxParams.phiSin.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.phiSin.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/interceptXPos ********************/ datasetBranch ("/sramParameters/rxParameters/interceptXPos", floatArray); scenParams.rxParams.interceptXPos.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.interceptXPos.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/interceptYPos ********************/ datasetBranch ("/sramParameters/rxParameters/interceptYPos", floatArray); scenParams.rxParams.interceptYPos.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.interceptYPos.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/interceptZPos ********************/ datasetBranch ("/sramParameters/rxParameters/interceptZPos", floatArray); scenParams.rxParams.interceptZPos.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.interceptZPos.push_back(floatArray[accum]); accum++; } /**************** /sramParameters/rxParameters/txR0MinDelayQ ********************/ datasetBranch ("/sramParameters/rxParameters/txR0MinDelayQ", floatArray); scenParams.rxParams.txR0MinDelayQ.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.txR0MinDelayQ.push_back(static_cast(floatArray[accum])); accum++; } /**************** /sramParameters/rxParameters/rxR0MinDelayQ ********************/ datasetBranch ("/sramParameters/rxParameters/rxR0MinDelayQ", floatArray); scenParams.rxParams.rxR0MinDelayQ.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.rxR0MinDelayQ.push_back(static_cast(floatArray[accum])); accum++; } /**************** /sramParameters/rxParameters/rxR0MaxDelayQ ********************/ datasetBranch ("/sramParameters/rxParameters/rxR0MaxDelayQ", floatArray); scenParams.rxParams.rxR0MaxDelayQ.clear(); accum = 0; for (quint32 var = 0; var < scenParams.focusTypeNumber; var++) for (quint8 var1 = 0; var1 < scenParams.rxBeamFormerNumber[static_cast(var)]; var1++) { scenParams.rxParams.rxR0MaxDelayQ.push_back(static_cast(floatArray[accum])); accum++; } /**************** /registerParameters/pulseTypeNo ********************/ datasetBranch ("/registerParameters/pulseTypeNo", floatArray); scenParams.hwRegister.pulseTypeNumber = static_cast(floatArray[0]); /**************** /registerParameters/rxBeamformerTypeNo ********************/ datasetBranch ("/registerParameters/rxBeamformerTypeNo", floatArray); scenParams.hwRegister.rxBeamFormerTypeNumber = static_cast(floatArray[0]); /**************** /registerParameters/receiverConfigTypeNo ********************/ datasetBranch ("/registerParameters/receiverConfigTypeNo", floatArray); scenParams.hwRegister.receiverConfigTypeNumber = static_cast(floatArray[0]); /**************** /registerParameters/blendWeight ********************/ datasetBranch ("/registerParameters/blendWeight", floatArray); scenParams.hwRegister.blendWeight.clear(); QVector tempBlendWeight; for (quint32 i = 0; i < 4; i++) { tempBlendWeight.clear(); for (quint32 j = 0; j < 512; j++) { tempBlendWeight.push_back(floatArray[j + i * 512]); } scenParams.hwRegister.blendWeight.push_back(tempBlendWeight); } // /**************** /registerParameters/freqLut ********************/ // datasetBranch ("/registerParameters/freqLut", floatArray); // scenParams.hwRegister.freqLut.clear(); // for (quint32 var = 0; var < 8; var++) // scenParams.hwRegister.freqLut.push_back(floatArray[var]); /*********** /registerParameters/ddcParameters/startFreqLut ***************/ datasetBranch ("/registerParameters/ddcParameters/startFreqLut", floatArray); scenParams.hwRegister.startFreqLut.clear(); for (quint32 var = 0; var < 4; var++) scenParams.hwRegister.startFreqLut.push_back(static_cast(floatArray[var])); /*********** /registerParameters/ddcParameters/endFreqLut ***************/ datasetBranch ("/registerParameters/ddcParameters/endFreqLut", floatArray); scenParams.hwRegister.endFreqLut.clear(); for (quint32 var = 0; var < 4; var++) scenParams.hwRegister.endFreqLut.push_back(static_cast(floatArray[var])); /*********** /registerParameters/ddcParameters/startFreqPointLut ***************/ datasetBranch ("/registerParameters/ddcParameters/startFreqPointLut", floatArray); QList startFreqPoint; for (quint32 var = 0; var < 4; var++) startFreqPoint.push_back(static_cast(floatArray[var])); /*********** /registerParameters/ddcParameters/endFreqPointLut ***************/ datasetBranch ("/registerParameters/ddcParameters/endFreqPointLut", floatArray); QList endFreqPoint; for (quint32 var = 0; var < 4; var++) endFreqPoint.push_back(static_cast(floatArray[var])); /*********** /registerParameters/ddcParameters/freqPointLut ***************/ scenParams.hwRegister.freqPointLut.clear(); for (qint32 var = 0; var < 4; var++) { FrequencyPointLut_t frequencyPointLut; frequencyPointLut.startFreqPoint = startFreqPoint.at(var); frequencyPointLut.endFreqPoint = endFreqPoint.at(var); scenParams.hwRegister.freqPointLut.push_back(frequencyPointLut); } /*********** /registerParameters/ddcParameters/freqStepLut ***************/ datasetBranch ("/registerParameters/ddcParameters/freqStepLut", floatArray); scenParams.hwRegister.freqStepLut.clear(); for (quint32 var = 0; var < 4; var++) scenParams.hwRegister.freqStepLut.push_back(floatArray[var]); /*********** /registerParameters/ddcParameters/lpfWeightStepLut ***************/ datasetBranch ("/registerParameters/ddcParameters/lpfWeightStepLut", floatArray); scenParams.hwRegister.lpfWeightStepLut.clear(); for (quint32 var = 0; var < 4; var++) scenParams.hwRegister.lpfWeightStepLut.push_back(floatArray[var]); /*********** /registerParameters/ddcParameters/startLpfWeightLut ***************/ datasetBranch ("/registerParameters/ddcParameters/startLpfWeightLut", floatArray); scenParams.hwRegister.startLpfWeightLut.clear(); for (quint32 var = 0; var < 4; var++) scenParams.hwRegister.startLpfWeightLut.push_back(floatArray[var]); /**************** /registerParameters/dTgcLut ********************/ datasetBranch ("/registerParameters/dTgcLut", floatArray); scenParams.hwRegister.dtgcLut.clear(); for (quint32 var = 0; var < 1024; var++) scenParams.hwRegister.dtgcLut.push_back(floatArray[var]); /**************** /registerParameters/elementXPositions ********************/ datasetBranch ("/registerParameters/elementXPositions", floatArray); scenParams.hwRegister.elementXPosition.clear(); for (quint32 var = 0; var < 192; var++) scenParams.hwRegister.elementXPosition.push_back(floatArray[var]); /**************** /registerParameters/elementYPositions ********************/ datasetBranch ("/registerParameters/elementYPositions", floatArray); scenParams.hwRegister.elementYPosition.clear(); for (quint32 var = 0; var < 192; var++) scenParams.hwRegister.elementYPosition.push_back(floatArray[var]); /**************** /registerParameters/elementZPositions ********************/ datasetBranch ("/registerParameters/elementZPositions", floatArray); scenParams.hwRegister.elementZPosition.clear(); for (quint32 var = 0; var < 192; var++) scenParams.hwRegister.elementZPosition.push_back(floatArray[var]); /**************** /registerParameters/scenarioStartIndex ********************/ datasetBranch ("/registerParameters/scenarioStartIndex", floatArray); scenParams.hwRegister.scenarioStartIndex = static_cast(floatArray[0]); /**************** /registerParameters/scenarioEndIndex ********************/ datasetBranch ("/registerParameters/scenarioEndIndex", floatArray); scenParams.hwRegister.scenarioEndIndex = static_cast(floatArray[0]); /**************** /registerParameters/pulseProperties/halfPeriod ********************/ datasetBranch ("/registerParameters/pulseProperties/halfPeriod", floatArray); QList halfPeriod; for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { halfPeriod.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/pulseProperties/halfCycleNo ********************/ datasetBranch ("/registerParameters/pulseProperties/halfCycleNo", floatArray); QList halfCycleNo; for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { halfCycleNo.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/pulseProperties/pulseVoltSel ********************/ datasetBranch ("/registerParameters/pulseProperties/pulseVoltSel", floatArray); QList pulseVoltSel; for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { pulseVoltSel.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/pulseProperties/startPhase ********************/ datasetBranch ("/registerParameters/pulseProperties/startPhase", floatArray); QList startPhase; for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { startPhase.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/pulseProperties/dampingPulseWidth ********************/ datasetBranch ("/registerParameters/pulseProperties/dampingPulseWidth", floatArray); QList dampingPulseWidth; for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { dampingPulseWidth.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/pulseProperties ********************/ Pulse_t pulseObj; scenParams.hwRegister.pulseProps.clear(); for (qint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++) { pulseObj.halfPeriod = halfPeriod.at(j); pulseObj.startPhase = startPhase.at(j); pulseObj.halfCycleNo = halfCycleNo.at(j); pulseObj.pulseVoltSel = pulseVoltSel.at(j); pulseObj.dampingPulseWidth = dampingPulseWidth.at(j); scenParams.hwRegister.pulseProps.push_back(pulseObj); } /**************** /registerParameters/rxBeamformerProperties/mla ********************/ datasetBranch ("/registerParameters/rxBeamformerProperties/mla", floatArray); QList mla; for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) { mla.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/rxBeamformerProperties/lag ********************/ datasetBranch ("/registerParameters/rxBeamformerProperties/lag", floatArray); QList lag; for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) { lag.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/rxBeamformerProperties/apodizationSel ********************/ datasetBranch ("/registerParameters/rxBeamformerProperties/apodizationSel", floatArray); QList apodizationSel; for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) { apodizationSel.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/rxBeamformerProperties ********************/ RxBeamFormer_t rxBeamformerObj; scenParams.hwRegister.rxBeamFormerProps.clear(); for (qint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++) { rxBeamformerObj.mla = mla.at(j); rxBeamformerObj.lag = lag.at(j); rxBeamformerObj.apodizationSel = apodizationSel.at(j); scenParams.hwRegister.rxBeamFormerProps.push_back(rxBeamformerObj); } /********* /registerParameters/apodizationParameters/maxApertureSize ************/ datasetBranch ("/registerParameters/apodizationParameters/maxApertureSize", floatArray); QList maxApertureSize; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) maxApertureSize.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/winOpenStartPoint ************/ datasetBranch ("/registerParameters/apodizationParameters/winOpenStartPoint", floatArray); QList winOpenStartPoint; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) winOpenStartPoint.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/winOpenStopPoint ************/ datasetBranch ("/registerParameters/apodizationParameters/winOpenStopPoint", floatArray); QList winOpenStopPoint; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) winOpenStopPoint.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/winOpenStartVal ************/ datasetBranch ("/registerParameters/apodizationParameters/winOpenStartVal", floatArray); QList winOpenStartVal; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) winOpenStartVal.push_back(floatArray[var]); /********* /registerParameters/apodizationParameters/winOpenStopVal ************/ datasetBranch ("/registerParameters/apodizationParameters/winOpenStopVal", floatArray); QList winOpenStopVal; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) winOpenStopVal.push_back(floatArray[var]); /********* /registerParameters/apodizationParameters/winOpenStepVal ************/ datasetBranch ("/registerParameters/apodizationParameters/winOpenStepVal", floatArray); QList winOpenStepVal; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) winOpenStepVal.push_back(floatArray[var]); /********* /registerParameters/apodizationParameters/minApertureSize ************/ datasetBranch ("/registerParameters/apodizationParameters/minApertureSize", floatArray); QList minApertureSize; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) minApertureSize.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/rxActiveElementStep1 ************/ datasetBranch ("/registerParameters/apodizationParameters/rxActiveElementStep1", floatArray); QList rxActiveElementStep1; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) rxActiveElementStep1.push_back(floatArray[var]); /********* /registerParameters/apodizationParameters/rxActiveElementStep2 ************/ datasetBranch ("/registerParameters/apodizationParameters/rxActiveElementStep2", floatArray); QList rxActiveElementStep2; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) rxActiveElementStep2.push_back(floatArray[var]); /********* /registerParameters/apodizationParameters/rxActiveElementStepStartPoint ************/ datasetBranch ("/registerParameters/apodizationParameters/rxActiveElementStepStartPoint", floatArray); QList rxActiveElementStepStartPoint; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) rxActiveElementStepStartPoint.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/rxActiveElementStepStopPoint ************/ datasetBranch ("/registerParameters/apodizationParameters/rxActiveElementStepStopPoint", floatArray); QList rxActiveElementStepStopPoint; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) rxActiveElementStepStopPoint.push_back(static_cast(floatArray[var])); /********* /registerParameters/apodizationParameters/rxActiveElementStepChangePoint ************/ datasetBranch ("/registerParameters/apodizationParameters/rxActiveElementStepChangePoint", floatArray); QList rxActiveElementStepChangePoint; for (quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) rxActiveElementStepChangePoint.push_back(static_cast(floatArray[var])); /*********** registerParameters/apodizationParameters ***************/ scenParams.hwRegister.apodizationParams.clear(); for (qint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { ApodizationParams_t apoParams; apoParams.winOpenStepVal = winOpenStepVal.at(var); apoParams.winOpenStopVal = winOpenStopVal.at(var); apoParams.maxApertureSize = maxApertureSize.at(var); apoParams.minApertureSize = minApertureSize.at(var); apoParams.winOpenStartVal = winOpenStartVal.at(var); apoParams.winOpenStopPoint = winOpenStopPoint.at(var); apoParams.winOpenStartPoint = winOpenStartPoint.at(var); apoParams.rxActiveElementStep1 = rxActiveElementStep1.at(var); apoParams.rxActiveElementStep2 = rxActiveElementStep2.at(var); apoParams.rxActiveElementStepStopPoint = rxActiveElementStepStopPoint.at(var); apoParams.rxActiveElementStepStartPoint = rxActiveElementStepStartPoint.at(var); apoParams.rxActiveElementStepChangePoint = rxActiveElementStepChangePoint.at(var); scenParams.hwRegister.apodizationParams.push_back(apoParams); } /**************** /registerParameters/receiverConfigProperties/mla ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/mla", floatArray); QList receiverCfgMla; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { receiverCfgMla.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/lineMode ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/lineMode", floatArray); QList lineMode; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { lineMode.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/aTgcSel ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/aTgcSel", floatArray); QList aTgcSel; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { aTgcSel.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/stbEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/stbEn", floatArray); QList stbEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { stbEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/stb ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/stb", floatArray); QList stb; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { stb.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/subtractFilterEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/subtractFilterEn", floatArray); QList subtractFilterEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { subtractFilterEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/dcCancelEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/dcCancelEn", floatArray); QList dcCancelEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { dcCancelEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/ncoFreqSel ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/ncoFreqSel", floatArray); QList ncoFreqSel; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { ncoFreqSel.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/lpfSel ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/lpfSel", floatArray); QList lpfSel; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { lpfSel.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/absEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/absEn", floatArray); QList absEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { absEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/focusNo ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/focusNo", floatArray); QList focusNo; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { focusNo.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/iqDataCrossEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/iqDataCrossEn", floatArray); QList iqDataCrossEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { iqDataCrossEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/logEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/logEn", floatArray); QList logEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { logEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/dTgcEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/dTgcEn", floatArray); QList dTgcEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { dTgcEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/ddcEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/ddcEn", floatArray); QList ddcEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { ddcEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/frameType ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/frameType", floatArray); QList frameType; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { frameType.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/noiseRejectEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/noiseRejectEn", floatArray); QList noiseRejectEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { noiseRejectEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties/blendEn ********************/ datasetBranch ("/registerParameters/receiverConfigProperties/blendEn", floatArray); QList blendEn; for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { blendEn.push_back(static_cast(floatArray[j])); } /**************** /registerParameters/receiverConfigProperties ********************/ ReceiverConfig_t receiverCfgObj; scenParams.hwRegister.receiverConfigProps.clear(); for (qint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { receiverCfgObj.stb = stb.at(j); receiverCfgObj.ddcEn = ddcEn.at(j); receiverCfgObj.absEn = absEn.at(j); receiverCfgObj.logEn = logEn.at(j); receiverCfgObj.stbEn = stbEn.at(j); receiverCfgObj.lpfSel = lpfSel.at(j); receiverCfgObj.dTgcEn = dTgcEn.at(j); receiverCfgObj.blendEn = blendEn.at(j); receiverCfgObj.aTgcSel = aTgcSel.at(j); receiverCfgObj.focusNo = focusNo.at(j); receiverCfgObj.lineMode = lineMode.at(j); receiverCfgObj.mla = receiverCfgMla.at(j); receiverCfgObj.frameType = frameType.at(j); receiverCfgObj.dcCancelEn = dcCancelEn.at(j); receiverCfgObj.ncoFreqSel = ncoFreqSel.at(j); receiverCfgObj.iqDataCrossEn = iqDataCrossEn.at(j); receiverCfgObj.noiseRejectEn = noiseRejectEn.at(j); receiverCfgObj.subtractFilterEn = subtractFilterEn.at(j); scenParams.hwRegister.receiverConfigProps.push_back(receiverCfgObj); } scenParams.hwRegister.mlaOffsetAddr.clear(); /**************** /registerParameters/sramFrameParameters/bOffset *****************/ datasetBranch ("/registerParameters/sramFrameParameters/bOffset", floatArray); scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast(floatArray[0])); /**************** /registerParameters/sramFrameParameters/dOffset *****************/ datasetBranch ("/registerParameters/sramFrameParameters/dOffset", floatArray); scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast(floatArray[0])); /**************** /registerParameters/sramFrameParameters/bLastOffset *****************/ datasetBranch ("/registerParameters/sramFrameParameters/bLastOffset", floatArray); scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast(floatArray[0])); /**************** /registerParameters/sramFrameParameters/dLastOffset *****************/ datasetBranch ("/registerParameters/sramFrameParameters/dLastOffset", floatArray); scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast(floatArray[0])); /**************** /registerParameters/noiseRejectValue *****************/ datasetBranch ("/registerParameters/noiseRejectValue", floatArray); scenParams.hwRegister.noiseRejectValue = static_cast(floatArray[0]); } void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams) { /**************** /registerParameters/apodizationLut ********************/ datasetBranch ("/registerParameters/apodizationLut", floatArray); prbDepParams.prbDepParams.apodizationLut.clear(); QList tempApodization; for (quint32 i = 0; i < 4; i++) { tempApodization.clear(); for (quint32 j = 0; j < 3057; j++) { tempApodization.push_back(static_cast(floatArray[j + i * 3057])); } prbDepParams.prbDepParams.apodizationLut.push_back(tempApodization); } /************ /registerParameters/aTgcParameters/aTgcLut ****************/ datasetBranch ("/registerParameters/aTgcParameters/aTgcLut", floatArray); QList> atgcLut; for (quint32 i = 0; i < 4; i++) { QList temp; for (quint32 j = 0; j < 256; j++) { temp.push_back(static_cast(floatArray[j + i * 256])); } atgcLut.push_back(temp); } /******* /registerParameters/aTgcParameters/aTgcCompensationLut *********/ datasetBranch ("/registerParameters/aTgcParameters/aTgcCompensationLut", floatArray); QList> atgcCompensationLut; for (quint32 i = 0; i < 4; i++) { QVector temp; for (quint32 j = 0; j < 256; j++) { temp.push_back(floatArray[j + i * 256]); } atgcCompensationLut.push_back(temp); } /************** /registerParameters/aTgcParameters/aTgc ******************/ prbDepParams.prbDepParams.atgcLut.clear(); for (qint8 i = 0; i < 4; i++) { Atgc atgcObj; atgcObj.clear(); atgcObj.atgcLut = atgcLut.at(i); atgcObj.atgcCompensateLut = atgcCompensationLut.at(i); prbDepParams.prbDepParams.atgcLut.push_back(atgcObj); } /*********** /registerParameters/ddcParameters/startLpfLut ****************/ datasetBranch ("/registerParameters/ddcParameters/startLpfLut", floatArray); QList> startLpf; for (quint32 i = 0; i < 4; i++) { QList temp; for (quint32 j = 0; j < 64; j++) { temp.push_back(static_cast(floatArray[j + i * 64])); } startLpf.push_back(temp); } /*********** /registerParameters/ddcParameters/endLpfLut ****************/ datasetBranch ("/registerParameters/ddcParameters/endLpfLut", floatArray); QList> endLpf; for (quint32 i = 0; i < 4; i++) { QList temp; for (quint32 j = 0; j < 64; j++) { temp.push_back(static_cast(floatArray[j + i * 64])); } endLpf.push_back(temp); } /******************* /registerParameters/ddcParameters/lpfLut **********************/ prbDepParams.prbDepParams.lpfLut.clear(); for (qint8 i = 0; i < 4; i++) { Lpf lpfObj; lpfObj.startLpf = startLpf.at(i); lpfObj.endLpf = endLpf.at(i); prbDepParams.prbDepParams.lpfLut.push_back(lpfObj); } /************* /registerParameters/ddcParameters/lpfScale *****************/ datasetBranch ("/registerParameters/ddcParameters/lpfScale", floatArray); prbDepParams.prbDepParams.lpfScaleCoeff.clear(); for (quint8 i = 0; i < 4; i++) prbDepParams.prbDepParams.lpfScaleCoeff.push_back(static_cast(floatArray[i])); } QVector Hdf5::stbRead() { /**************** /registerParameters/stbLutQ ********************/ datasetBranch ("/registerParameters/stbLutQ", floatArray); QVector stb; for (quint8 var = 0; var < 8; var++) stb.push_back(static_cast(floatArray[var])); return stb; } QVector Hdf5::lineFilterRead() { /**************** /registerParameters/lineFilterLut ********************/ datasetBranch ("/registerParameters/lineFilterLut", floatArray); QVector lineFilter; for (quint8 var = 0; var < 3; var++) lineFilter.push_back(floatArray[var]); return lineFilter; }