18 #include <QJsonDocument> 116 QByteArray array (json.toStdString().c_str());
117 QJsonDocument doc = QJsonDocument::fromJson(array);
118 QJsonObject jsonObject = doc.object();
158 QJsonDocument doc(*obj);
159 QByteArray bytes = doc.toJson();
161 return QString(bytes);
166 QJsonObject* obj =
new QJsonObject();
177 obj->insert(
"squelch", QJsonValue(
squelch));
180 obj->insert(
"pllLocked", QJsonValue(
pll_locked));
183 obj->insert(
"slot1On", QJsonValue(
slot1_on));
186 obj->insert(
"slot2On", QJsonValue(
slot2_on));
192 obj->insert(
"inLevel", QJsonValue(
in_level));
201 obj->insert(
"syncRate", QJsonValue(
sync_rate));
343 bool isObjectUpdated =
false;
352 if(
sync_type !=
nullptr && *
sync_type != QString(
"")){ isObjectUpdated =
true;
break;}
359 return isObjectUpdated;
virtual SWGDSDDemodReport * fromJson(QString &jsonString) override
void setPllLocked(qint32 pll_locked)
void setChannelSampleRate(qint32 channel_sample_rate)
float getChannelPowerDb()
void setInLevel(qint32 in_level)
bool m_channel_power_db_isSet
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
qint32 getChannelSampleRate()
bool m_audio_sample_rate_isSet
bool m_carier_position_isSet
qint32 channel_sample_rate
void setStatusText(QString *status_text)
void setChannelPowerDb(float channel_power_db)
QString * getStatusText()
virtual QJsonObject * asJsonObject() override
void setAudioSampleRate(qint32 audio_sample_rate)
void setSquelch(qint32 squelch)
virtual bool isSet() override
bool m_zero_crossing_position_isSet
void setZeroCrossingPosition(qint32 zero_crossing_position)
void setCarierPosition(qint32 carier_position)
virtual QString asJson() override
qint32 getZeroCrossingPosition()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
void setSlot1On(qint32 slot1_on)
void setSlot2On(qint32 slot2_on)
qint32 getAudioSampleRate()
virtual void fromJsonObject(QJsonObject &json) override
void setSyncType(QString *sync_type)
qint32 getCarierPosition()
qint32 zero_crossing_position
virtual ~SWGDSDDemodReport()
void setSyncRate(qint32 sync_rate)
bool m_channel_sample_rate_isSet