1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

BladeRF2 MIMO: REST API

This commit is contained in:
f4exb 2020-11-10 17:56:57 +01:00
parent 26c7821d68
commit e1178fd81b
15 changed files with 592 additions and 94 deletions

View File

@ -43,6 +43,7 @@
<file>webapi/doc/swagger/include/GS232Controller.yaml</file>
<file>webapi/doc/swagger/include/HackRF.yaml</file>
<file>webapi/doc/swagger/include/IEEE_802_15_4_Mod.yaml</file>
<file>webapi/doc/swagger/include/Interferometer.yaml</file>
<file>webapi/doc/swagger/include/LimeRFE.yaml</file>
<file>webapi/doc/swagger/include/LimeSdr.yaml</file>
<file>webapi/doc/swagger/include/KiwiSDR.yaml</file>
@ -70,6 +71,7 @@
<file>webapi/doc/swagger/include/SSBDemod.yaml</file>
<file>webapi/doc/swagger/include/SSBMod.yaml</file>
<file>webapi/doc/swagger/include/Structs.yaml</file>
<file>webapi/doc/swagger/include/TestMI.yaml</file>
<file>webapi/doc/swagger/include/TestSource.yaml</file>
<file>webapi/doc/swagger/include/UDPSource.yaml</file>
<file>webapi/doc/swagger/include/UDPSink.yaml</file>

View File

