#ifndef FREQSWITCHER_H
#define FREQSWITCHER_H

#include <QObject>

#include "device/DeviceBase.h"
#include "protocol/dto/FreqSwitcherInterfaceDto.h"
#include "protocol/dto/FreqSwitcherStatusDto.h"
#include "protocol/dto/CommandReplyDto.h"

class FreqSwitcher : public DeviceBase
{
    Q_OBJECT
public:
    explicit FreqSwitcher(QObject *parent = nullptr);
    ~FreqSwitcher();

    void frameParse(QList<QByteArray> frameList);

    void mockReceivData();
    void mockReceivCmdReply() {}

    void afterFrameParse(DeviceFrameBaseDto * frameDto);
    void afterCommandReply(DeviceFrameBaseDto * frameDto) {}
    void sendDataToSerial(QByteArray data);

signals:
    void sendDataToDraw(DeviceFrameBaseDto * frameData);
    void sendCommandToDisplay(QJsonObject command);

public slots:
    void dataReceivedHandler(QByteArray data);
    void dataBReceivedHandler(QByteArray data);
    void commandReceivedHandler(QJsonObject command);
};

#endif // FREQSWITCHER_H
