#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(ScenHardware& 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.ddcParams.startFreqLut.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.startFreqLut.push_back(static_cast(floatArray[var])); } /*********** /registerParameters/ddcParameters/endFreqLut ***************/ datasetBranch("/registerParameters/ddcParameters/endFreqLut", floatArray); scenParams.hwRegister.ddcParams.endFreqLut.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.endFreqLut.push_back(static_cast(floatArray[var])); } /*********** /registerParameters/ddcParameters/startFreqPointLut ***************/ datasetBranch("/registerParameters/ddcParameters/startFreqPointLut", floatArray); scenParams.hwRegister.ddcParams.startFreqPoint.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.startFreqPoint.push_back(static_cast(floatArray[var ])); } /*********** /registerParameters/ddcParameters/endFreqPointLut ***************/ datasetBranch("/registerParameters/ddcParameters/endFreqPointLut", floatArray); scenParams.hwRegister.ddcParams.endFreqPoint.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.endFreqPoint.push_back(static_cast(floatArray[var])); } /*********** /registerParameters/ddcParameters/freqStepLut ***************/ datasetBranch("/registerParameters/ddcParameters/freqStepLut", floatArray); scenParams.hwRegister.ddcParams.freqStepLut.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.freqStepLut.push_back(floatArray[var]); } /*********** /registerParameters/ddcParameters/lpfWeightStepLut ***************/ datasetBranch("/registerParameters/ddcParameters/lpfWeightStepLut", floatArray); scenParams.hwRegister.ddcParams.lpfWeightStepLut.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.lpfWeightStepLut.push_back(floatArray[var]); } /*********** /registerParameters/ddcParameters/startLpfWeightLut ***************/ datasetBranch("/registerParameters/ddcParameters/startLpfWeightLut", floatArray); scenParams.hwRegister.ddcParams.startLpfWeightLut.clear(); for(quint32 var = 0; var < 4; var++) { scenParams.hwRegister.ddcParams.startLpfWeightLut.push_back(floatArray[var]); } /*********** /registerParameters/ddcParameters/startLpfLut ****************/ datasetBranch("/registerParameters/ddcParameters/startLpfLut", floatArray); scenParams.hwRegister.ddcParams.startLpf.clear(); 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])); } scenParams.hwRegister.ddcParams.startLpf.push_back(temp); } /*********** /registerParameters/ddcParameters/endLpfLut ****************/ datasetBranch("/registerParameters/ddcParameters/endLpfLut", floatArray); scenParams.hwRegister.ddcParams.endLpf.clear(); 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])); } scenParams.hwRegister.ddcParams.endLpf.push_back(temp); } /************* /registerParameters/ddcParameters/lpfScale *****************/ datasetBranch("/registerParameters/ddcParameters/lpfScale", floatArray); scenParams.hwRegister.ddcParams.lpfScale.clear(); for(quint8 i = 0; i < 4; i++) { scenParams.hwRegister.ddcParams.lpfScale.push_back(static_cast(floatArray[i])); } /**************** /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/dualPathWeight ********************/ datasetBranch("/registerParameters/dualPathWeightQ", floatArray); scenParams.hwRegister.dualPathWeight.clear(); for(quint32 var = 0; var < 1024; var++) { scenParams.hwRegister.dualPathWeight.push_back(static_cast(floatArray[var])); // scenParams.hwRegister.dualPathWeight.push_back(0); } /**************** /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 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 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); scenParams.hwRegister.apodizationParams.maxApertureSize.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.maxApertureSize.push_back(static_cast( floatArray[var])); } /********* /registerParameters/apodizationParameters/winOpenStartPoint ************/ datasetBranch("/registerParameters/apodizationParameters/winOpenStartPoint", floatArray); scenParams.hwRegister.apodizationParams.winOpenStartPoint.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.winOpenStartPoint.push_back(static_cast( floatArray[var])); } /********* /registerParameters/apodizationParameters/winOpenStopPoint ************/ datasetBranch("/registerParameters/apodizationParameters/winOpenStopPoint", floatArray); scenParams.hwRegister.apodizationParams.winOpenStopPoint.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.winOpenStopPoint.push_back(static_cast( floatArray[var])); } /********* /registerParameters/apodizationParameters/winOpenStartVal ************/ datasetBranch("/registerParameters/apodizationParameters/winOpenStartVal", floatArray); scenParams.hwRegister.apodizationParams.winOpenStartVal.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.winOpenStartVal.push_back(floatArray[var]); } /********* /registerParameters/apodizationParameters/winOpenStopVal ************/ datasetBranch("/registerParameters/apodizationParameters/winOpenStopVal", floatArray); scenParams.hwRegister.apodizationParams.winOpenStopVal.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.winOpenStopVal.push_back(floatArray[var]); } /********* /registerParameters/apodizationParameters/winOpenStepVal ************/ datasetBranch("/registerParameters/apodizationParameters/winOpenStepVal", floatArray); scenParams.hwRegister.apodizationParams.winOpenStepVal.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.winOpenStepVal.push_back(floatArray[var]); } /********* /registerParameters/apodizationParameters/minApertureSize ************/ datasetBranch("/registerParameters/apodizationParameters/minApertureSize", floatArray); scenParams.hwRegister.apodizationParams.minApertureSize.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.minApertureSize.push_back(static_cast( floatArray[var])); } /********* /registerParameters/apodizationParameters/rxActiveElementStep1 ************/ datasetBranch("/registerParameters/apodizationParameters/rxActiveElementStep1", floatArray); scenParams.hwRegister.apodizationParams.rxActiveElementStep1.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.rxActiveElementStep1.push_back(floatArray[var]); } /********* /registerParameters/apodizationParameters/rxActiveElementStep2 ************/ datasetBranch("/registerParameters/apodizationParameters/rxActiveElementStep2", floatArray); scenParams.hwRegister.apodizationParams.rxActiveElementStep2.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.rxActiveElementStep2.push_back(floatArray[var]); } /********* /registerParameters/apodizationParameters/rxActiveElementStepStartPoint ************/ datasetBranch( "/registerParameters/apodizationParameters/rxActiveElementStepStartPoint", floatArray); scenParams.hwRegister.apodizationParams.rxActiveElementStepStartPoint.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.rxActiveElementStepStartPoint.push_back(static_cast< quint32>( floatArray [var])); } /********* /registerParameters/apodizationParameters/rxActiveElementStepStopPoint ************/ datasetBranch("/registerParameters/apodizationParameters/rxActiveElementStepStopPoint", floatArray); scenParams.hwRegister.apodizationParams.rxActiveElementStepStopPoint.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.rxActiveElementStepStopPoint.push_back(static_cast< quint32>( floatArray [var])); } /********* /registerParameters/apodizationParameters/rxActiveElementStepChangePoint ************/ datasetBranch( "/registerParameters/apodizationParameters/rxActiveElementStepChangePoint", floatArray); scenParams.hwRegister.apodizationParams.rxActiveElementStepChangePoint.clear(); for(quint32 var = 0; var < scenParams.hwRegister.rxBeamFormerTypeNumber; var++) { scenParams.hwRegister.apodizationParams.rxActiveElementStepChangePoint.push_back( static_cast(floatArray[var])); } /**************** /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/dualPathEn ********************/ datasetBranch("/registerParameters/receiverConfigProperties/dualPathEn", floatArray); QList dualPathEn; for(quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++) { dualPathEn.push_back(static_cast(floatArray[j])); // dualPathEn.push_back(static_cast(0)); } /**************** /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 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.dualPathEn = dualPathEn.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); } } 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; } void Hdf5::scanConversionParamsRead(scanConversionParameters ¶ms) { /*** /swScenarioParameters/scanConversionParameters/rxLineDAz ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/rxLineDAz", floatArray); params.dx = (floatArray[0]); /*** /frameParameters/rxPointDAx ***/ datasetBranch("/frameParameters/rxPointDAx", floatArray); params.dz = (floatArray[0]); /*** /swScenarioParameters/scanConversionParameters/rxLineNo ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/rxLineNo", floatArray); //input //frame //width params.gridX_size = static_cast(floatArray[0]); /*** /frameParameters/rxFocusPointNo ***/ datasetBranch("/frameParameters/rxFocusPointNo", floatArray); //input //frame //depth params.gridZ_size = static_cast(floatArray[0]); /*** /swScenarioParameters/scanConversionParameters/scanAz ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/scanAz", floatArray); QList gridX; for(quint32 j = 0; j < params.gridX_size; j++) { gridX.push_back(floatArray[j]); } params.gridX = gridX; /*** /swScenarioParameters/scanConversionParameters/scanAx ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/scanAxPreResample", floatArray); QList gridZ; for(quint32 j = 0; j < params.gridZ_size; j++) { gridZ.push_back(floatArray[j]); } params.gridZ = gridZ; /*** /swScenarioParameters/scanConversionParameters/pixelParameters/pixelZNo ***/ datasetBranch( "/swScenarioParameters/scanConversionParameters/pixelParameters/pixelZNo", //output //image //depth floatArray); quint32 queryRow = static_cast(floatArray[0]); params.pixelZNo = queryRow; /*** /swScenarioParameters/scanConversionParameters/pixelParameters/pixelXNo ***/ datasetBranch( "/swScenarioParameters/scanConversionParameters/pixelParameters/pixelXNo", //output //image //width floatArray); quint32 queryColumn = static_cast(floatArray[0]); params.pixelXNo = queryColumn; /*** /swScenarioParameters/scanConversionParameters/gridPixelAz ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/gridPixelAz", floatArray); QList > queryX; for(quint32 i = 0; i < queryColumn; i++) { QList temp; for(quint32 j = 0; j < queryRow; j++) { temp.push_back(floatArray[j + i * queryRow]); } queryX.push_back(temp); } params.queryX = queryX; /*** /swScenarioParameters/scanConversionParameters/gridPixelAx ***/ datasetBranch("/swScenarioParameters/scanConversionParameters/gridPixelAx", floatArray); QList > queryZ; for(quint32 i = 0; i < queryColumn; i++) { QList temp; for(quint32 j = 0; j < queryRow; j++) { temp.push_back(floatArray[j + i * queryRow]); } queryZ.push_back(temp); } params.queryZ = queryZ; }