SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Classes | Enumerations | Functions
SWGSDRangel Namespace Reference

Classes

class  SWGAirspyHFReport
 
class  SWGAirspyHFSettings
 
class  SWGAirspyReport
 
class  SWGAirspySettings
 
class  SWGAMBEDevice
 
class  SWGAMBEDevices
 
class  SWGAMDemodReport
 
class  SWGAMDemodSettings
 
class  SWGAMModReport
 
class  SWGAMModSettings
 
class  SWGArgInfo
 
class  SWGArgValue
 
class  SWGATVModReport
 
class  SWGATVModSettings
 
class  SWGAudioDevices
 
class  SWGAudioInputDevice
 
class  SWGAudioOutputDevice
 
class  SWGBandwidth
 
class  SWGBFMDemodReport
 
class  SWGBFMDemodSettings
 
class  SWGBladeRF1InputSettings
 
class  SWGBladeRF1OutputSettings
 
class  SWGBladeRF2InputReport
 
class  SWGBladeRF2InputSettings
 
class  SWGBladeRF2OutputReport
 
class  SWGBladeRF2OutputSettings
 
class  SWGChannel
 
class  SWGChannelConfig
 
class  SWGChannelListItem
 
class  SWGChannelReport
 
class  SWGChannelsDetail
 
class  SWGChannelSettings
 
class  SWGChannelSettings_2
 
class  SWGCommand
 
class  SWGComplex
 
class  SWGCWKeyerSettings
 
class  SWGDeviceConfig
 
class  SWGDeviceListItem
 
class  SWGDeviceReport
 
class  SWGDeviceSet
 
class  SWGDeviceSetApi
 
class  SWGDeviceSetList
 
class  SWGDeviceSettings
 
class  SWGDeviceSettings_2
 
class  SWGDeviceState
 
class  SWGDSDDemodReport
 
class  SWGDSDDemodSettings
 
class  SWGDVSerialDevice
 
class  SWGDVSerialDevices
 
class  SWGErrorResponse
 
class  SWGFCDProPlusSettings
 
class  SWGFCDProSettings
 
class  SWGFileInputReport
 
class  SWGFileInputSettings
 
class  SWGFileSourceReport
 
class  SWGFileSourceSettings
 
class  SWGFreeDVDemodReport
 
class  SWGFreeDVDemodSettings
 
class  SWGFreeDVModReport
 
class  SWGFreeDVModSettings
 
class  SWGFreqTrackerReport
 
class  SWGFreqTrackerSettings
 
class  SWGFrequency
 
class  SWGFrequencyBand
 
class  SWGFrequencyRange
 
class  SWGGain
 
class  SWGGLSpectrum
 
class  SWGHackRFInputSettings
 
class  SWGHackRFOutputSettings
 
class  SWGHttpRequestInput
 
class  SWGHttpRequestInputFileElement
 
class  SWGHttpRequestWorker
 
class  SWGInstanceApi
 
class  SWGInstanceChannelsResponse
 
class  SWGInstanceConfigResponse
 
class  SWGInstanceDevicesResponse
 
class  SWGInstanceSummaryResponse
 
class  SWGKiwiSDRReport
 
class  SWGKiwiSDRSettings
 
class  SWGLimeSdrInputReport
 
class  SWGLimeSdrInputSettings
 
class  SWGLimeSdrOutputReport
 
class  SWGLimeSdrOutputSettings
 
class  SWGLocalInputReport
 
class  SWGLocalInputSettings
 
class  SWGLocalOutputReport
 
class  SWGLocalOutputSettings
 
class  SWGLocalSinkSettings
 
class  SWGLocalSourceSettings
 
class  SWGLocationInformation
 
class  SWGLoggingInfo
 
class  SWGNamedEnum
 
class  SWGNFMDemodReport
 
class  SWGNFMDemodSettings
 
class  SWGNFMModReport
 
class  SWGNFMModSettings
 
class  SWGObject
 
class  SWGPerseusReport
 
class  SWGPerseusSettings
 
class  SWGPlutoSdrInputReport
 
class  SWGPlutoSdrInputSettings
 
class  SWGPlutoSdrOutputReport
 
class  SWGPlutoSdrOutputSettings
 
class  SWGPreferences
 
class  SWGPreset
 
class  SWGPresetExport
 
class  SWGPresetGroup
 
class  SWGPresetIdentifier
 
class  SWGPresetImport
 
class  SWGPresetItem
 
class  SWGPresets
 
class  SWGPresetTransfer
 
class  SWGRange
 
class  SWGRangeFloat
 
class  SWGRDSReport
 
class  SWGRDSReport_altFrequencies
 
class  SWGRemoteInputReport
 
class  SWGRemoteInputSettings
 
class  SWGRemoteOutputReport
 
class  SWGRemoteOutputSettings
 
class  SWGRemoteSinkSettings
 
class  SWGRemoteSourceReport
 
class  SWGRemoteSourceSettings
 
class  SWGRtlSdrReport
 
class  SWGRtlSdrSettings
 
class  SWGSampleRate
 
class  SWGSamplingDevice
 
class  SWGSDRPlayReport
 
class  SWGSDRPlaySettings
 
class  SWGSoapySDRFrequencySetting
 
class  SWGSoapySDRGainSetting
 
class  SWGSoapySDRInputSettings
 
class  SWGSoapySDROutputSettings
 
class  SWGSoapySDRReport
 
class  SWGSSBDemodReport
 
class  SWGSSBDemodSettings
 
class  SWGSSBModReport
 
class  SWGSSBModSettings
 
class  SWGSuccessResponse
 
class  SWGTestMISettings
 
class  SWGTestMiStreamSettings
 
class  SWGTestSourceSettings
 
class  SWGUDPSinkReport
 
class  SWGUDPSinkSettings
 
class  SWGUDPSourceReport
 
class  SWGUDPSourceSettings
 
class  SWGWFMDemodReport
 
class  SWGWFMDemodSettings
 
class  SWGWFMModReport
 
class  SWGWFMModSettings
 
class  SWGXtrxInputReport
 
class  SWGXtrxInputSettings
 
class  SWGXtrxOutputReport
 
class  SWGXtrxOutputSettings
 

Enumerations

enum  SWGHttpRequestVarLayout { NOT_SET, ADDRESS, URL_ENCODED, MULTIPART }
 

Functions

void setValue (void *value, QJsonValue obj, QString type, QString complexType)
 
void toJsonValue (QString name, void *value, QJsonObject *output, QString type)
 
void toJsonArray (QList< void *> *value, QJsonObject *output, QString innerName, QString innerType)
 
void toJsonMap (QMap< QString, void *> *value, QJsonObject *output, QString innerName, QString innerType)
 
QString stringValue (QString *value)
 
QString stringValue (qint32 value)
 
QString stringValue (qint64 value)
 
QString stringValue (bool value)
 
bool isCompatibleJsonValue (QString type)
 
void * create (QString type)
 
void * create (QString json, QString type)
 

Detailed Description

SDRangel This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube — Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time —

OpenAPI spec version: 4.11.6 Contact: f4exb.nosp@m.06@g.nosp@m.mail..nosp@m.com

NOTE: This class is auto generated by the swagger code generator program. https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.

SDRangel This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube — Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time —

OpenAPI spec version: 4.11.3 Contact: f4exb.nosp@m.06@g.nosp@m.mail..nosp@m.com

NOTE: This class is auto generated by the swagger code generator program. https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually.

SDRangel This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube — Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time —

OpenAPI spec version: 4.11.6 Contact: f4exb.nosp@m.06@g.nosp@m.mail..nosp@m.com

NOTE: This class is auto generated by the swagger code generator program. https://github.com/swagger-api/swagger-codegen.git Do not edit the class manually. Based on http://www.creativepulse.gr/en/blog/2014/restful-api-requests-using-qt-cpp-for-linux-mac-osx-ms-windows By Alex Stylianos

Enumeration Type Documentation

◆ SWGHttpRequestVarLayout

Enumerator
NOT_SET 
ADDRESS 
URL_ENCODED 
MULTIPART 

Definition at line 32 of file SWGHttpRequest.h.

Function Documentation

◆ create() [1/2]

void* SWGSDRangel::create ( QString  type)
inline

Definition at line 166 of file SWGModelFactory.h.

