18 #include <QJsonDocument> 47 rssi =
new QString(
"");
64 QByteArray array (json.toStdString().c_str());
65 QJsonDocument doc = QJsonDocument::fromJson(array);
66 QJsonObject jsonObject = doc.object();
86 QJsonDocument doc(*obj);
87 QByteArray bytes = doc.toJson();
89 return QString(bytes);
94 QJsonObject* obj =
new QJsonObject();
96 obj->insert(
"dacRate", QJsonValue(
dac_rate));
98 if(
rssi !=
nullptr && *
rssi != QString(
"")){
102 obj->insert(
"temperature", QJsonValue(
temperature));
141 bool isObjectUpdated =
false;
144 if(
rssi !=
nullptr && *
rssi != QString(
"")){ isObjectUpdated =
true;
break;}
147 return isObjectUpdated;
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
virtual QString asJson() override
void setRssi(QString *rssi)
void setDacRate(qint32 dac_rate)
virtual ~SWGPlutoSdrOutputReport()
virtual QJsonObject * asJsonObject() override
void setTemperature(float temperature)
SWGPlutoSdrOutputReport()
virtual bool isSet() override
virtual SWGPlutoSdrOutputReport * fromJson(QString &jsonString) override
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
virtual void fromJsonObject(QJsonObject &json) override