#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", QString("%1").arg(this->channelClockValue)); dataObj.insert("frameId", this->frameId); jsonObj.insert("channelNo", this->channelId); jsonObj.insert("ts", this->milisecond); jsonObj.insert("data", dataObj); return jsonObj; }