#ifndef CLUSTERSTACK_H #define CLUSTERSTACK_H #include "adc.h" #include "adcchannel.h" #include #define DATA_OFFSET 4 // смещение из-за 4 байт спереди - номер пакета class clusterStack : public QObject { Q_OBJECT public: explicit clusterStack(int firstPacketIndex, ADC_ns::bitDepth bitDepth, QList * channelsConfig, int channelOffset, QList * slaves, QObject *parent = nullptr); void insert(int adcIndex, int packetIndex, QByteArray packet); double getValue(int adcIndex, int packetIndex, uint8_t channel, int sampleNo); bool getTachoValue(int adcIndex, int packet, int point); int getFirstPacketIndex() { return _firstPacketIndex; } private: QByteArray _packets[16][45]; ADC_ns::bitDepth _bitDepth; double _channelFactors[16][4]; int _channelsCount; int _tachoOffset; uint8_t _bytesInSample; uint32_t _firstPacketIndex; }; #endif // CLUSTERSTACK_H