You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

896 lines
44 KiB

#include "hdf5Scenario.h"
template<class T>
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 <float_t>("/sramParameters/frameType", floatArray);
// scenParams.frameType = static_cast<quint8>(floatArray[0]);
/****************** /sramParameters/totalTxShotNo ******************/
datasetBranch <float_t>("/sramParameters/totalTxShotNo", floatArray);
scenParams.totalTxShotNumber = static_cast<quint32>(floatArray[0]);
/******************* /sramParameters/focusTypeNo *******************/
datasetBranch <float_t>("/sramParameters/focusTypeNo", floatArray);
scenParams.focusTypeNumber = static_cast<quint32>(floatArray[0]);
/******************* /sramParameters/rxBeamformerNo *******************/
datasetBranch <float_t>("/sramParameters/rxBeamformerNo", floatArray);
scenParams.rxBeamFormerNumber.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.rxBeamFormerNumber.push_back(static_cast<quint8>(floatArray[var]));
/**************** /sramParameters/pulseInterval ********************/
datasetBranch <float_t>("/sramParameters/pulseInterval", floatArray);
scenParams.pulseInterval.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.pulseInterval.push_back(floatArray[var]);
/**************** /sramParameters/indexParameters/shotPropertiesIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/shotPropertiesIndex", floatArray);
scenParams.indexParams.shotPropertiesIndex.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.shotPropertiesIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/pulsePropertiesIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/pulsePropertiesIndex", floatArray);
scenParams.indexParams.pulsePropertiesIndex.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.pulsePropertiesIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/receiverConfigurationIndex ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/receiverConfigurationIndex", floatArray);
scenParams.indexParams.receiverConfigurationIndex.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.receiverConfigurationIndex.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/firstLineInFrame ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/firstLineInFrame", floatArray);
scenParams.indexParams.firstLineInFrame.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.firstLineInFrame.push_back(static_cast<bool>(floatArray[var]));
/**************** /sramParameters/indexParameters/startOfSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/startOfSubBatch", floatArray);
scenParams.indexParams.startOfSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.startOfSubBatch.push_back(static_cast<bool>(floatArray[var]));
/**************** /sramParameters/indexParameters/endOfSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfSubBatch", floatArray);
scenParams.indexParams.endOfSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.endOfSubBatch.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/endOfSubFrame ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfSubFrame", floatArray);
scenParams.indexParams.endOfSubFrame.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.endOfSubFrame.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/endOfEnsemble ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/endOfEnsemble", floatArray);
scenParams.indexParams.endOfEnsemble.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.endOfEnsemble.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/indexParameters/isLastSubBatch ********************/
datasetBranch <float_t>("/sramParameters/indexParameters/isLastSubBatch", floatArray);
scenParams.indexParams.isLastSubBatch.clear();
for (quint32 var = 0; var < scenParams.totalTxShotNumber; var++)
scenParams.indexParams.isLastSubBatch.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/txParameters/txFocusXPos ********************/
datasetBranch <float_t>("/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 <float_t>("/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 <float_t>("/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 <float_t>("/sramParameters/txParameters/txStartActiveElementNo", floatArray);
scenParams.txParams.txStartActiveElementNumber.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.txParams.txStartActiveElementNumber.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/txParameters/txActiveElementNo ********************/
datasetBranch <float_t>("/sramParameters/txParameters/txActiveElementNo", floatArray);
scenParams.txParams.txActiveElementNumber.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.txParams.txActiveElementNumber.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/txParameters/maxDelayQ ********************/
datasetBranch <float_t>("/sramParameters/txParameters/maxDelayQ", floatArray);
scenParams.txParams.maxDelayQ.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.txParams.maxDelayQ.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/rxParameters/rxR0CenterActiveElementNo ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.rxR0CenterActiveElementNumber.push_back(static_cast<quint32>(floatArray[accum]));
accum++;
}
/**************** /sramParameters/rxParameters/rxR0ActiveElementNo ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.rxR0ActiveElementNumber.push_back(static_cast<quint32>(floatArray[accum]));
accum++;
}
/**************** /sramParameters/rxParameters/rxActiveElementStep ********************/
datasetBranch <float_t>("/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 <float_t>("/sramParameters/rxParameters/interceptPointFiringTime", floatArray);
scenParams.rxParams.interceptPointFiringTime.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.rxParams.interceptPointFiringTime.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/rxParameters/rxFocusPointNo ********************/
datasetBranch <float_t>("/sramParameters/rxParameters/rxFocusPointNo", floatArray);
scenParams.rxParams.rxFocusPointNumber.clear();
for (quint32 var = 0; var < scenParams.focusTypeNumber; var++)
scenParams.rxParams.rxFocusPointNumber.push_back(static_cast<quint32>(floatArray[var]));
/**************** /sramParameters/rxParameters/r0Position ********************/
datasetBranch <float_t>("/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 <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.thetaCos.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/thetaSin ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.thetaSin.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/phiCos ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.phiCos.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/phiSin ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.phiSin.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/interceptXPos ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.interceptXPos.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/interceptYPos ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.interceptYPos.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/interceptZPos ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.interceptZPos.push_back(floatArray[accum]);
accum++;
}
/**************** /sramParameters/rxParameters/txR0MinDelayQ ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.txR0MinDelayQ.push_back(static_cast<quint32>(floatArray[accum]));
accum++;
}
/**************** /sramParameters/rxParameters/rxR0MinDelayQ ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.rxR0MinDelayQ.push_back(static_cast<quint32>(floatArray[accum]));
accum++;
}
/**************** /sramParameters/rxParameters/rxR0MaxDelayQ ********************/
datasetBranch <float_t>("/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<qint32>(var)]; var1++)
{
scenParams.rxParams.rxR0MaxDelayQ.push_back(static_cast<quint32>(floatArray[accum]));
accum++;
}
/**************** /registerParameters/pulseTypeNo ********************/
datasetBranch <float_t>("/registerParameters/pulseTypeNo", floatArray);
scenParams.hwRegister.pulseTypeNumber = static_cast<quint8>(floatArray[0]);
/**************** /registerParameters/rxBeamformerTypeNo ********************/
datasetBranch <float_t>("/registerParameters/rxBeamformerTypeNo", floatArray);
scenParams.hwRegister.rxBeamFormerTypeNumber = static_cast<quint8>(floatArray[0]);
/**************** /registerParameters/receiverConfigTypeNo ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigTypeNo", floatArray);
scenParams.hwRegister.receiverConfigTypeNumber = static_cast<quint8>(floatArray[0]);
/**************** /registerParameters/blendWeight ********************/
datasetBranch <float_t>("/registerParameters/blendWeight", floatArray);
scenParams.hwRegister.blendWeight.clear();
QVector <float> 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 <float_t>("/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 <float_t>("/registerParameters/ddcParameters/startFreqLut", floatArray);
scenParams.hwRegister.ddcParams.startFreqLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.ddcParams.startFreqLut.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/endFreqLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endFreqLut", floatArray);
scenParams.hwRegister.ddcParams.endFreqLut.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.ddcParams.endFreqLut.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/startFreqPointLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/startFreqPointLut", floatArray);
scenParams.hwRegister.ddcParams.startFreqPoint.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.ddcParams.startFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/endFreqPointLut ***************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endFreqPointLut", floatArray);
scenParams.hwRegister.ddcParams.endFreqPoint.clear();
for (quint32 var = 0; var < 4; var++)
scenParams.hwRegister.ddcParams.endFreqPoint.push_back(static_cast<quint32>(floatArray[var]));
/*********** /registerParameters/ddcParameters/freqStepLut ***************/
datasetBranch <float_t>("/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 <float_t>("/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 <float_t>("/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 <float_t>("/registerParameters/ddcParameters/startLpfLut", floatArray);
scenParams.hwRegister.ddcParams.startLpf.clear();
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
scenParams.hwRegister.ddcParams.startLpf.push_back(temp);
}
/*********** /registerParameters/ddcParameters/endLpfLut ****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/endLpfLut", floatArray);
scenParams.hwRegister.ddcParams.endLpf.clear();
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 64; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 64]));
}
scenParams.hwRegister.ddcParams.endLpf.push_back(temp);
}
/************* /registerParameters/ddcParameters/lpfScale *****************/
datasetBranch <float_t>("/registerParameters/ddcParameters/lpfScale", floatArray);
scenParams.hwRegister.ddcParams.lpfScale.clear();
for (quint8 i = 0; i < 4; i++)
scenParams.hwRegister.ddcParams.lpfScale.push_back(static_cast<quint8>(floatArray[i]));
/**************** /registerParameters/dTgcLut ********************/
datasetBranch <float_t>("/registerParameters/dTgcLut", floatArray);
scenParams.hwRegister.dtgcLut.clear();
for (quint32 var = 0; var < 1024; var++)
scenParams.hwRegister.dtgcLut.push_back(floatArray[var]);
/**************** /registerParameters/elementXPositions ********************/
datasetBranch <float_t>("/registerParameters/elementXPositions", floatArray);
scenParams.hwRegister.elementXPosition.clear();
for (quint32 var = 0; var < 192; var++)
scenParams.hwRegister.elementXPosition.push_back(floatArray[var]);
/**************** /registerParameters/elementYPositions ********************/
datasetBranch <float_t>("/registerParameters/elementYPositions", floatArray);
scenParams.hwRegister.elementYPosition.clear();
for (quint32 var = 0; var < 192; var++)
scenParams.hwRegister.elementYPosition.push_back(floatArray[var]);
/**************** /registerParameters/elementZPositions ********************/
datasetBranch <float_t>("/registerParameters/elementZPositions", floatArray);
scenParams.hwRegister.elementZPosition.clear();
for (quint32 var = 0; var < 192; var++)
scenParams.hwRegister.elementZPosition.push_back(floatArray[var]);
/**************** /registerParameters/scenarioStartIndex ********************/
datasetBranch <float_t>("/registerParameters/scenarioStartIndex", floatArray);
scenParams.hwRegister.scenarioStartIndex = static_cast<quint32>(floatArray[0]);
/**************** /registerParameters/scenarioEndIndex ********************/
datasetBranch <float_t>("/registerParameters/scenarioEndIndex", floatArray);
scenParams.hwRegister.scenarioEndIndex = static_cast<quint32>(floatArray[0]);
/**************** /registerParameters/pulseProperties/halfPeriod ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/halfPeriod", floatArray);
QList<quint32> halfPeriod;
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
{
halfPeriod.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/pulseProperties/halfCycleNo ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/halfCycleNo", floatArray);
QList<quint32> halfCycleNo;
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
{
halfCycleNo.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/pulseProperties/pulseVoltSel ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/pulseVoltSel", floatArray);
QList<bool> pulseVoltSel;
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
{
pulseVoltSel.push_back(static_cast<bool>(floatArray[j]));
}
/**************** /registerParameters/pulseProperties/startPhase ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/startPhase", floatArray);
QList<bool> startPhase;
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
{
startPhase.push_back(static_cast<bool>(floatArray[j]));
}
/**************** /registerParameters/pulseProperties/dampingPulseWidth ********************/
datasetBranch <float_t>("/registerParameters/pulseProperties/dampingPulseWidth", floatArray);
QList<quint32> dampingPulseWidth;
for (quint32 j = 0; j < scenParams.hwRegister.pulseTypeNumber; j++)
{
dampingPulseWidth.push_back(static_cast<quint32>(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 <float_t>("/registerParameters/rxBeamformerProperties/mla", floatArray);
QList<quint32> mla;
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++)
{
mla.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/rxBeamformerProperties/lag ********************/
datasetBranch <float_t>("/registerParameters/rxBeamformerProperties/lag", floatArray);
QList<quint32> lag;
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++)
{
lag.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/rxBeamformerProperties/apodizationSel ********************/
datasetBranch <float_t>("/registerParameters/rxBeamformerProperties/apodizationSel", floatArray);
QList<quint32> apodizationSel;
for (quint32 j = 0; j < scenParams.hwRegister.rxBeamFormerTypeNumber; j++)
{
apodizationSel.push_back(static_cast<quint32>(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 <float_t>("/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<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStartPoint ************/
datasetBranch <float_t>("/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<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStopPoint ************/
datasetBranch <float_t>("/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<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/winOpenStartVal ************/
datasetBranch <float_t>("/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 <float_t>("/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 <float_t>("/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 <float_t>("/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<quint32>(floatArray[var]));
/********* /registerParameters/apodizationParameters/rxActiveElementStep1 ************/
datasetBranch <float_t>("/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 <float_t>("/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 <float_t>("/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 <float_t>("/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 <float_t>("/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<quint32>(floatArray[var]));
/**************** /registerParameters/receiverConfigProperties/mla ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/mla", floatArray);
QList<quint32> receiverCfgMla;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
receiverCfgMla.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/lineMode ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lineMode", floatArray);
QList<quint32> lineMode;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
lineMode.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/aTgcSel ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/aTgcSel", floatArray);
QList<quint32> aTgcSel;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
aTgcSel.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/stbEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/stbEn", floatArray);
QList<quint32> stbEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
stbEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/stb ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/stb", floatArray);
QList<quint32> stb;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
stb.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/subtractFilterEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/subtractFilterEn", floatArray);
QList<quint32> subtractFilterEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
subtractFilterEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/dcCancelEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dcCancelEn", floatArray);
QList<quint32> dcCancelEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
dcCancelEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/ncoFreqSel ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ncoFreqSel", floatArray);
QList<quint32> ncoFreqSel;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
ncoFreqSel.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/lpfSel ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/lpfSel", floatArray);
QList<quint32> lpfSel;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
lpfSel.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/absEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/absEn", floatArray);
QList<quint32> absEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
absEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/focusNo ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/focusNo", floatArray);
QList<quint32> focusNo;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
focusNo.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/iqDataCrossEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/iqDataCrossEn", floatArray);
QList<quint32> iqDataCrossEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
iqDataCrossEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/logEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/logEn", floatArray);
QList<quint32> logEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
logEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/dTgcEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/dTgcEn", floatArray);
QList<quint32> dTgcEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
dTgcEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/ddcEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/ddcEn", floatArray);
QList<quint32> ddcEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
ddcEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/frameType ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/frameType", floatArray);
QList<quint32> frameType;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
frameType.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/noiseRejectEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/noiseRejectEn", floatArray);
QList<quint32> noiseRejectEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
noiseRejectEn.push_back(static_cast<quint32>(floatArray[j]));
}
/**************** /registerParameters/receiverConfigProperties/blendEn ********************/
datasetBranch <float_t>("/registerParameters/receiverConfigProperties/blendEn", floatArray);
QList<quint32> blendEn;
for (quint32 j = 0; j < scenParams.hwRegister.receiverConfigTypeNumber; j++)
{
blendEn.push_back(static_cast<quint32>(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 <float_t>("/registerParameters/sramFrameParameters/bOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/dOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/dOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/bLastOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/bLastOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/sramFrameParameters/dLastOffset *****************/
datasetBranch <float_t>("/registerParameters/sramFrameParameters/dLastOffset", floatArray);
scenParams.hwRegister.mlaOffsetAddr.push_back(static_cast<quint32>(floatArray[0]));
/**************** /registerParameters/noiseRejectValue *****************/
datasetBranch <float_t>("/registerParameters/noiseRejectValue", floatArray);
scenParams.hwRegister.noiseRejectValue = static_cast<quint32>(floatArray[0]);
}
void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
{
/**************** /registerParameters/apodizationLut ********************/
datasetBranch <float_t>("/registerParameters/apodizationLut", floatArray);
prbDepParams.prbDepParams.apodizationLut.clear();
QList <quint32> tempApodization;
for (quint32 i = 0; i < 4; i++)
{
tempApodization.clear();
for (quint32 j = 0; j < 3057; j++)
{
tempApodization.push_back(static_cast<quint32>(floatArray[j + i * 3057]));
}
prbDepParams.prbDepParams.apodizationLut.push_back(tempApodization);
}
/************ /registerParameters/aTgcParameters/aTgcLut ****************/
datasetBranch <float_t>("/registerParameters/aTgcParameters/aTgcLut", floatArray);
QList<QList<quint32>> atgcLut;
for (quint32 i = 0; i < 4; i++)
{
QList<quint32> temp;
for (quint32 j = 0; j < 256; j++)
{
temp.push_back(static_cast<quint32>(floatArray[j + i * 256]));
}
atgcLut.push_back(temp);
}
/******* /registerParameters/aTgcParameters/aTgcCompensationLut *********/
datasetBranch <float_t>("/registerParameters/aTgcParameters/aTgcCompensationLut", floatArray);
QList<QVector<float>> atgcCompensationLut;
for (quint32 i = 0; i < 4; i++)
{
QVector<float> 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<quint32> Hdf5::stbRead()
{
/**************** /registerParameters/stbLutQ ********************/
datasetBranch <float_t>("/registerParameters/stbLutQ", floatArray);
QVector<quint32> stb;
for (quint8 var = 0; var < 8; var++)
stb.push_back(static_cast<quint32>(floatArray[var]));
return stb;
}
QVector<float> Hdf5::lineFilterRead()
{
/**************** /registerParameters/lineFilterLut ********************/
datasetBranch <float_t>("/registerParameters/lineFilterLut", floatArray);
QVector<float> lineFilter;
for (quint8 var = 0; var < 3; var++)
lineFilter.push_back(floatArray[var]);
return lineFilter;
}