Newer
Older
ZXSSCJ / DeviceHub / protocol / dto / TimeReplicatorCmdRepDto.cpp
tanyue on 24 Dec 2021 501 bytes 20211224 timeSwifter command
#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;
}