mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-17 23:28:50 -05:00
BladeRF2: REST API: implemented actions: generated code
This commit is contained in:
parent
9947a454d6
commit
69a7540ce3
@ -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:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2020-03-29T00:14:31.725+01:00
|
||||
Generated 2020-04-02T04:52:29.862+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2020-03-29T00:14:31.725+01:00
|
||||
Generated 2020-04-02T04:52:29.862+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
108
swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.cpp
Normal file
108
swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.cpp
Normal file
@ -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 <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
58
swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGBladeRF2InputActions.h
Normal file
@ -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 <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#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_ */
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user