#ifndef FREQREPLICATORPROTOCOLTX_H
#define FREQREPLICATORPROTOCOLTX_H

#include <QObject>

#include "common/utils/QByteUtil.h"
#include "DeviceProtocolBase.h"
#include "dto/FreqReplicatorStatusDto.h"

class FreqReplicatorProtocolTX : public DeviceProtocolBase
{
    Q_OBJECT
public:
    explicit FreqReplicatorProtocolTX(QObject *parent = nullptr);
    ~FreqReplicatorProtocolTX();

    // 解析数据
    bool parseDeviceFrameData(QByteArray rawData, DeviceFrameBaseDto * frameData, int frameType);
    DeviceFrameBaseDto * frameFactory(int frameType);

    //
    QList<QByteArray> extractFrameList(QByteArray rawData);

    // 检测帧格式，帧头帧尾
    int checkFrame(QByteArray rawData);
};

#endif // FREQREPLICATORPROTOCOLTX_H
