#ifndef BCODETERMINAL_H
#define BCODETERMINAL_H

#include <QObject>

#include "device/DeviceBase.h"
#include "protocol/BCodeTerminalProtocolBM.h"
#include "protocol/dto/BCodeTerminalStatusDto.h"
#include "protocol/dto/CommandReplyDto.h"

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

    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 commandReceivedHandler(QJsonObject command);
};

#endif // BCODETERMINAL_H
