2017-12-03 18:48:14 -05:00
|
|
|
/**
|
|
|
|
* SDRangel
|
2018-09-11 08:52:16 -04:00
|
|
|
* 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 ---
|
2017-12-03 18:48:14 -05:00
|
|
|
*
|
2018-09-18 23:54:07 -04:00
|
|
|
* OpenAPI spec version: 4.2.0
|
2017-12-03 18:48:14 -05:00
|
|
|
* Contact: f4exb06@gmail.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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "SWGDeviceSettings.h"
|
|
|
|
|
|
|
|
#include "SWGHelpers.h"
|
|
|
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
namespace SWGSDRangel {
|
|
|
|
|
2018-02-13 19:42:35 -05:00
|
|
|
SWGDeviceSettings::SWGDeviceSettings(QString* json) {
|
2017-12-03 18:48:14 -05:00
|
|
|
init();
|
2018-02-13 19:42:35 -05:00
|
|
|
this->fromJson(*json);
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGDeviceSettings::SWGDeviceSettings() {
|
2018-02-13 19:42:35 -05:00
|
|
|
device_hw_type = nullptr;
|
|
|
|
m_device_hw_type_isSet = false;
|
|
|
|
tx = 0;
|
|
|
|
m_tx_isSet = false;
|
2018-05-25 13:28:57 -04:00
|
|
|
airspy_settings = nullptr;
|
|
|
|
m_airspy_settings_isSet = false;
|
2018-03-22 00:10:13 -04:00
|
|
|
airspy_hf_settings = nullptr;
|
|
|
|
m_airspy_hf_settings_isSet = false;
|
2018-09-18 23:54:07 -04:00
|
|
|
blade_rf1_input_settings = nullptr;
|
|
|
|
m_blade_rf1_input_settings_isSet = false;
|
|
|
|
blade_rf1_output_settings = nullptr;
|
|
|
|
m_blade_rf1_output_settings_isSet = false;
|
2018-05-26 04:27:28 -04:00
|
|
|
fcd_pro_settings = nullptr;
|
|
|
|
m_fcd_pro_settings_isSet = false;
|
2018-05-26 04:54:31 -04:00
|
|
|
fcd_pro_plus_settings = nullptr;
|
|
|
|
m_fcd_pro_plus_settings_isSet = false;
|
2018-02-13 19:42:35 -05:00
|
|
|
file_source_settings = nullptr;
|
|
|
|
m_file_source_settings_isSet = false;
|
|
|
|
hack_rf_input_settings = nullptr;
|
|
|
|
m_hack_rf_input_settings_isSet = false;
|
|
|
|
hack_rf_output_settings = nullptr;
|
|
|
|
m_hack_rf_output_settings_isSet = false;
|
|
|
|
lime_sdr_input_settings = nullptr;
|
|
|
|
m_lime_sdr_input_settings_isSet = false;
|
|
|
|
lime_sdr_output_settings = nullptr;
|
|
|
|
m_lime_sdr_output_settings_isSet = false;
|
2018-05-26 07:24:35 -04:00
|
|
|
perseus_settings = nullptr;
|
|
|
|
m_perseus_settings_isSet = false;
|
2018-05-26 12:07:21 -04:00
|
|
|
pluto_sdr_input_settings = nullptr;
|
|
|
|
m_pluto_sdr_input_settings_isSet = false;
|
|
|
|
pluto_sdr_output_settings = nullptr;
|
|
|
|
m_pluto_sdr_output_settings_isSet = false;
|
2018-02-13 19:42:35 -05:00
|
|
|
rtl_sdr_settings = nullptr;
|
|
|
|
m_rtl_sdr_settings_isSet = false;
|
2018-05-27 18:40:33 -04:00
|
|
|
sdr_daemon_sink_settings = nullptr;
|
|
|
|
m_sdr_daemon_sink_settings_isSet = false;
|
2018-05-27 05:07:24 -04:00
|
|
|
sdr_daemon_source_settings = nullptr;
|
|
|
|
m_sdr_daemon_source_settings_isSet = false;
|
2018-05-27 05:57:23 -04:00
|
|
|
sdr_play_settings = nullptr;
|
|
|
|
m_sdr_play_settings_isSet = false;
|
2018-05-27 16:25:01 -04:00
|
|
|
test_source_settings = nullptr;
|
|
|
|
m_test_source_settings_isSet = false;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGDeviceSettings::~SWGDeviceSettings() {
|
|
|
|
this->cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::init() {
|
2017-12-06 13:23:42 -05:00
|
|
|
device_hw_type = new QString("");
|
2018-02-12 12:20:27 -05:00
|
|
|
m_device_hw_type_isSet = false;
|
2017-12-06 13:23:42 -05:00
|
|
|
tx = 0;
|
2018-02-12 12:20:27 -05:00
|
|
|
m_tx_isSet = false;
|
2018-05-25 13:28:57 -04:00
|
|
|
airspy_settings = new SWGAirspySettings();
|
|
|
|
m_airspy_settings_isSet = false;
|
2018-03-22 00:10:13 -04:00
|
|
|
airspy_hf_settings = new SWGAirspyHFSettings();
|
|
|
|
m_airspy_hf_settings_isSet = false;
|
2018-09-18 23:54:07 -04:00
|
|
|
blade_rf1_input_settings = new SWGBladeRF1InputSettings();
|
|
|
|
m_blade_rf1_input_settings_isSet = false;
|
|
|
|
blade_rf1_output_settings = new SWGBladeRF1OutputSettings();
|
|
|
|
m_blade_rf1_output_settings_isSet = false;
|
2018-05-26 04:27:28 -04:00
|
|
|
fcd_pro_settings = new SWGFCDProSettings();
|
|
|
|
m_fcd_pro_settings_isSet = false;
|
2018-05-26 04:54:31 -04:00
|
|
|
fcd_pro_plus_settings = new SWGFCDProPlusSettings();
|
|
|
|
m_fcd_pro_plus_settings_isSet = false;
|
2017-12-06 13:23:42 -05:00
|
|
|
file_source_settings = new SWGFileSourceSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_file_source_settings_isSet = false;
|
2017-12-28 19:40:34 -05:00
|
|
|
hack_rf_input_settings = new SWGHackRFInputSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_hack_rf_input_settings_isSet = false;
|
2017-12-28 19:40:34 -05:00
|
|
|
hack_rf_output_settings = new SWGHackRFOutputSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_hack_rf_output_settings_isSet = false;
|
2017-12-06 13:23:42 -05:00
|
|
|
lime_sdr_input_settings = new SWGLimeSdrInputSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_lime_sdr_input_settings_isSet = false;
|
2017-12-06 13:23:42 -05:00
|
|
|
lime_sdr_output_settings = new SWGLimeSdrOutputSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_lime_sdr_output_settings_isSet = false;
|
2018-05-26 07:24:35 -04:00
|
|
|
perseus_settings = new SWGPerseusSettings();
|
|
|
|
m_perseus_settings_isSet = false;
|
2018-05-26 12:07:21 -04:00
|
|
|
pluto_sdr_input_settings = new SWGPlutoSdrInputSettings();
|
|
|
|
m_pluto_sdr_input_settings_isSet = false;
|
|
|
|
pluto_sdr_output_settings = new SWGPlutoSdrOutputSettings();
|
|
|
|
m_pluto_sdr_output_settings_isSet = false;
|
2017-12-28 19:40:34 -05:00
|
|
|
rtl_sdr_settings = new SWGRtlSdrSettings();
|
2018-02-12 12:20:27 -05:00
|
|
|
m_rtl_sdr_settings_isSet = false;
|
2018-05-27 18:40:33 -04:00
|
|
|
sdr_daemon_sink_settings = new SWGSDRdaemonSinkSettings();
|
|
|
|
m_sdr_daemon_sink_settings_isSet = false;
|
2018-05-27 05:07:24 -04:00
|
|
|
sdr_daemon_source_settings = new SWGSDRdaemonSourceSettings();
|
|
|
|
m_sdr_daemon_source_settings_isSet = false;
|
2018-05-27 05:57:23 -04:00
|
|
|
sdr_play_settings = new SWGSDRPlaySettings();
|
|
|
|
m_sdr_play_settings_isSet = false;
|
2018-05-27 16:25:01 -04:00
|
|
|
test_source_settings = new SWGTestSourceSettings();
|
|
|
|
m_test_source_settings_isSet = false;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::cleanup() {
|
2018-02-12 12:20:27 -05:00
|
|
|
if(device_hw_type != nullptr) {
|
2017-12-06 13:23:42 -05:00
|
|
|
delete device_hw_type;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
2018-05-25 13:28:57 -04:00
|
|
|
if(airspy_settings != nullptr) {
|
|
|
|
delete airspy_settings;
|
|
|
|
}
|
2018-03-22 00:10:13 -04:00
|
|
|
if(airspy_hf_settings != nullptr) {
|
|
|
|
delete airspy_hf_settings;
|
|
|
|
}
|
2018-09-18 23:54:07 -04:00
|
|
|
if(blade_rf1_input_settings != nullptr) {
|
|
|
|
delete blade_rf1_input_settings;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
2018-09-18 23:54:07 -04:00
|
|
|
if(blade_rf1_output_settings != nullptr) {
|
|
|
|
delete blade_rf1_output_settings;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
2018-05-26 04:27:28 -04:00
|
|
|
if(fcd_pro_settings != nullptr) {
|
|
|
|
delete fcd_pro_settings;
|
|
|
|
}
|
2018-05-26 04:54:31 -04:00
|
|
|
if(fcd_pro_plus_settings != nullptr) {
|
|
|
|
delete fcd_pro_plus_settings;
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(file_source_settings != nullptr) {
|
2017-12-06 13:23:42 -05:00
|
|
|
delete file_source_settings;
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(hack_rf_input_settings != nullptr) {
|
2017-12-28 19:40:34 -05:00
|
|
|
delete hack_rf_input_settings;
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(hack_rf_output_settings != nullptr) {
|
2017-12-28 19:40:34 -05:00
|
|
|
delete hack_rf_output_settings;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(lime_sdr_input_settings != nullptr) {
|
2017-12-06 13:23:42 -05:00
|
|
|
delete lime_sdr_input_settings;
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(lime_sdr_output_settings != nullptr) {
|
2017-12-06 13:23:42 -05:00
|
|
|
delete lime_sdr_output_settings;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
2018-05-26 07:24:35 -04:00
|
|
|
if(perseus_settings != nullptr) {
|
|
|
|
delete perseus_settings;
|
|
|
|
}
|
2018-05-26 12:07:21 -04:00
|
|
|
if(pluto_sdr_input_settings != nullptr) {
|
|
|
|
delete pluto_sdr_input_settings;
|
|
|
|
}
|
|
|
|
if(pluto_sdr_output_settings != nullptr) {
|
|
|
|
delete pluto_sdr_output_settings;
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(rtl_sdr_settings != nullptr) {
|
2017-12-28 19:40:34 -05:00
|
|
|
delete rtl_sdr_settings;
|
|
|
|
}
|
2018-05-27 18:40:33 -04:00
|
|
|
if(sdr_daemon_sink_settings != nullptr) {
|
|
|
|
delete sdr_daemon_sink_settings;
|
|
|
|
}
|
2018-05-27 05:07:24 -04:00
|
|
|
if(sdr_daemon_source_settings != nullptr) {
|
|
|
|
delete sdr_daemon_source_settings;
|
|
|
|
}
|
2018-05-27 05:57:23 -04:00
|
|
|
if(sdr_play_settings != nullptr) {
|
|
|
|
delete sdr_play_settings;
|
|
|
|
}
|
2018-05-27 16:25:01 -04:00
|
|
|
if(test_source_settings != nullptr) {
|
|
|
|
delete test_source_settings;
|
|
|
|
}
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGDeviceSettings*
|
2018-02-13 19:42:35 -05:00
|
|
|
SWGDeviceSettings::fromJson(QString &json) {
|
2017-12-03 18:48:14 -05:00
|
|
|
QByteArray array (json.toStdString().c_str());
|
|
|
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
|
|
|
QJsonObject jsonObject = doc.object();
|
|
|
|
this->fromJsonObject(jsonObject);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2018-02-13 19:42:35 -05:00
|
|
|
SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
|
2017-12-06 13:23:42 -05:00
|
|
|
::SWGSDRangel::setValue(&device_hw_type, pJson["deviceHwType"], "QString", "QString");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2018-05-25 13:28:57 -04:00
|
|
|
::SWGSDRangel::setValue(&airspy_settings, pJson["airspySettings"], "SWGAirspySettings", "SWGAirspySettings");
|
|
|
|
|
2018-03-22 00:10:13 -04:00
|
|
|
::SWGSDRangel::setValue(&airspy_hf_settings, pJson["airspyHFSettings"], "SWGAirspyHFSettings", "SWGAirspyHFSettings");
|
|
|
|
|
2018-09-18 23:54:07 -04:00
|
|
|
::SWGSDRangel::setValue(&blade_rf1_input_settings, pJson["bladeRF1InputSettings"], "SWGBladeRF1InputSettings", "SWGBladeRF1InputSettings");
|
2018-03-31 13:29:52 -04:00
|
|
|
|
2018-09-18 23:54:07 -04:00
|
|
|
::SWGSDRangel::setValue(&blade_rf1_output_settings, pJson["bladeRF1OutputSettings"], "SWGBladeRF1OutputSettings", "SWGBladeRF1OutputSettings");
|
2018-03-31 13:29:52 -04:00
|
|
|
|
2018-05-26 04:27:28 -04:00
|
|
|
::SWGSDRangel::setValue(&fcd_pro_settings, pJson["fcdProSettings"], "SWGFCDProSettings", "SWGFCDProSettings");
|
|
|
|
|
2018-05-26 04:54:31 -04:00
|
|
|
::SWGSDRangel::setValue(&fcd_pro_plus_settings, pJson["fcdProPlusSettings"], "SWGFCDProPlusSettings", "SWGFCDProPlusSettings");
|
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
::SWGSDRangel::setValue(&file_source_settings, pJson["fileSourceSettings"], "SWGFileSourceSettings", "SWGFileSourceSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2017-12-28 19:40:34 -05:00
|
|
|
::SWGSDRangel::setValue(&hack_rf_input_settings, pJson["hackRFInputSettings"], "SWGHackRFInputSettings", "SWGHackRFInputSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2017-12-28 19:40:34 -05:00
|
|
|
::SWGSDRangel::setValue(&hack_rf_output_settings, pJson["hackRFOutputSettings"], "SWGHackRFOutputSettings", "SWGHackRFOutputSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
::SWGSDRangel::setValue(&lime_sdr_input_settings, pJson["limeSdrInputSettings"], "SWGLimeSdrInputSettings", "SWGLimeSdrInputSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
::SWGSDRangel::setValue(&lime_sdr_output_settings, pJson["limeSdrOutputSettings"], "SWGLimeSdrOutputSettings", "SWGLimeSdrOutputSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2018-05-26 07:24:35 -04:00
|
|
|
::SWGSDRangel::setValue(&perseus_settings, pJson["perseusSettings"], "SWGPerseusSettings", "SWGPerseusSettings");
|
|
|
|
|
2018-05-26 12:07:21 -04:00
|
|
|
::SWGSDRangel::setValue(&pluto_sdr_input_settings, pJson["plutoSdrInputSettings"], "SWGPlutoSdrInputSettings", "SWGPlutoSdrInputSettings");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&pluto_sdr_output_settings, pJson["plutoSdrOutputSettings"], "SWGPlutoSdrOutputSettings", "SWGPlutoSdrOutputSettings");
|
|
|
|
|
2017-12-28 19:40:34 -05:00
|
|
|
::SWGSDRangel::setValue(&rtl_sdr_settings, pJson["rtlSdrSettings"], "SWGRtlSdrSettings", "SWGRtlSdrSettings");
|
2018-02-12 12:20:27 -05:00
|
|
|
|
2018-05-27 18:40:33 -04:00
|
|
|
::SWGSDRangel::setValue(&sdr_daemon_sink_settings, pJson["sdrDaemonSinkSettings"], "SWGSDRdaemonSinkSettings", "SWGSDRdaemonSinkSettings");
|
|
|
|
|
2018-05-27 05:07:24 -04:00
|
|
|
::SWGSDRangel::setValue(&sdr_daemon_source_settings, pJson["sdrDaemonSourceSettings"], "SWGSDRdaemonSourceSettings", "SWGSDRdaemonSourceSettings");
|
|
|
|
|
2018-05-27 05:57:23 -04:00
|
|
|
::SWGSDRangel::setValue(&sdr_play_settings, pJson["sdrPlaySettings"], "SWGSDRPlaySettings", "SWGSDRPlaySettings");
|
|
|
|
|
2018-05-27 16:25:01 -04:00
|
|
|
::SWGSDRangel::setValue(&test_source_settings, pJson["testSourceSettings"], "SWGTestSourceSettings", "SWGTestSourceSettings");
|
|
|
|
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
SWGDeviceSettings::asJson ()
|
|
|
|
{
|
2018-02-13 19:42:35 -05:00
|
|
|
QJsonObject* obj = this->asJsonObject();
|
|
|
|
|
|
|
|
QJsonDocument doc(*obj);
|
2017-12-03 18:48:14 -05:00
|
|
|
QByteArray bytes = doc.toJson();
|
2018-02-13 19:42:35 -05:00
|
|
|
delete obj;
|
2017-12-03 18:48:14 -05:00
|
|
|
return QString(bytes);
|
|
|
|
}
|
|
|
|
|
2018-02-13 19:42:35 -05:00
|
|
|
QJsonObject*
|
2017-12-03 18:48:14 -05:00
|
|
|
SWGDeviceSettings::asJsonObject() {
|
2018-02-13 19:42:35 -05:00
|
|
|
QJsonObject* obj = new QJsonObject();
|
2018-02-12 12:20:27 -05:00
|
|
|
if(device_hw_type != nullptr && *device_hw_type != QString("")){
|
|
|
|
toJsonValue(QString("deviceHwType"), device_hw_type, obj, QString("QString"));
|
|
|
|
}
|
|
|
|
if(m_tx_isSet){
|
2018-02-13 19:42:35 -05:00
|
|
|
obj->insert("tx", QJsonValue(tx));
|
2018-02-12 12:20:27 -05:00
|
|
|
}
|
2018-05-25 13:28:57 -04:00
|
|
|
if((airspy_settings != nullptr) && (airspy_settings->isSet())){
|
|
|
|
toJsonValue(QString("airspySettings"), airspy_settings, obj, QString("SWGAirspySettings"));
|
|
|
|
}
|
2018-03-22 00:10:13 -04:00
|
|
|
if((airspy_hf_settings != nullptr) && (airspy_hf_settings->isSet())){
|
|
|
|
toJsonValue(QString("airspyHFSettings"), airspy_hf_settings, obj, QString("SWGAirspyHFSettings"));
|
|
|
|
}
|
2018-09-18 23:54:07 -04:00
|
|
|
if((blade_rf1_input_settings != nullptr) && (blade_rf1_input_settings->isSet())){
|
|
|
|
toJsonValue(QString("bladeRF1InputSettings"), blade_rf1_input_settings, obj, QString("SWGBladeRF1InputSettings"));
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
2018-09-18 23:54:07 -04:00
|
|
|
if((blade_rf1_output_settings != nullptr) && (blade_rf1_output_settings->isSet())){
|
|
|
|
toJsonValue(QString("bladeRF1OutputSettings"), blade_rf1_output_settings, obj, QString("SWGBladeRF1OutputSettings"));
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
2018-05-26 04:27:28 -04:00
|
|
|
if((fcd_pro_settings != nullptr) && (fcd_pro_settings->isSet())){
|
|
|
|
toJsonValue(QString("fcdProSettings"), fcd_pro_settings, obj, QString("SWGFCDProSettings"));
|
|
|
|
}
|
2018-05-26 04:54:31 -04:00
|
|
|
if((fcd_pro_plus_settings != nullptr) && (fcd_pro_plus_settings->isSet())){
|
|
|
|
toJsonValue(QString("fcdProPlusSettings"), fcd_pro_plus_settings, obj, QString("SWGFCDProPlusSettings"));
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if((file_source_settings != nullptr) && (file_source_settings->isSet())){
|
|
|
|
toJsonValue(QString("fileSourceSettings"), file_source_settings, obj, QString("SWGFileSourceSettings"));
|
|
|
|
}
|
|
|
|
if((hack_rf_input_settings != nullptr) && (hack_rf_input_settings->isSet())){
|
|
|
|
toJsonValue(QString("hackRFInputSettings"), hack_rf_input_settings, obj, QString("SWGHackRFInputSettings"));
|
|
|
|
}
|
|
|
|
if((hack_rf_output_settings != nullptr) && (hack_rf_output_settings->isSet())){
|
|
|
|
toJsonValue(QString("hackRFOutputSettings"), hack_rf_output_settings, obj, QString("SWGHackRFOutputSettings"));
|
|
|
|
}
|
|
|
|
if((lime_sdr_input_settings != nullptr) && (lime_sdr_input_settings->isSet())){
|
|
|
|
toJsonValue(QString("limeSdrInputSettings"), lime_sdr_input_settings, obj, QString("SWGLimeSdrInputSettings"));
|
|
|
|
}
|
|
|
|
if((lime_sdr_output_settings != nullptr) && (lime_sdr_output_settings->isSet())){
|
|
|
|
toJsonValue(QString("limeSdrOutputSettings"), lime_sdr_output_settings, obj, QString("SWGLimeSdrOutputSettings"));
|
|
|
|
}
|
2018-05-26 07:24:35 -04:00
|
|
|
if((perseus_settings != nullptr) && (perseus_settings->isSet())){
|
|
|
|
toJsonValue(QString("perseusSettings"), perseus_settings, obj, QString("SWGPerseusSettings"));
|
|
|
|
}
|
2018-05-26 12:07:21 -04:00
|
|
|
if((pluto_sdr_input_settings != nullptr) && (pluto_sdr_input_settings->isSet())){
|
|
|
|
toJsonValue(QString("plutoSdrInputSettings"), pluto_sdr_input_settings, obj, QString("SWGPlutoSdrInputSettings"));
|
|
|
|
}
|
|
|
|
if((pluto_sdr_output_settings != nullptr) && (pluto_sdr_output_settings->isSet())){
|
|
|
|
toJsonValue(QString("plutoSdrOutputSettings"), pluto_sdr_output_settings, obj, QString("SWGPlutoSdrOutputSettings"));
|
|
|
|
}
|
2018-02-12 12:20:27 -05:00
|
|
|
if((rtl_sdr_settings != nullptr) && (rtl_sdr_settings->isSet())){
|
|
|
|
toJsonValue(QString("rtlSdrSettings"), rtl_sdr_settings, obj, QString("SWGRtlSdrSettings"));
|
|
|
|
}
|
2018-05-27 18:40:33 -04:00
|
|
|
if((sdr_daemon_sink_settings != nullptr) && (sdr_daemon_sink_settings->isSet())){
|
|
|
|
toJsonValue(QString("sdrDaemonSinkSettings"), sdr_daemon_sink_settings, obj, QString("SWGSDRdaemonSinkSettings"));
|
|
|
|
}
|
2018-05-27 05:07:24 -04:00
|
|
|
if((sdr_daemon_source_settings != nullptr) && (sdr_daemon_source_settings->isSet())){
|
|
|
|
toJsonValue(QString("sdrDaemonSourceSettings"), sdr_daemon_source_settings, obj, QString("SWGSDRdaemonSourceSettings"));
|
|
|
|
}
|
2018-05-27 05:57:23 -04:00
|
|
|
if((sdr_play_settings != nullptr) && (sdr_play_settings->isSet())){
|
|
|
|
toJsonValue(QString("sdrPlaySettings"), sdr_play_settings, obj, QString("SWGSDRPlaySettings"));
|
|
|
|
}
|
2018-05-27 16:25:01 -04:00
|
|
|
if((test_source_settings != nullptr) && (test_source_settings->isSet())){
|
|
|
|
toJsonValue(QString("testSourceSettings"), test_source_settings, obj, QString("SWGTestSourceSettings"));
|
|
|
|
}
|
2017-12-28 19:40:34 -05:00
|
|
|
|
2017-12-03 18:48:14 -05:00
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
2017-12-06 13:23:42 -05:00
|
|
|
SWGDeviceSettings::getDeviceHwType() {
|
|
|
|
return device_hw_type;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setDeviceHwType(QString* device_hw_type) {
|
|
|
|
this->device_hw_type = device_hw_type;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_device_hw_type_isSet = true;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGDeviceSettings::getTx() {
|
|
|
|
return tx;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setTx(qint32 tx) {
|
|
|
|
this->tx = tx;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_tx_isSet = true;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
|
|
|
|
2018-05-25 13:28:57 -04:00
|
|
|
SWGAirspySettings*
|
|
|
|
SWGDeviceSettings::getAirspySettings() {
|
|
|
|
return airspy_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setAirspySettings(SWGAirspySettings* airspy_settings) {
|
|
|
|
this->airspy_settings = airspy_settings;
|
|
|
|
this->m_airspy_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-03-22 00:10:13 -04:00
|
|
|
SWGAirspyHFSettings*
|
|
|
|
SWGDeviceSettings::getAirspyHfSettings() {
|
|
|
|
return airspy_hf_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setAirspyHfSettings(SWGAirspyHFSettings* airspy_hf_settings) {
|
|
|
|
this->airspy_hf_settings = airspy_hf_settings;
|
|
|
|
this->m_airspy_hf_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-09-18 23:54:07 -04:00
|
|
|
SWGBladeRF1InputSettings*
|
|
|
|
SWGDeviceSettings::getBladeRf1InputSettings() {
|
|
|
|
return blade_rf1_input_settings;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
|
|
|
void
|
2018-09-18 23:54:07 -04:00
|
|
|
SWGDeviceSettings::setBladeRf1InputSettings(SWGBladeRF1InputSettings* blade_rf1_input_settings) {
|
|
|
|
this->blade_rf1_input_settings = blade_rf1_input_settings;
|
|
|
|
this->m_blade_rf1_input_settings_isSet = true;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
|
|
|
|
2018-09-18 23:54:07 -04:00
|
|
|
SWGBladeRF1OutputSettings*
|
|
|
|
SWGDeviceSettings::getBladeRf1OutputSettings() {
|
|
|
|
return blade_rf1_output_settings;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
|
|
|
void
|
2018-09-18 23:54:07 -04:00
|
|
|
SWGDeviceSettings::setBladeRf1OutputSettings(SWGBladeRF1OutputSettings* blade_rf1_output_settings) {
|
|
|
|
this->blade_rf1_output_settings = blade_rf1_output_settings;
|
|
|
|
this->m_blade_rf1_output_settings_isSet = true;
|
2018-03-31 13:29:52 -04:00
|
|
|
}
|
|
|
|
|
2018-05-26 04:27:28 -04:00
|
|
|
SWGFCDProSettings*
|
|
|
|
SWGDeviceSettings::getFcdProSettings() {
|
|
|
|
return fcd_pro_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setFcdProSettings(SWGFCDProSettings* fcd_pro_settings) {
|
|
|
|
this->fcd_pro_settings = fcd_pro_settings;
|
|
|
|
this->m_fcd_pro_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-26 04:54:31 -04:00
|
|
|
SWGFCDProPlusSettings*
|
|
|
|
SWGDeviceSettings::getFcdProPlusSettings() {
|
|
|
|
return fcd_pro_plus_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setFcdProPlusSettings(SWGFCDProPlusSettings* fcd_pro_plus_settings) {
|
|
|
|
this->fcd_pro_plus_settings = fcd_pro_plus_settings;
|
|
|
|
this->m_fcd_pro_plus_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
SWGFileSourceSettings*
|
|
|
|
SWGDeviceSettings::getFileSourceSettings() {
|
|
|
|
return file_source_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setFileSourceSettings(SWGFileSourceSettings* file_source_settings) {
|
|
|
|
this->file_source_settings = file_source_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_file_source_settings_isSet = true;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
|
|
|
|
2017-12-28 19:40:34 -05:00
|
|
|
SWGHackRFInputSettings*
|
|
|
|
SWGDeviceSettings::getHackRfInputSettings() {
|
|
|
|
return hack_rf_input_settings;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
|
|
|
void
|
2017-12-28 19:40:34 -05:00
|
|
|
SWGDeviceSettings::setHackRfInputSettings(SWGHackRFInputSettings* hack_rf_input_settings) {
|
|
|
|
this->hack_rf_input_settings = hack_rf_input_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_hack_rf_input_settings_isSet = true;
|
2017-12-28 19:40:34 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGHackRFOutputSettings*
|
|
|
|
SWGDeviceSettings::getHackRfOutputSettings() {
|
|
|
|
return hack_rf_output_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setHackRfOutputSettings(SWGHackRFOutputSettings* hack_rf_output_settings) {
|
|
|
|
this->hack_rf_output_settings = hack_rf_output_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_hack_rf_output_settings_isSet = true;
|
2017-12-06 13:23:42 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGLimeSdrInputSettings*
|
|
|
|
SWGDeviceSettings::getLimeSdrInputSettings() {
|
|
|
|
return lime_sdr_input_settings;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
void
|
2017-12-06 13:23:42 -05:00
|
|
|
SWGDeviceSettings::setLimeSdrInputSettings(SWGLimeSdrInputSettings* lime_sdr_input_settings) {
|
|
|
|
this->lime_sdr_input_settings = lime_sdr_input_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_lime_sdr_input_settings_isSet = true;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
2017-12-06 13:23:42 -05:00
|
|
|
SWGLimeSdrOutputSettings*
|
|
|
|
SWGDeviceSettings::getLimeSdrOutputSettings() {
|
|
|
|
return lime_sdr_output_settings;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
void
|
2017-12-06 13:23:42 -05:00
|
|
|
SWGDeviceSettings::setLimeSdrOutputSettings(SWGLimeSdrOutputSettings* lime_sdr_output_settings) {
|
|
|
|
this->lime_sdr_output_settings = lime_sdr_output_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_lime_sdr_output_settings_isSet = true;
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|
2018-05-26 07:24:35 -04:00
|
|
|
SWGPerseusSettings*
|
|
|
|
SWGDeviceSettings::getPerseusSettings() {
|
|
|
|
return perseus_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setPerseusSettings(SWGPerseusSettings* perseus_settings) {
|
|
|
|
this->perseus_settings = perseus_settings;
|
|
|
|
this->m_perseus_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-26 12:07:21 -04:00
|
|
|
SWGPlutoSdrInputSettings*
|
|
|
|
SWGDeviceSettings::getPlutoSdrInputSettings() {
|
|
|
|
return pluto_sdr_input_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setPlutoSdrInputSettings(SWGPlutoSdrInputSettings* pluto_sdr_input_settings) {
|
|
|
|
this->pluto_sdr_input_settings = pluto_sdr_input_settings;
|
|
|
|
this->m_pluto_sdr_input_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
SWGPlutoSdrOutputSettings*
|
|
|
|
SWGDeviceSettings::getPlutoSdrOutputSettings() {
|
|
|
|
return pluto_sdr_output_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setPlutoSdrOutputSettings(SWGPlutoSdrOutputSettings* pluto_sdr_output_settings) {
|
|
|
|
this->pluto_sdr_output_settings = pluto_sdr_output_settings;
|
|
|
|
this->m_pluto_sdr_output_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2017-12-28 19:40:34 -05:00
|
|
|
SWGRtlSdrSettings*
|
|
|
|
SWGDeviceSettings::getRtlSdrSettings() {
|
|
|
|
return rtl_sdr_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setRtlSdrSettings(SWGRtlSdrSettings* rtl_sdr_settings) {
|
|
|
|
this->rtl_sdr_settings = rtl_sdr_settings;
|
2018-02-12 12:20:27 -05:00
|
|
|
this->m_rtl_sdr_settings_isSet = true;
|
2017-12-28 19:40:34 -05:00
|
|
|
}
|
|
|
|
|
2018-05-27 18:40:33 -04:00
|
|
|
SWGSDRdaemonSinkSettings*
|
|
|
|
SWGDeviceSettings::getSdrDaemonSinkSettings() {
|
|
|
|
return sdr_daemon_sink_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setSdrDaemonSinkSettings(SWGSDRdaemonSinkSettings* sdr_daemon_sink_settings) {
|
|
|
|
this->sdr_daemon_sink_settings = sdr_daemon_sink_settings;
|
|
|
|
this->m_sdr_daemon_sink_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-27 05:07:24 -04:00
|
|
|
SWGSDRdaemonSourceSettings*
|
|
|
|
SWGDeviceSettings::getSdrDaemonSourceSettings() {
|
|
|
|
return sdr_daemon_source_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setSdrDaemonSourceSettings(SWGSDRdaemonSourceSettings* sdr_daemon_source_settings) {
|
|
|
|
this->sdr_daemon_source_settings = sdr_daemon_source_settings;
|
|
|
|
this->m_sdr_daemon_source_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-27 05:57:23 -04:00
|
|
|
SWGSDRPlaySettings*
|
|
|
|
SWGDeviceSettings::getSdrPlaySettings() {
|
|
|
|
return sdr_play_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setSdrPlaySettings(SWGSDRPlaySettings* sdr_play_settings) {
|
|
|
|
this->sdr_play_settings = sdr_play_settings;
|
|
|
|
this->m_sdr_play_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-27 16:25:01 -04:00
|
|
|
SWGTestSourceSettings*
|
|
|
|
SWGDeviceSettings::getTestSourceSettings() {
|
|
|
|
return test_source_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGDeviceSettings::setTestSourceSettings(SWGTestSourceSettings* test_source_settings) {
|
|
|
|
this->test_source_settings = test_source_settings;
|
|
|
|
this->m_test_source_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2017-12-03 18:48:14 -05:00
|
|
|
|
2018-02-12 12:20:27 -05:00
|
|
|
bool
|
|
|
|
SWGDeviceSettings::isSet(){
|
|
|
|
bool isObjectUpdated = false;
|
|
|
|
do{
|
|
|
|
if(device_hw_type != nullptr && *device_hw_type != QString("")){ isObjectUpdated = true; break;}
|
|
|
|
if(m_tx_isSet){ isObjectUpdated = true; break;}
|
2018-05-25 13:28:57 -04:00
|
|
|
if(airspy_settings != nullptr && airspy_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-03-22 00:10:13 -04:00
|
|
|
if(airspy_hf_settings != nullptr && airspy_hf_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-09-18 23:54:07 -04:00
|
|
|
if(blade_rf1_input_settings != nullptr && blade_rf1_input_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(blade_rf1_output_settings != nullptr && blade_rf1_output_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-26 04:27:28 -04:00
|
|
|
if(fcd_pro_settings != nullptr && fcd_pro_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-26 04:54:31 -04:00
|
|
|
if(fcd_pro_plus_settings != nullptr && fcd_pro_plus_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(file_source_settings != nullptr && file_source_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(hack_rf_input_settings != nullptr && hack_rf_input_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(hack_rf_output_settings != nullptr && hack_rf_output_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(lime_sdr_input_settings != nullptr && lime_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(lime_sdr_output_settings != nullptr && lime_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-26 07:24:35 -04:00
|
|
|
if(perseus_settings != nullptr && perseus_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-26 12:07:21 -04:00
|
|
|
if(pluto_sdr_input_settings != nullptr && pluto_sdr_input_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(pluto_sdr_output_settings != nullptr && pluto_sdr_output_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-02-12 12:20:27 -05:00
|
|
|
if(rtl_sdr_settings != nullptr && rtl_sdr_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-27 18:40:33 -04:00
|
|
|
if(sdr_daemon_sink_settings != nullptr && sdr_daemon_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-27 05:07:24 -04:00
|
|
|
if(sdr_daemon_source_settings != nullptr && sdr_daemon_source_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-27 05:57:23 -04:00
|
|
|
if(sdr_play_settings != nullptr && sdr_play_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-27 16:25:01 -04:00
|
|
|
if(test_source_settings != nullptr && test_source_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-02-12 12:20:27 -05:00
|
|
|
}while(false);
|
|
|
|
return isObjectUpdated;
|
|
|
|
}
|
2017-12-03 18:48:14 -05:00
|
|
|
}
|
|
|
|
|