#include "TimeReplicatorCmdRepDto.h" TimeReplicatorCmdRepDto::TimeReplicatorCmdRepDto(QObject *parent) : DeviceFrameBaseDto(parent) { } QJsonObject TimeReplicatorCmdRepDto::toJSON() { QJsonObject jsonObj; jsonObj.insert("status", QString::number(this->cmdStatus)); jsonObj.insert("commandId", this->commandId); if (this->cmdStatus != 1) { jsonObj.insert("remarks", remarks); } jsonObj.insert("rawCommand", QString::fromUtf8(rawCommand)); return jsonObj; }