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.
59 lines
1.3 KiB
59 lines
1.3 KiB
4 years ago
|
#ifndef USPACKET_H
|
||
|
#define USPACKET_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QDataStream>
|
||
|
|
||
|
#include "model/ultrasoundModule/UsData.h"
|
||
|
|
||
|
/*************************************************************************************************/
|
||
|
/**
|
||
|
* @brief This class is the container for various types of data that may stream throught the system,
|
||
|
* it is a full frame that needs to be processed
|
||
|
* @author Hessamoddin Hediyehloo(H-4nd-H)
|
||
|
* @date 2020/10/04(1399/7/13)
|
||
|
*/
|
||
|
/*************************************************************************************************/
|
||
|
class UsPacket
|
||
|
{
|
||
|
private:
|
||
|
UsData _bData;
|
||
|
UsData _mData;
|
||
|
UsData _cData;
|
||
|
UsData _cmData;
|
||
|
UsMetadataBag _metadata;
|
||
|
|
||
|
public:
|
||
|
UsPacket();
|
||
|
|
||
|
void clear();
|
||
|
|
||
|
bool hasData() const;
|
||
|
|
||
|
UsData getBData() const;
|
||
|
void setBData(const UsData& data);
|
||
|
void setBDataMetadataBag(const UsMetadataBag& metadata);
|
||
|
|
||
|
UsData getMData() const;
|
||
|
void setMData(const UsData& data);
|
||
|
|
||
|
UsData getCData() const;
|
||
|
void setCData(const UsData& data);
|
||
|
|
||
|
UsData getCmData() const;
|
||
|
void setCmData(const UsData& data);
|
||
|
|
||
|
UsMetadataBag getMetadataBag() const;
|
||
|
void setMetadataBag(const UsMetadataBag& metadata);
|
||
|
|
||
|
unsigned long getSize() const;
|
||
|
|
||
|
void compress(int ratio = DEFAULT_COMPRESS_RATIO);
|
||
|
void uncompress();
|
||
|
};
|
||
|
|
||
|
Q_DECLARE_METATYPE(UsPacket)
|
||
|
Q_DECLARE_METATYPE(UsPacket*)
|
||
|
|
||
|
#endif //USPACKET_H
|