#include "SignalGeneratorStatusDto.h"

SignalGeneratorStatusDto::SignalGeneratorStatusDto(QObject *parent) : DeviceFrameBaseDto(parent)
{

}

QJsonObject SignalGeneratorStatusDto::toJSON()
{
    QJsonObject jsonObj;

    QJsonObject dataObj;
    dataObj.insert("devStatus", devStatus);
    dataObj.insert("leap", leapSec);
    dataObj.insert("leapTm", leapTimestamp);
    dataObj.insert("freqStatus", freqSignalStatus);
    dataObj.insert("freqType", freqSignalType);
    dataObj.insert("oppsStatus", oppsSignalStatus);
    dataObj.insert("phaseDiff", phaseDiff);
    dataObj.insert("pulseWidth", pulseWidth);
    dataObj.insert("phaseAcc", phaseShiftAcc);
    dataObj.insert("bacRatio", bacRatio);
    dataObj.insert("bacRange", bacRange);

    jsonObj.insert("ts", this->milisecond);
    jsonObj.insert("frameType", this->frameType);
    jsonObj.insert("data", dataObj);

    return jsonObj;
}
