Browse Source

Frame meta data changing

develop v4.2
Arash Aletayeb 2 years ago
parent
commit
6b8f08a6ad
  1. 2
      developHw.pro.user
  2. 2
      include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h
  3. 2
      mainwindow.ui
  4. 29
      src/model/hardware/core/lowLevelApi/TrxBoard.cpp
  5. 11
      src/model/hardware/core/lowLevelApi/register/sram/Sram.cpp

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2022-07-25T17:23:09. -->
<!-- Written by QtCreator 4.10.0, 2022-08-17T15:51:52. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>

2
include/model/hardware/core/lowLevelApi/TrxBoardUtils/PreProcessorDef.h

@ -2,6 +2,6 @@
#define PREPROCESSORDEF_H
#define MPS_BOARD
#define DEVELOP_UI
//#define DEVELOP_UI
#endif //PREPROCESSORDEF_H

2
mainwindow.ui

@ -42,7 +42,7 @@
<string/>
</property>
<property name="currentIndex">
<number>6</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_0">
<attribute name="title">

29
src/model/hardware/core/lowLevelApi/TrxBoard.cpp

@ -978,17 +978,42 @@ void TrxBoard::setDtgcLut(QVector<float>& dtgcLut)
void TrxBoard::setFramesMetaData(const QByteArray& metaData) const
{
qint32 metaLength = metaData.length();
if(!metaLength)
{
throw SonoException("Meta data array is empty.");
}
if(static_cast<quint32>(metaLength) > META_DATA_LENGTH * 8)
{
throw SonoException("Meta data byte array is out of range.");
}
QList<quint64> clear;
for(quint8 i=0; i < META_DATA_LENGTH; i++)
{
clear.append(0);
}
this->_sram->setSramMetaData(clear);
QList<quint64> data;
QByteArray temp;
qint32 num(0);
while(num < metaData.size())
while(metaLength)
{
for(quint8 j = 0; j < sizeof(quint64); j++)
{
if(metaLength)
{
temp.append(metaData[j + num]);
metaLength--;
}
else
{
temp.append(qint8(0));
}
}
data.push_back(byteArray2UintLittleEndian<quint64>(temp));
temp.clear();
num += sizeof(quint64);

11
src/model/hardware/core/lowLevelApi/register/sram/Sram.cpp

@ -78,14 +78,15 @@ void Sram::setSramRx(QVector<quint8> &rxBeamFormerNumber, quint32 &focusTypeNumb
void Sram::setSramMetaData(QList<quint64> &metaData) const
{
this->_metaData->setSoftwareMetaData(metaData);
this->_metaData->updateArrayLong(META_DATA_INTERVAL, META_DATA_LENGTH);
quint32 metaDataBaseOffset = this->_metaData->getCurrentOffset();
this->_metaData->changeOffset(META_DATA_OFFSET+metaDataBaseOffset);
this->_metaData->setSoftwareMetaData(metaData);
this->_metaData->updateArrayLong(META_DATA_INTERVAL, META_DATA_LENGTH);
for(quint8 i=0; i < 3; i++)
{
this->_metaData->changeOffset(i * META_DATA_OFFSET + metaDataBaseOffset);
this->_metaData->updateArrayLong(META_DATA_INTERVAL, static_cast<quint32>(metaData.length()));
}
this->_metaData->changeOffset(metaDataBaseOffset); // return to base offset address
}

Loading…
Cancel
Save