@ -1965,6 +1965,41 @@ margin-bottom: 20px;
}
},
"description" : "BladeRF2"
};
defs.BladeRF2MIMOReport = {
"properties" : {
"frequencyRangeRx" : {
"$ref" : "#/definitions/FrequencyRange"
},
"sampleRateRangeRx" : {
"$ref" : "#/definitions/Range"
},
"bandwidthRangeRx" : {
"$ref" : "#/definitions/Range"
},
"globalGainRangeRx" : {
"$ref" : "#/definitions/Range"
},
"gainModesRx" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/NamedEnum"
}
},
"frequencyRangeTx" : {
"$ref" : "#/definitions/FrequencyRange"
},
"sampleRateRangeTx" : {
"$ref" : "#/definitions/Range"
},
"bandwidthRangeTx" : {
"$ref" : "#/definitions/Range"
},
"globalGainRangeTx" : {
"$ref" : "#/definitions/Range"
}
},
"description" : "BladeRF2"
};
defs.BladeRF2MIMOSettings = {
"properties" : {
@ -2056,9 +2091,6 @@ margin-bottom: 20px;
"type" : "integer",
"format" : "int64"
},
"fileRecordName" : {
"type" : "string"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "boolean"
@ -3392,6 +3424,9 @@ margin-bottom: 20px;
"bladeRF2OutputReport" : {
"$ref" : "#/definitions/BladeRF2OutputReport"
},
"bladeRF2MIMOReport" : {
"$ref" : "#/definitions/BladeRF2MIMOReport"
},
"fileInputReport" : {
"$ref" : "#/definitions/FileInputReport"
},
@ -41052,7 +41087,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-11-10T15:35:08.828+01:00
Generated 2020-11-10T17:44:38.740+01:00
</div>
</div>
</div>

View File

@ -175,8 +175,6 @@ BladeRF2MIMOSettings:
txTransverterDeltaFrequency:
type: integer
format: int64
fileRecordName:
type: string
useReverseAPI:
description: boolean
type: integer
@ -186,3 +184,27 @@ BladeRF2MIMOSettings:
type: integer
reverseAPIDeviceIndex:
type: integer
BladeRF2MIMOReport:
description: BladeRF2
properties:
frequencyRangeRx:
$ref: "/doc/swagger/include/Structs.yaml#/FrequencyRange"
sampleRateRangeRx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"
bandwidthRangeRx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"
globalGainRangeRx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"
gainModesRx:
type: array
items:
$ref: "/doc/swagger/include/Structs.yaml#/NamedEnum"
frequencyRangeTx:
$ref: "/doc/swagger/include/Structs.yaml#/FrequencyRange"
sampleRateRangeTx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"
bandwidthRangeTx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"
globalGainRangeTx:
$ref: "/doc/swagger/include/Structs.yaml#/Range"

View File

@ -19,6 +19,8 @@ DeviceReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
bladeRF2MIMOReport:
$ref: "/doc/swagger/include/BladeRF2.yaml#/BladeRF2MIMOReport"
fileInputReport:
$ref: "/doc/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:

View File

@ -1,51 +0,0 @@
TestSourceMISettings:
description: TestSourceMI
properties:
centerFrequency:
type: integer
format: int64
frequencyShift:
type: integer
sampleRate:
type: integer
log2Decim:
type: integer
fcPos:
type: integer
sampleSizeIndex:
type: integer
amplitudeBits:
type: integer
autoCorrOptions:
type: integer
modulation:
type: integer
modulationTone:
type: integer
amModulation:
type: integer
fmDeviation:
type: integer
dcFactor:
type: number
format: float
iFactor:
type: number
format: float
qFactor:
type: number
format: float
phaseImbalance:
type: number
format: float
fileRecordName:
type: string
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer

View File

@ -175,8 +175,6 @@ BladeRF2MIMOSettings:
txTransverterDeltaFrequency:
type: integer
format: int64
fileRecordName:
type: string
useReverseAPI:
description: boolean
type: integer
@ -186,3 +184,27 @@ BladeRF2MIMOSettings:
type: integer
reverseAPIDeviceIndex:
type: integer
BladeRF2MIMOReport:
description: BladeRF2
properties:
frequencyRangeRx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/FrequencyRange"
sampleRateRangeRx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"
bandwidthRangeRx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"
globalGainRangeRx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"
gainModesRx:
type: array
items:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/NamedEnum"
frequencyRangeTx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/FrequencyRange"
sampleRateRangeTx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"
bandwidthRangeTx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"
globalGainRangeTx:
$ref: "http://swgserver:8081/api/swagger/include/Structs.yaml#/Range"

View File

@ -19,6 +19,8 @@ DeviceReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2InputReport"
bladeRF2OutputReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2OutputReport"
bladeRF2MIMOReport:
$ref: "http://swgserver:8081/api/swagger/include/BladeRF2.yaml#/BladeRF2MIMOReport"
fileInputReport:
$ref: "http://swgserver:8081/api/swagger/include/FileInput.yaml#/FileInputReport"
limeSdrInputReport:

View File

@ -1965,6 +1965,41 @@ margin-bottom: 20px;
}
},
"description" : "BladeRF2"
};
defs.BladeRF2MIMOReport = {
"properties" : {
"frequencyRangeRx" : {
"$ref" : "#/definitions/FrequencyRange"
},
"sampleRateRangeRx" : {
"$ref" : "#/definitions/Range"
},
"bandwidthRangeRx" : {
"$ref" : "#/definitions/Range"
},
"globalGainRangeRx" : {
"$ref" : "#/definitions/Range"
},
"gainModesRx" : {
"type" : "array",
"items" : {
"$ref" : "#/definitions/NamedEnum"
}
},
"frequencyRangeTx" : {
"$ref" : "#/definitions/FrequencyRange"
},
"sampleRateRangeTx" : {
"$ref" : "#/definitions/Range"
},
"bandwidthRangeTx" : {
"$ref" : "#/definitions/Range"
},
"globalGainRangeTx" : {
"$ref" : "#/definitions/Range"
}
},
"description" : "BladeRF2"
};
defs.BladeRF2MIMOSettings = {
"properties" : {
@ -2056,9 +2091,6 @@ margin-bottom: 20px;
"type" : "integer",
"format" : "int64"
},
"fileRecordName" : {
"type" : "string"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "boolean"
@ -3392,6 +3424,9 @@ margin-bottom: 20px;
"bladeRF2OutputReport" : {
"$ref" : "#/definitions/BladeRF2OutputReport"
},
"bladeRF2MIMOReport" : {
"$ref" : "#/definitions/BladeRF2MIMOReport"
},
"fileInputReport" : {
"$ref" : "#/definitions/FileInputReport"
},
@ -41052,7 +41087,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2020-11-10T15:35:08.828+01:00
Generated 2020-11-10T17:44:38.740+01:00
</div>
</div>
</div>

View File

@ -0,0 +1,314 @@
/**
* 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, USRP 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.15.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 "SWGBladeRF2MIMOReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGBladeRF2MIMOReport::SWGBladeRF2MIMOReport(QString* json) {
init();
this->fromJson(*json);
}
SWGBladeRF2MIMOReport::SWGBladeRF2MIMOReport() {
frequency_range_rx = nullptr;
m_frequency_range_rx_isSet = false;
sample_rate_range_rx = nullptr;
m_sample_rate_range_rx_isSet = false;
bandwidth_range_rx = nullptr;
m_bandwidth_range_rx_isSet = false;
global_gain_range_rx = nullptr;
m_global_gain_range_rx_isSet = false;
gain_modes_rx = nullptr;
m_gain_modes_rx_isSet = false;
frequency_range_tx = nullptr;
m_frequency_range_tx_isSet = false;
sample_rate_range_tx = nullptr;
m_sample_rate_range_tx_isSet = false;
bandwidth_range_tx = nullptr;
m_bandwidth_range_tx_isSet = false;
global_gain_range_tx = nullptr;
m_global_gain_range_tx_isSet = false;
}
SWGBladeRF2MIMOReport::~SWGBladeRF2MIMOReport() {
this->cleanup();
}
void
SWGBladeRF2MIMOReport::init() {
frequency_range_rx = new SWGFrequencyRange();
m_frequency_range_rx_isSet = false;
sample_rate_range_rx = new SWGRange();
m_sample_rate_range_rx_isSet = false;
bandwidth_range_rx = new SWGRange();
m_bandwidth_range_rx_isSet = false;
global_gain_range_rx = new SWGRange();
m_global_gain_range_rx_isSet = false;
gain_modes_rx = new QList<SWGNamedEnum*>();
m_gain_modes_rx_isSet = false;
frequency_range_tx = new SWGFrequencyRange();
m_frequency_range_tx_isSet = false;
sample_rate_range_tx = new SWGRange();
m_sample_rate_range_tx_isSet = false;
bandwidth_range_tx = new SWGRange();
m_bandwidth_range_tx_isSet = false;
global_gain_range_tx = new SWGRange();
m_global_gain_range_tx_isSet = false;
}
void
SWGBladeRF2MIMOReport::cleanup() {
if(frequency_range_rx != nullptr) {
delete frequency_range_rx;
}
if(sample_rate_range_rx != nullptr) {
delete sample_rate_range_rx;
}
if(bandwidth_range_rx != nullptr) {
delete bandwidth_range_rx;
}
if(global_gain_range_rx != nullptr) {
delete global_gain_range_rx;
}
if(gain_modes_rx != nullptr) {
auto arr = gain_modes_rx;
for(auto o: *arr) {
delete o;
}
delete gain_modes_rx;
}
if(frequency_range_tx != nullptr) {
delete frequency_range_tx;
}
if(sample_rate_range_tx != nullptr) {
delete sample_rate_range_tx;
}
if(bandwidth_range_tx != nullptr) {
delete bandwidth_range_tx;
}
if(global_gain_range_tx != nullptr) {
delete global_gain_range_tx;
}
}
SWGBladeRF2MIMOReport*
SWGBladeRF2MIMOReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGBladeRF2MIMOReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&frequency_range_rx, pJson["frequencyRangeRx"], "SWGFrequencyRange", "SWGFrequencyRange");
::SWGSDRangel::setValue(&sample_rate_range_rx, pJson["sampleRateRangeRx"], "SWGRange", "SWGRange");
::SWGSDRangel::setValue(&bandwidth_range_rx, pJson["bandwidthRangeRx"], "SWGRange", "SWGRange");
::SWGSDRangel::setValue(&global_gain_range_rx, pJson["globalGainRangeRx"], "SWGRange", "SWGRange");
::SWGSDRangel::setValue(&gain_modes_rx, pJson["gainModesRx"], "QList", "SWGNamedEnum");
::SWGSDRangel::setValue(&frequency_range_tx, pJson["frequencyRangeTx"], "SWGFrequencyRange", "SWGFrequencyRange");
::SWGSDRangel::setValue(&sample_rate_range_tx, pJson["sampleRateRangeTx"], "SWGRange", "SWGRange");
::SWGSDRangel::setValue(&bandwidth_range_tx, pJson["bandwidthRangeTx"], "SWGRange", "SWGRange");
::SWGSDRangel::setValue(&global_gain_range_tx, pJson["globalGainRangeTx"], "SWGRange", "SWGRange");
}
QString
SWGBladeRF2MIMOReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGBladeRF2MIMOReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if((frequency_range_rx != nullptr) && (frequency_range_rx->isSet())){
toJsonValue(QString("frequencyRangeRx"), frequency_range_rx, obj, QString("SWGFrequencyRange"));
}
if((sample_rate_range_rx != nullptr) && (sample_rate_range_rx->isSet())){
toJsonValue(QString("sampleRateRangeRx"), sample_rate_range_rx, obj, QString("SWGRange"));
}
if((bandwidth_range_rx != nullptr) && (bandwidth_range_rx->isSet())){
toJsonValue(QString("bandwidthRangeRx"), bandwidth_range_rx, obj, QString("SWGRange"));
}
if((global_gain_range_rx != nullptr) && (global_gain_range_rx->isSet())){
toJsonValue(QString("globalGainRangeRx"), global_gain_range_rx, obj, QString("SWGRange"));
}
if(gain_modes_rx && gain_modes_rx->size() > 0){
toJsonArray((QList<void*>*)gain_modes_rx, obj, "gainModesRx", "SWGNamedEnum");
}
if((frequency_range_tx != nullptr) && (frequency_range_tx->isSet())){
toJsonValue(QString("frequencyRangeTx"), frequency_range_tx, obj, QString("SWGFrequencyRange"));
}
if((sample_rate_range_tx != nullptr) && (sample_rate_range_tx->isSet())){
toJsonValue(QString("sampleRateRangeTx"), sample_rate_range_tx, obj, QString("SWGRange"));
}
if((bandwidth_range_tx != nullptr) && (bandwidth_range_tx->isSet())){
toJsonValue(QString("bandwidthRangeTx"), bandwidth_range_tx, obj, QString("SWGRange"));
}
if((global_gain_range_tx != nullptr) && (global_gain_range_tx->isSet())){
toJsonValue(QString("globalGainRangeTx"), global_gain_range_tx, obj, QString("SWGRange"));
}
return obj;
}
SWGFrequencyRange*
SWGBladeRF2MIMOReport::getFrequencyRangeRx() {
return frequency_range_rx;
}
void
SWGBladeRF2MIMOReport::setFrequencyRangeRx(SWGFrequencyRange* frequency_range_rx) {
this->frequency_range_rx = frequency_range_rx;
this->m_frequency_range_rx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getSampleRateRangeRx() {
return sample_rate_range_rx;
}
void
SWGBladeRF2MIMOReport::setSampleRateRangeRx(SWGRange* sample_rate_range_rx) {
this->sample_rate_range_rx = sample_rate_range_rx;
this->m_sample_rate_range_rx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getBandwidthRangeRx() {
return bandwidth_range_rx;
}
void
SWGBladeRF2MIMOReport::setBandwidthRangeRx(SWGRange* bandwidth_range_rx) {
this->bandwidth_range_rx = bandwidth_range_rx;
this->m_bandwidth_range_rx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getGlobalGainRangeRx() {
return global_gain_range_rx;
}
void
SWGBladeRF2MIMOReport::setGlobalGainRangeRx(SWGRange* global_gain_range_rx) {
this->global_gain_range_rx = global_gain_range_rx;
this->m_global_gain_range_rx_isSet = true;
}
QList<SWGNamedEnum*>*
SWGBladeRF2MIMOReport::getGainModesRx() {
return gain_modes_rx;
}
void
SWGBladeRF2MIMOReport::setGainModesRx(QList<SWGNamedEnum*>* gain_modes_rx) {
this->gain_modes_rx = gain_modes_rx;
this->m_gain_modes_rx_isSet = true;
}
SWGFrequencyRange*
SWGBladeRF2MIMOReport::getFrequencyRangeTx() {
return frequency_range_tx;
}
void
SWGBladeRF2MIMOReport::setFrequencyRangeTx(SWGFrequencyRange* frequency_range_tx) {
this->frequency_range_tx = frequency_range_tx;
this->m_frequency_range_tx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getSampleRateRangeTx() {
return sample_rate_range_tx;
}
void
SWGBladeRF2MIMOReport::setSampleRateRangeTx(SWGRange* sample_rate_range_tx) {
this->sample_rate_range_tx = sample_rate_range_tx;
this->m_sample_rate_range_tx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getBandwidthRangeTx() {
return bandwidth_range_tx;
}
void
SWGBladeRF2MIMOReport::setBandwidthRangeTx(SWGRange* bandwidth_range_tx) {
this->bandwidth_range_tx = bandwidth_range_tx;
this->m_bandwidth_range_tx_isSet = true;
}
SWGRange*
SWGBladeRF2MIMOReport::getGlobalGainRangeTx() {
return global_gain_range_tx;
}
void
SWGBladeRF2MIMOReport::setGlobalGainRangeTx(SWGRange* global_gain_range_tx) {
this->global_gain_range_tx = global_gain_range_tx;
this->m_global_gain_range_tx_isSet = true;
}
bool
SWGBladeRF2MIMOReport::isSet(){
bool isObjectUpdated = false;
do{
if(frequency_range_rx && frequency_range_rx->isSet()){
isObjectUpdated = true; break;
}
if(sample_rate_range_rx && sample_rate_range_rx->isSet()){
isObjectUpdated = true; break;
}
if(bandwidth_range_rx && bandwidth_range_rx->isSet()){
isObjectUpdated = true; break;
}
if(global_gain_range_rx && global_gain_range_rx->isSet()){
isObjectUpdated = true; break;
}
if(gain_modes_rx && (gain_modes_rx->size() > 0)){
isObjectUpdated = true; break;
}
if(frequency_range_tx && frequency_range_tx->isSet()){
isObjectUpdated = true; break;
}
if(sample_rate_range_tx && sample_rate_range_tx->isSet()){
isObjectUpdated = true; break;
}
if(bandwidth_range_tx && bandwidth_range_tx->isSet()){
isObjectUpdated = true; break;
}
if(global_gain_range_tx && global_gain_range_tx->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,110 @@
/**
* 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, USRP 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.15.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.
*/
/*
* SWGBladeRF2MIMOReport.h
*
* BladeRF2
*/
#ifndef SWGBladeRF2MIMOReport_H_
#define SWGBladeRF2MIMOReport_H_
#include <QJsonObject>
#include "SWGFrequencyRange.h"
#include "SWGNamedEnum.h"
#include "SWGRange.h"
#include <QList>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGBladeRF2MIMOReport: public SWGObject {
public:
SWGBladeRF2MIMOReport();
SWGBladeRF2MIMOReport(QString* json);
virtual ~SWGBladeRF2MIMOReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGBladeRF2MIMOReport* fromJson(QString &jsonString) override;
SWGFrequencyRange* getFrequencyRangeRx();
void setFrequencyRangeRx(SWGFrequencyRange* frequency_range_rx);
SWGRange* getSampleRateRangeRx();
void setSampleRateRangeRx(SWGRange* sample_rate_range_rx);
SWGRange* getBandwidthRangeRx();
void setBandwidthRangeRx(SWGRange* bandwidth_range_rx);
SWGRange* getGlobalGainRangeRx();
void setGlobalGainRangeRx(SWGRange* global_gain_range_rx);
QList<SWGNamedEnum*>* getGainModesRx();
void setGainModesRx(QList<SWGNamedEnum*>* gain_modes_rx);
SWGFrequencyRange* getFrequencyRangeTx();
void setFrequencyRangeTx(SWGFrequencyRange* frequency_range_tx);
SWGRange* getSampleRateRangeTx();
void setSampleRateRangeTx(SWGRange* sample_rate_range_tx);
SWGRange* getBandwidthRangeTx();
void setBandwidthRangeTx(SWGRange* bandwidth_range_tx);
SWGRange* getGlobalGainRangeTx();
void setGlobalGainRangeTx(SWGRange* global_gain_range_tx);
virtual bool isSet() override;
private:
SWGFrequencyRange* frequency_range_rx;
bool m_frequency_range_rx_isSet;
SWGRange* sample_rate_range_rx;
bool m_sample_rate_range_rx_isSet;
SWGRange* bandwidth_range_rx;
bool m_bandwidth_range_rx_isSet;
SWGRange* global_gain_range_rx;
bool m_global_gain_range_rx_isSet;
QList<SWGNamedEnum*>* gain_modes_rx;
bool m_gain_modes_rx_isSet;
SWGFrequencyRange* frequency_range_tx;
bool m_frequency_range_tx_isSet;
SWGRange* sample_rate_range_tx;
bool m_sample_rate_range_tx_isSet;
SWGRange* bandwidth_range_tx;
bool m_bandwidth_range_tx_isSet;
SWGRange* global_gain_range_tx;
bool m_global_gain_range_tx_isSet;
};
}
#endif /* SWGBladeRF2MIMOReport_H_ */