Referenced by create(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelDeleteCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelPostCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelReportGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelSettingsGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelSettingsPatchCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelSettingsPutCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetChannelsReportGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDevicePutCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceReportGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceRunDeleteCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceRunGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceRunPostCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceSettingsGetCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceSettingsPatchCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetDeviceSettingsPutCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetFocusPatchCallback(), SWGSDRangel::SWGDeviceSetApi::devicesetGetCallback(), SWGSDRangel::SWGInstanceApi::instanceAMBEDevicesDeleteCallback(), SWGSDRangel::SWGInstanceApi::instanceAMBEDevicesGetCallback(), SWGSDRangel::SWGInstanceApi::instanceAMBEDevicesPatchCallback(), SWGSDRangel::SWGInstanceApi::instanceAMBEDevicesPutCallback(), SWGSDRangel::SWGInstanceApi::instanceAMBESerialGetCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioGetCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioInputCleanupPatchCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioInputDeleteCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioInputPatchCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioOutputCleanupPatchCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioOutputDeleteCallback(), SWGSDRangel::SWGInstanceApi::instanceAudioOutputPatchCallback(), SWGSDRangel::SWGInstanceApi::instanceChannelsCallback(), SWGSDRangel::SWGInstanceApi::instanceConfigCallback(), SWGSDRangel::SWGInstanceApi::instanceDeleteCallback(), SWGSDRangel::SWGInstanceApi::instanceDevicesCallback(), SWGSDRangel::SWGDeviceSetApi::instanceDeviceSetDeleteCallback(), SWGSDRangel::SWGDeviceSetApi::instanceDeviceSetPostCallback(), SWGSDRangel::SWGInstanceApi::instanceDeviceSetsGetCallback(), SWGSDRangel::SWGInstanceApi::instanceLocationGetCallback(), SWGSDRangel::SWGInstanceApi::instanceLocationPutCallback(), SWGSDRangel::SWGInstanceApi::instanceLoggingGetCallback(), SWGSDRangel::SWGInstanceApi::instanceLoggingPutCallback(), SWGSDRangel::SWGInstanceApi::instancePresetDeleteCallback(), SWGSDRangel::SWGInstanceApi::instancePresetFilePostCallback(), SWGSDRangel::SWGInstanceApi::instancePresetFilePutCallback(), SWGSDRangel::SWGInstanceApi::instancePresetGetCallback(), SWGSDRangel::SWGInstanceApi::instancePresetPatchCallback(), SWGSDRangel::SWGInstanceApi::instancePresetPostCallback(), SWGSDRangel::SWGInstanceApi::instancePresetPutCallback(), SWGSDRangel::SWGInstanceApi::instanceSummaryCallback(), AMBEWorker::postTest(), and setValue().

166  {
167  if(QString("SWGAMBEDevice").compare(type) == 0) {
168  return new SWGAMBEDevice();
169  }
170  if(QString("SWGAMBEDevices").compare(type) == 0) {
171  return new SWGAMBEDevices();
172  }
173  if(QString("SWGAMDemodReport").compare(type) == 0) {
174  return new SWGAMDemodReport();
175  }
176  if(QString("SWGAMDemodSettings").compare(type) == 0) {
177  return new SWGAMDemodSettings();
178  }
179  if(QString("SWGAMModReport").compare(type) == 0) {
180  return new SWGAMModReport();
181  }
182  if(QString("SWGAMModSettings").compare(type) == 0) {
183  return new SWGAMModSettings();
184  }
185  if(QString("SWGATVModReport").compare(type) == 0) {
186  return new SWGATVModReport();
187  }
188  if(QString("SWGATVModSettings").compare(type) == 0) {
189  return new SWGATVModSettings();
190  }
191  if(QString("SWGAirspyHFReport").compare(type) == 0) {
192  return new SWGAirspyHFReport();
193  }
194  if(QString("SWGAirspyHFSettings").compare(type) == 0) {
195  return new SWGAirspyHFSettings();
196  }
197  if(QString("SWGAirspyReport").compare(type) == 0) {
198  return new SWGAirspyReport();
199  }
200  if(QString("SWGAirspySettings").compare(type) == 0) {
201  return new SWGAirspySettings();
202  }
203  if(QString("SWGArgInfo").compare(type) == 0) {
204  return new SWGArgInfo();
205  }
206  if(QString("SWGArgValue").compare(type) == 0) {
207  return new SWGArgValue();
208  }
209  if(QString("SWGAudioDevices").compare(type) == 0) {
210  return new SWGAudioDevices();
211  }
212  if(QString("SWGAudioInputDevice").compare(type) == 0) {
213  return new SWGAudioInputDevice();
214  }
215  if(QString("SWGAudioOutputDevice").compare(type) == 0) {
216  return new SWGAudioOutputDevice();
217  }
218  if(QString("SWGBFMDemodReport").compare(type) == 0) {
219  return new SWGBFMDemodReport();
220  }
221  if(QString("SWGBFMDemodSettings").compare(type) == 0) {
222  return new SWGBFMDemodSettings();
223  }
224  if(QString("SWGBandwidth").compare(type) == 0) {
225  return new SWGBandwidth();
226  }
227  if(QString("SWGBladeRF1InputSettings").compare(type) == 0) {
228  return new SWGBladeRF1InputSettings();
229  }
230  if(QString("SWGBladeRF1OutputSettings").compare(type) == 0) {
231  return new SWGBladeRF1OutputSettings();
232  }
233  if(QString("SWGBladeRF2InputReport").compare(type) == 0) {
234  return new SWGBladeRF2InputReport();
235  }
236  if(QString("SWGBladeRF2InputSettings").compare(type) == 0) {
237  return new SWGBladeRF2InputSettings();
238  }
239  if(QString("SWGBladeRF2OutputReport").compare(type) == 0) {
240  return new SWGBladeRF2OutputReport();
241  }
242  if(QString("SWGBladeRF2OutputSettings").compare(type) == 0) {
243  return new SWGBladeRF2OutputSettings();
244  }
245  if(QString("SWGCWKeyerSettings").compare(type) == 0) {
246  return new SWGCWKeyerSettings();
247  }
248  if(QString("SWGChannel").compare(type) == 0) {
249  return new SWGChannel();
250  }
251  if(QString("SWGChannelConfig").compare(type) == 0) {
252  return new SWGChannelConfig();
253  }
254  if(QString("SWGChannelListItem").compare(type) == 0) {
255  return new SWGChannelListItem();
256  }
257  if(QString("SWGChannelReport").compare(type) == 0) {
258  return new SWGChannelReport();
259  }
260  if(QString("SWGChannelSettings").compare(type) == 0) {
261  return new SWGChannelSettings();
262  }
263  if(QString("SWGChannelsDetail").compare(type) == 0) {
264  return new SWGChannelsDetail();
265  }
266  if(QString("SWGCommand").compare(type) == 0) {
267  return new SWGCommand();
268  }
269  if(QString("SWGComplex").compare(type) == 0) {
270  return new SWGComplex();
271  }
272  if(QString("SWGDSDDemodReport").compare(type) == 0) {
273  return new SWGDSDDemodReport();
274  }
275  if(QString("SWGDSDDemodSettings").compare(type) == 0) {
276  return new SWGDSDDemodSettings();
277  }
278  if(QString("SWGDVSerialDevice").compare(type) == 0) {
279  return new SWGDVSerialDevice();
280  }
281  if(QString("SWGDVSerialDevices").compare(type) == 0) {
282  return new SWGDVSerialDevices();
283  }
284  if(QString("SWGDeviceConfig").compare(type) == 0) {
285  return new SWGDeviceConfig();
286  }
287  if(QString("SWGDeviceListItem").compare(type) == 0) {
288  return new SWGDeviceListItem();
289  }
290  if(QString("SWGDeviceReport").compare(type) == 0) {
291  return new SWGDeviceReport();
292  }
293  if(QString("SWGDeviceSet").compare(type) == 0) {
294  return new SWGDeviceSet();
295  }
296  if(QString("SWGDeviceSetList").compare(type) == 0) {
297  return new SWGDeviceSetList();
298  }
299  if(QString("SWGDeviceSettings").compare(type) == 0) {
300  return new SWGDeviceSettings();
301  }
302  if(QString("SWGDeviceState").compare(type) == 0) {
303  return new SWGDeviceState();
304  }
305  if(QString("SWGErrorResponse").compare(type) == 0) {
306  return new SWGErrorResponse();
307  }
308  if(QString("SWGFCDProPlusSettings").compare(type) == 0) {
309  return new SWGFCDProPlusSettings();
310  }
311  if(QString("SWGFCDProSettings").compare(type) == 0) {
312  return new SWGFCDProSettings();
313  }
314  if(QString("SWGFileInputReport").compare(type) == 0) {
315  return new SWGFileInputReport();
316  }
317  if(QString("SWGFileInputSettings").compare(type) == 0) {
318  return new SWGFileInputSettings();
319  }
320  if(QString("SWGFileSourceReport").compare(type) == 0) {
321  return new SWGFileSourceReport();
322  }
323  if(QString("SWGFileSourceSettings").compare(type) == 0) {
324  return new SWGFileSourceSettings();
325  }
326  if(QString("SWGFreeDVDemodReport").compare(type) == 0) {
327  return new SWGFreeDVDemodReport();
328  }
329  if(QString("SWGFreeDVDemodSettings").compare(type) == 0) {
330  return new SWGFreeDVDemodSettings();
331  }
332  if(QString("SWGFreeDVModReport").compare(type) == 0) {
333  return new SWGFreeDVModReport();
334  }
335  if(QString("SWGFreeDVModSettings").compare(type) == 0) {
336  return new SWGFreeDVModSettings();
337  }
338  if(QString("SWGFreqTrackerReport").compare(type) == 0) {
339  return new SWGFreqTrackerReport();
340  }
341  if(QString("SWGFreqTrackerSettings").compare(type) == 0) {
342  return new SWGFreqTrackerSettings();
343  }
344  if(QString("SWGFrequency").compare(type) == 0) {
345  return new SWGFrequency();
346  }
347  if(QString("SWGFrequencyBand").compare(type) == 0) {
348  return new SWGFrequencyBand();
349  }
350  if(QString("SWGFrequencyRange").compare(type) == 0) {
351  return new SWGFrequencyRange();
352  }
353  if(QString("SWGGLSpectrum").compare(type) == 0) {
354  return new SWGGLSpectrum();
355  }
356  if(QString("SWGGain").compare(type) == 0) {
357  return new SWGGain();
358  }
359  if(QString("SWGHackRFInputSettings").compare(type) == 0) {
360  return new SWGHackRFInputSettings();
361  }
362  if(QString("SWGHackRFOutputSettings").compare(type) == 0) {
363  return new SWGHackRFOutputSettings();
364  }
365  if(QString("SWGInstanceChannelsResponse").compare(type) == 0) {
366  return new SWGInstanceChannelsResponse();
367  }
368  if(QString("SWGInstanceConfigResponse").compare(type) == 0) {
369  return new SWGInstanceConfigResponse();
370  }
371  if(QString("SWGInstanceDevicesResponse").compare(type) == 0) {
372  return new SWGInstanceDevicesResponse();
373  }
374  if(QString("SWGInstanceSummaryResponse").compare(type) == 0) {
375  return new SWGInstanceSummaryResponse();
376  }
377  if(QString("SWGKiwiSDRReport").compare(type) == 0) {
378  return new SWGKiwiSDRReport();
379  }
380  if(QString("SWGKiwiSDRSettings").compare(type) == 0) {
381  return new SWGKiwiSDRSettings();
382  }
383  if(QString("SWGLimeSdrInputReport").compare(type) == 0) {
384  return new SWGLimeSdrInputReport();
385  }
386  if(QString("SWGLimeSdrInputSettings").compare(type) == 0) {
387  return new SWGLimeSdrInputSettings();
388  }
389  if(QString("SWGLimeSdrOutputReport").compare(type) == 0) {
390  return new SWGLimeSdrOutputReport();
391  }
392  if(QString("SWGLimeSdrOutputSettings").compare(type) == 0) {
393  return new SWGLimeSdrOutputSettings();
394  }
395  if(QString("SWGLocalInputReport").compare(type) == 0) {
396  return new SWGLocalInputReport();
397  }
398  if(QString("SWGLocalInputSettings").compare(type) == 0) {
399  return new SWGLocalInputSettings();
400  }
401  if(QString("SWGLocalOutputReport").compare(type) == 0) {
402  return new SWGLocalOutputReport();
403  }
404  if(QString("SWGLocalOutputSettings").compare(type) == 0) {
405  return new SWGLocalOutputSettings();
406  }
407  if(QString("SWGLocalSinkSettings").compare(type) == 0) {
408  return new SWGLocalSinkSettings();
409  }
410  if(QString("SWGLocalSourceSettings").compare(type) == 0) {
411  return new SWGLocalSourceSettings();
412  }
413  if(QString("SWGLocationInformation").compare(type) == 0) {
414  return new SWGLocationInformation();
415  }
416  if(QString("SWGLoggingInfo").compare(type) == 0) {
417  return new SWGLoggingInfo();
418  }
419  if(QString("SWGNFMDemodReport").compare(type) == 0) {
420  return new SWGNFMDemodReport();
421  }
422  if(QString("SWGNFMDemodSettings").compare(type) == 0) {
423  return new SWGNFMDemodSettings();
424  }
425  if(QString("SWGNFMModReport").compare(type) == 0) {
426  return new SWGNFMModReport();
427  }
428  if(QString("SWGNFMModSettings").compare(type) == 0) {
429  return new SWGNFMModSettings();
430  }
431  if(QString("SWGNamedEnum").compare(type) == 0) {
432  return new SWGNamedEnum();
433  }
434  if(QString("SWGPerseusReport").compare(type) == 0) {
435  return new SWGPerseusReport();
436  }
437  if(QString("SWGPerseusSettings").compare(type) == 0) {
438  return new SWGPerseusSettings();
439  }
440  if(QString("SWGPlutoSdrInputReport").compare(type) == 0) {
441  return new SWGPlutoSdrInputReport();
442  }
443  if(QString("SWGPlutoSdrInputSettings").compare(type) == 0) {
444  return new SWGPlutoSdrInputSettings();
445  }
446  if(QString("SWGPlutoSdrOutputReport").compare(type) == 0) {
447  return new SWGPlutoSdrOutputReport();
448  }
449  if(QString("SWGPlutoSdrOutputSettings").compare(type) == 0) {
450  return new SWGPlutoSdrOutputSettings();
451  }
452  if(QString("SWGPreferences").compare(type) == 0) {
453  return new SWGPreferences();
454  }
455  if(QString("SWGPreset").compare(type) == 0) {
456  return new SWGPreset();
457  }
458  if(QString("SWGPresetExport").compare(type) == 0) {
459  return new SWGPresetExport();
460  }
461  if(QString("SWGPresetGroup").compare(type) == 0) {
462  return new SWGPresetGroup();
463  }
464  if(QString("SWGPresetIdentifier").compare(type) == 0) {
465  return new SWGPresetIdentifier();
466  }
467  if(QString("SWGPresetImport").compare(type) == 0) {
468  return new SWGPresetImport();
469  }
470  if(QString("SWGPresetItem").compare(type) == 0) {
471  return new SWGPresetItem();
472  }
473  if(QString("SWGPresetTransfer").compare(type) == 0) {
474  return new SWGPresetTransfer();
475  }
476  if(QString("SWGPresets").compare(type) == 0) {
477  return new SWGPresets();
478  }
479  if(QString("SWGRDSReport").compare(type) == 0) {
480  return new SWGRDSReport();
481  }
482  if(QString("SWGRDSReport_altFrequencies").compare(type) == 0) {
483  return new SWGRDSReport_altFrequencies();
484  }
485  if(QString("SWGRange").compare(type) == 0) {
486  return new SWGRange();
487  }
488  if(QString("SWGRangeFloat").compare(type) == 0) {
489  return new SWGRangeFloat();
490  }
491  if(QString("SWGRemoteInputReport").compare(type) == 0) {
492  return new SWGRemoteInputReport();
493  }
494  if(QString("SWGRemoteInputSettings").compare(type) == 0) {
495  return new SWGRemoteInputSettings();
496  }
497  if(QString("SWGRemoteOutputReport").compare(type) == 0) {
498  return new SWGRemoteOutputReport();
499  }
500  if(QString("SWGRemoteOutputSettings").compare(type) == 0) {
501  return new SWGRemoteOutputSettings();
502  }
503  if(QString("SWGRemoteSinkSettings").compare(type) == 0) {
504  return new SWGRemoteSinkSettings();
505  }
506  if(QString("SWGRemoteSourceReport").compare(type) == 0) {
507  return new SWGRemoteSourceReport();
508  }
509  if(QString("SWGRemoteSourceSettings").compare(type) == 0) {
510  return new SWGRemoteSourceSettings();
511  }
512  if(QString("SWGRtlSdrReport").compare(type) == 0) {
513  return new SWGRtlSdrReport();
514  }
515  if(QString("SWGRtlSdrSettings").compare(type) == 0) {
516  return new SWGRtlSdrSettings();
517  }
518  if(QString("SWGSDRPlayReport").compare(type) == 0) {
519  return new SWGSDRPlayReport();
520  }
521  if(QString("SWGSDRPlaySettings").compare(type) == 0) {
522  return new SWGSDRPlaySettings();
523  }
524  if(QString("SWGSSBDemodReport").compare(type) == 0) {
525  return new SWGSSBDemodReport();
526  }
527  if(QString("SWGSSBDemodSettings").compare(type) == 0) {
528  return new SWGSSBDemodSettings();
529  }
530  if(QString("SWGSSBModReport").compare(type) == 0) {
531  return new SWGSSBModReport();
532  }
533  if(QString("SWGSSBModSettings").compare(type) == 0) {
534  return new SWGSSBModSettings();
535  }
536  if(QString("SWGSampleRate").compare(type) == 0) {
537  return new SWGSampleRate();
538  }
539  if(QString("SWGSamplingDevice").compare(type) == 0) {
540  return new SWGSamplingDevice();
541  }
542  if(QString("SWGSoapySDRFrequencySetting").compare(type) == 0) {
543  return new SWGSoapySDRFrequencySetting();
544  }
545  if(QString("SWGSoapySDRGainSetting").compare(type) == 0) {
546  return new SWGSoapySDRGainSetting();
547  }
548  if(QString("SWGSoapySDRInputSettings").compare(type) == 0) {
549  return new SWGSoapySDRInputSettings();
550  }
551  if(QString("SWGSoapySDROutputSettings").compare(type) == 0) {
552  return new SWGSoapySDROutputSettings();
553  }
554  if(QString("SWGSoapySDRReport").compare(type) == 0) {
555  return new SWGSoapySDRReport();
556  }
557  if(QString("SWGSuccessResponse").compare(type) == 0) {
558  return new SWGSuccessResponse();
559  }
560  if(QString("SWGTestMISettings").compare(type) == 0) {
561  return new SWGTestMISettings();
562  }
563  if(QString("SWGTestMiStreamSettings").compare(type) == 0) {
564  return new SWGTestMiStreamSettings();
565  }
566  if(QString("SWGTestSourceSettings").compare(type) == 0) {
567  return new SWGTestSourceSettings();
568  }
569  if(QString("SWGUDPSinkReport").compare(type) == 0) {
570  return new SWGUDPSinkReport();
571  }
572  if(QString("SWGUDPSinkSettings").compare(type) == 0) {
573  return new SWGUDPSinkSettings();
574  }
575  if(QString("SWGUDPSourceReport").compare(type) == 0) {
576  return new SWGUDPSourceReport();
577  }
578  if(QString("SWGUDPSourceSettings").compare(type) == 0) {
579  return new SWGUDPSourceSettings();
580  }
581  if(QString("SWGWFMDemodReport").compare(type) == 0) {
582  return new SWGWFMDemodReport();
583  }
584  if(QString("SWGWFMDemodSettings").compare(type) == 0) {
585  return new SWGWFMDemodSettings();
586  }
587  if(QString("SWGWFMModReport").compare(type) == 0) {
588  return new SWGWFMModReport();
589  }
590  if(QString("SWGWFMModSettings").compare(type) == 0) {
591  return new SWGWFMModSettings();
592  }
593  if(QString("SWGXtrxInputReport").compare(type) == 0) {
594  return new SWGXtrxInputReport();
595  }
596  if(QString("SWGXtrxInputSettings").compare(type) == 0) {
597  return new SWGXtrxInputSettings();
598  }
599  if(QString("SWGXtrxOutputReport").compare(type) == 0) {
600  return new SWGXtrxOutputReport();
601  }
602  if(QString("SWGXtrxOutputSettings").compare(type) == 0) {
603  return new SWGXtrxOutputSettings();
604  }
605 
606  return nullptr;
607  }
+ Here is the caller graph for this function:

◆ create() [2/2]

void* SWGSDRangel::create ( QString  json,
QString  type 
)
inline

Definition at line 609 of file SWGModelFactory.h.

References create(), and SWGSDRangel::SWGObject::fromJson().

609  {
610  void* val = create(type);
611  if(val != nullptr) {
612  SWGObject* obj = static_cast<SWGObject*>(val);
613  return obj->fromJson(json);
614  }
615  if(type.startsWith("QString")) {
616  return new QString();
617  }
618  return nullptr;
619  }
void * create(QString json, QString type)
+ Here is the call graph for this function:

◆ isCompatibleJsonValue()

bool SWGSDRangel::isCompatibleJsonValue ( QString  type)

◆ setValue()

void SWGSDRangel::setValue ( void *  value,
QJsonValue  obj,
QString  type,
QString  complexType 
)

Definition at line 25 of file SWGHelpers.cpp.

References create(), and SWGSDRangel::SWGObject::fromJsonObject().

Referenced by SWGSDRangel::SWGAMDemodReport::fromJsonObject(), SWGSDRangel::SWGAMModReport::fromJsonObject(), SWGSDRangel::SWGComplex::fromJsonObject(), SWGSDRangel::SWGFrequency::fromJsonObject(), SWGSDRangel::SWGFrequencyRange::fromJsonObject(), SWGSDRangel::SWGSSBDemodReport::fromJsonObject(), SWGSDRangel::SWGGain::fromJsonObject(), SWGSDRangel::SWGSSBModReport::fromJsonObject(), SWGSDRangel::SWGGLSpectrum::fromJsonObject(), SWGSDRangel::SWGTestMiStreamSettings::fromJsonObject(), SWGSDRangel::SWGUDPSinkReport::fromJsonObject(), SWGSDRangel::SWGUDPSourceReport::fromJsonObject(), SWGSDRangel::SWGWFMDemodReport::fromJsonObject(), SWGSDRangel::SWGKiwiSDRReport::fromJsonObject(), SWGSDRangel::SWGWFMModReport::fromJsonObject(), SWGSDRangel::SWGXtrxInputReport::fromJsonObject(), SWGSDRangel::SWGXtrxOutputReport::fromJsonObject(), SWGSDRangel::SWGLimeSdrInputReport::fromJsonObject(), SWGSDRangel::SWGLimeSdrOutputReport::fromJsonObject(), SWGSDRangel::SWGBandwidth::fromJsonObject(), SWGSDRangel::SWGLocalInputReport::fromJsonObject(), SWGSDRangel::SWGLocalOutputReport::fromJsonObject(), SWGSDRangel::SWGLocationInformation::fromJsonObject(), SWGSDRangel::SWGNFMDemodReport::fromJsonObject(), SWGSDRangel::SWGNFMModReport::fromJsonObject(), SWGSDRangel::SWGATVModReport::fromJsonObject(), SWGSDRangel::SWGRange::fromJsonObject(), SWGSDRangel::SWGRangeFloat::fromJsonObject(), SWGSDRangel::SWGFreeDVDemodReport::fromJsonObject(), SWGSDRangel::SWGRDSReport_altFrequencies::fromJsonObject(), SWGSDRangel::SWGRemoteOutputReport::fromJsonObject(), SWGSDRangel::SWGRemoteSourceReport::fromJsonObject(), SWGSDRangel::SWGFreeDVModReport::fromJsonObject(), SWGSDRangel::SWGSampleRate::fromJsonObject(), SWGSDRangel::SWGFreqTrackerReport::fromJsonObject(), SWGSDRangel::SWGXtrxOutputSettings::fromJsonObject(), SWGSDRangel::SWGFileSourceSettings::fromJsonObject(), SWGSDRangel::SWGRemoteInputSettings::fromJsonObject(), SWGSDRangel::SWGXtrxInputSettings::fromJsonObject(), SWGSDRangel::SWGSSBDemodSettings::fromJsonObject(), SWGSDRangel::SWGFrequencyBand::fromJsonObject(), SWGSDRangel::SWGFileInputSettings::fromJsonObject(), SWGSDRangel::SWGPresetTransfer::fromJsonObject(), SWGSDRangel::SWGHackRFInputSettings::fromJsonObject(), SWGSDRangel::SWGTestSourceSettings::fromJsonObject(), SWGSDRangel::SWGPresetItem::fromJsonObject(), SWGSDRangel::SWGHackRFOutputSettings::fromJsonObject(), SWGSDRangel::SWGUDPSinkSettings::fromJsonObject(), SWGSDRangel::SWGUDPSourceSettings::fromJsonObject(), SWGSDRangel::SWGSuccessResponse::fromJsonObject(), SWGSDRangel::SWGWFMDemodSettings::fromJsonObject(), SWGSDRangel::SWGATVModSettings::fromJsonObject(), SWGSDRangel::SWGPlutoSdrOutputSettings::fromJsonObject(), SWGSDRangel::SWGAudioInputDevice::fromJsonObject(), SWGSDRangel::SWGPlutoSdrInputSettings::fromJsonObject(), SWGSDRangel::SWGCommand::fromJsonObject(), SWGSDRangel::SWGPerseusSettings::fromJsonObject(), SWGSDRangel::SWGAudioOutputDevice::fromJsonObject(), SWGSDRangel::SWGKiwiSDRSettings::fromJsonObject(), SWGSDRangel::SWGCWKeyerSettings::fromJsonObject(), SWGSDRangel::SWGNFMDemodSettings::fromJsonObject(), SWGSDRangel::SWGLimeSdrInputSettings::fromJsonObject(), SWGSDRangel::SWGDeviceListItem::fromJsonObject(), SWGSDRangel::SWGLimeSdrOutputSettings::fromJsonObject(), SWGSDRangel::SWGLocalSourceSettings::fromJsonObject(), SWGSDRangel::SWGAirspyHFSettings::fromJsonObject(), SWGSDRangel::SWGLocalInputSettings::fromJsonObject(), SWGSDRangel::SWGLocalOutputSettings::fromJsonObject(), SWGSDRangel::SWGLocalSinkSettings::fromJsonObject(), SWGSDRangel::SWGBFMDemodReport::fromJsonObject(), SWGSDRangel::SWGAMDemodSettings::fromJsonObject(), SWGSDRangel::SWGLoggingInfo::fromJsonObject(), SWGSDRangel::SWGNamedEnum::fromJsonObject(), SWGSDRangel::SWGBFMDemodSettings::fromJsonObject(), SWGSDRangel::SWGBladeRF1InputSettings::fromJsonObject(), SWGSDRangel::SWGDeviceState::fromJsonObject(), SWGSDRangel::SWGDSDDemodReport::fromJsonObject(), SWGSDRangel::SWGRemoteSinkSettings::fromJsonObject(), SWGSDRangel::SWGSDRPlaySettings::fromJsonObject(), SWGSDRangel::SWGDSDDemodSettings::fromJsonObject(), SWGSDRangel::SWGDVSerialDevice::fromJsonObject(), SWGSDRangel::SWGPlutoSdrInputReport::fromJsonObject(), SWGSDRangel::SWGPlutoSdrOutputReport::fromJsonObject(), SWGSDRangel::SWGErrorResponse::fromJsonObject(), SWGSDRangel::SWGPreferences::fromJsonObject(), SWGSDRangel::SWGFCDProPlusSettings::fromJsonObject(), SWGSDRangel::SWGPresetIdentifier::fromJsonObject(), SWGSDRangel::SWGPresetImport::fromJsonObject(), SWGSDRangel::SWGFreqTrackerSettings::fromJsonObject(), SWGSDRangel::SWGFCDProSettings::fromJsonObject(), SWGSDRangel::SWGAMBEDevice::fromJsonObject(), SWGSDRangel::SWGBladeRF1OutputSettings::fromJsonObject(), SWGSDRangel::SWGArgValue::fromJsonObject(), SWGSDRangel::SWGRemoteOutputSettings::fromJsonObject(), SWGSDRangel::SWGAirspySettings::fromJsonObject(), SWGSDRangel::SWGRemoteInputReport::fromJsonObject(), SWGSDRangel::SWGFileInputReport::fromJsonObject(), SWGSDRangel::SWGBladeRF2InputSettings::fromJsonObject(), SWGSDRangel::SWGFreeDVDemodSettings::fromJsonObject(), SWGSDRangel::SWGBladeRF2OutputSettings::fromJsonObject(), SWGSDRangel::SWGFileSourceReport::fromJsonObject(), SWGSDRangel::SWGSamplingDevice::fromJsonObject(), SWGSDRangel::SWGRemoteSourceSettings::fromJsonObject(), SWGSDRangel::SWGRtlSdrSettings::fromJsonObject(), SWGSDRangel::SWGChannelListItem::fromJsonObject(), SWGSDRangel::SWGChannel::fromJsonObject(), SWGSDRangel::SWGInstanceDevicesResponse::fromJsonObject(), SWGSDRangel::SWGAirspyHFReport::fromJsonObject(), SWGSDRangel::SWGSoapySDRGainSetting::fromJsonObject(), SWGSDRangel::SWGSSBModSettings::fromJsonObject(), SWGSDRangel::SWGPresets::fromJsonObject(), SWGSDRangel::SWGFreeDVModSettings::fromJsonObject(), SWGSDRangel::SWGDeviceConfig::fromJsonObject(), SWGSDRangel::SWGAMModSettings::fromJsonObject(), SWGSDRangel::SWGBladeRF2OutputReport::fromJsonObject(), SWGSDRangel::SWGNFMModSettings::fromJsonObject(), SWGSDRangel::SWGPresetExport::fromJsonObject(), SWGSDRangel::SWGWFMModSettings::fromJsonObject(), SWGSDRangel::SWGPerseusReport::fromJsonObject(), SWGSDRangel::SWGChannelsDetail::fromJsonObject(), SWGSDRangel::SWGAirspyReport::fromJsonObject(), SWGSDRangel::SWGDeviceSetList::fromJsonObject(), SWGSDRangel::SWGInstanceChannelsResponse::fromJsonObject(), SWGSDRangel::SWGDVSerialDevices::fromJsonObject(), SWGSDRangel::SWGChannelConfig::fromJsonObject(), SWGSDRangel::SWGAMBEDevices::fromJsonObject(), SWGSDRangel::SWGRtlSdrReport::fromJsonObject(), SWGSDRangel::SWGSoapySDRFrequencySetting::fromJsonObject(), SWGSDRangel::SWGDeviceSet::fromJsonObject(), SWGSDRangel::SWGArgInfo::fromJsonObject(), SWGSDRangel::SWGTestMISettings::fromJsonObject(), SWGSDRangel::SWGAudioDevices::fromJsonObject(), SWGSDRangel::SWGRDSReport::fromJsonObject(), SWGSDRangel::SWGInstanceSummaryResponse::fromJsonObject(), SWGSDRangel::SWGPresetGroup::fromJsonObject(), SWGSDRangel::SWGBladeRF2InputReport::fromJsonObject(), SWGSDRangel::SWGSoapySDROutputSettings::fromJsonObject(), SWGSDRangel::SWGInstanceConfigResponse::fromJsonObject(), SWGSDRangel::SWGSoapySDRInputSettings::fromJsonObject(), SWGSDRangel::SWGSDRPlayReport::fromJsonObject(), SWGSDRangel::SWGPreset::fromJsonObject(), SWGSDRangel::SWGSoapySDRReport::fromJsonObject(), SWGSDRangel::SWGChannelReport::fromJsonObject(), SWGSDRangel::SWGDeviceReport::fromJsonObject(), SWGSDRangel::SWGChannelSettings_2::fromJsonObject(), SWGSDRangel::SWGChannelSettings::fromJsonObject(), SWGSDRangel::SWGDeviceSettings_2::fromJsonObject(), SWGSDRangel::SWGDeviceSettings::fromJsonObject(), DynamicArgSettingGUI::getName(), and ItemSettingGUI::~ItemSettingGUI().

25  {
26  if(value == nullptr) {
27  // can't set value with a null pointer
28  return;
29  }
30  if(QStringLiteral("bool").compare(type) == 0) {
31  bool * val = static_cast<bool*>(value);
32  *val = obj.toBool();
33  }
34  else if(QStringLiteral("qint32").compare(type) == 0) {
35  qint32 *val = static_cast<qint32*>(value);
36  *val = obj.toInt();
37  }
38  else if(QStringLiteral("qint64").compare(type) == 0) {
39  qint64 *val = static_cast<qint64*>(value);
40  *val = obj.toVariant().toLongLong();
41  }
42  else if(QStringLiteral("float").compare(type) == 0) {
43  float *val = static_cast<float*>(value);
44  *val = obj.toDouble();
45  }
46  else if(QStringLiteral("double").compare(type) == 0) {
47  double *val = static_cast<double*>(value);
48  *val = obj.toDouble();
49  }
50  else if (QStringLiteral("QString").compare(type) == 0) {
51  QString **val = static_cast<QString**>(value);
52  if(val != nullptr) {
53  if(!obj.isNull()) {
54  // create a new value and return
55  if(*val != nullptr) delete *val;
56  *val = new QString(obj.toString());
57  return;
58  }
59  else {
60  // set target to nullptr
61  if(*val != nullptr) delete *val;
62  *val = nullptr;
63  }
64  }
65  else {
66  qDebug() << "Can't set value because the target pointer is nullptr";
67  }
68  }
69  else if (QStringLiteral("QDateTime").compare(type) == 0) {
70  QDateTime **val = static_cast<QDateTime**>(value);
71 
72  if(val != nullptr) {
73  if(!obj.isNull()) {
74  // create a new value and return
75  if(*val != nullptr) delete *val;
76  *val = new QDateTime(QDateTime::fromString(obj.toString(), Qt::ISODate));
77  return;
78  }
79  else {
80  // set target to nullptr
81  if(*val != nullptr) delete *val;
82  *val = nullptr;
83  }
84  }
85  else {
86  qDebug() << "Can't set value because the target pointer is nullptr";
87  }
88  }
89  else if (QStringLiteral("QDate").compare(type) == 0) {
90  QDate **val = static_cast<QDate**>(value);
91 
92  if(val != nullptr) {
93  if(!obj.isNull()) {
94  // create a new value and return
95  if(*val != nullptr) delete *val;
96  *val = new QDate(QDate::fromString(obj.toString(), Qt::ISODate));
97  return;
98  }
99  else {
100  // set target to nullptr
101  if(*val != nullptr) delete *val;
102  *val = nullptr;
103  }
104  }
105  else {
106  qDebug() << "Can't set value because the target pointer is nullptr";
107  }
108  }
109  else if (QStringLiteral("QByteArray").compare(type) == 0) {
110  QByteArray **val = static_cast<QByteArray**>(value);
111 
112  if(val != nullptr) {
113  if(!obj.isNull()) {
114  // create a new value and return
115  if(*val != nullptr) delete *val;
116 
117  *val = new QByteArray(QByteArray::fromBase64(QByteArray::fromStdString(obj.toString().toStdString())));
118  return;
119  }
120  else {
121  // set target to nullptr
122  if(*val != nullptr) delete *val;
123  *val = nullptr;
124  }
125  }
126  else {
127  qDebug() << "Can't set value because the target pointer is nullptr";
128  }
129  }
130  else if(type.startsWith("SWG") && obj.isObject()) {
131  // complex type
132  QJsonObject jsonObj = obj.toObject();
133  SWGObject * so = (SWGObject*)::SWGSDRangel::create(complexType);
134  if(so != nullptr) {
135  so->fromJsonObject(jsonObj);
136  SWGObject **val = static_cast<SWGObject**>(value);
137  if(*val != nullptr) delete *val;
138  *val = so;
139  }
140  }
141  else if(type.startsWith("QList") && QString("").compare(complexType) != 0 && obj.isArray()) {
142  // list of values
143  if(complexType.startsWith("SWG")) {
144  auto output = reinterpret_cast<QList<SWGObject *> **> (value);
145  for (auto item : **output) {
146  if(item != nullptr) delete item;
147  }
148  (*output)->clear();
149  QJsonArray arr = obj.toArray();
150  for (const QJsonValue & jval : arr) {
151  // it's an object
152  SWGObject * val = (SWGObject*)::SWGSDRangel::create(complexType);
153  QJsonObject t = jval.toObject();
154  val->fromJsonObject(t);
155  (*output)->append(val);
156  }
157  }
158  else if(QStringLiteral("qint32").compare(complexType) == 0) {
159  auto output = reinterpret_cast<QList<qint32> **> (value);
160  (*output)->clear();
161  QJsonArray arr = obj.toArray();
162  for (const QJsonValue & jval : arr){
163  qint32 val;
164  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("qint32"), QStringLiteral(""));
165  (*output)->push_back(val);
166  }
167  }
168  else if(QStringLiteral("qint64").compare(complexType) == 0) {
169  auto output = reinterpret_cast<QList<qint64> **> (value);
170  (*output)->clear();
171  QJsonArray arr = obj.toArray();
172  for (const QJsonValue & jval : arr){
173  qint64 val;
174  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("qint64"), QStringLiteral(""));
175  (*output)->push_back(val);
176  }
177  }
178  else if(QStringLiteral("bool").compare(complexType) == 0) {
179  auto output = reinterpret_cast<QList<bool> **> (value);
180  (*output)->clear();
181  QJsonArray arr = obj.toArray();
182  for (const QJsonValue & jval : arr){
183  bool val;
184  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("bool"), QStringLiteral(""));
185  (*output)->push_back(val);
186  }
187  }
188  else if(QStringLiteral("float").compare(complexType) == 0) {
189  auto output = reinterpret_cast<QList<float> **> (value);
190  (*output)->clear();
191  QJsonArray arr = obj.toArray();
192  for (const QJsonValue & jval : arr){
193  float val;
194  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("float"), QStringLiteral(""));
195  (*output)->push_back(val);
196  }
197  }
198  else if(QStringLiteral("double").compare(complexType) == 0) {
199  auto output = reinterpret_cast<QList<double> **> (value);
200  (*output)->clear();
201  QJsonArray arr = obj.toArray();
202  for (const QJsonValue & jval : arr){
203  double val;
204  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("double"), QStringLiteral(""));
205  (*output)->push_back(val);
206  }
207  }
208  else if(QStringLiteral("QString").compare(complexType) == 0) {
209  auto output = reinterpret_cast<QList<QString*> **> (value);
210  for (auto item : **output) {
211  if(item != nullptr) delete item;
212  }
213  (*output)->clear();
214  QJsonArray arr = obj.toArray();
215  for (const QJsonValue & jval : arr){
216  QString * val = new QString();
217  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("QString"), QStringLiteral(""));
218  (*output)->push_back(val);
219  }
220  }
221  else if(QStringLiteral("QDate").compare(complexType) == 0) {
222  auto output = reinterpret_cast<QList<QDate*> **> (value);
223  for (auto item : **output) {
224  if(item != nullptr) delete item;
225  }
226  (*output)->clear();
227  QJsonArray arr = obj.toArray();
228  for (const QJsonValue & jval : arr){
229  QDate * val = new QDate();
230  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("QDate"), QStringLiteral(""));
231  (*output)->push_back(val);
232  }
233  }
234  else if(QStringLiteral("QDateTime").compare(complexType) == 0) {
235  auto output = reinterpret_cast<QList<QDateTime*> **> (value);
236  for (auto item : **output) {
237  if(item != nullptr) delete item;
238  }
239  (*output)->clear();
240  QJsonArray arr = obj.toArray();
241  for (const QJsonValue & jval : arr){
242  QDateTime * val = new QDateTime();
243  ::SWGSDRangel::setValue(&val, jval, QStringLiteral("QDateTime"), QStringLiteral(""));
244  (*output)->push_back(val);
245  }
246  }
247  }
248  else if(type.startsWith("QMap") && QString("").compare(complexType) != 0 && obj.isObject()) {
249  // list of values
250  if(complexType.startsWith("SWG")) {
251  auto output = reinterpret_cast<QMap<QString, SWGObject*> **> (value);
252  for (auto item : **output) {
253  if(item != nullptr) delete item;
254  }
255  (*output)->clear();
256  auto varmap = obj.toObject().toVariantMap();
257  if(varmap.count() > 0){
258  for(auto itemkey : varmap.keys() ){
259  auto val = (SWGObject*)::SWGSDRangel::create(complexType);
260  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
261  ::SWGSDRangel::setValue(&val, jsonval, complexType, complexType);
262  (*output)->insert(itemkey, val);
263  }
264  }
265  }
266  else if(QStringLiteral("qint32").compare(complexType) == 0) {
267  auto output = reinterpret_cast<QMap<QString, qint32> **> (value);
268  (*output)->clear();
269  auto varmap = obj.toObject().toVariantMap();
270  if(varmap.count() > 0){
271  for(auto itemkey : varmap.keys() ){
272  qint32 val;
273  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
274  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("qint32"), QStringLiteral(""));
275  (*output)->insert( itemkey, val);
276  }
277  }
278  }
279  else if(QStringLiteral("qint64").compare(complexType) == 0) {
280  auto output = reinterpret_cast<QMap<QString, qint64> **> (value);
281  (*output)->clear();
282  auto varmap = obj.toObject().toVariantMap();
283  if(varmap.count() > 0){
284  for(auto itemkey : varmap.keys() ){
285  qint64 val;
286  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
287  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("qint64"), QStringLiteral(""));
288  (*output)->insert( itemkey, val);
289  }
290  }
291  }
292  else if(QStringLiteral("bool").compare(complexType) == 0) {
293  auto output = reinterpret_cast<QMap<QString, bool> **> (value);
294  (*output)->clear();
295  auto varmap = obj.toObject().toVariantMap();
296  if(varmap.count() > 0){
297  for(auto itemkey : varmap.keys() ){
298  bool val;
299  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
300  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("bool"), QStringLiteral(""));
301  (*output)->insert( itemkey, val);
302  }
303  }
304  }
305  else if(QStringLiteral("float").compare(complexType) == 0) {
306  auto output = reinterpret_cast<QMap<QString, float> **> (value);
307  (*output)->clear();
308  auto varmap = obj.toObject().toVariantMap();
309  if(varmap.count() > 0){
310  for(auto itemkey : varmap.keys() ){
311  float val;
312  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
313  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("float"), QStringLiteral(""));
314  (*output)->insert( itemkey, val);
315  }
316  }
317  }
318  else if(QStringLiteral("double").compare(complexType) == 0) {
319  auto output = reinterpret_cast<QMap<QString, double> **> (value);
320  (*output)->clear();
321  auto varmap = obj.toObject().toVariantMap();
322  if(varmap.count() > 0){
323  for(auto itemkey : varmap.keys() ){
324  double val;
325  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
326  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("double"), QStringLiteral(""));
327  (*output)->insert( itemkey, val);
328  }
329  }
330  }
331  else if(QStringLiteral("QString").compare(complexType) == 0) {
332  auto output = reinterpret_cast<QMap<QString, QString*> **> (value);
333  for (auto item : **output) {
334  if(item != nullptr) delete item;
335  }
336  (*output)->clear();
337  auto varmap = obj.toObject().toVariantMap();
338  if(varmap.count() > 0){
339  for(auto itemkey : varmap.keys() ){
340  QString * val = new QString();
341  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
342  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("QString"), QStringLiteral(""));
343  (*output)->insert( itemkey, val);
344  }
345  }
346  }
347  else if(QStringLiteral("QDate").compare(complexType) == 0) {
348  auto output = reinterpret_cast<QMap<QString, QDate*> **> (value);
349  for (auto item : **output) {
350  if(item != nullptr) delete item;
351  }
352  (*output)->clear();
353  auto varmap = obj.toObject().toVariantMap();
354  if(varmap.count() > 0){
355  for(auto itemkey : varmap.keys() ){
356  QDate * val = new QDate();
357  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
358  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("QDate"), QStringLiteral(""));
359  (*output)->insert( itemkey, val);
360  }
361  }
362  }
363  else if(QStringLiteral("QDateTime").compare(complexType) == 0) {
364  auto output = reinterpret_cast<QMap<QString, QDateTime*> **> (value);
365  for (auto item : **output) {
366  if(item != nullptr) delete item;
367  }
368  (*output)->clear();
369  auto varmap = obj.toObject().toVariantMap();
370  if(varmap.count() > 0){
371  for(auto itemkey : varmap.keys() ){
372  QDateTime * val = new QDateTime();
373  auto jsonval = QJsonValue::fromVariant(varmap.value(itemkey));
374  ::SWGSDRangel::setValue(&val, jsonval, QStringLiteral("QDateTime"), QStringLiteral(""));
375  (*output)->insert( itemkey, val);
376  }
377  }
378  }
379  }
380 }
void * create(QString type)
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
Definition: SWGHelpers.cpp:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stringValue() [1/4]

