#ifndef HARDWAREPACKET_H
#define HARDWAREPACKET_H

#include <QObject>

#include "model/ultrasoundModule/UsPacket.h"
#include "model/hardware/service/PacketFormat.h"

class HardwarePacket
{
protected:
	quint16 batch;
	quint8 subBatch;
	quint8 type;
	quint8 frameCounter;

	quint16 Extract16BitValue(QByteArray buffer, int index);

public:
	HardwarePacket();
	virtual ~HardwarePacket()
	{
	}

	virtual void decode(QByteArray buffer);
	virtual UsPacket getUsPacket(int fps) = 0;
};

#endif //HARDWAREPACKET_H