View File

@ -78,8 +78,6 @@ SWGBladeRF2MIMOSettings::SWGBladeRF2MIMOSettings() {
m_tx_transverter_mode_isSet = false;
tx_transverter_delta_frequency = 0L;
m_tx_transverter_delta_frequency_isSet = false;
file_record_name = nullptr;
m_file_record_name_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
@ -146,8 +144,6 @@ SWGBladeRF2MIMOSettings::init() {
m_tx_transverter_mode_isSet = false;
tx_transverter_delta_frequency = 0L;
m_tx_transverter_delta_frequency_isSet = false;
file_record_name = new QString("");
m_file_record_name_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
@ -185,9 +181,6 @@ SWGBladeRF2MIMOSettings::cleanup() {
if(file_record_name != nullptr) {
delete file_record_name;
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
@ -257,8 +250,6 @@ SWGBladeRF2MIMOSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&tx_transverter_delta_frequency, pJson["txTransverterDeltaFrequency"], "qint64", "");
::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
@ -358,9 +349,6 @@ SWGBladeRF2MIMOSettings::asJsonObject() {
if(m_tx_transverter_delta_frequency_isSet){
obj->insert("txTransverterDeltaFrequency", QJsonValue(tx_transverter_delta_frequency));
}
if(file_record_name != nullptr && *file_record_name != QString("")){
toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
@ -627,16 +615,6 @@ SWGBladeRF2MIMOSettings::setTxTransverterDeltaFrequency(qint64 tx_transverter_de
this->m_tx_transverter_delta_frequency_isSet = true;
}
QString*
SWGBladeRF2MIMOSettings::getFileRecordName() {
return file_record_name;
}
void
SWGBladeRF2MIMOSettings::setFileRecordName(QString* file_record_name) {
this->file_record_name = file_record_name;
this->m_file_record_name_isSet = true;
}
qint32
SWGBladeRF2MIMOSettings::getUseReverseApi() {
return use_reverse_api;
@ -757,9 +735,6 @@ SWGBladeRF2MIMOSettings::isSet(){
if(m_tx_transverter_delta_frequency_isSet){
isObjectUpdated = true; break;
}
if(file_record_name && *file_record_name != QString("")){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}

View File

@ -117,9 +117,6 @@ public:
qint64 getTxTransverterDeltaFrequency();
void setTxTransverterDeltaFrequency(qint64 tx_transverter_delta_frequency);
QString* getFileRecordName();
void setFileRecordName(QString* file_record_name);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
@ -211,9 +208,6 @@ private:
qint64 tx_transverter_delta_frequency;
bool m_tx_transverter_delta_frequency_isSet;
QString* file_record_name;
bool m_file_record_name_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;

View File

@ -40,6 +40,8 @@ SWGDeviceReport::SWGDeviceReport() {
m_blade_rf2_input_report_isSet = false;
blade_rf2_output_report = nullptr;
m_blade_rf2_output_report_isSet = false;
blade_rf2_mimo_report = nullptr;
m_blade_rf2_mimo_report_isSet = false;
file_input_report = nullptr;
m_file_input_report_isSet = false;
lime_sdr_input_report = nullptr;
@ -100,6 +102,8 @@ SWGDeviceReport::init() {
m_blade_rf2_input_report_isSet = false;
blade_rf2_output_report = new SWGBladeRF2OutputReport();
m_blade_rf2_output_report_isSet = false;
blade_rf2_mimo_report = new SWGBladeRF2MIMOReport();
m_blade_rf2_mimo_report_isSet = false;
file_input_report = new SWGFileInputReport();
m_file_input_report_isSet = false;
lime_sdr_input_report = new SWGLimeSdrInputReport();
@ -160,6 +164,9 @@ SWGDeviceReport::cleanup() {
if(blade_rf2_output_report != nullptr) {
delete blade_rf2_output_report;
}
if(blade_rf2_mimo_report != nullptr) {
delete blade_rf2_mimo_report;
}
if(file_input_report != nullptr) {
delete file_input_report;
}
@ -245,6 +252,8 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&blade_rf2_output_report, pJson["bladeRF2OutputReport"], "SWGBladeRF2OutputReport", "SWGBladeRF2OutputReport");
::SWGSDRangel::setValue(&blade_rf2_mimo_report, pJson["bladeRF2MIMOReport"], "SWGBladeRF2MIMOReport", "SWGBladeRF2MIMOReport");
::SWGSDRangel::setValue(&file_input_report, pJson["fileInputReport"], "SWGFileInputReport", "SWGFileInputReport");
::SWGSDRangel::setValue(&lime_sdr_input_report, pJson["limeSdrInputReport"], "SWGLimeSdrInputReport", "SWGLimeSdrInputReport");
@ -319,6 +328,9 @@ SWGDeviceReport::asJsonObject() {
if((blade_rf2_output_report != nullptr) && (blade_rf2_output_report->isSet())){
toJsonValue(QString("bladeRF2OutputReport"), blade_rf2_output_report, obj, QString("SWGBladeRF2OutputReport"));
}
if((blade_rf2_mimo_report != nullptr) && (blade_rf2_mimo_report->isSet())){
toJsonValue(QString("bladeRF2MIMOReport"), blade_rf2_mimo_report, obj, QString("SWGBladeRF2MIMOReport"));
}
if((file_input_report != nullptr) && (file_input_report->isSet())){
toJsonValue(QString("fileInputReport"), file_input_report, obj, QString("SWGFileInputReport"));
}
@ -443,6 +455,16 @@ SWGDeviceReport::setBladeRf2OutputReport(SWGBladeRF2OutputReport* blade_rf2_outp
this->m_blade_rf2_output_report_isSet = true;
}
SWGBladeRF2MIMOReport*
SWGDeviceReport::getBladeRf2MimoReport() {
return blade_rf2_mimo_report;
}
void
SWGDeviceReport::setBladeRf2MimoReport(SWGBladeRF2MIMOReport* blade_rf2_mimo_report) {
this->blade_rf2_mimo_report = blade_rf2_mimo_report;
this->m_blade_rf2_mimo_report_isSet = true;
}
SWGFileInputReport*
SWGDeviceReport::getFileInputReport() {
return file_input_report;
@ -666,6 +688,9 @@ SWGDeviceReport::isSet(){
if(blade_rf2_output_report && blade_rf2_output_report->isSet()){
isObjectUpdated = true; break;
}
if(blade_rf2_mimo_report && blade_rf2_mimo_report->isSet()){
isObjectUpdated = true; break;
}
if(file_input_report && file_input_report->isSet()){
isObjectUpdated = true; break;
}

View File

@ -25,6 +25,7 @@
#include "SWGAirspyHFReport.h"
#include "SWGAirspyReport.h"
#include "SWGBladeRF2InputReport.h"
#include "SWGBladeRF2MIMOReport.h"
#include "SWGBladeRF2OutputReport.h"
#include "SWGFileInputReport.h"
#include "SWGKiwiSDRReport.h"
@ -83,6 +84,9 @@ public:
SWGBladeRF2OutputReport* getBladeRf2OutputReport();
void setBladeRf2OutputReport(SWGBladeRF2OutputReport* blade_rf2_output_report);
SWGBladeRF2MIMOReport* getBladeRf2MimoReport();
void setBladeRf2MimoReport(SWGBladeRF2MIMOReport* blade_rf2_mimo_report);
SWGFileInputReport* getFileInputReport();
void setFileInputReport(SWGFileInputReport* file_input_report);
@ -165,6 +169,9 @@ private:
SWGBladeRF2OutputReport* blade_rf2_output_report;
bool m_blade_rf2_output_report_isSet;
SWGBladeRF2MIMOReport* blade_rf2_mimo_report;
bool m_blade_rf2_mimo_report_isSet;
SWGFileInputReport* file_input_report;
bool m_file_input_report_isSet;

View File

@ -45,6 +45,7 @@
#include "SWGBladeRF1OutputSettings.h"
#include "SWGBladeRF2InputReport.h"
#include "SWGBladeRF2InputSettings.h"
#include "SWGBladeRF2MIMOReport.h"
#include "SWGBladeRF2MIMOSettings.h"
#include "SWGBladeRF2OutputReport.h"
#include "SWGBladeRF2OutputSettings.h"
@ -317,6 +318,9 @@ namespace SWGSDRangel {
if(QString("SWGBladeRF2InputSettings").compare(type) == 0) {
return new SWGBladeRF2InputSettings();
}
if(QString("SWGBladeRF2MIMOReport").compare(type) == 0) {
return new SWGBladeRF2MIMOReport();
}
if(QString("SWGBladeRF2MIMOSettings").compare(type) == 0) {
return new SWGBladeRF2MIMOSettings();
}