18 #include <QJsonDocument> 156 QByteArray array (json.toStdString().c_str());
157 QJsonDocument doc = QJsonDocument::fromJson(array);
158 QJsonObject jsonObject = doc.object();
214 QJsonDocument doc(*obj);
215 QByteArray bytes = doc.toJson();
217 return QString(bytes);
222 QJsonObject* obj =
new QJsonObject();
230 obj->insert(
"sampleRate", QJsonValue(
sample_rate));
233 obj->insert(
"log2Decim", QJsonValue(
log2_decim));
236 obj->insert(
"fcPos", QJsonValue(
fc_pos));
248 obj->insert(
"modulation", QJsonValue(
modulation));
260 obj->insert(
"dcFactor", QJsonValue(
dc_factor));
263 obj->insert(
"iFactor", QJsonValue(
i_factor));
266 obj->insert(
"qFactor", QJsonValue(
q_factor));
503 bool isObjectUpdated =
false;
527 return isObjectUpdated;
void setModulation(qint32 modulation)
void setFcPos(qint32 fc_pos)
bool m_phase_imbalance_isSet
void setIFactor(float i_factor)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
bool m_amplitude_bits_isSet
void setFmDeviation(qint32 fm_deviation)
bool m_fm_deviation_isSet
void setFileRecordName(QString *file_record_name)
void setReverseApiPort(qint32 reverse_api_port)
QString * file_record_name
QString * getReverseApiAddress()
void setUseReverseApi(qint32 use_reverse_api)
bool m_auto_corr_options_isSet
qint32 getAutoCorrOptions()
bool m_file_record_name_isSet
void setQFactor(float q_factor)
virtual QJsonObject * asJsonObject() override
void setSampleSizeIndex(qint32 sample_size_index)
QString * getFileRecordName()
qint32 getSampleSizeIndex()
qint32 getFrequencyShift()
virtual ~SWGTestSourceSettings()
qint32 getUseReverseApi()
virtual bool isSet() override
void setReverseApiAddress(QString *reverse_api_address)
qint32 getAmplitudeBits()
void setAutoCorrOptions(qint32 auto_corr_options)
void setLog2Decim(qint32 log2_decim)
virtual SWGTestSourceSettings * fromJson(QString &jsonString) override
void setAmplitudeBits(qint32 amplitude_bits)
void setModulationTone(qint32 modulation_tone)
virtual void fromJsonObject(QJsonObject &json) override
qint32 getReverseApiDeviceIndex()
float getPhaseImbalance()
bool m_center_frequency_isSet
void setPhaseImbalance(float phase_imbalance)
void setCenterFrequency(qint32 center_frequency)
qint32 getModulationTone()
qint32 getReverseApiPort()
void setAmModulation(qint32 am_modulation)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
bool m_use_reverse_api_isSet
void setSampleRate(qint32 sample_rate)
bool m_reverse_api_device_index_isSet
bool m_am_modulation_isSet
bool m_reverse_api_address_isSet
void setReverseApiDeviceIndex(qint32 reverse_api_device_index)
qint32 getCenterFrequency()
void setFrequencyShift(qint32 frequency_shift)
virtual QString asJson() override
bool m_frequency_shift_isSet
qint32 reverse_api_device_index
bool m_sample_size_index_isSet
QString * reverse_api_address
bool m_reverse_api_port_isSet
void setDcFactor(float dc_factor)
bool m_modulation_tone_isSet