18 #include <QJsonDocument> 114 QByteArray array (json.toStdString().c_str());
115 QJsonDocument doc = QJsonDocument::fromJson(array);
116 QJsonObject jsonObject = doc.object();
156 QJsonDocument doc(*obj);
157 QByteArray bytes = doc.toJson();
159 return QString(bytes);
164 QJsonObject* obj =
new QJsonObject();
172 obj->insert(
"bandwidth", QJsonValue(
bandwidth));
175 obj->insert(
"vgaGain", QJsonValue(
vga_gain));
178 obj->insert(
"log2Interp", QJsonValue(
log2_interp));
181 obj->insert(
"fcPos", QJsonValue(
fc_pos));
187 obj->insert(
"biasT", QJsonValue(
bias_t));
190 obj->insert(
"lnaExt", QJsonValue(
lna_ext));
341 bool isObjectUpdated =
false;
357 return isObjectUpdated;
virtual QJsonObject * asJsonObject() override
bool m_l_oppm_tenths_isSet
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setUseReverseApi(qint32 use_reverse_api)
bool m_center_frequency_isSet
virtual SWGHackRFOutputSettings * fromJson(QString &jsonString) override
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
void setFcPos(qint32 fc_pos)
bool m_reverse_api_port_isSet
bool m_reverse_api_device_index_isSet
void setReverseApiPort(qint32 reverse_api_port)
void setDevSampleRate(qint32 dev_sample_rate)
QString * reverse_api_address
void setLnaExt(qint32 lna_ext)
QString * getReverseApiAddress()
virtual QString asJson() override
qint32 getReverseApiDeviceIndex()
qint32 getUseReverseApi()
bool m_use_reverse_api_isSet
virtual void fromJsonObject(QJsonObject &json) override
qint32 getDevSampleRate()
qint64 getCenterFrequency()
bool m_reverse_api_address_isSet
void setVgaGain(qint32 vga_gain)
void setLOppmTenths(qint32 l_oppm_tenths)
void setCenterFrequency(qint64 center_frequency)
qint32 getReverseApiPort()
virtual ~SWGHackRFOutputSettings()
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
bool m_dev_sample_rate_isSet
SWGHackRFOutputSettings()
void setReverseApiAddress(QString *reverse_api_address)
void setBiasT(qint32 bias_t)
void setBandwidth(qint32 bandwidth)
qint32 reverse_api_device_index
virtual bool isSet() override
void setLog2Interp(qint32 log2_interp)