#ifndef SIGNALGENERATOR_H
#define SIGNALGENERATOR_H

#include <QObject>

#include "device/DeviceBase.h"
#include "protocol/dto/SignalGeneratorInterfaceDto.h"
#include "protocol/dto/SignalGeneratorStatusDto.h"
#include "protocol/dto/SignalGeneratorMJDTimeDto.h"
#include "protocol/dto/SignalGeneratorZDATimeDto.h"

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

    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 // SIGNALGENERATOR_H