QString SWGSDRangel::stringValue ( QString *  value)

◆ stringValue() [2/4]

QString SWGSDRangel::stringValue ( qint32  value)

Definition at line 584 of file SWGHelpers.cpp.

584  {
585  return QString::number(value);
586 }

◆ stringValue() [3/4]

QString SWGSDRangel::stringValue ( qint64  value)

Definition at line 589 of file SWGHelpers.cpp.

589  {
590  return QString::number(value);
591 }

◆ stringValue() [4/4]

QString SWGSDRangel::stringValue ( bool  value)

Definition at line 594 of file SWGHelpers.cpp.

594  {
595  return QString(value ? "true" : "false");
596 }

◆ toJsonArray()

void SWGSDRangel::toJsonArray ( QList< void *> *  value,
QJsonObject *  output,
QString  innerName,
QString  innerType 
)

Definition at line 445 of file SWGHelpers.cpp.

References SWGSDRangel::SWGObject::asJsonObject().

Referenced by SWGSDRangel::SWGAirspyHFReport::asJsonObject(), SWGSDRangel::SWGAirspyReport::asJsonObject(), SWGSDRangel::SWGDeviceSetList::asJsonObject(), SWGSDRangel::SWGPresets::asJsonObject(), SWGSDRangel::SWGRtlSdrReport::asJsonObject(), SWGSDRangel::SWGDVSerialDevices::asJsonObject(), SWGSDRangel::SWGInstanceChannelsResponse::asJsonObject(), SWGSDRangel::SWGAMBEDevices::asJsonObject(), SWGSDRangel::SWGInstanceDevicesResponse::asJsonObject(), SWGSDRangel::SWGChannelsDetail::asJsonObject(), SWGSDRangel::SWGPerseusReport::asJsonObject(), SWGSDRangel::SWGPresetGroup::asJsonObject(), SWGSDRangel::SWGDeviceSet::asJsonObject(), SWGSDRangel::SWGRDSReport::asJsonObject(), SWGSDRangel::SWGSoapySDRFrequencySetting::asJsonObject(), SWGSDRangel::SWGAudioDevices::asJsonObject(), SWGSDRangel::SWGArgInfo::asJsonObject(), SWGSDRangel::SWGTestMISettings::asJsonObject(), SWGSDRangel::SWGSoapySDRInputSettings::asJsonObject(), SWGSDRangel::SWGInstanceConfigResponse::asJsonObject(), SWGSDRangel::SWGBladeRF2InputReport::asJsonObject(), SWGSDRangel::SWGSoapySDROutputSettings::asJsonObject(), SWGSDRangel::SWGSDRPlayReport::asJsonObject(), SWGSDRangel::SWGPreset::asJsonObject(), and SWGSDRangel::SWGSoapySDRReport::asJsonObject().

