mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-01-04 23:38:42 -05:00
REST API: generated code
This commit is contained in:
parent
6ee39b0e68
commit
2db3ece8a8
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1270,6 +1270,336 @@ SWGDeviceSetApi::devicesetGetCallback(SWGHttpRequestWorker * worker) {
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerDelete(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "DELETE");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGDeviceSetApi::devicesetSpectrumServerDeleteCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerDeleteCallback(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 devicesetSpectrumServerDeleteSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumServerDeleteSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumServerDeleteSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerGet(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
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,
|
||||
&SWGDeviceSetApi::devicesetSpectrumServerGetCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerGetCallback(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);
|
||||
SWGSpectrumServer* output = static_cast<SWGSpectrumServer*>(create(json, QString("SWGSpectrumServer")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit devicesetSpectrumServerGetSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumServerGetSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumServerGetSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerPost(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/server");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "POST");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
foreach(QString key, this->defaultHeaders.keys()) {
|
||||
input.headers.insert(key, this->defaultHeaders.value(key));
|
||||
}
|
||||
|
||||
connect(worker,
|
||||
&SWGHttpRequestWorker::on_execution_finished,
|
||||
this,
|
||||
&SWGDeviceSetApi::devicesetSpectrumServerPostCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumServerPostCallback(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 devicesetSpectrumServerPostSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumServerPostSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumServerPostSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsGet(qint32 device_set_index) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
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,
|
||||
&SWGDeviceSetApi::devicesetSpectrumSettingsGetCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsGetCallback(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);
|
||||
SWGGLSpectrum* output = static_cast<SWGGLSpectrum*>(create(json, QString("SWGGLSpectrum")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit devicesetSpectrumSettingsGetSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumSettingsGetSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumSettingsGetSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSpectrum& body) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
SWGHttpRequestWorker *worker = new SWGHttpRequestWorker();
|
||||
SWGHttpRequestInput input(fullPath, "PATCH");
|
||||
|
||||
|
||||
|
||||
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,
|
||||
&SWGDeviceSetApi::devicesetSpectrumSettingsPatchCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsPatchCallback(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);
|
||||
SWGGLSpectrum* output = static_cast<SWGGLSpectrum*>(create(json, QString("SWGGLSpectrum")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit devicesetSpectrumSettingsPatchSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumSettingsPatchSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumSettingsPatchSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpectrum& body) {
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/settings");
|
||||
|
||||
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
|
||||
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
|
||||
|
||||
|
||||
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,
|
||||
&SWGDeviceSetApi::devicesetSpectrumSettingsPutCallback);
|
||||
|
||||
worker->execute(&input);
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::devicesetSpectrumSettingsPutCallback(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);
|
||||
SWGGLSpectrum* output = static_cast<SWGGLSpectrum*>(create(json, QString("SWGGLSpectrum")));
|
||||
worker->deleteLater();
|
||||
|
||||
if (worker->error_type == QNetworkReply::NoError) {
|
||||
emit devicesetSpectrumSettingsPutSignal(output);
|
||||
} else {
|
||||
emit devicesetSpectrumSettingsPutSignalE(output, error_type, error_str);
|
||||
emit devicesetSpectrumSettingsPutSignalEFull(worker, error_type, error_str);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
SWGDeviceSetApi::instanceDeviceSetDelete() {
|
||||
QString fullPath;
|
||||
|
||||
@ -26,6 +26,8 @@
|
||||
#include "SWGDeviceSettings.h"
|
||||
#include "SWGDeviceState.h"
|
||||
#include "SWGErrorResponse.h"
|
||||
#include "SWGGLSpectrum.h"
|
||||
#include "SWGSpectrumServer.h"
|
||||
#include "SWGSuccessResponse.h"
|
||||
|
||||
#include <QObject>
|
||||
@ -66,6 +68,12 @@ public:
|
||||
void devicesetDeviceSubsystemRunPost(qint32 device_set_index, qint32 subsystem_index, SWGDeviceSettings& body);
|
||||
void devicesetFocusPatch(qint32 device_set_index);
|
||||
void devicesetGet(qint32 device_set_index);
|
||||
void devicesetSpectrumServerDelete(qint32 device_set_index);
|
||||
void devicesetSpectrumServerGet(qint32 device_set_index);
|
||||
void devicesetSpectrumServerPost(qint32 device_set_index);
|
||||
void devicesetSpectrumSettingsGet(qint32 device_set_index);
|
||||
void devicesetSpectrumSettingsPatch(qint32 device_set_index, SWGGLSpectrum& body);
|
||||
void devicesetSpectrumSettingsPut(qint32 device_set_index, SWGGLSpectrum& body);
|
||||
void instanceDeviceSetDelete();
|
||||
void instanceDeviceSetPost(qint32 direction);
|
||||
|
||||
@ -92,6 +100,12 @@ private:
|
||||
void devicesetDeviceSubsystemRunPostCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetFocusPatchCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetGetCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumServerDeleteCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumServerGetCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumServerPostCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumSettingsGetCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumSettingsPatchCallback (SWGHttpRequestWorker * worker);
|
||||
void devicesetSpectrumSettingsPutCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceDeviceSetDeleteCallback (SWGHttpRequestWorker * worker);
|
||||
void instanceDeviceSetPostCallback (SWGHttpRequestWorker * worker);
|
||||
|
||||
@ -118,6 +132,12 @@ signals:
|
||||
void devicesetDeviceSubsystemRunPostSignal(SWGDeviceState* summary);
|
||||
void devicesetFocusPatchSignal(SWGSuccessResponse* summary);
|
||||
void devicesetGetSignal(SWGDeviceSet* summary);
|
||||
void devicesetSpectrumServerDeleteSignal(SWGSuccessResponse* summary);
|
||||
void devicesetSpectrumServerGetSignal(SWGSpectrumServer* summary);
|
||||
void devicesetSpectrumServerPostSignal(SWGSuccessResponse* summary);
|
||||
void devicesetSpectrumSettingsGetSignal(SWGGLSpectrum* summary);
|
||||
void devicesetSpectrumSettingsPatchSignal(SWGGLSpectrum* summary);
|
||||
void devicesetSpectrumSettingsPutSignal(SWGGLSpectrum* summary);
|
||||
void instanceDeviceSetDeleteSignal(SWGSuccessResponse* summary);
|
||||
void instanceDeviceSetPostSignal(SWGSuccessResponse* summary);
|
||||
|
||||
@ -143,6 +163,12 @@ signals:
|
||||
void devicesetDeviceSubsystemRunPostSignalE(SWGDeviceState* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetFocusPatchSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerGetSignalE(SWGSpectrumServer* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsGetSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsPatchSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsPutSignalE(SWGGLSpectrum* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetDeleteSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
|
||||
@ -168,6 +194,12 @@ signals:
|
||||
void devicesetDeviceSubsystemRunPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetFocusPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumServerPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void devicesetSpectrumSettingsPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetDeleteSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
void instanceDeviceSetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
|
||||
|
||||
|
||||
@ -50,8 +50,6 @@ SWGGLSpectrum::SWGGLSpectrum() {
|
||||
m_decay_isSet = false;
|
||||
display_grid = 0;
|
||||
m_display_grid_isSet = false;
|
||||
invert = 0;
|
||||
m_invert_isSet = false;
|
||||
display_grid_intensity = 0;
|
||||
m_display_grid_intensity_isSet = false;
|
||||
decay_divisor = 0;
|
||||
@ -100,8 +98,6 @@ SWGGLSpectrum::init() {
|
||||
m_decay_isSet = false;
|
||||
display_grid = 0;
|
||||
m_display_grid_isSet = false;
|
||||
invert = 0;
|
||||
m_invert_isSet = false;
|
||||
display_grid_intensity = 0;
|
||||
m_display_grid_intensity_isSet = false;
|
||||
decay_divisor = 0;
|
||||
@ -143,7 +139,6 @@ SWGGLSpectrum::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -180,8 +175,6 @@ SWGGLSpectrum::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&display_grid, pJson["displayGrid"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&invert, pJson["invert"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&display_grid_intensity, pJson["displayGridIntensity"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&decay_divisor, pJson["decayDivisor"], "qint32", "");
|
||||
@ -249,9 +242,6 @@ SWGGLSpectrum::asJsonObject() {
|
||||
if(m_display_grid_isSet){
|
||||
obj->insert("displayGrid", QJsonValue(display_grid));
|
||||
}
|
||||
if(m_invert_isSet){
|
||||
obj->insert("invert", QJsonValue(invert));
|
||||
}
|
||||
if(m_display_grid_intensity_isSet){
|
||||
obj->insert("displayGridIntensity", QJsonValue(display_grid_intensity));
|
||||
}
|
||||
@ -393,16 +383,6 @@ SWGGLSpectrum::setDisplayGrid(qint32 display_grid) {
|
||||
this->m_display_grid_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGGLSpectrum::getInvert() {
|
||||
return invert;
|
||||
}
|
||||
void
|
||||
SWGGLSpectrum::setInvert(qint32 invert) {
|
||||
this->invert = invert;
|
||||
this->m_invert_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGGLSpectrum::getDisplayGridIntensity() {
|
||||
return display_grid_intensity;
|
||||
@ -531,9 +511,6 @@ SWGGLSpectrum::isSet(){
|
||||
if(m_display_grid_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_invert_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_display_grid_intensity_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
||||
@ -74,9 +74,6 @@ public:
|
||||
qint32 getDisplayGrid();
|
||||
void setDisplayGrid(qint32 display_grid);
|
||||
|
||||
qint32 getInvert();
|
||||
void setInvert(qint32 invert);
|
||||
|
||||
qint32 getDisplayGridIntensity();
|
||||
void setDisplayGridIntensity(qint32 display_grid_intensity);
|
||||
|
||||
@ -141,9 +138,6 @@ private:
|
||||
qint32 display_grid;
|
||||
bool m_display_grid_isSet;
|
||||
|
||||
qint32 invert;
|
||||
bool m_invert_isSet;
|
||||
|
||||
qint32 display_grid_intensity;
|
||||
bool m_display_grid_intensity_isSet;
|
||||
|
||||
|
||||
@ -180,6 +180,8 @@
|
||||
#include "SWGSoapySDRInputSettings.h"
|
||||
#include "SWGSoapySDROutputSettings.h"
|
||||
#include "SWGSoapySDRReport.h"
|
||||
#include "SWGSpectrumServer.h"
|
||||
#include "SWGSpectrumServer_clients.h"
|
||||
#include "SWGSuccessResponse.h"
|
||||
#include "SWGTestMISettings.h"
|
||||
#include "SWGTestMOSyncSettings.h"
|
||||
@ -705,6 +707,12 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGSoapySDRReport").compare(type) == 0) {
|
||||
return new SWGSoapySDRReport();
|
||||
}
|
||||
if(QString("SWGSpectrumServer").compare(type) == 0) {
|
||||
return new SWGSpectrumServer();
|
||||
}
|
||||
if(QString("SWGSpectrumServer_clients").compare(type) == 0) {
|
||||
return new SWGSpectrumServer_clients();
|
||||
}
|
||||
if(QString("SWGSuccessResponse").compare(type) == 0) {
|
||||
return new SWGSuccessResponse();
|
||||
}
|
||||
|
||||
137
swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp
Normal file
137
swagger/sdrangel/code/qt5/client/SWGSpectrumServer.cpp
Normal file
@ -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.3.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 "SWGSpectrumServer.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSpectrumServer::SWGSpectrumServer(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSpectrumServer::SWGSpectrumServer() {
|
||||
run = 0;
|
||||
m_run_isSet = false;
|
||||
clients = nullptr;
|
||||
m_clients_isSet = false;
|
||||
}
|
||||
|
||||
SWGSpectrumServer::~SWGSpectrumServer() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer::init() {
|
||||
run = 0;
|
||||
m_run_isSet = false;
|
||||
clients = new QList<SWGSpectrumServer_clients*>();
|
||||
m_clients_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer::cleanup() {
|
||||
|
||||
if(clients != nullptr) {
|
||||
auto arr = clients;
|
||||
for(auto o: *arr) {
|
||||
delete o;
|
||||
}
|
||||
delete clients;
|
||||
}
|
||||
}
|
||||
|
||||
SWGSpectrumServer*
|
||||
SWGSpectrumServer::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&run, pJson["run"], "qint32", "");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&clients, pJson["clients"], "QList", "SWGSpectrumServer_clients");
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSpectrumServer::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSpectrumServer::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_run_isSet){
|
||||
obj->insert("run", QJsonValue(run));
|
||||
}
|
||||
if(clients && clients->size() > 0){
|
||||
toJsonArray((QList<void*>*)clients, obj, "clients", "SWGSpectrumServer_clients");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSpectrumServer::getRun() {
|
||||
return run;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer::setRun(qint32 run) {
|
||||
this->run = run;
|
||||
this->m_run_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGSpectrumServer_clients*>*
|
||||
SWGSpectrumServer::getClients() {
|
||||
return clients;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer::setClients(QList<SWGSpectrumServer_clients*>* clients) {
|
||||
this->clients = clients;
|
||||
this->m_clients_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSpectrumServer::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_run_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(clients && (clients->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
66
swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h
Normal file
66
swagger/sdrangel/code/qt5/client/SWGSpectrumServer.h
Normal file
@ -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.3.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSpectrumServer.h
|
||||
*
|
||||
* Spectrum server state
|
||||
*/
|
||||
|
||||
#ifndef SWGSpectrumServer_H_
|
||||
#define SWGSpectrumServer_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include "SWGSpectrumServer_clients.h"
|
||||
#include <QList>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSpectrumServer: public SWGObject {
|
||||
public:
|
||||
SWGSpectrumServer();
|
||||
SWGSpectrumServer(QString* json);
|
||||
virtual ~SWGSpectrumServer();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSpectrumServer* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getRun();
|
||||
void setRun(qint32 run);
|
||||
|
||||
QList<SWGSpectrumServer_clients*>* getClients();
|
||||
void setClients(QList<SWGSpectrumServer_clients*>* clients);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 run;
|
||||
bool m_run_isSet;
|
||||
|
||||
QList<SWGSpectrumServer_clients*>* clients;
|
||||
bool m_clients_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSpectrumServer_H_ */
|
||||
133
swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp
Normal file
133
swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.cpp
Normal file
@ -0,0 +1,133 @@
|
||||
/**
|
||||
* 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.3.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 "SWGSpectrumServer_clients.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSpectrumServer_clients::SWGSpectrumServer_clients(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSpectrumServer_clients::SWGSpectrumServer_clients() {
|
||||
address = nullptr;
|
||||
m_address_isSet = false;
|
||||
port = 0;
|
||||
m_port_isSet = false;
|
||||
}
|
||||
|
||||
SWGSpectrumServer_clients::~SWGSpectrumServer_clients() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer_clients::init() {
|
||||
address = new QString("");
|
||||
m_address_isSet = false;
|
||||
port = 0;
|
||||
m_port_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer_clients::cleanup() {
|
||||
if(address != nullptr) {
|
||||
delete address;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SWGSpectrumServer_clients*
|
||||
SWGSpectrumServer_clients::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumServer_clients::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&address, pJson["address"], "QString", "QString");
|
||||
|
||||
::SWGSDRangel::setValue(&port, pJson["port"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSpectrumServer_clients::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSpectrumServer_clients::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(address != nullptr && *address != QString("")){
|
||||
toJsonValue(QString("address"), address, obj, QString("QString"));
|
||||
}
|
||||
if(m_port_isSet){
|
||||
obj->insert("port", QJsonValue(port));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGSpectrumServer_clients::getAddress() {
|
||||
return address;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer_clients::setAddress(QString* address) {
|
||||
this->address = address;
|
||||
this->m_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSpectrumServer_clients::getPort() {
|
||||
return port;
|
||||
}
|
||||
void
|
||||
SWGSpectrumServer_clients::setPort(qint32 port) {
|
||||
this->port = port;
|
||||
this->m_port_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSpectrumServer_clients::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(address && *address != QString("")){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_port_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
65
swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h
Normal file
65
swagger/sdrangel/code/qt5/client/SWGSpectrumServer_clients.h
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
* 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.3.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSpectrumServer_clients.h
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SWGSpectrumServer_clients_H_
|
||||
#define SWGSpectrumServer_clients_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSpectrumServer_clients: public SWGObject {
|
||||
public:
|
||||
SWGSpectrumServer_clients();
|
||||
SWGSpectrumServer_clients(QString* json);
|
||||
virtual ~SWGSpectrumServer_clients();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSpectrumServer_clients* fromJson(QString &jsonString) override;
|
||||
|
||||
QString* getAddress();
|
||||
void setAddress(QString* address);
|
||||
|
||||
qint32 getPort();
|
||||
void setPort(qint32 port);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
QString* address;
|
||||
bool m_address_isSet;
|
||||
|
||||
qint32 port;
|
||||
bool m_port_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSpectrumServer_clients_H_ */
|
||||
108
swagger/sdrangel/code/qt5/client/SWGSpectrumState.cpp
Normal file
108
swagger/sdrangel/code/qt5/client/SWGSpectrumState.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: 5.3.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 "SWGSpectrumState.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGSpectrumState::SWGSpectrumState(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGSpectrumState::SWGSpectrumState() {
|
||||
ws_spectrum = 0;
|
||||
m_ws_spectrum_isSet = false;
|
||||
}
|
||||
|
||||
SWGSpectrumState::~SWGSpectrumState() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumState::init() {
|
||||
ws_spectrum = 0;
|
||||
m_ws_spectrum_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumState::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGSpectrumState*
|
||||
SWGSpectrumState::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGSpectrumState::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&ws_spectrum, pJson["wsSpectrum"], "qint32", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGSpectrumState::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGSpectrumState::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_ws_spectrum_isSet){
|
||||
obj->insert("wsSpectrum", QJsonValue(ws_spectrum));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSpectrumState::getWsSpectrum() {
|
||||
return ws_spectrum;
|
||||
}
|
||||
void
|
||||
SWGSpectrumState::setWsSpectrum(qint32 ws_spectrum) {
|
||||
this->ws_spectrum = ws_spectrum;
|
||||
this->m_ws_spectrum_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGSpectrumState::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_ws_spectrum_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
||||
58
swagger/sdrangel/code/qt5/client/SWGSpectrumState.h
Normal file
58
swagger/sdrangel/code/qt5/client/SWGSpectrumState.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: 5.3.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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGSpectrumState.h
|
||||
*
|
||||
* Spectrum running state
|
||||
*/
|
||||
|
||||
#ifndef SWGSpectrumState_H_
|
||||
#define SWGSpectrumState_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGSpectrumState: public SWGObject {
|
||||
public:
|
||||
SWGSpectrumState();
|
||||
SWGSpectrumState(QString* json);
|
||||
virtual ~SWGSpectrumState();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGSpectrumState* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getWsSpectrum();
|
||||
void setWsSpectrum(qint32 ws_spectrum);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
qint32 ws_spectrum;
|
||||
bool m_ws_spectrum_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGSpectrumState_H_ */
|
||||
Loading…
x
Reference in New Issue
Block a user