#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;
}