445  {
446  if((value == nullptr) || (output == nullptr)) {
447  return;
448  }
449  QJsonArray outputarray;
450  if(innerType.startsWith("SWG")){
451  for(void* obj : *value) {
452  SWGObject *SWGobject = reinterpret_cast<SWGObject *>(obj);
453  if(SWGobject != nullptr)
454  {
455  QJsonObject* o = SWGobject->asJsonObject();
456  outputarray.append(*o);
457  delete o;
458  }
459  }
460  }
461  else if(QStringLiteral("QString").compare(innerType) == 0) {
462  for(QString* obj : *(reinterpret_cast<QList<QString*>*>(value))){
463  outputarray.append(QJsonValue(*obj));
464  }
465  }
466  else if(QStringLiteral("QDate").compare(innerType) == 0) {
467  for(QDate* obj : *(reinterpret_cast<QList<QDate*>*>(value))){
468  outputarray.append(QJsonValue(obj->toString(Qt::ISODate)));
469  }
470  }
471  else if(QStringLiteral("QDateTime").compare(innerType) == 0) {
472  for(QDateTime* obj : *(reinterpret_cast<QList<QDateTime*>*>(value))){
473  outputarray.append(QJsonValue(obj->toString(Qt::ISODate))); }
474  }
475  else if(QStringLiteral("QByteArray").compare(innerType) == 0) {
476  for(QByteArray* obj : *(reinterpret_cast<QList<QByteArray*>*>(value))){
477  outputarray.append(QJsonValue(QString(obj->toBase64())));
478  }
479  }
480  else if(QStringLiteral("qint32").compare(innerType) == 0) {
481  for(qint32 obj : *(reinterpret_cast<QList<qint32>*>(value)))
482  outputarray.append(QJsonValue(obj));
483  }
484  else if(QStringLiteral("qint64").compare(innerType) == 0) {
485  for(qint64 obj : *(reinterpret_cast<QList<qint64>*>(value)))
486  outputarray.append(QJsonValue(obj));
487  }
488  else if(QStringLiteral("bool").compare(innerType) == 0) {
489  for(bool obj : *(reinterpret_cast<QList<bool>*>(value)))
490  outputarray.append(QJsonValue(obj));
491  }
492  else if(QStringLiteral("float").compare(innerType) == 0) {
493  for(float obj : *(reinterpret_cast<QList<float>*>(value)))
494  outputarray.append(QJsonValue(obj));
495  }
496  else if(QStringLiteral("double").compare(innerType) == 0) {
497  for(double obj : *(reinterpret_cast<QList<double>*>(value)))
498  outputarray.append(QJsonValue(obj));
499  }
500  output->insert(innerName, outputarray);
501 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toJsonMap()

void SWGSDRangel::toJsonMap ( QMap< QString, void *> *  value,
QJsonObject *  output,
QString  innerName,
QString  innerType 
)

Definition at line 504 of file SWGHelpers.cpp.

References toJsonValue().

504  {
505  if((value == nullptr) || (output == nullptr)) {
506  return;
507  }
508  QJsonObject mapobj;
509  if(innerType.startsWith("SWG")){
510  auto items = reinterpret_cast< QMap<QString, SWGObject*> *>(value);
511  for(auto itemkey: items->keys()) {
512  ::SWGSDRangel::toJsonValue(itemkey, items->value(itemkey), &mapobj, innerType);
513  }
514  }
515  else if(QStringLiteral("QString").compare(innerType) == 0) {
516  auto items = reinterpret_cast< QMap<QString, QString*> *>(value);
517  for(auto itemkey: items->keys()) {
518  ::SWGSDRangel::toJsonValue(itemkey, items->value(itemkey), &mapobj, innerType);
519  }
520  }
521  else if(QStringLiteral("QDate").compare(innerType) == 0) {
522  auto items = reinterpret_cast< QMap<QString, QDate*> *>(value);
523  for(auto itemkey: items->keys()) {
524  ::SWGSDRangel::toJsonValue(itemkey, items->value(itemkey), &mapobj, innerType);
525  }
526  }
527  else if(QStringLiteral("QDateTime").compare(innerType) == 0) {
528  auto items = reinterpret_cast< QMap<QString, QDateTime*> *>(value);
529  for(auto itemkey: items->keys()) {
530  ::SWGSDRangel::toJsonValue(itemkey, items->value(itemkey), &mapobj, innerType);
531  }
532  }
533  else if(QStringLiteral("QByteArray").compare(innerType) == 0) {
534  auto items = reinterpret_cast< QMap<QString, QByteArray*> *>(value);
535  for(auto itemkey: items->keys()) {
536  ::SWGSDRangel::toJsonValue(itemkey, items->value(itemkey), &mapobj, innerType);
537  }
538  }
539  else if(QStringLiteral("qint32").compare(innerType) == 0) {
540  auto items = reinterpret_cast< QMap<QString, qint32> *>(value);
541  for(auto itemkey: items->keys()) {
542  auto val = items->value(itemkey);
543  ::SWGSDRangel::toJsonValue(itemkey, &val, &mapobj, innerType);
544  }
545  }
546  else if(QStringLiteral("qint64").compare(innerType) == 0) {
547  auto items = reinterpret_cast< QMap<QString, qint64> *>(value);
548  for(auto itemkey: items->keys()) {
549  auto val = items->value(itemkey);
550  ::SWGSDRangel::toJsonValue(itemkey, &val, &mapobj, innerType);
551  }
552  }
553  else if(QStringLiteral("bool").compare(innerType) == 0) {
554  auto items = reinterpret_cast< QMap<QString, bool> *>(value);
555  for(auto itemkey: items->keys()) {
556  auto val = items->value(itemkey);
557  ::SWGSDRangel::toJsonValue(itemkey, &val, &mapobj, innerType);
558  }
559  }
560  else if(QStringLiteral("float").compare(innerType) == 0) {
561  auto items = reinterpret_cast< QMap<QString, float> *>(value);
562  for(auto itemkey: items->keys()) {
563  auto val = items->value(itemkey);
564  ::SWGSDRangel::toJsonValue(itemkey, &val, &mapobj, innerType);
565  }
566  }
567  else if(QStringLiteral("double").compare(innerType) == 0) {
568  auto items = reinterpret_cast< QMap<QString, double> *>(value);
569  for(auto itemkey: items->keys() ) {
570  auto val = items->value(itemkey);
571  ::SWGSDRangel::toJsonValue(itemkey, &val, &mapobj, innerType);
572  }
573  }
574  output->insert(innerName, mapobj);
575 }
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
Definition: SWGHelpers.cpp:383
+ Here is the call graph for this function:

◆ toJsonValue()

void SWGSDRangel::toJsonValue ( QString  name,
void *  value,
QJsonObject *  output,
QString  type 
)

Definition at line 383 of file SWGHelpers.cpp.

References SWGSDRangel::SWGObject::asJsonObject().

Referenced by SWGSDRangel::SWGAirspyHFSettings::asJsonObject(), SWGSDRangel::SWGAirspySettings::asJsonObject(), SWGSDRangel::SWGAMDemodSettings::asJsonObject(), SWGSDRangel::SWGATVModSettings::asJsonObject(), SWGSDRangel::SWGWFMDemodSettings::asJsonObject(), SWGSDRangel::SWGUDPSourceSettings::asJsonObject(), SWGSDRangel::SWGBladeRF2InputSettings::asJsonObject(), SWGSDRangel::SWGTestSourceSettings::asJsonObject(), SWGSDRangel::SWGPerseusSettings::asJsonObject(), SWGSDRangel::SWGPlutoSdrInputReport::asJsonObject(), SWGSDRangel::SWGDeviceState::asJsonObject(), SWGSDRangel::SWGPlutoSdrInputSettings::asJsonObject(), SWGSDRangel::SWGPlutoSdrOutputReport::asJsonObject(), SWGSDRangel::SWGDSDDemodReport::asJsonObject(), SWGSDRangel::SWGPlutoSdrOutputSettings::asJsonObject(), SWGSDRangel::SWGPreferences::asJsonObject(), SWGSDRangel::SWGDSDDemodSettings::asJsonObject(), SWGSDRangel::SWGSDRPlaySettings::asJsonObject(), SWGSDRangel::SWGAudioInputDevice::asJsonObject(), SWGSDRangel::SWGRtlSdrSettings::asJsonObject(), SWGSDRangel::SWGRemoteSourceSettings::asJsonObject(), SWGSDRangel::SWGRemoteSinkSettings::asJsonObject(), SWGSDRangel::SWGBladeRF2OutputSettings::asJsonObject(), SWGSDRangel::SWGRemoteInputSettings::asJsonObject(), SWGSDRangel::SWGRemoteInputReport::asJsonObject(), SWGSDRangel::SWGDVSerialDevice::asJsonObject(), SWGSDRangel::SWGPresetIdentifier::asJsonObject(), SWGSDRangel::SWGErrorResponse::asJsonObject(), SWGSDRangel::SWGPresetImport::asJsonObject(), SWGSDRangel::SWGPresetItem::asJsonObject(), SWGSDRangel::SWGFCDProPlusSettings::asJsonObject(), SWGSDRangel::SWGPresetTransfer::asJsonObject(), SWGSDRangel::SWGFCDProSettings::asJsonObject(), SWGSDRangel::SWGAudioOutputDevice::asJsonObject(), SWGSDRangel::SWGChannelListItem::asJsonObject(), SWGSDRangel::SWGFileInputReport::asJsonObject(), SWGSDRangel::SWGRemoteOutputSettings::asJsonObject(), SWGSDRangel::SWGFileInputSettings::asJsonObject(), SWGSDRangel::SWGFileSourceReport::asJsonObject(), SWGSDRangel::SWGSamplingDevice::asJsonObject(), SWGSDRangel::SWGFileSourceSettings::asJsonObject(), SWGSDRangel::SWGBFMDemodReport::asJsonObject(), SWGSDRangel::SWGFreeDVDemodSettings::asJsonObject(), SWGSDRangel::SWGLocalSourceSettings::asJsonObject(), SWGSDRangel::SWGSSBDemodSettings::asJsonObject(), SWGSDRangel::SWGLocalOutputSettings::asJsonObject(), SWGSDRangel::SWGLocalInputSettings::asJsonObject(), SWGSDRangel::SWGLimeSdrOutputSettings::asJsonObject(), SWGSDRangel::SWGFreqTrackerSettings::asJsonObject(), SWGSDRangel::SWGKiwiSDRSettings::asJsonObject(), SWGSDRangel::SWGSuccessResponse::asJsonObject(), SWGSDRangel::SWGFrequencyBand::asJsonObject(), SWGSDRangel::SWGXtrxOutputSettings::asJsonObject(), SWGSDRangel::SWGHackRFOutputSettings::asJsonObject(), SWGSDRangel::SWGUDPSinkSettings::asJsonObject(), SWGSDRangel::SWGAMBEDevice::asJsonObject(), SWGSDRangel::SWGBFMDemodSettings::asJsonObject(), SWGSDRangel::SWGCommand::asJsonObject(), SWGSDRangel::SWGHackRFInputSettings::asJsonObject(), SWGSDRangel::SWGXtrxInputSettings::asJsonObject(), SWGSDRangel::SWGBladeRF1InputSettings::asJsonObject(), SWGSDRangel::SWGCWKeyerSettings::asJsonObject(), SWGSDRangel::SWGLimeSdrInputSettings::asJsonObject(), SWGSDRangel::SWGArgValue::asJsonObject(), SWGSDRangel::SWGBladeRF1OutputSettings::asJsonObject(), SWGSDRangel::SWGDeviceListItem::asJsonObject(), SWGSDRangel::SWGLocalSinkSettings::asJsonObject(), SWGSDRangel::SWGLoggingInfo::asJsonObject(), SWGSDRangel::SWGNamedEnum::asJsonObject(), SWGSDRangel::SWGNFMDemodSettings::asJsonObject(), SWGSDRangel::SWGSSBModSettings::asJsonObject(), SWGSDRangel::SWGWFMModSettings::asJsonObject(), SWGSDRangel::SWGFreeDVModSettings::asJsonObject(), SWGSDRangel::SWGBladeRF2OutputReport::asJsonObject(), SWGSDRangel::SWGChannel::asJsonObject(), SWGSDRangel::SWGSoapySDRGainSetting::asJsonObject(), SWGSDRangel::SWGChannelConfig::asJsonObject(), SWGSDRangel::SWGDeviceConfig::asJsonObject(), SWGSDRangel::SWGNFMModSettings::asJsonObject(), SWGSDRangel::SWGPresetExport::asJsonObject(), SWGSDRangel::SWGAMModSettings::asJsonObject(), SWGSDRangel::SWGPresetGroup::asJsonObject(), SWGSDRangel::SWGArgInfo::asJsonObject(), SWGSDRangel::SWGRDSReport::asJsonObject(), SWGSDRangel::SWGInstanceSummaryResponse::asJsonObject(), SWGSDRangel::SWGDeviceSet::asJsonObject(), SWGSDRangel::SWGSoapySDRFrequencySetting::asJsonObject(), SWGSDRangel::SWGTestMISettings::asJsonObject(), SWGSDRangel::SWGInstanceConfigResponse::asJsonObject(), SWGSDRangel::SWGSoapySDROutputSettings::asJsonObject(), SWGSDRangel::SWGBladeRF2InputReport::asJsonObject(), SWGSDRangel::SWGSoapySDRInputSettings::asJsonObject(), SWGSDRangel::SWGPreset::asJsonObject(), SWGSDRangel::SWGSoapySDRReport::asJsonObject(), SWGSDRangel::SWGChannelReport::asJsonObject(), SWGSDRangel::SWGDeviceReport::asJsonObject(), SWGSDRangel::SWGChannelSettings_2::asJsonObject(), SWGSDRangel::SWGChannelSettings::asJsonObject(), SWGSDRangel::SWGDeviceSettings_2::asJsonObject(), SWGSDRangel::SWGDeviceSettings::asJsonObject(), and toJsonMap().

383  {
384  if(value == nullptr) {
385  return;
386  }
387  if(type.startsWith("SWG")) {
388  SWGObject *SWGobject = reinterpret_cast<SWGObject *>(value);
389  if(SWGobject != nullptr) {
390  QJsonObject* o = (*SWGobject).asJsonObject();
391  if (o != nullptr)
392  {
393  if(name != nullptr) {
394  output->insert(name, *o);
395  if(o != nullptr) delete o;
396  }
397  else {
398  output->empty();
399  for(QString key : o->keys()) {
400  output->insert(key, o->value(key));
401  }
402  }
403  }
404  }
405  }
406  else if(QStringLiteral("QString").compare(type) == 0) {
407  QString* str = static_cast<QString*>(value);
408  output->insert(name, QJsonValue(*str));
409  }
410  else if(QStringLiteral("qint32").compare(type) == 0) {
411  qint32* str = static_cast<qint32*>(value);
412  output->insert(name, QJsonValue(*str));
413  }
414  else if(QStringLiteral("qint64").compare(type) == 0) {
415  qint64* str = static_cast<qint64*>(value);
416  output->insert(name, QJsonValue(*str));
417  }
418  else if(QStringLiteral("bool").compare(type) == 0) {
419  bool* str = static_cast<bool*>(value);
420  output->insert(name, QJsonValue(*str));
421  }
422  else if(QStringLiteral("float").compare(type) == 0) {
423  float* str = static_cast<float*>(value);
424  output->insert(name, QJsonValue((double)*str));
425  }
426  else if(QStringLiteral("double").compare(type) == 0) {
427  double* str = static_cast<double*>(value);
428  output->insert(name, QJsonValue(*str));
429  }
430  else if(QStringLiteral("QDate").compare(type) == 0) {
431  QDate* date = static_cast<QDate*>(value);
432  output->insert(name, QJsonValue(date->toString(Qt::ISODate)));
433  }
434  else if(QStringLiteral("QDateTime").compare(type) == 0) {
435  QDateTime* datetime = static_cast<QDateTime*>(value);
436  output->insert(name, QJsonValue(datetime->toString(Qt::ISODate)));
437  }
438  else if(QStringLiteral("QByteArray").compare(type) == 0) {
439  QByteArray* byteArray = static_cast<QByteArray*>(value);
440  output->insert(name, QJsonValue(QString(byteArray->toBase64())));
441  }
442 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function: