Newer
Older
ZXSSCJ / DeviceHub / protocol / dto / CommandReplyDto.cpp
tanyue on 25 Dec 2021 469 bytes 20211225 freq swifter
#include "CommandReplyDto.h"

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

}

QJsonObject CommandReplyDto::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;
}