diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 42a7cafb4..db232a860 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -1701,6 +1701,15 @@ margin-bottom: 20px; } }, "description" : "BladeRF1" +}; + defs.BladeRF2InputActions = { + "properties" : { + "record" : { + "type" : "integer", + "description" : "Record IQ stream action\n * 0 - stop recording\n * 1 - start recording\n" + } + }, + "description" : "BladeRF2" }; defs.BladeRF2InputReport = { "properties" : { @@ -2681,6 +2690,9 @@ margin-bottom: 20px; "bladeRF1InputActions" : { "$ref" : "#/definitions/BladeRF1InputActions" }, + "bladeRF2InputActions" : { + "$ref" : "#/definitions/BladeRF2InputActions" + }, "fcdProActions" : { "$ref" : "#/definitions/FCDProActions" }, @@ -33380,7 +33392,7 @@ except ApiException as e:
- Generated 2020-03-29T00:14:31.725+01:00 + Generated 2020-04-02T04:52:29.862+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml b/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml index 3d2e65ff6..5d71ed373 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/BladeRF2.yaml @@ -57,6 +57,16 @@ BladeRF2InputReport: items: $ref: "/doc/swagger/include/Structs.yaml#/NamedEnum" +BladeRF2InputActions: + description: BladeRF2 + properties: + record: + type: integer + description: > + Record IQ stream action + * 0 - stop recording + * 1 - start recording + BladeRF2OutputSettings: description: BladeRF2 properties: diff --git a/sdrbase/resources/webapi/doc/swagger/include/DeviceActions.yaml b/sdrbase/resources/webapi/doc/swagger/include/DeviceActions.yaml index ce2402200..beab35b84 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/DeviceActions.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/DeviceActions.yaml @@ -20,6 +20,8 @@ DeviceActions: $ref: "/doc/swagger/include/AirspyHF.yaml#/AirspyHFActions" bladeRF1InputActions: $ref: "/doc/swagger/include/BladeRF1.yaml#/BladeRF1InputActions" + bladeRF2InputActions: + $ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2InputActions" fcdProActions: $ref: "/doc/swagger/include/FCDPro.yaml#/FCDProActions" fcdProPlusActions: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 42a7cafb4..db232a860 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -1701,6 +1701,15 @@ margin-bottom: 20px; } }, "description" : "BladeRF1" +}; + defs.BladeRF2InputActions = { + "properties" : { + "record" : { + "type" : "integer", + "description" : "Record IQ stream action\n * 0 - stop recording\n * 1 - start recording\n" + } + }, + "description" : "BladeRF2" }; defs.BladeRF2InputReport = { "properties" : { @@ -2681,6 +2690,9 @@ margin-bottom: 20px; "bladeRF1InputActions" : { "$ref" : "#/definitions/BladeRF1InputActions" }, + "bladeRF2InputActions" : { + "$ref" : "#/definitions/BladeRF2InputActions" + }, "fcdProActions" : { "$ref" : "#/definitions/FCDProActions" }, @@ -33380,7 +33392,7 @@ except ApiException as e:
- Generated 2020-03-29T00:14:31.725+01:00 + Generated 2020-04-02T04:52:29.862+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.cpp b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.cpp new file mode 100644 index 000000000..e518b9a7c --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.cpp @@ -0,0 +1,108 @@ +/** + * 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.14.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 "SWGBladeRF2InputActions.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGBladeRF2InputActions::SWGBladeRF2InputActions(QString* json) { + init(); + this->fromJson(*json); +} + +SWGBladeRF2InputActions::SWGBladeRF2InputActions() { + record = 0; + m_record_isSet = false; +} + +SWGBladeRF2InputActions::~SWGBladeRF2InputActions() { + this->cleanup(); +} + +void +SWGBladeRF2InputActions::init() { + record = 0; + m_record_isSet = false; +} + +void +SWGBladeRF2InputActions::cleanup() { + +} + +SWGBladeRF2InputActions* +SWGBladeRF2InputActions::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGBladeRF2InputActions::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&record, pJson["record"], "qint32", ""); + +} + +QString +SWGBladeRF2InputActions::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGBladeRF2InputActions::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_record_isSet){ + obj->insert("record", QJsonValue(record)); + } + + return obj; +} + +qint32 +SWGBladeRF2InputActions::getRecord() { + return record; +} +void +SWGBladeRF2InputActions::setRecord(qint32 record) { + this->record = record; + this->m_record_isSet = true; +} + + +bool +SWGBladeRF2InputActions::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_record_isSet){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.h b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.h new file mode 100644 index 000000000..65cfd40a0 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.h @@ -0,0 +1,58 @@ +/** + * 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.14.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. + */ + +/* + * SWGBladeRF2InputActions.h + * + * BladeRF2 + */ + +#ifndef SWGBladeRF2InputActions_H_ +#define SWGBladeRF2InputActions_H_ + +#include + + + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGBladeRF2InputActions: public SWGObject { +public: + SWGBladeRF2InputActions(); + SWGBladeRF2InputActions(QString* json); + virtual ~SWGBladeRF2InputActions(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGBladeRF2InputActions* fromJson(QString &jsonString) override; + + qint32 getRecord(); + void setRecord(qint32 record); + + + virtual bool isSet() override; + +private: + qint32 record; + bool m_record_isSet; + +}; + +} + +#endif /* SWGBladeRF2InputActions_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceActions.cpp b/swagger/sdrangel/code/qt5/client/SWGDeviceActions.cpp index df5dc7c6c..d82db0573 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceActions.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceActions.cpp @@ -40,6 +40,8 @@ SWGDeviceActions::SWGDeviceActions() { m_airspy_hf_actions_isSet = false; blade_rf1_input_actions = nullptr; m_blade_rf1_input_actions_isSet = false; + blade_rf2_input_actions = nullptr; + m_blade_rf2_input_actions_isSet = false; fcd_pro_actions = nullptr; m_fcd_pro_actions_isSet = false; fcd_pro_plus_actions = nullptr; @@ -88,6 +90,8 @@ SWGDeviceActions::init() { m_airspy_hf_actions_isSet = false; blade_rf1_input_actions = new SWGBladeRF1InputActions(); m_blade_rf1_input_actions_isSet = false; + blade_rf2_input_actions = new SWGBladeRF2InputActions(); + m_blade_rf2_input_actions_isSet = false; fcd_pro_actions = new SWGFCDProActions(); m_fcd_pro_actions_isSet = false; fcd_pro_plus_actions = new SWGFCDProPlusActions(); @@ -134,6 +138,9 @@ SWGDeviceActions::cleanup() { if(blade_rf1_input_actions != nullptr) { delete blade_rf1_input_actions; } + if(blade_rf2_input_actions != nullptr) { + delete blade_rf2_input_actions; + } if(fcd_pro_actions != nullptr) { delete fcd_pro_actions; } @@ -201,6 +208,8 @@ SWGDeviceActions::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&blade_rf1_input_actions, pJson["bladeRF1InputActions"], "SWGBladeRF1InputActions", "SWGBladeRF1InputActions"); + ::SWGSDRangel::setValue(&blade_rf2_input_actions, pJson["bladeRF2InputActions"], "SWGBladeRF2InputActions", "SWGBladeRF2InputActions"); + ::SWGSDRangel::setValue(&fcd_pro_actions, pJson["fcdProActions"], "SWGFCDProActions", "SWGFCDProActions"); ::SWGSDRangel::setValue(&fcd_pro_plus_actions, pJson["fcdProPlusActions"], "SWGFCDProPlusActions", "SWGFCDProPlusActions"); @@ -263,6 +272,9 @@ SWGDeviceActions::asJsonObject() { if((blade_rf1_input_actions != nullptr) && (blade_rf1_input_actions->isSet())){ toJsonValue(QString("bladeRF1InputActions"), blade_rf1_input_actions, obj, QString("SWGBladeRF1InputActions")); } + if((blade_rf2_input_actions != nullptr) && (blade_rf2_input_actions->isSet())){ + toJsonValue(QString("bladeRF2InputActions"), blade_rf2_input_actions, obj, QString("SWGBladeRF2InputActions")); + } if((fcd_pro_actions != nullptr) && (fcd_pro_actions->isSet())){ toJsonValue(QString("fcdProActions"), fcd_pro_actions, obj, QString("SWGFCDProActions")); } @@ -369,6 +381,16 @@ SWGDeviceActions::setBladeRf1InputActions(SWGBladeRF1InputActions* blade_rf1_inp this->m_blade_rf1_input_actions_isSet = true; } +SWGBladeRF2InputActions* +SWGDeviceActions::getBladeRf2InputActions() { + return blade_rf2_input_actions; +} +void +SWGDeviceActions::setBladeRf2InputActions(SWGBladeRF2InputActions* blade_rf2_input_actions) { + this->blade_rf2_input_actions = blade_rf2_input_actions; + this->m_blade_rf2_input_actions_isSet = true; +} + SWGFCDProActions* SWGDeviceActions::getFcdProActions() { return fcd_pro_actions; @@ -532,6 +554,9 @@ SWGDeviceActions::isSet(){ if(blade_rf1_input_actions && blade_rf1_input_actions->isSet()){ isObjectUpdated = true; break; } + if(blade_rf2_input_actions && blade_rf2_input_actions->isSet()){ + isObjectUpdated = true; break; + } if(fcd_pro_actions && fcd_pro_actions->isSet()){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGDeviceActions.h b/swagger/sdrangel/code/qt5/client/SWGDeviceActions.h index 8a0677c2b..11657bff2 100644 --- a/swagger/sdrangel/code/qt5/client/SWGDeviceActions.h +++ b/swagger/sdrangel/code/qt5/client/SWGDeviceActions.h @@ -25,6 +25,7 @@ #include "SWGAirspyActions.h" #include "SWGAirspyHFActions.h" #include "SWGBladeRF1InputActions.h" +#include "SWGBladeRF2InputActions.h" #include "SWGFCDProActions.h" #include "SWGFCDProPlusActions.h" #include "SWGHackRFInputActions.h" @@ -77,6 +78,9 @@ public: SWGBladeRF1InputActions* getBladeRf1InputActions(); void setBladeRf1InputActions(SWGBladeRF1InputActions* blade_rf1_input_actions); + SWGBladeRF2InputActions* getBladeRf2InputActions(); + void setBladeRf2InputActions(SWGBladeRF2InputActions* blade_rf2_input_actions); + SWGFCDProActions* getFcdProActions(); void setFcdProActions(SWGFCDProActions* fcd_pro_actions); @@ -141,6 +145,9 @@ private: SWGBladeRF1InputActions* blade_rf1_input_actions; bool m_blade_rf1_input_actions_isSet; + SWGBladeRF2InputActions* blade_rf2_input_actions; + bool m_blade_rf2_input_actions_isSet; + SWGFCDProActions* fcd_pro_actions; bool m_fcd_pro_actions_isSet; diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 67f02c725..23521a098 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -40,6 +40,7 @@ #include "SWGBladeRF1InputActions.h" #include "SWGBladeRF1InputSettings.h" #include "SWGBladeRF1OutputSettings.h" +#include "SWGBladeRF2InputActions.h" #include "SWGBladeRF2InputReport.h" #include "SWGBladeRF2InputSettings.h" #include "SWGBladeRF2MIMOSettings.h" @@ -271,6 +272,9 @@ namespace SWGSDRangel { if(QString("SWGBladeRF1OutputSettings").compare(type) == 0) { return new SWGBladeRF1OutputSettings(); } + if(QString("SWGBladeRF2InputActions").compare(type) == 0) { + return new SWGBladeRF2InputActions(); + } if(QString("SWGBladeRF2InputReport").compare(type) == 0) { return new SWGBladeRF2InputReport(); }