18 #include <QJsonDocument> 77 state =
new QString(
"");
96 if(
state !=
nullptr) {
103 QByteArray array (json.toStdString().c_str());
104 QJsonDocument doc = QJsonDocument::fromJson(array);
105 QJsonObject jsonObject = doc.object();
139 QJsonDocument doc(*obj);
140 QByteArray bytes = doc.toJson();
142 return QString(bytes);
147 QJsonObject* obj =
new QJsonObject();
149 obj->insert(
"index", QJsonValue(
index));
155 obj->insert(
"direction", QJsonValue(
direction));
164 obj->insert(
"sequence", QJsonValue(
sequence));
173 obj->insert(
"bandwidth", QJsonValue(
bandwidth));
175 if(
state !=
nullptr && *
state != QString(
"")){
285 bool isObjectUpdated =
false;
288 if(
hw_type !=
nullptr && *
hw_type != QString(
"")){ isObjectUpdated =
true;
break;}
293 if(
serial !=
nullptr && *
serial != QString(
"")){ isObjectUpdated =
true;
break;}
296 if(
state !=
nullptr && *
state != QString(
"")){ isObjectUpdated =
true;
break;}
298 return isObjectUpdated;
void setHwType(QString *hw_type)
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
void setState(QString *state)
virtual bool isSet() override
qint32 getDeviceNbStreams()
void setSerial(QString *serial)
void setSequence(qint32 sequence)
virtual ~SWGSamplingDevice()
void setCenterFrequency(qint64 center_frequency)
bool m_center_frequency_isSet
virtual SWGSamplingDevice * fromJson(QString &jsonString) override
virtual QJsonObject * asJsonObject() override
void setDirection(qint32 direction)
bool m_device_nb_streams_isSet
void setDeviceStreamIndex(qint32 device_stream_index)
bool m_device_stream_index_isSet
void setIndex(qint32 index)
virtual QString asJson() override
qint32 getDeviceStreamIndex()
void setDeviceNbStreams(qint32 device_nb_streams)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
qint64 getCenterFrequency()
virtual void fromJsonObject(QJsonObject &json) override
qint32 device_stream_index
void setBandwidth(qint32 bandwidth)