Newer
Older
ZXSSCJ / CounterAcq / protocol / dto / CounterDataDto.cpp
tan yue on 18 Oct 2021 540 bytes 20211018 clock-data mock
#include "CounterDataDto.h"
#include "common/utils/SettingConfig.h"

CounterDataDto::CounterDataDto(QObject *parent) : QObject(parent)
{

}

QJsonObject CounterDataDto::toJSON()
{
    QJsonObject jsonObj;

    QJsonObject dataObj;
    dataObj.insert("channelRefNo", this->channelRefId);
    dataObj.insert("dataValue", this->channelData);
    dataObj.insert("frameId", this->frameId);

    jsonObj.insert("channelNo", this->channelId);
    jsonObj.insert("js", this->milisecond);
    jsonObj.insert("data", dataObj);

    return jsonObj;
}