@ -19,9 +19,9 @@ void Hdf5::hdf5Path(const string &h5Path)
void Hdf5 : : scenarioRead ( ScenGenHardwareOutput_t & scenParams )
{
/****************** /sramParameters/frameType ******************/
datasetBranch < float_t > ( " /sramParameters/frameType " , floatArray ) ;
scenParams . frameType = static_cast < quint8 > ( floatArray [ 0 ] ) ;
// /****************** /sramParameters/frameType ******************/
// datasetBranch <float_t>("/sramParameters/frameType", floatArray);
// scenParams.frameType = static_cast<quint8>(floatArray[0]);
/****************** /sramParameters/totalTxShotNo ******************/
datasetBranch < float_t > ( " /sramParameters/totalTxShotNo " , floatArray ) ;
@ -67,23 +67,35 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
for ( quint32 var = 0 ; var < scenParams . totalTxShotNumber ; var + + )
scenParams . indexParams . firstLineInFrame . push_back ( static_cast < bool > ( floatArray [ var ] ) ) ;
/**************** /sramParameters/indexParameters/lastLineInFrame ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/lastLineInFrame " , floatArray ) ;
scenParams . indexParams . lastLineInFrame . clear ( ) ;
/**************** /sramParameters/indexParameters/startOfSubBatch ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/startOfSubBatch " , floatArray ) ;
scenParams . indexParams . startOfSubBatch . clear ( ) ;
for ( quint32 var = 0 ; var < scenParams . totalTxShotNumber ; var + + )
scenParams . indexParams . lastLineInFrame . push_back ( static_cast < bool > ( floatArray [ var ] ) ) ;
scenParams . indexParams . startOfSubBatch . push_back ( static_cast < bool > ( floatArray [ var ] ) ) ;
/**************** /sramParameters/indexParameters/dLineNum ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/dLineNum " , floatArray ) ;
scenParams . indexParams . dLineNum . clear ( ) ;
/**************** /sramParameters/indexParameters/endOfSubBatch ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/endOfSubBatch " , floatArray ) ;
scenParams . indexParams . endOfSubBatch . clear ( ) ;
for ( quint32 var = 0 ; var < scenParams . totalTxShotNumber ; var + + )
scenParams . indexParams . dLineNum . push_back ( static_cast < quint32 > ( floatArray [ var ] ) ) ;
scenParams . indexParams . endOfSubBatch . push_back ( static_cast < quint32 > ( floatArray [ var ] ) ) ;
/**************** /sramParameters/indexParameters/dEnsembleNum ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/dEnsembleNum " , floatArray ) ;
scenParams . indexParams . dEnsembleNum . clear ( ) ;
/**************** /sramParameters/indexParameters/endOfSubFrame ********************/
datasetBranch < float_t > ( " /sramParameters/indexParameters/endOfSubFrame " , floatArray ) ;
scenParams . indexParams . endOfSubFrame . clear ( ) ;
for ( quint32 var = 0 ; var < scenParams . totalTxShotNumber ; var + + )
scenParams . indexParams . dEnsembleNum . push_back ( static_cast < quint32 > ( floatArray [ 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 ) ;
@ -544,22 +556,31 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
focusNo . push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
}
/**************** /registerParameters/receiverConfigProperties/lineFilter En ********************/
datasetBranch < float_t > ( " /registerParameters/receiverConfigProperties/lineFilter En " , floatArray ) ;
QList < quint32 > lineFilter En;
/**************** /registerParameters/receiverConfigProperties/iqDataCross En ********************/
datasetBranch < float_t > ( " /registerParameters/receiverConfigProperties/iqDataCross En " , floatArray ) ;
QList < quint32 > iqDataCross En;
for ( quint32 j = 0 ; j < scenParams . hwRegister . receiverConfigTypeNumber ; j + + )
{
lineFilter En. push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
iqDataCross En. push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
}
/**************** /registerParameters/receiverConfigProperties/dpeEn ********************/
datasetBranch < float_t > ( " /registerParameters/receiverConfigProperties/dpeEn " , floatArray ) ;
QList < quint32 > dpeEn ;
/**************** /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 + + )
{
dpeEn . push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
dTgc En . push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
}
/**************** /registerParameters/receiverConfigProperties/ddcEn ********************/
@ -571,13 +592,22 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
ddcEn . push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
}
/**************** /registerParameters/receiverConfigProperties/wmfEn ********************/
datasetBranch < float_t > ( " /registerParameters/receiverConfigProperties/wmfEn " , floatArray ) ;
QList < quint32 > wmfEn ;
/**************** /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 + + )
{
wmfEn . push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
noiseReject En. push_back ( static_cast < quint32 > ( floatArray [ j ] ) ) ;
}
/**************** /registerParameters/receiverConfigProperties ********************/
@ -586,24 +616,47 @@ void Hdf5::scenarioRead(ScenGenHardwareOutput_t &scenParams)
for ( qint32 j = 0 ; j < scenParams . hwRegister . receiverConfigTypeNumber ; j + + )
{
receiverCfgObj . mla = receiverCfgMla . at ( j ) ;
receiverCfgObj . stb = stb . at ( j ) ;
receiverCfgObj . ddcEn = ddcEn . at ( j ) ;
receiverCfgObj . absEn = absEn . at ( j ) ;
receiverCfgObj . dpeEn = dpe En. at ( j ) ;
receiverCfgObj . logEn = log En. at ( j ) ;
receiverCfgObj . stbEn = stbEn . at ( j ) ;
receiverCfgObj . wmfEn = wmfEn . at ( j ) ;
receiverCfgObj . lpfSel = lpfSel . at ( j ) ;
receiverCfgObj . dTgcEn = dTgcEn . 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 . lineFilterEn = lineFilterEn . 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 ] ) ;
}
@ -624,19 +677,43 @@ void Hdf5::prbDependParamsRead(ScenPrbDepHardwareParam &prbDepParams)
prbDepParams . prbDepParams . apodizationLut . push_back ( tempApodization ) ;
}
/**************** /registerParameters/aTgcLut ********************/
datasetBranch < float_t > ( " /registerParameters/aTgcLut " , floatArray ) ;
prbDepParams . prbDepParams . atgcLut . clear ( ) ;
QList < quint32 > tempAtgc ;
/************ /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 + + )
{
tempAtgc . clear ( ) ;
for ( quint32 j = 0 ; j < 128 ; j + + )
QVector < float > temp ;
for ( quint32 j = 0 ; j < 256 ; j + + )
{
tempAtgc . push_back ( static_cast < quint32 > ( floatArray [ j + i * 128 ] ) ) ;
temp . push_back ( floatArray [ j + i * 256 ] ) ;
}
prbDepParams . prbDepParams . atgcLut . push_back ( tempAtgc ) ;
atgcCompensationLut . push_back ( temp ) ;
}
/******************* /registerParameters/aTgc **********************/
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/lpfLut ********************/