mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-01 16:38:06 -04:00
LimeRFE USB support: REST API: generated code
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -531,6 +531,111 @@ paths:
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/limerfe/serial:
|
||||
x-swagger-router-controller: instance
|
||||
get:
|
||||
description: get a list of available serial interfaces to LimeRFE device
|
||||
operationId: instanceLimeRFESerialGet
|
||||
tags:
|
||||
- Instance
|
||||
responses:
|
||||
"200":
|
||||
description: On success return list of device paths possibly empty
|
||||
schema:
|
||||
$ref: "#/definitions/LimeRFEDevices"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/limerfe/config:
|
||||
x-swagger-router-controller: instance
|
||||
get:
|
||||
description: get LimeRFE configuration
|
||||
operationId: instanceLimeRFEConfigGet
|
||||
tags:
|
||||
- Instance
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: serial
|
||||
in: query
|
||||
description: device serial path
|
||||
required: true
|
||||
type: string
|
||||
responses:
|
||||
"200":
|
||||
description: On success return configuration information for the given device in input
|
||||
schema:
|
||||
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
put:
|
||||
description: replace LimeRFE configuration
|
||||
operationId: instanceLimeRFEConfigPut
|
||||
tags:
|
||||
- Instance
|
||||
consumes:
|
||||
- application/json
|
||||
parameters:
|
||||
- name: body
|
||||
in: body
|
||||
description: Give device serial path in devicePath field. To switch Rx and/or Tx on or off use the run API.
|
||||
required: true
|
||||
schema:
|
||||
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings"
|
||||
responses:
|
||||
"200":
|
||||
description: Success
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Error
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: LimeRFE device not found
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/limerfe/run:
|
||||
x-swagger-router-controller: instance
|
||||
put:
|
||||
description: set Rx and Tx on or off
|
||||
operationId: instanceLimeRFERunPut
|
||||
tags:
|
||||
- Instance
|
||||
parameters:
|
||||
- name: body
|
||||
in: body
|
||||
description: Give device serial path in devicePath field and run status in rxOn and txOn
|
||||
required: true
|
||||
schema:
|
||||
$ref: "/doc/swagger/include/LimeRFE.yaml#/LimeRFESettings"
|
||||
responses:
|
||||
"200":
|
||||
description: Success
|
||||
schema:
|
||||
$ref: "#/definitions/SuccessResponse"
|
||||
"400":
|
||||
description: Error
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"404":
|
||||
description: LimeRFE device not found
|
||||
schema:
|
||||
$ref: "#/definitions/ErrorResponse"
|
||||
"500":
|
||||
$ref: "#/responses/Response_500"
|
||||
"501":
|
||||
$ref: "#/responses/Response_501"
|
||||
|
||||
/sdrangel/presets:
|
||||
x-swagger-router-controller: instance
|
||||
get:
|
||||
@@ -1939,6 +2044,27 @@ definitions:
|
||||
description: "1 if device is to be removed from active list"
|
||||
type: integer
|
||||
|
||||
LimeRFEDevices:
|
||||
description: "List of LimeRFE devices (serial or server address)"
|
||||
required:
|
||||
- nbDevices
|
||||
properties:
|
||||
nbDevices:
|
||||
description: "Number of LimeRFE serial interfaces"
|
||||
type: integer
|
||||
limeRFEDevices:
|
||||
description: "List of LimeRFE devices"
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/definitions/LimeRFEDevice"
|
||||
|
||||
LimeRFEDevice:
|
||||
description: "LimeRFE device active in the system"
|
||||
properties:
|
||||
deviceRef:
|
||||
description: "Serial device name or server address"
|
||||
type: string
|
||||
|
||||
Presets:
|
||||
description: "Settings presets"
|
||||
required:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1056,6 +1056,228 @@ SWGInstanceApi::instanceDevicesCallback(SWGHttpRequestWorker * worker) {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFEConfigGet(QString* serial) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/config");
|
||||
|
||||
|
||||
if (fullPath.indexOf("?") > 0)
|
||||
fullPath.append("&");
|
||||
else
|
||||
fullPath.append("?");
|
||||
fullPath.append(QUrl::toPercentEncoding("serial"))
|
||||
.append("=")
|
||||
.append(QUrl::toPercentEncoding(stringValue(serial)));
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "GET");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGInstanceApi::instanceLimeRFEConfigGetCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFEConfigGetCallback(SWGHttpRequestWorker * worker) {
|
||||
QString msg;
|
||||
QString error_str = worker->error_str;
|
||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||
}
|
||||
else {
|
||||
msg = "Error: " + worker->error_str;
|
||||
}
|
||||
|
||||
|
||||
QString json(worker->response);
|
||||
SWGLimeRFESettings* output = static_cast<SWGLimeRFESettings*>(create(json, QString("SWGLimeRFESettings")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit instanceLimeRFEConfigGetSignal(output);
|
||||
} else {
|
||||
emit instanceLimeRFEConfigGetSignalE(output, error_type, error_str);
|
||||
emit instanceLimeRFEConfigGetSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFEConfigPut(SWGLimeRFESettings& body) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/config");
|
||||
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "PUT");
|
||||
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGInstanceApi::instanceLimeRFEConfigPutCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFEConfigPutCallback(SWGHttpRequestWorker * worker) {
|
||||
QString msg;
|
||||
QString error_str = worker->error_str;
|
||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||
}
|
||||
else {
|
||||
msg = "Error: " + worker->error_str;
|
||||
}
|
||||
|
||||
|
||||
QString json(worker->response);
|
||||
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit instanceLimeRFEConfigPutSignal(output);
|
||||
} else {
|
||||
emit instanceLimeRFEConfigPutSignalE(output, error_type, error_str);
|
||||
emit instanceLimeRFEConfigPutSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFERunPut(SWGLimeRFESettings& body) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/run");
|
||||
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "PUT");
|
||||
|
||||
|
||||
|
||||
QString output = body.asJson();
|
||||
input.request_body.append(output);
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGInstanceApi::instanceLimeRFERunPutCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFERunPutCallback(SWGHttpRequestWorker * worker) {
|
||||
QString msg;
|
||||
QString error_str = worker->error_str;
|
||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||
}
|
||||
else {
|
||||
msg = "Error: " + worker->error_str;
|
||||
}
|
||||
|
||||
|
||||
QString json(worker->response);
|
||||
SWGSuccessResponse* output = static_cast<SWGSuccessResponse*>(create(json, QString("SWGSuccessResponse")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit instanceLimeRFERunPutSignal(output);
|
||||
} else {
|
||||
emit instanceLimeRFERunPutSignalE(output, error_type, error_str);
|
||||
emit instanceLimeRFERunPutSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFESerialGet() {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/limerfe/serial");
|
||||
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "GET");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGInstanceApi::instanceLimeRFESerialGetCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLimeRFESerialGetCallback(SWGHttpRequestWorker * worker) {
|
||||
QString msg;
|
||||
QString error_str = worker->error_str;
|
||||
QNetworkReply::NetworkError error_type = worker->error_type;
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
msg = QString("Success! %1 bytes").arg(worker->response.length());
|
||||
}
|
||||
else {
|
||||
msg = "Error: " + worker->error_str;
|
||||
}
|
||||
|
||||
|
||||
QString json(worker->response);
|
||||
SWGLimeRFEDevices* output = static_cast<SWGLimeRFEDevices*>(create(json, QString("SWGLimeRFEDevices")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit instanceLimeRFESerialGetSignal(output);
|
||||
} else {
|
||||
emit instanceLimeRFESerialGetSignalE(output, error_type, error_str);
|
||||
emit instanceLimeRFESerialGetSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGInstanceApi::instanceLocationGet() {
|
||||
QString fullPath;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "SWGHttpRequest.h"
|
||||
|
||||
#include <QString>
|
||||
#include "SWGAMBEDevices.h"
|
||||
#include "SWGAudioDevices.h"
|
||||
#include "SWGAudioInputDevice.h"
|
||||
@@ -26,6 +27,8 @@
|
||||
#include "SWGInstanceConfigResponse.h"
|
||||
#include "SWGInstanceDevicesResponse.h"
|
||||
#include "SWGInstanceSummaryResponse.h"
|
||||
#include "SWGLimeRFEDevices.h"
|
||||
#include "SWGLimeRFESettings.h"
|
||||
#include "SWGLocationInformation.h"
|
||||
#include "SWGLoggingInfo.h"
|
||||
#include "SWGPresetExport.h"
|
||||
@@ -70,6 +73,10 @@ public:
|
||||
void instanceDelete();
|
||||
void instanceDeviceSetsGet();
|
||||
void instanceDevices(qint32 direction);
|
||||
void instanceLimeRFEConfigGet(QString* serial);
|
||||
void instanceLimeRFEConfigPut(SWGLimeRFESettings& body);
|
||||
void instanceLimeRFERunPut(SWGLimeRFESettings& body);
|
||||
void instanceLimeRFESerialGet();
|
||||
void instanceLocationGet();
|
||||
void instanceLocationPut(SWGLocationInformation& body);
|
||||
void instanceLoggingGet();
|
||||
@@ -103,6 +110,10 @@ private:
|
||||
void instanceDeleteCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceDeviceSetsGetCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceDevicesCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLimeRFEConfigGetCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLimeRFEConfigPutCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLimeRFERunPutCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLimeRFESerialGetCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLocationGetCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLocationPutCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceLoggingGetCallback (SWGHttpRequestWorker * worker);
|
||||
@@ -136,6 +147,10 @@ signals:
|
||||
void instanceDeleteSignal(SWGInstanceSummaryResponse* summary);
|
||||
void instanceDeviceSetsGetSignal(SWGDeviceSetList* summary);
|
||||
void instanceDevicesSignal(SWGInstanceDevicesResponse* summary);
|
||||
void instanceLimeRFEConfigGetSignal(SWGLimeRFESettings* summary);
|
||||
void instanceLimeRFEConfigPutSignal(SWGSuccessResponse* summary);
|
||||
void instanceLimeRFERunPutSignal(SWGSuccessResponse* summary);
|
||||
void instanceLimeRFESerialGetSignal(SWGLimeRFEDevices* summary);
|
||||
void instanceLocationGetSignal(SWGLocationInformation* summary);
|
||||
void instanceLocationPutSignal(SWGLocationInformation* summary);
|
||||
void instanceLoggingGetSignal(SWGLoggingInfo* summary);
|
||||
@@ -168,6 +183,10 @@ signals:
|
||||
void instanceDeleteSignalE(SWGInstanceSummaryResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetsGetSignalE(SWGDeviceSetList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDevicesSignalE(SWGInstanceDevicesResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFEConfigGetSignalE(SWGLimeRFESettings* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFEConfigPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFERunPutSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFESerialGetSignalE(SWGLimeRFEDevices* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLocationGetSignalE(SWGLocationInformation* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLocationPutSignalE(SWGLocationInformation* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLoggingGetSignalE(SWGLoggingInfo* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
@@ -200,6 +219,10 @@ signals:
|
||||
void instanceDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDevicesSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFEConfigGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFEConfigPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFERunPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLimeRFESerialGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLocationGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLocationPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceLoggingGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
|
||||
@@ -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 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: 5.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 "SWGLimeRFEDevice.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGLimeRFEDevice::SWGLimeRFEDevice(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGLimeRFEDevice::SWGLimeRFEDevice() {
|
||||
device_ref = nullptr;
|
||||
m_device_ref_isSet = false;
|
||||
}
|
||||
|
||||
SWGLimeRFEDevice::~SWGLimeRFEDevice() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevice::init() {
|
||||
device_ref = new QString("");
|
||||
m_device_ref_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevice::cleanup() {
|
||||
if(device_ref != nullptr) {
|
||||
delete device_ref;
|
||||
}
|
||||
}
|
||||
|
||||
SWGLimeRFEDevice*
|
||||
SWGLimeRFEDevice::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevice::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&device_ref, pJson["deviceRef"], "QString", "QString");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGLimeRFEDevice::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGLimeRFEDevice::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(device_ref != nullptr && *device_ref != QString("")){
|
||||
toJsonValue(QString("deviceRef"), device_ref, obj, QString("QString"));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGLimeRFEDevice::getDeviceRef() {
|
||||
return device_ref;
|
||||
}
|
||||
void
|
||||
SWGLimeRFEDevice::setDeviceRef(QString* device_ref) {
|
||||
this->device_ref = device_ref;
|
||||
this->m_device_ref_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGLimeRFEDevice::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(device_ref && *device_ref != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* 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: 5.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGLimeRFEDevice.h
|
||||
*
|
||||
* LimeRFE device active in the system
|
||||
*/
|
||||
|
||||
#ifndef SWGLimeRFEDevice_H_
|
||||
#define SWGLimeRFEDevice_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGLimeRFEDevice: public SWGObject {
|
||||
public:
|
||||
SWGLimeRFEDevice();
|
||||
SWGLimeRFEDevice(QString* json);
|
||||
virtual ~SWGLimeRFEDevice();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGLimeRFEDevice* fromJson(QString &jsonString) override;
|
||||
|
||||
QString* getDeviceRef();
|
||||
void setDeviceRef(QString* device_ref);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QString* device_ref;
|
||||
bool m_device_ref_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGLimeRFEDevice_H_ */
|
||||
@@ -0,0 +1,137 @@
|
||||
/**
|
||||
* 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: 5.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 "SWGLimeRFEDevices.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGLimeRFEDevices::SWGLimeRFEDevices(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGLimeRFEDevices::SWGLimeRFEDevices() {
|
||||
nb_devices = 0;
|
||||
m_nb_devices_isSet = false;
|
||||
lime_rfe_devices = nullptr;
|
||||
m_lime_rfe_devices_isSet = false;
|
||||
}
|
||||
|
||||
SWGLimeRFEDevices::~SWGLimeRFEDevices() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevices::init() {
|
||||
nb_devices = 0;
|
||||
m_nb_devices_isSet = false;
|
||||
lime_rfe_devices = new QList<SWGLimeRFEDevice*>();
|
||||
m_lime_rfe_devices_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevices::cleanup() {
|
||||
|
||||
if(lime_rfe_devices != nullptr) {
|
||||
auto arr = lime_rfe_devices;
|
||||
for(auto o: *arr) {
|
||||
delete o;
|
||||
}
|
||||
delete lime_rfe_devices;
|
||||
}
|
||||
}
|
||||
|
||||
SWGLimeRFEDevices*
|
||||
SWGLimeRFEDevices::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFEDevices::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&nb_devices, pJson["nbDevices"], "qint32", "");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&lime_rfe_devices, pJson["limeRFEDevices"], "QList", "SWGLimeRFEDevice");
|
||||
}
|
||||
|
||||
QString
|
||||
SWGLimeRFEDevices::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGLimeRFEDevices::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_nb_devices_isSet){
|
||||
obj->insert("nbDevices", QJsonValue(nb_devices));
|
||||
}
|
||||
if(lime_rfe_devices && lime_rfe_devices->size() > 0){
|
||||
toJsonArray((QList<void*>*)lime_rfe_devices, obj, "limeRFEDevices", "SWGLimeRFEDevice");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFEDevices::getNbDevices() {
|
||||
return nb_devices;
|
||||
}
|
||||
void
|
||||
SWGLimeRFEDevices::setNbDevices(qint32 nb_devices) {
|
||||
this->nb_devices = nb_devices;
|
||||
this->m_nb_devices_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGLimeRFEDevice*>*
|
||||
SWGLimeRFEDevices::getLimeRfeDevices() {
|
||||
return lime_rfe_devices;
|
||||
}
|
||||
void
|
||||
SWGLimeRFEDevices::setLimeRfeDevices(QList<SWGLimeRFEDevice*>* lime_rfe_devices) {
|
||||
this->lime_rfe_devices = lime_rfe_devices;
|
||||
this->m_lime_rfe_devices_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGLimeRFEDevices::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_nb_devices_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(lime_rfe_devices && (lime_rfe_devices->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/**
|
||||
* 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: 5.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGLimeRFEDevices.h
|
||||
*
|
||||
* List of LimeRFE devices (serial or server address)
|
||||
*/
|
||||
|
||||
#ifndef SWGLimeRFEDevices_H_
|
||||
#define SWGLimeRFEDevices_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGLimeRFEDevice.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGLimeRFEDevices: public SWGObject {
|
||||
public:
|
||||
SWGLimeRFEDevices();
|
||||
SWGLimeRFEDevices(QString* json);
|
||||
virtual ~SWGLimeRFEDevices();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGLimeRFEDevices* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getNbDevices();
|
||||
void setNbDevices(qint32 nb_devices);
|
||||
|
||||
QList<SWGLimeRFEDevice*>* getLimeRfeDevices();
|
||||
void setLimeRfeDevices(QList<SWGLimeRFEDevice*>* lime_rfe_devices);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 nb_devices;
|
||||
bool m_nb_devices_isSet;
|
||||
|
||||
QList<SWGLimeRFEDevice*>* lime_rfe_devices;
|
||||
bool m_lime_rfe_devices_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGLimeRFEDevices_H_ */
|
||||
@@ -0,0 +1,432 @@
|
||||
/**
|
||||
* 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: 5.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 "SWGLimeRFESettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGLimeRFESettings::SWGLimeRFESettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGLimeRFESettings::SWGLimeRFESettings() {
|
||||
device_path = nullptr;
|
||||
m_device_path_isSet = false;
|
||||
rx_channels = 0;
|
||||
m_rx_channels_isSet = false;
|
||||
rx_wideband_channel = 0;
|
||||
m_rx_wideband_channel_isSet = false;
|
||||
rx_ham_channel = 0;
|
||||
m_rx_ham_channel_isSet = false;
|
||||
rx_cellular_channel = 0;
|
||||
m_rx_cellular_channel_isSet = false;
|
||||
rx_port = 0;
|
||||
m_rx_port_isSet = false;
|
||||
attenuation_factor = 0;
|
||||
m_attenuation_factor_isSet = false;
|
||||
amfm_notch = 0;
|
||||
m_amfm_notch_isSet = false;
|
||||
tx_channels = 0;
|
||||
m_tx_channels_isSet = false;
|
||||
tx_wideband_channel = 0;
|
||||
m_tx_wideband_channel_isSet = false;
|
||||
tx_ham_channel = 0;
|
||||
m_tx_ham_channel_isSet = false;
|
||||
tx_cellular_channel = 0;
|
||||
m_tx_cellular_channel_isSet = false;
|
||||
tx_port = 0;
|
||||
m_tx_port_isSet = false;
|
||||
rx_on = 0;
|
||||
m_rx_on_isSet = false;
|
||||
tx_on = 0;
|
||||
m_tx_on_isSet = false;
|
||||
}
|
||||
|
||||
SWGLimeRFESettings::~SWGLimeRFESettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFESettings::init() {
|
||||
device_path = new QString("");
|
||||
m_device_path_isSet = false;
|
||||
rx_channels = 0;
|
||||
m_rx_channels_isSet = false;
|
||||
rx_wideband_channel = 0;
|
||||
m_rx_wideband_channel_isSet = false;
|
||||
rx_ham_channel = 0;
|
||||
m_rx_ham_channel_isSet = false;
|
||||
rx_cellular_channel = 0;
|
||||
m_rx_cellular_channel_isSet = false;
|
||||
rx_port = 0;
|
||||
m_rx_port_isSet = false;
|
||||
attenuation_factor = 0;
|
||||
m_attenuation_factor_isSet = false;
|
||||
amfm_notch = 0;
|
||||
m_amfm_notch_isSet = false;
|
||||
tx_channels = 0;
|
||||
m_tx_channels_isSet = false;
|
||||
tx_wideband_channel = 0;
|
||||
m_tx_wideband_channel_isSet = false;
|
||||
tx_ham_channel = 0;
|
||||
m_tx_ham_channel_isSet = false;
|
||||
tx_cellular_channel = 0;
|
||||
m_tx_cellular_channel_isSet = false;
|
||||
tx_port = 0;
|
||||
m_tx_port_isSet = false;
|
||||
rx_on = 0;
|
||||
m_rx_on_isSet = false;
|
||||
tx_on = 0;
|
||||
m_tx_on_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFESettings::cleanup() {
|
||||
if(device_path != nullptr) {
|
||||
delete device_path;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGLimeRFESettings*
|
||||
SWGLimeRFESettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGLimeRFESettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&device_path, pJson["devicePath"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_channels, pJson["rxChannels"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_wideband_channel, pJson["rxWidebandChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_ham_channel, pJson["rxHAMChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_cellular_channel, pJson["rxCellularChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_port, pJson["rxPort"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&attenuation_factor, pJson["attenuationFactor"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&amfm_notch, pJson["amfmNotch"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_channels, pJson["txChannels"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_wideband_channel, pJson["txWidebandChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_ham_channel, pJson["txHAMChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_cellular_channel, pJson["txCellularChannel"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_port, pJson["txPort"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rx_on, pJson["rxOn"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&tx_on, pJson["txOn"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGLimeRFESettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGLimeRFESettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(device_path != nullptr && *device_path != QString("")){
|
||||
toJsonValue(QString("devicePath"), device_path, obj, QString("QString"));
|
||||
}
|
||||
if(m_rx_channels_isSet){
|
||||
obj->insert("rxChannels", QJsonValue(rx_channels));
|
||||
}
|
||||
if(m_rx_wideband_channel_isSet){
|
||||
obj->insert("rxWidebandChannel", QJsonValue(rx_wideband_channel));
|
||||
}
|
||||
if(m_rx_ham_channel_isSet){
|
||||
obj->insert("rxHAMChannel", QJsonValue(rx_ham_channel));
|
||||
}
|
||||
if(m_rx_cellular_channel_isSet){
|
||||
obj->insert("rxCellularChannel", QJsonValue(rx_cellular_channel));
|
||||
}
|
||||
if(m_rx_port_isSet){
|
||||
obj->insert("rxPort", QJsonValue(rx_port));
|
||||
}
|
||||
if(m_attenuation_factor_isSet){
|
||||
obj->insert("attenuationFactor", QJsonValue(attenuation_factor));
|
||||
}
|
||||
if(m_amfm_notch_isSet){
|
||||
obj->insert("amfmNotch", QJsonValue(amfm_notch));
|
||||
}
|
||||
if(m_tx_channels_isSet){
|
||||
obj->insert("txChannels", QJsonValue(tx_channels));
|
||||
}
|
||||
if(m_tx_wideband_channel_isSet){
|
||||
obj->insert("txWidebandChannel", QJsonValue(tx_wideband_channel));
|
||||
}
|
||||
if(m_tx_ham_channel_isSet){
|
||||
obj->insert("txHAMChannel", QJsonValue(tx_ham_channel));
|
||||
}
|
||||
if(m_tx_cellular_channel_isSet){
|
||||
obj->insert("txCellularChannel", QJsonValue(tx_cellular_channel));
|
||||
}
|
||||
if(m_tx_port_isSet){
|
||||
obj->insert("txPort", QJsonValue(tx_port));
|
||||
}
|
||||
if(m_rx_on_isSet){
|
||||
obj->insert("rxOn", QJsonValue(rx_on));
|
||||
}
|
||||
if(m_tx_on_isSet){
|
||||
obj->insert("txOn", QJsonValue(tx_on));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGLimeRFESettings::getDevicePath() {
|
||||
return device_path;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setDevicePath(QString* device_path) {
|
||||
this->device_path = device_path;
|
||||
this->m_device_path_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxChannels() {
|
||||
return rx_channels;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxChannels(qint32 rx_channels) {
|
||||
this->rx_channels = rx_channels;
|
||||
this->m_rx_channels_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxWidebandChannel() {
|
||||
return rx_wideband_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxWidebandChannel(qint32 rx_wideband_channel) {
|
||||
this->rx_wideband_channel = rx_wideband_channel;
|
||||
this->m_rx_wideband_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxHamChannel() {
|
||||
return rx_ham_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxHamChannel(qint32 rx_ham_channel) {
|
||||
this->rx_ham_channel = rx_ham_channel;
|
||||
this->m_rx_ham_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxCellularChannel() {
|
||||
return rx_cellular_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxCellularChannel(qint32 rx_cellular_channel) {
|
||||
this->rx_cellular_channel = rx_cellular_channel;
|
||||
this->m_rx_cellular_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxPort() {
|
||||
return rx_port;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxPort(qint32 rx_port) {
|
||||
this->rx_port = rx_port;
|
||||
this->m_rx_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getAttenuationFactor() {
|
||||
return attenuation_factor;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setAttenuationFactor(qint32 attenuation_factor) {
|
||||
this->attenuation_factor = attenuation_factor;
|
||||
this->m_attenuation_factor_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getAmfmNotch() {
|
||||
return amfm_notch;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setAmfmNotch(qint32 amfm_notch) {
|
||||
this->amfm_notch = amfm_notch;
|
||||
this->m_amfm_notch_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxChannels() {
|
||||
return tx_channels;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxChannels(qint32 tx_channels) {
|
||||
this->tx_channels = tx_channels;
|
||||
this->m_tx_channels_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxWidebandChannel() {
|
||||
return tx_wideband_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxWidebandChannel(qint32 tx_wideband_channel) {
|
||||
this->tx_wideband_channel = tx_wideband_channel;
|
||||
this->m_tx_wideband_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxHamChannel() {
|
||||
return tx_ham_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxHamChannel(qint32 tx_ham_channel) {
|
||||
this->tx_ham_channel = tx_ham_channel;
|
||||
this->m_tx_ham_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxCellularChannel() {
|
||||
return tx_cellular_channel;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxCellularChannel(qint32 tx_cellular_channel) {
|
||||
this->tx_cellular_channel = tx_cellular_channel;
|
||||
this->m_tx_cellular_channel_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxPort() {
|
||||
return tx_port;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxPort(qint32 tx_port) {
|
||||
this->tx_port = tx_port;
|
||||
this->m_tx_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getRxOn() {
|
||||
return rx_on;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setRxOn(qint32 rx_on) {
|
||||
this->rx_on = rx_on;
|
||||
this->m_rx_on_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGLimeRFESettings::getTxOn() {
|
||||
return tx_on;
|
||||
}
|
||||
void
|
||||
SWGLimeRFESettings::setTxOn(qint32 tx_on) {
|
||||
this->tx_on = tx_on;
|
||||
this->m_tx_on_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGLimeRFESettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(device_path && *device_path != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_channels_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_wideband_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_ham_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_cellular_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_port_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_attenuation_factor_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_amfm_notch_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_channels_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_wideband_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_ham_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_cellular_channel_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_port_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_rx_on_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_tx_on_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
/**
|
||||
* 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: 5.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGLimeRFESettings.h
|
||||
*
|
||||
* LimeRFE
|
||||
*/
|
||||
|
||||
#ifndef SWGLimeRFESettings_H_
|
||||
#define SWGLimeRFESettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGLimeRFESettings: public SWGObject {
|
||||
public:
|
||||
SWGLimeRFESettings();
|
||||
SWGLimeRFESettings(QString* json);
|
||||
virtual ~SWGLimeRFESettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGLimeRFESettings* fromJson(QString &jsonString) override;
|
||||
|
||||
QString* getDevicePath();
|
||||
void setDevicePath(QString* device_path);
|
||||
|
||||
qint32 getRxChannels();
|
||||
void setRxChannels(qint32 rx_channels);
|
||||
|
||||
qint32 getRxWidebandChannel();
|
||||
void setRxWidebandChannel(qint32 rx_wideband_channel);
|
||||
|
||||
qint32 getRxHamChannel();
|
||||
void setRxHamChannel(qint32 rx_ham_channel);
|
||||
|
||||
qint32 getRxCellularChannel();
|
||||
void setRxCellularChannel(qint32 rx_cellular_channel);
|
||||
|
||||
qint32 getRxPort();
|
||||
void setRxPort(qint32 rx_port);
|
||||
|
||||
qint32 getAttenuationFactor();
|
||||
void setAttenuationFactor(qint32 attenuation_factor);
|
||||
|
||||
qint32 getAmfmNotch();
|
||||
void setAmfmNotch(qint32 amfm_notch);
|
||||
|
||||
qint32 getTxChannels();
|
||||
void setTxChannels(qint32 tx_channels);
|
||||
|
||||
qint32 getTxWidebandChannel();
|
||||
void setTxWidebandChannel(qint32 tx_wideband_channel);
|
||||
|
||||
qint32 getTxHamChannel();
|
||||
void setTxHamChannel(qint32 tx_ham_channel);
|
||||
|
||||
qint32 getTxCellularChannel();
|
||||
void setTxCellularChannel(qint32 tx_cellular_channel);
|
||||
|
||||
qint32 getTxPort();
|
||||
void setTxPort(qint32 tx_port);
|
||||
|
||||
qint32 getRxOn();
|
||||
void setRxOn(qint32 rx_on);
|
||||
|
||||
qint32 getTxOn();
|
||||
void setTxOn(qint32 tx_on);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QString* device_path;
|
||||
bool m_device_path_isSet;
|
||||
|
||||
qint32 rx_channels;
|
||||
bool m_rx_channels_isSet;
|
||||
|
||||
qint32 rx_wideband_channel;
|
||||
bool m_rx_wideband_channel_isSet;
|
||||
|
||||
qint32 rx_ham_channel;
|
||||
bool m_rx_ham_channel_isSet;
|
||||
|
||||
qint32 rx_cellular_channel;
|
||||
bool m_rx_cellular_channel_isSet;
|
||||
|
||||
qint32 rx_port;
|
||||
bool m_rx_port_isSet;
|
||||
|
||||
qint32 attenuation_factor;
|
||||
bool m_attenuation_factor_isSet;
|
||||
|
||||
qint32 amfm_notch;
|
||||
bool m_amfm_notch_isSet;
|
||||
|
||||
qint32 tx_channels;
|
||||
bool m_tx_channels_isSet;
|
||||
|
||||
qint32 tx_wideband_channel;
|
||||
bool m_tx_wideband_channel_isSet;
|
||||
|
||||
qint32 tx_ham_channel;
|
||||
bool m_tx_ham_channel_isSet;
|
||||
|
||||
qint32 tx_cellular_channel;
|
||||
bool m_tx_cellular_channel_isSet;
|
||||
|
||||
qint32 tx_port;
|
||||
bool m_tx_port_isSet;
|
||||
|
||||
qint32 rx_on;
|
||||
bool m_rx_on_isSet;
|
||||
|
||||
qint32 tx_on;
|
||||
bool m_tx_on_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGLimeRFESettings_H_ */
|
||||
@@ -93,6 +93,9 @@
|
||||
#include "SWGInterferometerSettings.h"
|
||||
#include "SWGKiwiSDRReport.h"
|
||||
#include "SWGKiwiSDRSettings.h"
|
||||
#include "SWGLimeRFEDevice.h"
|
||||
#include "SWGLimeRFEDevices.h"
|
||||
#include "SWGLimeRFESettings.h"
|
||||
#include "SWGLimeSdrInputReport.h"
|
||||
#include "SWGLimeSdrInputSettings.h"
|
||||
#include "SWGLimeSdrOutputReport.h"
|
||||
@@ -411,6 +414,15 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGKiwiSDRSettings").compare(type) == 0) {
|
||||
return new SWGKiwiSDRSettings();
|
||||
}
|
||||
if(QString("SWGLimeRFEDevice").compare(type) == 0) {
|
||||
return new SWGLimeRFEDevice();
|
||||
}
|
||||
if(QString("SWGLimeRFEDevices").compare(type) == 0) {
|
||||
return new SWGLimeRFEDevices();
|
||||
}
|
||||
if(QString("SWGLimeRFESettings").compare(type) == 0) {
|
||||
return new SWGLimeRFESettings();
|
||||
}
|
||||
if(QString("SWGLimeSdrInputReport").compare(type) == 0) {
|
||||
return new SWGLimeSdrInputReport();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user