From 4a5369c1b4e0cde3a96ea7b35ca7163d67d4a5e3 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 26 May 2018 10:27:28 +0200 Subject: [PATCH] FCD Pro input: implemeted WEB API --- fcdlib/fcdtraits.cpp | 4 +- plugins/samplesource/airspy/airspyplugin.cpp | 2 +- .../samplesource/airspyhf/airspyhfplugin.cpp | 2 +- plugins/samplesource/fcdpro/fcdprogui.cpp | 6 +- plugins/samplesource/fcdpro/fcdproinput.cpp | 147 ++++- plugins/samplesource/fcdpro/fcdproinput.h | 20 +- sdrbase/resources/webapi/doc/html2/index.html | 81 ++- .../webapi/doc/swagger/include/FCDPro.yaml | 54 ++ .../resources/webapi/doc/swagger/swagger.yaml | 2 + .../sdrangel/api/swagger/include/FCDPro.yaml | 52 ++ swagger/sdrangel/api/swagger/swagger.yaml | 2 + swagger/sdrangel/code/html2/index.html | 81 ++- .../code/qt5/client/SWGDeviceSettings.cpp | 23 + .../code/qt5/client/SWGDeviceSettings.h | 7 + .../code/qt5/client/SWGFCDProSettings.cpp | 570 ++++++++++++++++++ .../code/qt5/client/SWGFCDProSettings.h | 191 ++++++ .../code/qt5/client/SWGModelFactory.h | 4 + 17 files changed, 1228 insertions(+), 20 deletions(-) create mode 100644 sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml create mode 100644 swagger/sdrangel/api/swagger/include/FCDPro.yaml create mode 100644 swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h diff --git a/fcdlib/fcdtraits.cpp b/fcdlib/fcdtraits.cpp index 9c5ea4af1..41f8b66a6 100644 --- a/fcdlib/fcdtraits.cpp +++ b/fcdlib/fcdtraits.cpp @@ -22,8 +22,8 @@ const char *fcd_traits::displayedName = "FunCube Dongle Pro+"; const char *fcd_traits::pluginDisplayedName = "FunCube Pro Input"; const char *fcd_traits::pluginDisplayedName = "FunCube Pro+ Input"; -const char *fcd_traits::pluginVersion = "3.14.6"; -const char *fcd_traits::pluginVersion = "3.14.6"; +const char *fcd_traits::pluginVersion = "4.0.0"; +const char *fcd_traits::pluginVersion = "4.0.0"; const int64_t fcd_traits::loLowLimitFreq = 64000000L; const int64_t fcd_traits::loLowLimitFreq = 150000L; diff --git a/plugins/samplesource/airspy/airspyplugin.cpp b/plugins/samplesource/airspy/airspyplugin.cpp index 439cf73c8..91eadbb08 100644 --- a/plugins/samplesource/airspy/airspyplugin.cpp +++ b/plugins/samplesource/airspy/airspyplugin.cpp @@ -29,7 +29,7 @@ const int AirspyPlugin::m_maxDevices = 32; const PluginDescriptor AirspyPlugin::m_pluginDescriptor = { QString("Airspy Input"), - QString("3.14.6"), + QString("4.0.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/airspyhf/airspyhfplugin.cpp b/plugins/samplesource/airspyhf/airspyhfplugin.cpp index 8612607ac..b593150df 100644 --- a/plugins/samplesource/airspyhf/airspyhfplugin.cpp +++ b/plugins/samplesource/airspyhf/airspyhfplugin.cpp @@ -30,7 +30,7 @@ const PluginDescriptor AirspyHFPlugin::m_pluginDescriptor = { QString("AirspyHF Input"), - QString("3.14.6"), + QString("4.0.0"), QString("(c) Edouard Griffiths, F4EXB"), QString("https://github.com/f4exb/sdrangel"), true, diff --git a/plugins/samplesource/fcdpro/fcdprogui.cpp b/plugins/samplesource/fcdpro/fcdprogui.cpp index d2bd2765e..bc3dafebb 100644 --- a/plugins/samplesource/fcdpro/fcdprogui.cpp +++ b/plugins/samplesource/fcdpro/fcdprogui.cpp @@ -211,9 +211,9 @@ bool FCDProGui::deserialize(const QByteArray& data) bool FCDProGui::handleMessage(const Message& message __attribute__((unused))) { - if (FCDProInput::MsgConfigureFCD::match(message)) + if (FCDProInput::MsgConfigureFCDPro::match(message)) { - const FCDProInput::MsgConfigureFCD& cfg = (FCDProInput::MsgConfigureFCD&) message; + const FCDProInput::MsgConfigureFCDPro& cfg = (FCDProInput::MsgConfigureFCDPro&) message; m_settings = cfg.getSettings(); blockApplySettings(true); displaySettings(); @@ -517,7 +517,7 @@ void FCDProGui::updateStatus() void FCDProGui::updateHardware() { - FCDProInput::MsgConfigureFCD* message = FCDProInput::MsgConfigureFCD::create(m_settings, m_forceSettings); + FCDProInput::MsgConfigureFCDPro* message = FCDProInput::MsgConfigureFCDPro::create(m_settings, m_forceSettings); m_sampleSource->getInputMessageQueue()->push(message); m_forceSettings = false; m_updateTimer.stop(); diff --git a/plugins/samplesource/fcdpro/fcdproinput.cpp b/plugins/samplesource/fcdpro/fcdproinput.cpp index d84fd40bd..39f200078 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.cpp +++ b/plugins/samplesource/fcdpro/fcdproinput.cpp @@ -36,7 +36,7 @@ #include "fcdtraits.h" #include "fcdproconst.h" -MESSAGE_CLASS_DEFINITION(FCDProInput::MsgConfigureFCD, Message) +MESSAGE_CLASS_DEFINITION(FCDProInput::MsgConfigureFCDPro, Message) MESSAGE_CLASS_DEFINITION(FCDProInput::MsgStartStop, Message) MESSAGE_CLASS_DEFINITION(FCDProInput::MsgFileRecord, Message) @@ -170,12 +170,12 @@ bool FCDProInput::deserialize(const QByteArray& data) success = false; } - MsgConfigureFCD* message = MsgConfigureFCD::create(m_settings, true); + MsgConfigureFCDPro* message = MsgConfigureFCDPro::create(m_settings, true); m_inputMessageQueue.push(message); if (m_guiMessageQueue) { - MsgConfigureFCD* messageToGUI = MsgConfigureFCD::create(m_settings, true); + MsgConfigureFCDPro* messageToGUI = MsgConfigureFCDPro::create(m_settings, true); m_guiMessageQueue->push(messageToGUI); } @@ -202,22 +202,22 @@ void FCDProInput::setCenterFrequency(qint64 centerFrequency) FCDProSettings settings = m_settings; settings.m_centerFrequency = centerFrequency; - MsgConfigureFCD* message = MsgConfigureFCD::create(settings, false); + MsgConfigureFCDPro* message = MsgConfigureFCDPro::create(settings, false); m_inputMessageQueue.push(message); if (m_guiMessageQueue) { - MsgConfigureFCD* messageToGUI = MsgConfigureFCD::create(settings, false); + MsgConfigureFCDPro* messageToGUI = MsgConfigureFCDPro::create(settings, false); m_guiMessageQueue->push(messageToGUI); } } bool FCDProInput::handleMessage(const Message& message) { - if(MsgConfigureFCD::match(message)) + if(MsgConfigureFCDPro::match(message)) { qDebug() << "FCDProInput::handleMessage: MsgConfigureFCD"; - MsgConfigureFCD& conf = (MsgConfigureFCD&) message; + MsgConfigureFCDPro& conf = (MsgConfigureFCDPro&) message; applySettings(conf.getSettings(), conf.getForce()); return true; } @@ -773,3 +773,136 @@ int FCDProInput::webapiRun( return 200; } + +int FCDProInput::webapiSettingsGet( + SWGSDRangel::SWGDeviceSettings& response, + QString& errorMessage __attribute__((unused))) +{ + response.setFcdProSettings(new SWGSDRangel::SWGFCDProSettings()); + response.getFcdProSettings()->init(); + webapiFormatDeviceSettings(response, m_settings); + return 200; +} + +int FCDProInput::webapiSettingsPutPatch( + bool force, + const QStringList& deviceSettingsKeys, + SWGSDRangel::SWGDeviceSettings& response, // query + response + QString& errorMessage __attribute__((unused))) +{ + FCDProSettings settings = m_settings; + + if (deviceSettingsKeys.contains("centerFrequency")) { + settings.m_centerFrequency = response.getFcdProSettings()->getCenterFrequency(); + } + if (deviceSettingsKeys.contains("LOppmTenths")) { + settings.m_LOppmTenths = response.getFcdProSettings()->getLOppmTenths(); + } + if (deviceSettingsKeys.contains("lnaGainIndex")) { + settings.m_lnaGainIndex = response.getFcdProSettings()->getLnaGainIndex(); + } + if (deviceSettingsKeys.contains("rfFilterIndex")) { + settings.m_rfFilterIndex = response.getFcdProSettings()->getRfFilterIndex(); + } + if (deviceSettingsKeys.contains("lnaEnhanceIndex")) { + settings.m_lnaEnhanceIndex = response.getFcdProSettings()->getLnaEnhanceIndex(); + } + if (deviceSettingsKeys.contains("bandIndex")) { + settings.m_bandIndex = response.getFcdProSettings()->getBandIndex(); + } + if (deviceSettingsKeys.contains("mixerGainIndex")) { + settings.m_mixerGainIndex = response.getFcdProSettings()->getMixerGainIndex(); + } + if (deviceSettingsKeys.contains("mixerFilterIndex")) { + settings.m_mixerFilterIndex = response.getFcdProSettings()->getMixerFilterIndex(); + } + if (deviceSettingsKeys.contains("biasCurrentIndex")) { + settings.m_biasCurrentIndex = response.getFcdProSettings()->getBiasCurrentIndex(); + } + if (deviceSettingsKeys.contains("modeIndex")) { + settings.m_modeIndex = response.getFcdProSettings()->getModeIndex(); + } + if (deviceSettingsKeys.contains("gain1Index")) { + settings.m_gain1Index = response.getFcdProSettings()->getGain1Index(); + } + if (deviceSettingsKeys.contains("gain2Index")) { + settings.m_gain2Index = response.getFcdProSettings()->getGain2Index(); + } + if (deviceSettingsKeys.contains("gain3Index")) { + settings.m_gain3Index = response.getFcdProSettings()->getGain3Index(); + } + if (deviceSettingsKeys.contains("gain4Index")) { + settings.m_gain4Index = response.getFcdProSettings()->getGain4Index(); + } + if (deviceSettingsKeys.contains("gain5Index")) { + settings.m_gain5Index = response.getFcdProSettings()->getGain5Index(); + } + if (deviceSettingsKeys.contains("gain6Index")) { + settings.m_gain6Index = response.getFcdProSettings()->getGain6Index(); + } + if (deviceSettingsKeys.contains("rcFilterIndex")) { + settings.m_rcFilterIndex = response.getFcdProSettings()->getRcFilterIndex(); + } + if (deviceSettingsKeys.contains("ifFilterIndex")) { + settings.m_ifFilterIndex = response.getFcdProSettings()->getIfFilterIndex(); + } + if (deviceSettingsKeys.contains("dcBlock")) { + settings.m_dcBlock = response.getFcdProSettings()->getDcBlock() != 0; + } + if (deviceSettingsKeys.contains("iqCorrection")) { + settings.m_iqCorrection = response.getFcdProSettings()->getIqCorrection() != 0; + } + if (deviceSettingsKeys.contains("transverterDeltaFrequency")) { + settings.m_transverterDeltaFrequency = response.getFcdProSettings()->getTransverterDeltaFrequency(); + } + if (deviceSettingsKeys.contains("transverterMode")) { + settings.m_transverterMode = response.getFcdProSettings()->getTransverterMode() != 0; + } + if (deviceSettingsKeys.contains("fileRecordName")) { + settings.m_fileRecordName = *response.getFcdProSettings()->getFileRecordName(); + } + + MsgConfigureFCDPro *msg = MsgConfigureFCDPro::create(settings, force); + m_inputMessageQueue.push(msg); + + if (m_guiMessageQueue) // forward to GUI if any + { + MsgConfigureFCDPro *msgToGUI = MsgConfigureFCDPro::create(settings, force); + m_guiMessageQueue->push(msgToGUI); + } + + webapiFormatDeviceSettings(response, settings); + return 200; +} + +void FCDProInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const FCDProSettings& settings) +{ + response.getFcdProSettings()->setCenterFrequency(settings.m_centerFrequency); + response.getFcdProSettings()->setLOppmTenths(settings.m_LOppmTenths); + response.getFcdProSettings()->setLnaGainIndex(settings.m_lnaGainIndex); + response.getFcdProSettings()->setRfFilterIndex(settings.m_lnaGainIndex); + response.getFcdProSettings()->setLnaEnhanceIndex(settings.m_lnaEnhanceIndex); + response.getFcdProSettings()->setBandIndex(settings.m_bandIndex); + response.getFcdProSettings()->setMixerGainIndex(settings.m_mixerGainIndex); + response.getFcdProSettings()->setMixerFilterIndex(settings.m_mixerFilterIndex); + response.getFcdProSettings()->setBiasCurrentIndex(settings.m_biasCurrentIndex); + response.getFcdProSettings()->setModeIndex(settings.m_modeIndex); + response.getFcdProSettings()->setGain1Index(settings.m_gain1Index); + response.getFcdProSettings()->setGain2Index(settings.m_gain2Index); + response.getFcdProSettings()->setGain3Index(settings.m_gain3Index); + response.getFcdProSettings()->setGain4Index(settings.m_gain4Index); + response.getFcdProSettings()->setGain5Index(settings.m_gain5Index); + response.getFcdProSettings()->setGain6Index(settings.m_gain6Index); + response.getFcdProSettings()->setRcFilterIndex(settings.m_rcFilterIndex); + response.getFcdProSettings()->setIfFilterIndex(settings.m_ifFilterIndex); + response.getFcdProSettings()->setDcBlock(settings.m_dcBlock ? 1 : 0); + response.getFcdProSettings()->setIqCorrection(settings.m_iqCorrection ? 1 : 0); + response.getFcdProSettings()->setTransverterDeltaFrequency(settings.m_transverterDeltaFrequency); + response.getFcdProSettings()->setTransverterMode(settings.m_transverterMode ? 1 : 0); + + if (response.getFcdProSettings()->getFileRecordName()) { + *response.getFcdProSettings()->getFileRecordName() = settings.m_fileRecordName; + } else { + response.getFcdProSettings()->setFileRecordName(new QString(settings.m_fileRecordName)); + } +} diff --git a/plugins/samplesource/fcdpro/fcdproinput.h b/plugins/samplesource/fcdpro/fcdproinput.h index f7ed3792b..dfdbabe0d 100644 --- a/plugins/samplesource/fcdpro/fcdproinput.h +++ b/plugins/samplesource/fcdpro/fcdproinput.h @@ -37,23 +37,23 @@ class FileRecord; class FCDProInput : public DeviceSampleSource { public: - class MsgConfigureFCD : public Message { + class MsgConfigureFCDPro : public Message { MESSAGE_CLASS_DECLARATION public: const FCDProSettings& getSettings() const { return m_settings; } bool getForce() const { return m_force; } - static MsgConfigureFCD* create(const FCDProSettings& settings, bool force) + static MsgConfigureFCDPro* create(const FCDProSettings& settings, bool force) { - return new MsgConfigureFCD(settings, force); + return new MsgConfigureFCDPro(settings, force); } private: FCDProSettings m_settings; bool m_force; - MsgConfigureFCD(const FCDProSettings& settings, bool force) : + MsgConfigureFCDPro(const FCDProSettings& settings, bool force) : Message(), m_settings(settings), m_force(force) @@ -117,6 +117,16 @@ public: virtual bool handleMessage(const Message& message); + virtual int webapiSettingsGet( + SWGSDRangel::SWGDeviceSettings& response, + QString& errorMessage); + + virtual int webapiSettingsPutPatch( + bool force, + const QStringList& deviceSettingsKeys, + SWGSDRangel::SWGDeviceSettings& response, // query + response + QString& errorMessage); + virtual int webapiRunGet( SWGSDRangel::SWGDeviceState& response, QString& errorMessage); @@ -151,6 +161,8 @@ private: void applySettings(const FCDProSettings& settings, bool force); void set_lo_ppm(); + void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const FCDProSettings& settings); + DeviceSourceAPI *m_deviceAPI; hid_device *m_dev; QMutex m_mutex; diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 5a04f8ddb..eae18279d 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1779,6 +1779,9 @@ margin-bottom: 20px; "bladeRFOutputSettings" : { "$ref" : "#/definitions/BladeRFOutputSettings" }, + "fcdProSettings" : { + "$ref" : "#/definitions/FCDProSettings" + }, "fileSourceSettings" : { "$ref" : "#/definitions/FileSourceSettings" }, @@ -1818,6 +1821,82 @@ margin-bottom: 20px; "example" : "KO" } } +}; + defs.FCDProSettings = { + "properties" : { + "centerFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "LOppmTenths" : { + "type" : "integer" + }, + "lnaGainIndex" : { + "type" : "integer" + }, + "rfFilterIndex" : { + "type" : "integer" + }, + "lnaEnhanceIndex" : { + "type" : "integer" + }, + "bandIndex" : { + "type" : "integer" + }, + "mixerGainIndex" : { + "type" : "integer" + }, + "mixerFilterIndex" : { + "type" : "integer" + }, + "biasCurrentIndex" : { + "type" : "integer" + }, + "modeIndex" : { + "type" : "integer" + }, + "gain1Index" : { + "type" : "integer" + }, + "rcFilterIndex" : { + "type" : "integer" + }, + "gain2Index" : { + "type" : "integer" + }, + "gain3Index" : { + "type" : "integer" + }, + "gain4Index" : { + "type" : "integer" + }, + "ifFilterIndex" : { + "type" : "integer" + }, + "gain5Index" : { + "type" : "integer" + }, + "gain6Index" : { + "type" : "integer" + }, + "dcBlock" : { + "type" : "integer" + }, + "iqCorrection" : { + "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "fileRecordName" : { + "type" : "string" + } + }, + "description" : "FCDPro" }; defs.FileSourceSettings = { "properties" : { @@ -21695,7 +21774,7 @@ except ApiException as e:
- Generated 2018-05-26T02:22:55.108+02:00 + Generated 2018-05-26T10:03:22.430+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml b/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml new file mode 100644 index 000000000..8519d7d87 --- /dev/null +++ b/sdrbase/resources/webapi/doc/swagger/include/FCDPro.yaml @@ -0,0 +1,54 @@ +FCDProSettings: + description: FCDPro + properties: + centerFrequency: + type: integer + format: int64 + LOppmTenths: + type: integer + lnaGainIndex: + type: integer + rfFilterIndex: + type: integer + lnaEnhanceIndex: + type: integer + bandIndex: + type: integer + mixerGainIndex: + type: integer + mixerFilterIndex: + type: integer + biasCurrentIndex: + type: integer + modeIndex: + type: integer + gain1Index: + type: integer + rcFilterIndex: + type: integer + rcFilterIndex: + type: integer + gain2Index: + type: integer + gain3Index: + type: integer + gain4Index: + type: integer + ifFilterIndex: + type: integer + gain5Index: + type: integer + gain6Index: + type: integer + dcBlock: + type: integer + iqCorrection: + type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 + fileRecordName: + type: string + diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index 62f07987c..852e73dac 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -1753,6 +1753,8 @@ definitions: $ref: "/doc/swagger/include/BladeRF.yaml#/BladeRFInputSettings" bladeRFOutputSettings: $ref: "/doc/swagger/include/BladeRF.yaml#/BladeRFOutputSettings" + fcdProSettings: + $ref: "/doc/swagger/include/FCDPro.yaml#/FCDProSettings" fileSourceSettings: $ref: "/doc/swagger/include/FileSource.yaml#/FileSourceSettings" hackRFInputSettings: diff --git a/swagger/sdrangel/api/swagger/include/FCDPro.yaml b/swagger/sdrangel/api/swagger/include/FCDPro.yaml new file mode 100644 index 000000000..5eb4072b3 --- /dev/null +++ b/swagger/sdrangel/api/swagger/include/FCDPro.yaml @@ -0,0 +1,52 @@ +FCDProSettings: + description: FCDPro + properties: + centerFrequency: + type: integer + format: int64 + LOppmTenths: + type: integer + lnaGainIndex: + type: integer + rfFilterIndex: + type: integer + lnaEnhanceIndex: + type: integer + bandIndex: + type: integer + mixerGainIndex: + type: integer + mixerFilterIndex: + type: integer + biasCurrentIndex: + type: integer + modeIndex: + type: integer + gain1Index: + type: integer + rcFilterIndex: + type: integer + gain2Index: + type: integer + gain3Index: + type: integer + gain4Index: + type: integer + ifFilterIndex: + type: integer + gain5Index: + type: integer + gain6Index: + type: integer + dcBlock: + type: integer + iqCorrection: + type: integer + transverterMode: + type: integer + transverterDeltaFrequency: + type: integer + format: int64 + fileRecordName: + type: string + diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 1c6fb1704..b539061ed 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -1753,6 +1753,8 @@ definitions: $ref: "http://localhost:8081/api/swagger/include/BladeRF.yaml#/BladeRFInputSettings" bladeRFOutputSettings: $ref: "http://localhost:8081/api/swagger/include/BladeRF.yaml#/BladeRFOutputSettings" + fcdProSettings: + $ref: "http://localhost:8081/api/swagger/include/FCDPro.yaml#/FCDProSettings" fileSourceSettings: $ref: "http://localhost:8081/api/swagger/include/FileSource.yaml#/FileSourceSettings" hackRFInputSettings: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 5a04f8ddb..eae18279d 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1779,6 +1779,9 @@ margin-bottom: 20px; "bladeRFOutputSettings" : { "$ref" : "#/definitions/BladeRFOutputSettings" }, + "fcdProSettings" : { + "$ref" : "#/definitions/FCDProSettings" + }, "fileSourceSettings" : { "$ref" : "#/definitions/FileSourceSettings" }, @@ -1818,6 +1821,82 @@ margin-bottom: 20px; "example" : "KO" } } +}; + defs.FCDProSettings = { + "properties" : { + "centerFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "LOppmTenths" : { + "type" : "integer" + }, + "lnaGainIndex" : { + "type" : "integer" + }, + "rfFilterIndex" : { + "type" : "integer" + }, + "lnaEnhanceIndex" : { + "type" : "integer" + }, + "bandIndex" : { + "type" : "integer" + }, + "mixerGainIndex" : { + "type" : "integer" + }, + "mixerFilterIndex" : { + "type" : "integer" + }, + "biasCurrentIndex" : { + "type" : "integer" + }, + "modeIndex" : { + "type" : "integer" + }, + "gain1Index" : { + "type" : "integer" + }, + "rcFilterIndex" : { + "type" : "integer" + }, + "gain2Index" : { + "type" : "integer" + }, + "gain3Index" : { + "type" : "integer" + }, + "gain4Index" : { + "type" : "integer" + }, + "ifFilterIndex" : { + "type" : "integer" + }, + "gain5Index" : { + "type" : "integer" + }, + "gain6Index" : { + "type" : "integer" + }, + "dcBlock" : { + "type" : "integer" + }, + "iqCorrection" : { + "type" : "integer" + }, + "transverterMode" : { + "type" : "integer" + }, + "transverterDeltaFrequency" : { + "type" : "integer", + "format" : "int64" + }, + "fileRecordName" : { + "type" : "string" + } + }, + "description" : "FCDPro" }; defs.FileSourceSettings = { "properties" : { @@ -21695,7 +21774,7 @@ except ApiException as e:
- Generated 2018-05-26T02:22:55.108+02:00 + Generated 2018-05-26T10:03:22.430+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp index 50b53fc35..81b72b57b 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.cpp @@ -40,6 +40,8 @@ SWGDeviceSettings::SWGDeviceSettings() { m_blade_rf_input_settings_isSet = false; blade_rf_output_settings = nullptr; m_blade_rf_output_settings_isSet = false; + fcd_pro_settings = nullptr; + m_fcd_pro_settings_isSet = false; file_source_settings = nullptr; m_file_source_settings_isSet = false; hack_rf_input_settings = nullptr; @@ -72,6 +74,8 @@ SWGDeviceSettings::init() { m_blade_rf_input_settings_isSet = false; blade_rf_output_settings = new SWGBladeRFOutputSettings(); m_blade_rf_output_settings_isSet = false; + fcd_pro_settings = new SWGFCDProSettings(); + m_fcd_pro_settings_isSet = false; file_source_settings = new SWGFileSourceSettings(); m_file_source_settings_isSet = false; hack_rf_input_settings = new SWGHackRFInputSettings(); @@ -104,6 +108,9 @@ SWGDeviceSettings::cleanup() { if(blade_rf_output_settings != nullptr) { delete blade_rf_output_settings; } + if(fcd_pro_settings != nullptr) { + delete fcd_pro_settings; + } if(file_source_settings != nullptr) { delete file_source_settings; } @@ -147,6 +154,8 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&blade_rf_output_settings, pJson["bladeRFOutputSettings"], "SWGBladeRFOutputSettings", "SWGBladeRFOutputSettings"); + ::SWGSDRangel::setValue(&fcd_pro_settings, pJson["fcdProSettings"], "SWGFCDProSettings", "SWGFCDProSettings"); + ::SWGSDRangel::setValue(&file_source_settings, pJson["fileSourceSettings"], "SWGFileSourceSettings", "SWGFileSourceSettings"); ::SWGSDRangel::setValue(&hack_rf_input_settings, pJson["hackRFInputSettings"], "SWGHackRFInputSettings", "SWGHackRFInputSettings"); @@ -193,6 +202,9 @@ SWGDeviceSettings::asJsonObject() { if((blade_rf_output_settings != nullptr) && (blade_rf_output_settings->isSet())){ toJsonValue(QString("bladeRFOutputSettings"), blade_rf_output_settings, obj, QString("SWGBladeRFOutputSettings")); } + if((fcd_pro_settings != nullptr) && (fcd_pro_settings->isSet())){ + toJsonValue(QString("fcdProSettings"), fcd_pro_settings, obj, QString("SWGFCDProSettings")); + } if((file_source_settings != nullptr) && (file_source_settings->isSet())){ toJsonValue(QString("fileSourceSettings"), file_source_settings, obj, QString("SWGFileSourceSettings")); } @@ -275,6 +287,16 @@ SWGDeviceSettings::setBladeRfOutputSettings(SWGBladeRFOutputSettings* blade_rf_o this->m_blade_rf_output_settings_isSet = true; } +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; +} + SWGFileSourceSettings* SWGDeviceSettings::getFileSourceSettings() { return file_source_settings; @@ -346,6 +368,7 @@ SWGDeviceSettings::isSet(){ if(airspy_hf_settings != nullptr && airspy_hf_settings->isSet()){ isObjectUpdated = true; break;} if(blade_rf_input_settings != nullptr && blade_rf_input_settings->isSet()){ isObjectUpdated = true; break;} if(blade_rf_output_settings != nullptr && blade_rf_output_settings->isSet()){ isObjectUpdated = true; break;} + if(fcd_pro_settings != nullptr && fcd_pro_settings->isSet()){ isObjectUpdated = true; break;} 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;} diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h index 2c38ac566..142858ca8 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceSettings.h @@ -26,6 +26,7 @@ #include "SWGAirspySettings.h" #include "SWGBladeRFInputSettings.h" #include "SWGBladeRFOutputSettings.h" +#include "SWGFCDProSettings.h" #include "SWGFileSourceSettings.h" #include "SWGHackRFInputSettings.h" #include "SWGHackRFOutputSettings.h" @@ -70,6 +71,9 @@ public: SWGBladeRFOutputSettings* getBladeRfOutputSettings(); void setBladeRfOutputSettings(SWGBladeRFOutputSettings* blade_rf_output_settings); + SWGFCDProSettings* getFcdProSettings(); + void setFcdProSettings(SWGFCDProSettings* fcd_pro_settings); + SWGFileSourceSettings* getFileSourceSettings(); void setFileSourceSettings(SWGFileSourceSettings* file_source_settings); @@ -110,6 +114,9 @@ private: SWGBladeRFOutputSettings* blade_rf_output_settings; bool m_blade_rf_output_settings_isSet; + SWGFCDProSettings* fcd_pro_settings; + bool m_fcd_pro_settings_isSet; + SWGFileSourceSettings* file_source_settings; bool m_file_source_settings_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp new file mode 100644 index 000000000..b69368ab3 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.cpp @@ -0,0 +1,570 @@ +/** + * 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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * 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 demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * 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 "SWGFCDProSettings.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGFCDProSettings::SWGFCDProSettings(QString* json) { + init(); + this->fromJson(*json); +} + +SWGFCDProSettings::SWGFCDProSettings() { + center_frequency = 0L; + m_center_frequency_isSet = false; + l_oppm_tenths = 0; + m_l_oppm_tenths_isSet = false; + lna_gain_index = 0; + m_lna_gain_index_isSet = false; + rf_filter_index = 0; + m_rf_filter_index_isSet = false; + lna_enhance_index = 0; + m_lna_enhance_index_isSet = false; + band_index = 0; + m_band_index_isSet = false; + mixer_gain_index = 0; + m_mixer_gain_index_isSet = false; + mixer_filter_index = 0; + m_mixer_filter_index_isSet = false; + bias_current_index = 0; + m_bias_current_index_isSet = false; + mode_index = 0; + m_mode_index_isSet = false; + gain1_index = 0; + m_gain1_index_isSet = false; + rc_filter_index = 0; + m_rc_filter_index_isSet = false; + gain2_index = 0; + m_gain2_index_isSet = false; + gain3_index = 0; + m_gain3_index_isSet = false; + gain4_index = 0; + m_gain4_index_isSet = false; + if_filter_index = 0; + m_if_filter_index_isSet = false; + gain5_index = 0; + m_gain5_index_isSet = false; + gain6_index = 0; + m_gain6_index_isSet = false; + dc_block = 0; + m_dc_block_isSet = false; + iq_correction = 0; + m_iq_correction_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; + file_record_name = nullptr; + m_file_record_name_isSet = false; +} + +SWGFCDProSettings::~SWGFCDProSettings() { + this->cleanup(); +} + +void +SWGFCDProSettings::init() { + center_frequency = 0L; + m_center_frequency_isSet = false; + l_oppm_tenths = 0; + m_l_oppm_tenths_isSet = false; + lna_gain_index = 0; + m_lna_gain_index_isSet = false; + rf_filter_index = 0; + m_rf_filter_index_isSet = false; + lna_enhance_index = 0; + m_lna_enhance_index_isSet = false; + band_index = 0; + m_band_index_isSet = false; + mixer_gain_index = 0; + m_mixer_gain_index_isSet = false; + mixer_filter_index = 0; + m_mixer_filter_index_isSet = false; + bias_current_index = 0; + m_bias_current_index_isSet = false; + mode_index = 0; + m_mode_index_isSet = false; + gain1_index = 0; + m_gain1_index_isSet = false; + rc_filter_index = 0; + m_rc_filter_index_isSet = false; + gain2_index = 0; + m_gain2_index_isSet = false; + gain3_index = 0; + m_gain3_index_isSet = false; + gain4_index = 0; + m_gain4_index_isSet = false; + if_filter_index = 0; + m_if_filter_index_isSet = false; + gain5_index = 0; + m_gain5_index_isSet = false; + gain6_index = 0; + m_gain6_index_isSet = false; + dc_block = 0; + m_dc_block_isSet = false; + iq_correction = 0; + m_iq_correction_isSet = false; + transverter_mode = 0; + m_transverter_mode_isSet = false; + transverter_delta_frequency = 0L; + m_transverter_delta_frequency_isSet = false; + file_record_name = new QString(""); + m_file_record_name_isSet = false; +} + +void +SWGFCDProSettings::cleanup() { + + + + + + + + + + + + + + + + + + + + + + + if(file_record_name != nullptr) { + delete file_record_name; + } +} + +SWGFCDProSettings* +SWGFCDProSettings::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGFCDProSettings::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(¢er_frequency, pJson["centerFrequency"], "qint64", ""); + + ::SWGSDRangel::setValue(&l_oppm_tenths, pJson["LOppmTenths"], "qint32", ""); + + ::SWGSDRangel::setValue(&lna_gain_index, pJson["lnaGainIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&rf_filter_index, pJson["rfFilterIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&lna_enhance_index, pJson["lnaEnhanceIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&band_index, pJson["bandIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&mixer_gain_index, pJson["mixerGainIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&mixer_filter_index, pJson["mixerFilterIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&bias_current_index, pJson["biasCurrentIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&mode_index, pJson["modeIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain1_index, pJson["gain1Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&rc_filter_index, pJson["rcFilterIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain2_index, pJson["gain2Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain3_index, pJson["gain3Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain4_index, pJson["gain4Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&if_filter_index, pJson["ifFilterIndex"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain5_index, pJson["gain5Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&gain6_index, pJson["gain6Index"], "qint32", ""); + + ::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", ""); + + ::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", ""); + + ::SWGSDRangel::setValue(&transverter_mode, pJson["transverterMode"], "qint32", ""); + + ::SWGSDRangel::setValue(&transverter_delta_frequency, pJson["transverterDeltaFrequency"], "qint64", ""); + + ::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString"); + +} + +QString +SWGFCDProSettings::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGFCDProSettings::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_center_frequency_isSet){ + obj->insert("centerFrequency", QJsonValue(center_frequency)); + } + if(m_l_oppm_tenths_isSet){ + obj->insert("LOppmTenths", QJsonValue(l_oppm_tenths)); + } + if(m_lna_gain_index_isSet){ + obj->insert("lnaGainIndex", QJsonValue(lna_gain_index)); + } + if(m_rf_filter_index_isSet){ + obj->insert("rfFilterIndex", QJsonValue(rf_filter_index)); + } + if(m_lna_enhance_index_isSet){ + obj->insert("lnaEnhanceIndex", QJsonValue(lna_enhance_index)); + } + if(m_band_index_isSet){ + obj->insert("bandIndex", QJsonValue(band_index)); + } + if(m_mixer_gain_index_isSet){ + obj->insert("mixerGainIndex", QJsonValue(mixer_gain_index)); + } + if(m_mixer_filter_index_isSet){ + obj->insert("mixerFilterIndex", QJsonValue(mixer_filter_index)); + } + if(m_bias_current_index_isSet){ + obj->insert("biasCurrentIndex", QJsonValue(bias_current_index)); + } + if(m_mode_index_isSet){ + obj->insert("modeIndex", QJsonValue(mode_index)); + } + if(m_gain1_index_isSet){ + obj->insert("gain1Index", QJsonValue(gain1_index)); + } + if(m_rc_filter_index_isSet){ + obj->insert("rcFilterIndex", QJsonValue(rc_filter_index)); + } + if(m_gain2_index_isSet){ + obj->insert("gain2Index", QJsonValue(gain2_index)); + } + if(m_gain3_index_isSet){ + obj->insert("gain3Index", QJsonValue(gain3_index)); + } + if(m_gain4_index_isSet){ + obj->insert("gain4Index", QJsonValue(gain4_index)); + } + if(m_if_filter_index_isSet){ + obj->insert("ifFilterIndex", QJsonValue(if_filter_index)); + } + if(m_gain5_index_isSet){ + obj->insert("gain5Index", QJsonValue(gain5_index)); + } + if(m_gain6_index_isSet){ + obj->insert("gain6Index", QJsonValue(gain6_index)); + } + if(m_dc_block_isSet){ + obj->insert("dcBlock", QJsonValue(dc_block)); + } + if(m_iq_correction_isSet){ + obj->insert("iqCorrection", QJsonValue(iq_correction)); + } + if(m_transverter_mode_isSet){ + obj->insert("transverterMode", QJsonValue(transverter_mode)); + } + if(m_transverter_delta_frequency_isSet){ + obj->insert("transverterDeltaFrequency", QJsonValue(transverter_delta_frequency)); + } + if(file_record_name != nullptr && *file_record_name != QString("")){ + toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString")); + } + + return obj; +} + +qint64 +SWGFCDProSettings::getCenterFrequency() { + return center_frequency; +} +void +SWGFCDProSettings::setCenterFrequency(qint64 center_frequency) { + this->center_frequency = center_frequency; + this->m_center_frequency_isSet = true; +} + +qint32 +SWGFCDProSettings::getLOppmTenths() { + return l_oppm_tenths; +} +void +SWGFCDProSettings::setLOppmTenths(qint32 l_oppm_tenths) { + this->l_oppm_tenths = l_oppm_tenths; + this->m_l_oppm_tenths_isSet = true; +} + +qint32 +SWGFCDProSettings::getLnaGainIndex() { + return lna_gain_index; +} +void +SWGFCDProSettings::setLnaGainIndex(qint32 lna_gain_index) { + this->lna_gain_index = lna_gain_index; + this->m_lna_gain_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getRfFilterIndex() { + return rf_filter_index; +} +void +SWGFCDProSettings::setRfFilterIndex(qint32 rf_filter_index) { + this->rf_filter_index = rf_filter_index; + this->m_rf_filter_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getLnaEnhanceIndex() { + return lna_enhance_index; +} +void +SWGFCDProSettings::setLnaEnhanceIndex(qint32 lna_enhance_index) { + this->lna_enhance_index = lna_enhance_index; + this->m_lna_enhance_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getBandIndex() { + return band_index; +} +void +SWGFCDProSettings::setBandIndex(qint32 band_index) { + this->band_index = band_index; + this->m_band_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getMixerGainIndex() { + return mixer_gain_index; +} +void +SWGFCDProSettings::setMixerGainIndex(qint32 mixer_gain_index) { + this->mixer_gain_index = mixer_gain_index; + this->m_mixer_gain_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getMixerFilterIndex() { + return mixer_filter_index; +} +void +SWGFCDProSettings::setMixerFilterIndex(qint32 mixer_filter_index) { + this->mixer_filter_index = mixer_filter_index; + this->m_mixer_filter_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getBiasCurrentIndex() { + return bias_current_index; +} +void +SWGFCDProSettings::setBiasCurrentIndex(qint32 bias_current_index) { + this->bias_current_index = bias_current_index; + this->m_bias_current_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getModeIndex() { + return mode_index; +} +void +SWGFCDProSettings::setModeIndex(qint32 mode_index) { + this->mode_index = mode_index; + this->m_mode_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain1Index() { + return gain1_index; +} +void +SWGFCDProSettings::setGain1Index(qint32 gain1_index) { + this->gain1_index = gain1_index; + this->m_gain1_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getRcFilterIndex() { + return rc_filter_index; +} +void +SWGFCDProSettings::setRcFilterIndex(qint32 rc_filter_index) { + this->rc_filter_index = rc_filter_index; + this->m_rc_filter_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain2Index() { + return gain2_index; +} +void +SWGFCDProSettings::setGain2Index(qint32 gain2_index) { + this->gain2_index = gain2_index; + this->m_gain2_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain3Index() { + return gain3_index; +} +void +SWGFCDProSettings::setGain3Index(qint32 gain3_index) { + this->gain3_index = gain3_index; + this->m_gain3_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain4Index() { + return gain4_index; +} +void +SWGFCDProSettings::setGain4Index(qint32 gain4_index) { + this->gain4_index = gain4_index; + this->m_gain4_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getIfFilterIndex() { + return if_filter_index; +} +void +SWGFCDProSettings::setIfFilterIndex(qint32 if_filter_index) { + this->if_filter_index = if_filter_index; + this->m_if_filter_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain5Index() { + return gain5_index; +} +void +SWGFCDProSettings::setGain5Index(qint32 gain5_index) { + this->gain5_index = gain5_index; + this->m_gain5_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getGain6Index() { + return gain6_index; +} +void +SWGFCDProSettings::setGain6Index(qint32 gain6_index) { + this->gain6_index = gain6_index; + this->m_gain6_index_isSet = true; +} + +qint32 +SWGFCDProSettings::getDcBlock() { + return dc_block; +} +void +SWGFCDProSettings::setDcBlock(qint32 dc_block) { + this->dc_block = dc_block; + this->m_dc_block_isSet = true; +} + +qint32 +SWGFCDProSettings::getIqCorrection() { + return iq_correction; +} +void +SWGFCDProSettings::setIqCorrection(qint32 iq_correction) { + this->iq_correction = iq_correction; + this->m_iq_correction_isSet = true; +} + +qint32 +SWGFCDProSettings::getTransverterMode() { + return transverter_mode; +} +void +SWGFCDProSettings::setTransverterMode(qint32 transverter_mode) { + this->transverter_mode = transverter_mode; + this->m_transverter_mode_isSet = true; +} + +qint64 +SWGFCDProSettings::getTransverterDeltaFrequency() { + return transverter_delta_frequency; +} +void +SWGFCDProSettings::setTransverterDeltaFrequency(qint64 transverter_delta_frequency) { + this->transverter_delta_frequency = transverter_delta_frequency; + this->m_transverter_delta_frequency_isSet = true; +} + +QString* +SWGFCDProSettings::getFileRecordName() { + return file_record_name; +} +void +SWGFCDProSettings::setFileRecordName(QString* file_record_name) { + this->file_record_name = file_record_name; + this->m_file_record_name_isSet = true; +} + + +bool +SWGFCDProSettings::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_center_frequency_isSet){ isObjectUpdated = true; break;} + if(m_l_oppm_tenths_isSet){ isObjectUpdated = true; break;} + if(m_lna_gain_index_isSet){ isObjectUpdated = true; break;} + if(m_rf_filter_index_isSet){ isObjectUpdated = true; break;} + if(m_lna_enhance_index_isSet){ isObjectUpdated = true; break;} + if(m_band_index_isSet){ isObjectUpdated = true; break;} + if(m_mixer_gain_index_isSet){ isObjectUpdated = true; break;} + if(m_mixer_filter_index_isSet){ isObjectUpdated = true; break;} + if(m_bias_current_index_isSet){ isObjectUpdated = true; break;} + if(m_mode_index_isSet){ isObjectUpdated = true; break;} + if(m_gain1_index_isSet){ isObjectUpdated = true; break;} + if(m_rc_filter_index_isSet){ isObjectUpdated = true; break;} + if(m_gain2_index_isSet){ isObjectUpdated = true; break;} + if(m_gain3_index_isSet){ isObjectUpdated = true; break;} + if(m_gain4_index_isSet){ isObjectUpdated = true; break;} + if(m_if_filter_index_isSet){ isObjectUpdated = true; break;} + if(m_gain5_index_isSet){ isObjectUpdated = true; break;} + if(m_gain6_index_isSet){ isObjectUpdated = true; break;} + if(m_dc_block_isSet){ isObjectUpdated = true; break;} + if(m_iq_correction_isSet){ isObjectUpdated = true; break;} + if(m_transverter_mode_isSet){ isObjectUpdated = true; break;} + if(m_transverter_delta_frequency_isSet){ isObjectUpdated = true; break;} + if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;} + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h new file mode 100644 index 000000000..e0e6508c7 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGFCDProSettings.h @@ -0,0 +1,191 @@ +/** + * 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. * Stopping instance i.e. /sdrangel with DELETE method is a server only feature. It allows stopping the instance nicely. * 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 demodulator, Channel Analyzer, Channel Analyzer NG, LoRa demodulator, TCP source * The content type returned is always application/json except in the following cases: * An incorrect URL was specified: this document is returned as text/html with a status 400 --- + * + * OpenAPI spec version: 4.0.0 + * 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. + */ + +/* + * SWGFCDProSettings.h + * + * FCDPro + */ + +#ifndef SWGFCDProSettings_H_ +#define SWGFCDProSettings_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGFCDProSettings: public SWGObject { +public: + SWGFCDProSettings(); + SWGFCDProSettings(QString* json); + virtual ~SWGFCDProSettings(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGFCDProSettings* fromJson(QString &jsonString) override; + + qint64 getCenterFrequency(); + void setCenterFrequency(qint64 center_frequency); + + qint32 getLOppmTenths(); + void setLOppmTenths(qint32 l_oppm_tenths); + + qint32 getLnaGainIndex(); + void setLnaGainIndex(qint32 lna_gain_index); + + qint32 getRfFilterIndex(); + void setRfFilterIndex(qint32 rf_filter_index); + + qint32 getLnaEnhanceIndex(); + void setLnaEnhanceIndex(qint32 lna_enhance_index); + + qint32 getBandIndex(); + void setBandIndex(qint32 band_index); + + qint32 getMixerGainIndex(); + void setMixerGainIndex(qint32 mixer_gain_index); + + qint32 getMixerFilterIndex(); + void setMixerFilterIndex(qint32 mixer_filter_index); + + qint32 getBiasCurrentIndex(); + void setBiasCurrentIndex(qint32 bias_current_index); + + qint32 getModeIndex(); + void setModeIndex(qint32 mode_index); + + qint32 getGain1Index(); + void setGain1Index(qint32 gain1_index); + + qint32 getRcFilterIndex(); + void setRcFilterIndex(qint32 rc_filter_index); + + qint32 getGain2Index(); + void setGain2Index(qint32 gain2_index); + + qint32 getGain3Index(); + void setGain3Index(qint32 gain3_index); + + qint32 getGain4Index(); + void setGain4Index(qint32 gain4_index); + + qint32 getIfFilterIndex(); + void setIfFilterIndex(qint32 if_filter_index); + + qint32 getGain5Index(); + void setGain5Index(qint32 gain5_index); + + qint32 getGain6Index(); + void setGain6Index(qint32 gain6_index); + + qint32 getDcBlock(); + void setDcBlock(qint32 dc_block); + + qint32 getIqCorrection(); + void setIqCorrection(qint32 iq_correction); + + qint32 getTransverterMode(); + void setTransverterMode(qint32 transverter_mode); + + qint64 getTransverterDeltaFrequency(); + void setTransverterDeltaFrequency(qint64 transverter_delta_frequency); + + QString* getFileRecordName(); + void setFileRecordName(QString* file_record_name); + + + virtual bool isSet() override; + +private: + qint64 center_frequency; + bool m_center_frequency_isSet; + + qint32 l_oppm_tenths; + bool m_l_oppm_tenths_isSet; + + qint32 lna_gain_index; + bool m_lna_gain_index_isSet; + + qint32 rf_filter_index; + bool m_rf_filter_index_isSet; + + qint32 lna_enhance_index; + bool m_lna_enhance_index_isSet; + + qint32 band_index; + bool m_band_index_isSet; + + qint32 mixer_gain_index; + bool m_mixer_gain_index_isSet; + + qint32 mixer_filter_index; + bool m_mixer_filter_index_isSet; + + qint32 bias_current_index; + bool m_bias_current_index_isSet; + + qint32 mode_index; + bool m_mode_index_isSet; + + qint32 gain1_index; + bool m_gain1_index_isSet; + + qint32 rc_filter_index; + bool m_rc_filter_index_isSet; + + qint32 gain2_index; + bool m_gain2_index_isSet; + + qint32 gain3_index; + bool m_gain3_index_isSet; + + qint32 gain4_index; + bool m_gain4_index_isSet; + + qint32 if_filter_index; + bool m_if_filter_index_isSet; + + qint32 gain5_index; + bool m_gain5_index_isSet; + + qint32 gain6_index; + bool m_gain6_index_isSet; + + qint32 dc_block; + bool m_dc_block_isSet; + + qint32 iq_correction; + bool m_iq_correction_isSet; + + qint32 transverter_mode; + bool m_transverter_mode_isSet; + + qint64 transverter_delta_frequency; + bool m_transverter_delta_frequency_isSet; + + QString* file_record_name; + bool m_file_record_name_isSet; + +}; + +} + +#endif /* SWGFCDProSettings_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 0e413ef74..83744bff4 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -49,6 +49,7 @@ #include "SWGDeviceSettings.h" #include "SWGDeviceState.h" #include "SWGErrorResponse.h" +#include "SWGFCDProSettings.h" #include "SWGFileSourceSettings.h" #include "SWGHackRFInputSettings.h" #include "SWGHackRFOutputSettings.h" @@ -194,6 +195,9 @@ namespace SWGSDRangel { if(QString("SWGErrorResponse").compare(type) == 0) { return new SWGErrorResponse(); } + if(QString("SWGFCDProSettings").compare(type) == 0) { + return new SWGFCDProSettings(); + } if(QString("SWGFileSourceSettings").compare(type) == 0) { return new SWGFileSourceSettings(); }