Browse Source

Regenerate swagger

chirpmodem-v8.0.0
srcejon 2 months ago
parent
commit
6c5a9a4293
  1. 3106
      sdrbase/resources/webapi/doc/html2/index.html
  2. 106
      sdrbase/resources/webapi/doc/swagger/include/GLSpectrum.yaml
  3. 174
      sdrbase/resources/webapi/doc/swagger/swagger.yaml
  4. 3106
      swagger/sdrangel/code/html2/index.html
  5. 185
      swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp
  6. 11
      swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h
  7. 518
      swagger/sdrangel/code/qt5/client/SWGGLSpectrumHistory.cpp
  8. 163
      swagger/sdrangel/code/qt5/client/SWGGLSpectrumHistory.h
  9. 52
      swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp
  10. 6
      swagger/sdrangel/code/qt5/client/SWGInstanceApi.h
  11. 24
      swagger/sdrangel/code/qt5/client/SWGModelFactory.h
  12. 273
      swagger/sdrangel/code/qt5/client/SWGSpectrumHistorySignal.cpp
  13. 101
      swagger/sdrangel/code/qt5/client/SWGSpectrumHistorySignal.h
  14. 227
      swagger/sdrangel/code/qt5/client/SWGWindowInfo.cpp
  15. 89
      swagger/sdrangel/code/qt5/client/SWGWindowInfo.h
  16. 137
      swagger/sdrangel/code/qt5/client/SWGWindowList.cpp
  17. 66
      swagger/sdrangel/code/qt5/client/SWGWindowList.h
  18. 23
      swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.cpp
  19. 8
      swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.h

3106
sdrbase/resources/webapi/doc/html2/index.html

File diff suppressed because it is too large Load Diff

106
sdrbase/resources/webapi/doc/swagger/include/GLSpectrum.yaml

@ -578,6 +578,112 @@ SpectrumActions: @@ -578,6 +578,112 @@ SpectrumActions:
type: integer
minimum: 0
GLSpectrumHistory:
description: >
Statistics over the rows of spectrum history the GUI keeps for scrolling, reduced to a number
of bins. Powers are in dB whatever the display shows. The floor is the median of the per bin
means, and a bin counts as occupied in a row when it is above the floor by the threshold.
Rows taken with another centre frequency or sample rate are skipped and counted.
properties:
centerFrequency:
type: integer
format: int64
bandwidth:
type: integer
description: "Width of the whole spectrum in Hz."
startFrequency:
type: integer
format: int64
description: "Centre frequency of the first returned bin in Hz."
stopFrequency:
type: integer
format: int64
description: "Centre frequency of the last returned bin in Hz."
binBandwidth:
type: integer
description: "Width of each returned bin in Hz."
bins:
type: integer
rows:
type: integer
description: "Rows of history used."
skippedRows:
type: integer
description: "Rows in the period that were taken with the device tuned or sampling differently, and left out."
firstTime:
type: string
description: "Time of the oldest row used, ISO 8601."
lastTime:
type: string
description: "Time of the newest row used, ISO 8601."
seconds:
type: number
format: float
description: "Span between the oldest and newest rows used."
floorDb:
type: number
format: float
description: "The measured noise floor."
thresholdDb:
type: number
format: float
description: "The level above which a bin counts as occupied."
maxDb:
type: array
items:
type: number
format: float
description: "Per bin maximum over the rows."
meanDb:
type: array
items:
type: number
format: float
description: "Per bin mean over the rows."
occupancy:
type: array
items:
type: number
format: float
description: "Per bin fraction of rows in which the bin was above the threshold, 0 to 1."
signalCount:
type: integer
signals:
type: array
items:
$ref: "#/SpectrumHistorySignal"
description: "Runs of adjacent bins whose maximum rose above the threshold."
SpectrumHistorySignal:
description: A signal found in the spectrum history
properties:
frequency:
type: integer
format: int64
description: "Frequency of the strongest bin in Hz."
startFrequency:
type: integer
format: int64
description: "Lower edge in Hz."
stopFrequency:
type: integer
format: int64
description: "Upper edge in Hz."
bandwidth:
type: integer
description: "Width in Hz, to the bin."
peakDb:
type: number
format: float
dutyCycle:
type: number
format: float
description: "Fraction of rows in which any bin of the signal was above the threshold, 0 to 1: 1 for a continuous carrier, small for a burst."
firstSeen:
type: string
description: "Time of the first row it was up in, ISO 8601."
lastSeen:
type: string
description: "Time of the last row it was up in, ISO 8601."
GLSpectrumData:
description: >
A copy of the current power spectrum, reduced to the number of bins asked for so that the

174
sdrbase/resources/webapi/doc/swagger/swagger.yaml

@ -1097,6 +1097,24 @@ paths: @@ -1097,6 +1097,24 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/windows:
x-swagger-router-controller: instance
get:
description: List the windows of the GUI with their workspace and whether each is hidden (GUI)
operationId: instanceWindowsGet
tags:
- Instance
responses:
"200":
description: On success return the window list
schema:
$ref: "#/definitions/WindowList"
"500":
description: Error
schema:
$ref: "#/definitions/ErrorResponse"
"501":
description: Function not implemented
/sdrangel/workspace/{workspaceIndex}/actions:
x-swagger-router-controller: instance
post:
@ -1408,6 +1426,127 @@ paths: @@ -1408,6 +1426,127 @@ paths:
"501":
$ref: "#/responses/Response_501"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/history:
x-swagger-router-controller: deviceset
get:
description: >
Statistics over the spectrum history the GUI keeps for scrolling: per bin maximum, mean and
occupancy over a period, and the signals found. Only rows taken with the device tuned and
sampling as it is now are used. Needs scrolling enabled in the spectrum settings (scrollBar,
scrollLength); the server keeps no history
operationId: devicesetSpectrumHistoryGet
tags:
- DeviceSet
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: seconds
in: query
description: How far back to look, in seconds (default 60)
required: false
type: number
format: float
- name: bins
in: query
description: Number of bins to reduce the spectrum to, 1 to 4096 (default 128)
required: false
type: integer
- name: startFrequency
in: query
description: Lowest frequency to include in Hz. Default is the start of the spectrum
required: false
type: integer
format: int64
- name: stopFrequency
in: query
description: Highest frequency to include in Hz. Default is the end of the spectrum
required: false
type: integer
format: int64
- name: threshold
in: query
description: How far above the measured floor a bin must rise to count as occupied, in dB (default 6)
required: false
type: number
format: float
responses:
"200":
description: On success return the statistics
schema:
$ref: "/doc/swagger/include/GLSpectrum.yaml#/GLSpectrumHistory"
"400":
description: Invalid parameters
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Invalid index, or no history
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/history/image:
x-swagger-router-controller: deviceset
get:
description: >
The spectrum history as a greyscale PNG waterfall, one pixel per bin across and one per row
down with the newest row at the bottom, black a little below the noise floor and white at
the strongest bin. The frequency and time extents come back in X-Spectrum-History headers
and in the JSON form of the same call
operationId: devicesetSpectrumHistoryImageGet
tags:
- DeviceSet
produces:
- image/png
parameters:
- in: path
name: deviceSetIndex
type: integer
required: true
description: Index of device set in the device set list
- name: seconds
in: query
description: How far back to look, in seconds (default 60)
required: false
type: number
format: float
- name: bins
in: query
description: Width in pixels, 1 to 4096 (default 512)
required: false
type: integer
- name: rows
in: query
description: At most this many rows, the most recent (default 512, up to 4000)
required: false
type: integer
- name: startFrequency
in: query
description: Lowest frequency to include in Hz. Default is the start of the spectrum
required: false
type: integer
format: int64
- name: stopFrequency
in: query
description: Highest frequency to include in Hz. Default is the end of the spectrum
required: false
type: integer
format: int64
responses:
"200":
description: The PNG image
"400":
description: Invalid parameters
schema:
$ref: "#/definitions/ErrorResponse"
"404":
description: Invalid index, or no history
schema:
$ref: "#/definitions/ErrorResponse"
"500":
$ref: "#/responses/Response_500"
/sdrangel/deviceset/{deviceSetIndex}/spectrum/server:
x-swagger-router-controller: deviceset
get:
@ -3262,13 +3401,42 @@ definitions: @@ -3262,13 +3401,42 @@ definitions:
$ref: "#/definitions/Channel"
WorkspaceInfo:
description: "Workspace information"
required:
- index
description: "Where a window is and whether it is shown (GUI). On a PUT either field may be given alone: index moves the window, hidden hides or shows it"
properties:
index:
description: index of workspace in the list of workspaces
type: integer
hidden:
description: "1 when the window is hidden, 0 when it is shown. Showing a window also raises it and shows the workspace holding it"
type: integer
WindowList:
description: "Every device, spectrum, channel and feature window of the GUI"
properties:
windowCount:
type: integer
windows:
type: array
items:
$ref: "#/definitions/WindowInfo"
WindowInfo:
description: "One window of the GUI"
properties:
kind:
description: "device, spectrum, channel or feature"
type: string
deviceSetIndex:
description: "Index of the device set, for a device, spectrum or channel window"
type: integer
index:
description: "Channel index within the device set, or feature index; absent for a device or spectrum window"
type: integer
title:
type: string
workspaceIndex:
type: integer
hidden:
description: "1 when the window is hidden, 0 when it is shown"
type: integer
WorkspaceActions:
description: "Actions on a workspace"

3106
swagger/sdrangel/code/html2/index.html

File diff suppressed because it is too large Load Diff

185
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.cpp

@ -1585,6 +1585,191 @@ SWGDeviceSetApi::devicesetSpectrumDataGetCallback(SWGHttpRequestWorker * worker) @@ -1585,6 +1585,191 @@ SWGDeviceSetApi::devicesetSpectrumDataGetCallback(SWGHttpRequestWorker * worker)
}
}
void
SWGDeviceSetApi::devicesetSpectrumHistoryGet(qint32 device_set_index, float seconds, qint32 bins, qint64 start_frequency, qint64 stop_frequency, float threshold) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/history");
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("seconds"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(seconds)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("bins"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(bins)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("startFrequency"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(start_frequency)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("stopFrequency"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(stop_frequency)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("threshold"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(threshold)));
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::devicesetSpectrumHistoryGetCallback);
worker->execute(&input);
}
void
SWGDeviceSetApi::devicesetSpectrumHistoryGetCallback(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);
SWGGLSpectrumHistory* output = static_cast<SWGGLSpectrumHistory*>(create(json, QString("SWGGLSpectrumHistory")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit devicesetSpectrumHistoryGetSignal(output);
} else {
emit devicesetSpectrumHistoryGetSignalE(output, error_type, error_str);
emit devicesetSpectrumHistoryGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGDeviceSetApi::devicesetSpectrumHistoryImageGet(qint32 device_set_index, float seconds, qint32 bins, qint32 rows, qint64 start_frequency, qint64 stop_frequency) {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/deviceset/{deviceSetIndex}/spectrum/history/image");
QString device_set_indexPathParam("{"); device_set_indexPathParam.append("deviceSetIndex").append("}");
fullPath.replace(device_set_indexPathParam, stringValue(device_set_index));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("seconds"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(seconds)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("bins"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(bins)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("rows"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(rows)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("startFrequency"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(start_frequency)));
if (fullPath.indexOf("?") > 0)
fullPath.append("&");
else
fullPath.append("?");
fullPath.append(QUrl::toPercentEncoding("stopFrequency"))
.append("=")
.append(QUrl::toPercentEncoding(stringValue(stop_frequency)));
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::devicesetSpectrumHistoryImageGetCallback);
worker->execute(&input);
}
void
SWGDeviceSetApi::devicesetSpectrumHistoryImageGetCallback(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;
}
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit devicesetSpectrumHistoryImageGetSignal();
} else {
emit devicesetSpectrumHistoryImageGetSignalE(error_type, error_str);
emit devicesetSpectrumHistoryImageGetSignalEFull(worker, error_type, error_str);
}
}
void
SWGDeviceSetApi::devicesetSpectrumReportGet(qint32 device_set_index) {
QString fullPath;

11
swagger/sdrangel/code/qt5/client/SWGDeviceSetApi.h

@ -29,6 +29,7 @@ @@ -29,6 +29,7 @@
#include "SWGErrorResponse.h"
#include "SWGGLSpectrum.h"
#include "SWGGLSpectrumData.h"
#include "SWGGLSpectrumHistory.h"
#include "SWGGLSpectrumReport.h"
#include "SWGSpectrumActions.h"
#include "SWGSpectrumServer.h"
@ -78,6 +79,8 @@ public: @@ -78,6 +79,8 @@ public:
void devicesetGet(qint32 device_set_index);
void devicesetSpectrumActionsPost(qint32 device_set_index, SWGSpectrumActions& body);
void devicesetSpectrumDataGet(qint32 device_set_index, qint32 bins, qint64 start_frequency, qint64 stop_frequency, QString* reduce);
void devicesetSpectrumHistoryGet(qint32 device_set_index, float seconds, qint32 bins, qint64 start_frequency, qint64 stop_frequency, float threshold);
void devicesetSpectrumHistoryImageGet(qint32 device_set_index, float seconds, qint32 bins, qint32 rows, qint64 start_frequency, qint64 stop_frequency);
void devicesetSpectrumReportGet(qint32 device_set_index);
void devicesetSpectrumServerDelete(qint32 device_set_index);
void devicesetSpectrumServerGet(qint32 device_set_index);
@ -118,6 +121,8 @@ private: @@ -118,6 +121,8 @@ private:
void devicesetGetCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumActionsPostCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumDataGetCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumHistoryGetCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumHistoryImageGetCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumReportGetCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumServerDeleteCallback (SWGHttpRequestWorker * worker);
void devicesetSpectrumServerGetCallback (SWGHttpRequestWorker * worker);
@ -158,6 +163,8 @@ signals: @@ -158,6 +163,8 @@ signals:
void devicesetGetSignal(SWGDeviceSet* summary);
void devicesetSpectrumActionsPostSignal(SWGSuccessResponse* summary);
void devicesetSpectrumDataGetSignal(SWGGLSpectrumData* summary);
void devicesetSpectrumHistoryGetSignal(SWGGLSpectrumHistory* summary);
void devicesetSpectrumHistoryImageGetSignal();
void devicesetSpectrumReportGetSignal(SWGGLSpectrumReport* summary);
void devicesetSpectrumServerDeleteSignal(SWGSuccessResponse* summary);
void devicesetSpectrumServerGetSignal(SWGSpectrumServer* summary);
@ -197,6 +204,8 @@ signals: @@ -197,6 +204,8 @@ signals:
void devicesetGetSignalE(SWGDeviceSet* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumActionsPostSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumDataGetSignalE(SWGGLSpectrumData* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumHistoryGetSignalE(SWGGLSpectrumHistory* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumHistoryImageGetSignalE(QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumReportGetSignalE(SWGGLSpectrumReport* 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);
@ -236,6 +245,8 @@ signals: @@ -236,6 +245,8 @@ signals:
void devicesetGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumActionsPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumDataGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumHistoryGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumHistoryImageGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void devicesetSpectrumReportGetSignalEFull(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);

518
swagger/sdrangel/code/qt5/client/SWGGLSpectrumHistory.cpp

@ -0,0 +1,518 @@ @@ -0,0 +1,518 @@
/**
* 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: 7.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 "SWGGLSpectrumHistory.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGGLSpectrumHistory::SWGGLSpectrumHistory(QString* json) {
init();
this->fromJson(*json);
}
SWGGLSpectrumHistory::SWGGLSpectrumHistory() {
center_frequency = 0L;
m_center_frequency_isSet = false;
bandwidth = 0;
m_bandwidth_isSet = false;
start_frequency = 0L;
m_start_frequency_isSet = false;
stop_frequency = 0L;
m_stop_frequency_isSet = false;
bin_bandwidth = 0;
m_bin_bandwidth_isSet = false;
bins = 0;
m_bins_isSet = false;
rows = 0;
m_rows_isSet = false;
skipped_rows = 0;
m_skipped_rows_isSet = false;
first_time = nullptr;
m_first_time_isSet = false;
last_time = nullptr;
m_last_time_isSet = false;
seconds = 0.0f;
m_seconds_isSet = false;
floor_db = 0.0f;
m_floor_db_isSet = false;
threshold_db = 0.0f;
m_threshold_db_isSet = false;
max_db = new QList<float>();
m_max_db_isSet = false;
mean_db = new QList<float>();
m_mean_db_isSet = false;
occupancy = new QList<float>();
m_occupancy_isSet = false;
signal_count = 0;
m_signal_count_isSet = false;
signals = nullptr;
m_signals_isSet = false;
}
SWGGLSpectrumHistory::~SWGGLSpectrumHistory() {
this->cleanup();
}
void
SWGGLSpectrumHistory::init() {
center_frequency = 0L;
m_center_frequency_isSet = false;
bandwidth = 0;
m_bandwidth_isSet = false;
start_frequency = 0L;
m_start_frequency_isSet = false;
stop_frequency = 0L;
m_stop_frequency_isSet = false;
bin_bandwidth = 0;
m_bin_bandwidth_isSet = false;
bins = 0;
m_bins_isSet = false;
rows = 0;
m_rows_isSet = false;
skipped_rows = 0;
m_skipped_rows_isSet = false;
first_time = new QString("");
m_first_time_isSet = false;
last_time = new QString("");
m_last_time_isSet = false;
seconds = 0.0f;
m_seconds_isSet = false;
floor_db = 0.0f;
m_floor_db_isSet = false;
threshold_db = 0.0f;
m_threshold_db_isSet = false;
max_db = new QList<float>();
m_max_db_isSet = false;
mean_db = new QList<float>();
m_mean_db_isSet = false;
occupancy = new QList<float>();
m_occupancy_isSet = false;
signal_count = 0;
m_signal_count_isSet = false;
signals = new QList<SWG#/SpectrumHistorySignal*>();
m_signals_isSet = false;
}
void
SWGGLSpectrumHistory::cleanup() {
if(first_time != nullptr) {
delete first_time;
}
if(last_time != nullptr) {
delete last_time;
}
if(signals != nullptr) {
auto arr = signals;
for(auto o: *arr) {
delete o;
}
delete signals;
}
}
SWGGLSpectrumHistory*
SWGGLSpectrumHistory::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGGLSpectrumHistory::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&center_frequency, pJson["centerFrequency"], "qint64", "");
::SWGSDRangel::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
::SWGSDRangel::setValue(&start_frequency, pJson["startFrequency"], "qint64", "");
::SWGSDRangel::setValue(&stop_frequency, pJson["stopFrequency"], "qint64", "");
::SWGSDRangel::setValue(&bin_bandwidth, pJson["binBandwidth"], "qint32", "");
::SWGSDRangel::setValue(&bins, pJson["bins"], "qint32", "");
::SWGSDRangel::setValue(&rows, pJson["rows"], "qint32", "");
::SWGSDRangel::setValue(&skipped_rows, pJson["skippedRows"], "qint32", "");
::SWGSDRangel::setValue(&first_time, pJson["firstTime"], "QString", "QString");
::SWGSDRangel::setValue(&last_time, pJson["lastTime"], "QString", "QString");
::SWGSDRangel::setValue(&seconds, pJson["seconds"], "float", "");
::SWGSDRangel::setValue(&floor_db, pJson["floorDb"], "float", "");
::SWGSDRangel::setValue(&threshold_db, pJson["thresholdDb"], "float", "");
::SWGSDRangel::setValue(&max_db, pJson["maxDb"], "QList", "float");
::SWGSDRangel::setValue(&mean_db, pJson["meanDb"], "QList", "float");
::SWGSDRangel::setValue(&occupancy, pJson["occupancy"], "QList", "float");
::SWGSDRangel::setValue(&signal_count, pJson["signalCount"], "qint32", "");
::SWGSDRangel::setValue(&signals, pJson["signals"], "QList", "SWG#/SpectrumHistorySignal");
}
QString
SWGGLSpectrumHistory::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGGLSpectrumHistory::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_center_frequency_isSet){
obj->insert("centerFrequency", QJsonValue(center_frequency));
}
if(m_bandwidth_isSet){
obj->insert("bandwidth", QJsonValue(bandwidth));
}
if(m_start_frequency_isSet){
obj->insert("startFrequency", QJsonValue(start_frequency));
}
if(m_stop_frequency_isSet){
obj->insert("stopFrequency", QJsonValue(stop_frequency));
}
if(m_bin_bandwidth_isSet){
obj->insert("binBandwidth", QJsonValue(bin_bandwidth));
}
if(m_bins_isSet){
obj->insert("bins", QJsonValue(bins));
}
if(m_rows_isSet){
obj->insert("rows", QJsonValue(rows));
}
if(m_skipped_rows_isSet){
obj->insert("skippedRows", QJsonValue(skipped_rows));
}
if(first_time != nullptr && *first_time != QString("")){
toJsonValue(QString("firstTime"), first_time, obj, QString("QString"));
}
if(last_time != nullptr && *last_time != QString("")){
toJsonValue(QString("lastTime"), last_time, obj, QString("QString"));
}
if(m_seconds_isSet){
obj->insert("seconds", QJsonValue(seconds));
}
if(m_floor_db_isSet){
obj->insert("floorDb", QJsonValue(floor_db));
}
if(m_threshold_db_isSet){
obj->insert("thresholdDb", QJsonValue(threshold_db));
}
if(max_db && max_db->size() > 0){
toJsonArray((QList<void*>*)max_db, obj, "maxDb", "");
}
if(mean_db && mean_db->size() > 0){
toJsonArray((QList<void*>*)mean_db, obj, "meanDb", "");
}
if(occupancy && occupancy->size() > 0){
toJsonArray((QList<void*>*)occupancy, obj, "occupancy", "");
}
if(m_signal_count_isSet){
obj->insert("signalCount", QJsonValue(signal_count));
}
if(signals && signals->size() > 0){
toJsonArray((QList<void*>*)signals, obj, "signals", "SWG#/SpectrumHistorySignal");
}
return obj;
}
qint64
SWGGLSpectrumHistory::getCenterFrequency() {
return center_frequency;
}
void
SWGGLSpectrumHistory::setCenterFrequency(qint64 center_frequency) {
this->center_frequency = center_frequency;
this->m_center_frequency_isSet = true;
}
qint32
SWGGLSpectrumHistory::getBandwidth() {
return bandwidth;
}
void
SWGGLSpectrumHistory::setBandwidth(qint32 bandwidth) {
this->bandwidth = bandwidth;
this->m_bandwidth_isSet = true;
}
qint64
SWGGLSpectrumHistory::getStartFrequency() {
return start_frequency;
}
void
SWGGLSpectrumHistory::setStartFrequency(qint64 start_frequency) {
this->start_frequency = start_frequency;
this->m_start_frequency_isSet = true;
}
qint64
SWGGLSpectrumHistory::getStopFrequency() {
return stop_frequency;
}
void
SWGGLSpectrumHistory::setStopFrequency(qint64 stop_frequency) {
this->stop_frequency = stop_frequency;
this->m_stop_frequency_isSet = true;
}
qint32
SWGGLSpectrumHistory::getBinBandwidth() {
return bin_bandwidth;
}
void
SWGGLSpectrumHistory::setBinBandwidth(qint32 bin_bandwidth) {
this->bin_bandwidth = bin_bandwidth;
this->m_bin_bandwidth_isSet = true;
}
qint32
SWGGLSpectrumHistory::getBins() {
return bins;
}
void
SWGGLSpectrumHistory::setBins(qint32 bins) {
this->bins = bins;
this->m_bins_isSet = true;
}
qint32
SWGGLSpectrumHistory::getRows() {
return rows;
}
void
SWGGLSpectrumHistory::setRows(qint32 rows) {
this->rows = rows;
this->m_rows_isSet = true;
}
qint32
SWGGLSpectrumHistory::getSkippedRows() {
return skipped_rows;
}
void
SWGGLSpectrumHistory::setSkippedRows(qint32 skipped_rows) {
this->skipped_rows = skipped_rows;
this->m_skipped_rows_isSet = true;
}
QString*
SWGGLSpectrumHistory::getFirstTime() {
return first_time;
}
void
SWGGLSpectrumHistory::setFirstTime(QString* first_time) {
this->first_time = first_time;
this->m_first_time_isSet = true;
}
QString*
SWGGLSpectrumHistory::getLastTime() {
return last_time;
}
void
SWGGLSpectrumHistory::setLastTime(QString* last_time) {
this->last_time = last_time;
this->m_last_time_isSet = true;
}
float
SWGGLSpectrumHistory::getSeconds() {
return seconds;
}
void
SWGGLSpectrumHistory::setSeconds(float seconds) {
this->seconds = seconds;
this->m_seconds_isSet = true;
}
float
SWGGLSpectrumHistory::getFloorDb() {
return floor_db;
}
void
SWGGLSpectrumHistory::setFloorDb(float floor_db) {
this->floor_db = floor_db;
this->m_floor_db_isSet = true;
}
float
SWGGLSpectrumHistory::getThresholdDb() {
return threshold_db;
}
void
SWGGLSpectrumHistory::setThresholdDb(float threshold_db) {
this->threshold_db = threshold_db;
this->m_threshold_db_isSet = true;
}
QList<float>*
SWGGLSpectrumHistory::getMaxDb() {
return max_db;
}
void
SWGGLSpectrumHistory::setMaxDb(QList<float>* max_db) {
this->max_db = max_db;
this->m_max_db_isSet = true;
}
QList<float>*
SWGGLSpectrumHistory::getMeanDb() {
return mean_db;
}
void
SWGGLSpectrumHistory::setMeanDb(QList<float>* mean_db) {
this->mean_db = mean_db;
this->m_mean_db_isSet = true;
}
QList<float>*
SWGGLSpectrumHistory::getOccupancy() {
return occupancy;
}
void
SWGGLSpectrumHistory::setOccupancy(QList<float>* occupancy) {
this->occupancy = occupancy;
this->m_occupancy_isSet = true;
}
qint32
SWGGLSpectrumHistory::getSignalCount() {
return signal_count;
}
void
SWGGLSpectrumHistory::setSignalCount(qint32 signal_count) {
this->signal_count = signal_count;
this->m_signal_count_isSet = true;
}
QList<SWG#/SpectrumHistorySignal*>*
SWGGLSpectrumHistory::getSignals() {
return signals;
}
void
SWGGLSpectrumHistory::setSignals(QList<SWG#/SpectrumHistorySignal*>* signals) {
this->signals = signals;
this->m_signals_isSet = true;
}
bool
SWGGLSpectrumHistory::isSet(){
bool isObjectUpdated = false;
do{
if(m_center_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_bandwidth_isSet){
isObjectUpdated = true; break;
}
if(m_start_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_stop_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_bin_bandwidth_isSet){
isObjectUpdated = true; break;
}
if(m_bins_isSet){
isObjectUpdated = true; break;
}
if(m_rows_isSet){
isObjectUpdated = true; break;
}
if(m_skipped_rows_isSet){
isObjectUpdated = true; break;
}
if(first_time && *first_time != QString("")){
isObjectUpdated = true; break;
}
if(last_time && *last_time != QString("")){
isObjectUpdated = true; break;
}
if(m_seconds_isSet){
isObjectUpdated = true; break;
}
if(m_floor_db_isSet){
isObjectUpdated = true; break;
}
if(m_threshold_db_isSet){
isObjectUpdated = true; break;
}
if(m_max_db_isSet){
isObjectUpdated = true; break;
}
if(max_db && (max_db->size() > 0)){
isObjectUpdated = true; break;
}
if(m_mean_db_isSet){
isObjectUpdated = true; break;
}
if(mean_db && (mean_db->size() > 0)){
isObjectUpdated = true; break;
}
if(m_occupancy_isSet){
isObjectUpdated = true; break;
}
if(occupancy && (occupancy->size() > 0)){
isObjectUpdated = true; break;
}
if(m_signal_count_isSet){
isObjectUpdated = true; break;
}
if(signals && (signals->size() > 0)){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

163
swagger/sdrangel/code/qt5/client/SWGGLSpectrumHistory.h

@ -0,0 +1,163 @@ @@ -0,0 +1,163 @@
/**
* 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: 7.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.
*/
/*
* SWGGLSpectrumHistory.h
*
* Statistics over the rows of spectrum history the GUI keeps for scrolling, reduced to a number of bins. Powers are in dB whatever the display shows. The floor is the median of the per bin means, and a bin counts as occupied in a row when it is above the floor by the threshold. Rows taken with another centre frequency or sample rate are skipped and counted.
*/
#ifndef SWGGLSpectrumHistory_H_
#define SWGGLSpectrumHistory_H_
#include <QJsonObject>
#include "SWG#/SpectrumHistorySignal.h"
#include <QList>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGGLSpectrumHistory: public SWGObject {
public:
SWGGLSpectrumHistory();
SWGGLSpectrumHistory(QString* json);
virtual ~SWGGLSpectrumHistory();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGGLSpectrumHistory* fromJson(QString &jsonString) override;
qint64 getCenterFrequency();
void setCenterFrequency(qint64 center_frequency);
qint32 getBandwidth();
void setBandwidth(qint32 bandwidth);
qint64 getStartFrequency();
void setStartFrequency(qint64 start_frequency);
qint64 getStopFrequency();
void setStopFrequency(qint64 stop_frequency);
qint32 getBinBandwidth();
void setBinBandwidth(qint32 bin_bandwidth);
qint32 getBins();
void setBins(qint32 bins);
qint32 getRows();
void setRows(qint32 rows);
qint32 getSkippedRows();
void setSkippedRows(qint32 skipped_rows);
QString* getFirstTime();
void setFirstTime(QString* first_time);
QString* getLastTime();
void setLastTime(QString* last_time);
float getSeconds();
void setSeconds(float seconds);
float getFloorDb();
void setFloorDb(float floor_db);
float getThresholdDb();
void setThresholdDb(float threshold_db);
QList<float>* getMaxDb();
void setMaxDb(QList<float>* max_db);
QList<float>* getMeanDb();
void setMeanDb(QList<float>* mean_db);
QList<float>* getOccupancy();
void setOccupancy(QList<float>* occupancy);
qint32 getSignalCount();
void setSignalCount(qint32 signal_count);
QList<SWG#/SpectrumHistorySignal*>* getSignals();
void setSignals(QList<SWG#/SpectrumHistorySignal*>* signals);
virtual bool isSet() override;
private:
qint64 center_frequency;
bool m_center_frequency_isSet;
qint32 bandwidth;
bool m_bandwidth_isSet;
qint64 start_frequency;
bool m_start_frequency_isSet;
qint64 stop_frequency;
bool m_stop_frequency_isSet;
qint32 bin_bandwidth;
bool m_bin_bandwidth_isSet;
qint32 bins;
bool m_bins_isSet;
qint32 rows;
bool m_rows_isSet;
qint32 skipped_rows;
bool m_skipped_rows_isSet;
QString* first_time;
bool m_first_time_isSet;
QString* last_time;
bool m_last_time_isSet;
float seconds;
bool m_seconds_isSet;
float floor_db;
bool m_floor_db_isSet;
float threshold_db;
bool m_threshold_db_isSet;
QList<float>* max_db;
bool m_max_db_isSet;
QList<float>* mean_db;
bool m_mean_db_isSet;
QList<float>* occupancy;
bool m_occupancy_isSet;
qint32 signal_count;
bool m_signal_count_isSet;
QList<SWG#/SpectrumHistorySignal*>* signals;
bool m_signals_isSet;
};
}
#endif /* SWGGLSpectrumHistory_H_ */

52
swagger/sdrangel/code/qt5/client/SWGInstanceApi.cpp

@ -2199,5 +2199,57 @@ SWGInstanceApi::instanceSummaryCallback(SWGHttpRequestWorker * worker) { @@ -2199,5 +2199,57 @@ SWGInstanceApi::instanceSummaryCallback(SWGHttpRequestWorker * worker) {
}
}
void
SWGInstanceApi::instanceWindowsGet() {
QString fullPath;
fullPath.append(this->host).append(this->basePath).append("/sdrangel/windows");
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::instanceWindowsGetCallback);
worker->execute(&input);
}
void
SWGInstanceApi::instanceWindowsGetCallback(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);
SWGWindowList* output = static_cast<SWGWindowList*>(create(json, QString("SWGWindowList")));
worker->deleteLater();
if (worker->error_type == QNetworkReply::NoError) {
emit instanceWindowsGetSignal(output);
} else {
emit instanceWindowsGetSignalE(output, error_type, error_str);
emit instanceWindowsGetSignalEFull(worker, error_type, error_str);
}
}
}

6
swagger/sdrangel/code/qt5/client/SWGInstanceApi.h

@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
#include "SWGPresetTransfer.h"
#include "SWGPresets.h"
#include "SWGSuccessResponse.h"
#include "SWGWindowList.h"
#include <QObject>
@ -96,6 +97,7 @@ public: @@ -96,6 +97,7 @@ public:
void instancePresetPost(SWGPresetTransfer& body);
void instancePresetPut(SWGPresetTransfer& body);
void instanceSummary();
void instanceWindowsGet();
private:
void instanceAudioGetCallback (SWGHttpRequestWorker * worker);
@ -138,6 +140,7 @@ private: @@ -138,6 +140,7 @@ private:
void instancePresetPostCallback (SWGHttpRequestWorker * worker);
void instancePresetPutCallback (SWGHttpRequestWorker * worker);
void instanceSummaryCallback (SWGHttpRequestWorker * worker);
void instanceWindowsGetCallback (SWGHttpRequestWorker * worker);
signals:
void instanceAudioGetSignal(SWGAudioDevices* summary);
@ -180,6 +183,7 @@ signals: @@ -180,6 +183,7 @@ signals:
void instancePresetPostSignal(SWGPresetIdentifier* summary);
void instancePresetPutSignal(SWGPresetIdentifier* summary);
void instanceSummarySignal(SWGInstanceSummaryResponse* summary);
void instanceWindowsGetSignal(SWGWindowList* summary);
void instanceAudioGetSignalE(SWGAudioDevices* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceAudioInputCleanupPatchSignalE(SWGSuccessResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
@ -221,6 +225,7 @@ signals: @@ -221,6 +225,7 @@ signals:
void instancePresetPostSignalE(SWGPresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instancePresetPutSignalE(SWGPresetIdentifier* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceSummarySignalE(SWGInstanceSummaryResponse* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceWindowsGetSignalE(SWGWindowList* summary, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceAudioGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceAudioInputCleanupPatchSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
@ -262,6 +267,7 @@ signals: @@ -262,6 +267,7 @@ signals:
void instancePresetPostSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instancePresetPutSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceSummarySignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
void instanceWindowsGetSignalEFull(SWGHttpRequestWorker* worker, QNetworkReply::NetworkError error_type, QString& error_str);
};

24
swagger/sdrangel/code/qt5/client/SWGModelFactory.h

@ -180,6 +180,7 @@ @@ -180,6 +180,7 @@
#include "SWGGLScope.h"
#include "SWGGLSpectrum.h"
#include "SWGGLSpectrumData.h"
#include "SWGGLSpectrumHistory.h"
#include "SWGGLSpectrumReport.h"
#include "SWGGS232ControllerActions.h"
#include "SWGGS232ControllerReport.h"
@ -371,6 +372,7 @@ @@ -371,6 +372,7 @@
#include "SWGSpectrumAnnotationMarker.h"
#include "SWGSpectrumCalibrationPoint.h"
#include "SWGSpectrumHistogramMarker.h"
#include "SWGSpectrumHistorySignal.h"
#include "SWGSpectrumMemorySettings.h"
#include "SWGSpectrumPeak.h"
#include "SWGSpectrumServer.h"
@ -412,6 +414,8 @@ @@ -412,6 +414,8 @@
#include "SWGWFMDemodSettings.h"
#include "SWGWFMModReport.h"
#include "SWGWFMModSettings.h"
#include "SWGWindowInfo.h"
#include "SWGWindowList.h"
#include "SWGWorkspaceActions.h"
#include "SWGWorkspaceInfo.h"
#include "SWGXtrxInputReport.h"
@ -1254,6 +1258,11 @@ namespace SWGSDRangel { @@ -1254,6 +1258,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGGLSpectrumHistory").compare(type) == 0) {
SWGGLSpectrumHistory *obj = new SWGGLSpectrumHistory();
obj->init();
return obj;
}
if(QString("SWGGLSpectrumReport").compare(type) == 0) {
SWGGLSpectrumReport *obj = new SWGGLSpectrumReport();
obj->init();
@ -2209,6 +2218,11 @@ namespace SWGSDRangel { @@ -2209,6 +2218,11 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGSpectrumHistorySignal").compare(type) == 0) {
SWGSpectrumHistorySignal *obj = new SWGSpectrumHistorySignal();
obj->init();
return obj;
}
if(QString("SWGSpectrumMemorySettings").compare(type) == 0) {
SWGSpectrumMemorySettings *obj = new SWGSpectrumMemorySettings();
obj->init();
@ -2414,6 +2428,16 @@ namespace SWGSDRangel { @@ -2414,6 +2428,16 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGWindowInfo").compare(type) == 0) {
SWGWindowInfo *obj = new SWGWindowInfo();
obj->init();
return obj;
}
if(QString("SWGWindowList").compare(type) == 0) {
SWGWindowList *obj = new SWGWindowList();
obj->init();
return obj;
}
if(QString("SWGWorkspaceActions").compare(type) == 0) {
SWGWorkspaceActions *obj = new SWGWorkspaceActions();
obj->init();

273
swagger/sdrangel/code/qt5/client/SWGSpectrumHistorySignal.cpp

@ -0,0 +1,273 @@ @@ -0,0 +1,273 @@
/**
* 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: 7.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 "SWGSpectrumHistorySignal.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGSpectrumHistorySignal::SWGSpectrumHistorySignal(QString* json) {
init();
this->fromJson(*json);
}
SWGSpectrumHistorySignal::SWGSpectrumHistorySignal() {
frequency = 0L;
m_frequency_isSet = false;
start_frequency = 0L;
m_start_frequency_isSet = false;
stop_frequency = 0L;
m_stop_frequency_isSet = false;
bandwidth = 0;
m_bandwidth_isSet = false;
peak_db = 0.0f;
m_peak_db_isSet = false;
duty_cycle = 0.0f;
m_duty_cycle_isSet = false;
first_seen = nullptr;
m_first_seen_isSet = false;
last_seen = nullptr;
m_last_seen_isSet = false;
}
SWGSpectrumHistorySignal::~SWGSpectrumHistorySignal() {
this->cleanup();
}
void
SWGSpectrumHistorySignal::init() {
frequency = 0L;
m_frequency_isSet = false;
start_frequency = 0L;
m_start_frequency_isSet = false;
stop_frequency = 0L;
m_stop_frequency_isSet = false;
bandwidth = 0;
m_bandwidth_isSet = false;
peak_db = 0.0f;
m_peak_db_isSet = false;
duty_cycle = 0.0f;
m_duty_cycle_isSet = false;
first_seen = new QString("");
m_first_seen_isSet = false;
last_seen = new QString("");
m_last_seen_isSet = false;
}
void
SWGSpectrumHistorySignal::cleanup() {
if(first_seen != nullptr) {
delete first_seen;
}
if(last_seen != nullptr) {
delete last_seen;
}
}
SWGSpectrumHistorySignal*
SWGSpectrumHistorySignal::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGSpectrumHistorySignal::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&frequency, pJson["frequency"], "qint64", "");
::SWGSDRangel::setValue(&start_frequency, pJson["startFrequency"], "qint64", "");
::SWGSDRangel::setValue(&stop_frequency, pJson["stopFrequency"], "qint64", "");
::SWGSDRangel::setValue(&bandwidth, pJson["bandwidth"], "qint32", "");
::SWGSDRangel::setValue(&peak_db, pJson["peakDb"], "float", "");
::SWGSDRangel::setValue(&duty_cycle, pJson["dutyCycle"], "float", "");
::SWGSDRangel::setValue(&first_seen, pJson["firstSeen"], "QString", "QString");
::SWGSDRangel::setValue(&last_seen, pJson["lastSeen"], "QString", "QString");
}
QString
SWGSpectrumHistorySignal::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGSpectrumHistorySignal::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_frequency_isSet){
obj->insert("frequency", QJsonValue(frequency));
}
if(m_start_frequency_isSet){
obj->insert("startFrequency", QJsonValue(start_frequency));
}
if(m_stop_frequency_isSet){
obj->insert("stopFrequency", QJsonValue(stop_frequency));
}
if(m_bandwidth_isSet){
obj->insert("bandwidth", QJsonValue(bandwidth));
}
if(m_peak_db_isSet){
obj->insert("peakDb", QJsonValue(peak_db));
}
if(m_duty_cycle_isSet){
obj->insert("dutyCycle", QJsonValue(duty_cycle));
}
if(first_seen != nullptr && *first_seen != QString("")){
toJsonValue(QString("firstSeen"), first_seen, obj, QString("QString"));
}
if(last_seen != nullptr && *last_seen != QString("")){
toJsonValue(QString("lastSeen"), last_seen, obj, QString("QString"));
}
return obj;
}
qint64
SWGSpectrumHistorySignal::getFrequency() {
return frequency;
}
void
SWGSpectrumHistorySignal::setFrequency(qint64 frequency) {
this->frequency = frequency;
this->m_frequency_isSet = true;
}
qint64
SWGSpectrumHistorySignal::getStartFrequency() {
return start_frequency;
}
void
SWGSpectrumHistorySignal::setStartFrequency(qint64 start_frequency) {
this->start_frequency = start_frequency;
this->m_start_frequency_isSet = true;
}
qint64
SWGSpectrumHistorySignal::getStopFrequency() {
return stop_frequency;
}
void
SWGSpectrumHistorySignal::setStopFrequency(qint64 stop_frequency) {
this->stop_frequency = stop_frequency;
this->m_stop_frequency_isSet = true;
}
qint32
SWGSpectrumHistorySignal::getBandwidth() {
return bandwidth;
}
void
SWGSpectrumHistorySignal::setBandwidth(qint32 bandwidth) {
this->bandwidth = bandwidth;
this->m_bandwidth_isSet = true;
}
float
SWGSpectrumHistorySignal::getPeakDb() {
return peak_db;
}
void
SWGSpectrumHistorySignal::setPeakDb(float peak_db) {
this->peak_db = peak_db;
this->m_peak_db_isSet = true;
}
float
SWGSpectrumHistorySignal::getDutyCycle() {
return duty_cycle;
}
void
SWGSpectrumHistorySignal::setDutyCycle(float duty_cycle) {
this->duty_cycle = duty_cycle;
this->m_duty_cycle_isSet = true;
}
QString*
SWGSpectrumHistorySignal::getFirstSeen() {
return first_seen;
}
void
SWGSpectrumHistorySignal::setFirstSeen(QString* first_seen) {
this->first_seen = first_seen;
this->m_first_seen_isSet = true;
}
QString*
SWGSpectrumHistorySignal::getLastSeen() {
return last_seen;
}
void
SWGSpectrumHistorySignal::setLastSeen(QString* last_seen) {
this->last_seen = last_seen;
this->m_last_seen_isSet = true;
}
bool
SWGSpectrumHistorySignal::isSet(){
bool isObjectUpdated = false;
do{
if(m_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_start_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_stop_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_bandwidth_isSet){
isObjectUpdated = true; break;
}
if(m_peak_db_isSet){
isObjectUpdated = true; break;
}
if(m_duty_cycle_isSet){
isObjectUpdated = true; break;
}
if(first_seen && *first_seen != QString("")){
isObjectUpdated = true; break;
}
if(last_seen && *last_seen != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

101
swagger/sdrangel/code/qt5/client/SWGSpectrumHistorySignal.h

@ -0,0 +1,101 @@ @@ -0,0 +1,101 @@
/**
* 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: 7.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.
*/
/*
* SWGSpectrumHistorySignal.h
*
* A signal found in the spectrum history
*/
#ifndef SWGSpectrumHistorySignal_H_
#define SWGSpectrumHistorySignal_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGSpectrumHistorySignal: public SWGObject {
public:
SWGSpectrumHistorySignal();
SWGSpectrumHistorySignal(QString* json);
virtual ~SWGSpectrumHistorySignal();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGSpectrumHistorySignal* fromJson(QString &jsonString) override;
qint64 getFrequency();
void setFrequency(qint64 frequency);
qint64 getStartFrequency();
void setStartFrequency(qint64 start_frequency);
qint64 getStopFrequency();
void setStopFrequency(qint64 stop_frequency);
qint32 getBandwidth();
void setBandwidth(qint32 bandwidth);
float getPeakDb();
void setPeakDb(float peak_db);
float getDutyCycle();
void setDutyCycle(float duty_cycle);
QString* getFirstSeen();
void setFirstSeen(QString* first_seen);
QString* getLastSeen();
void setLastSeen(QString* last_seen);
virtual bool isSet() override;
private:
qint64 frequency;
bool m_frequency_isSet;
qint64 start_frequency;
bool m_start_frequency_isSet;
qint64 stop_frequency;
bool m_stop_frequency_isSet;
qint32 bandwidth;
bool m_bandwidth_isSet;
float peak_db;
bool m_peak_db_isSet;
float duty_cycle;
bool m_duty_cycle_isSet;
QString* first_seen;
bool m_first_seen_isSet;
QString* last_seen;
bool m_last_seen_isSet;
};
}
#endif /* SWGSpectrumHistorySignal_H_ */

227
swagger/sdrangel/code/qt5/client/SWGWindowInfo.cpp

@ -0,0 +1,227 @@ @@ -0,0 +1,227 @@
/**
* 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: 7.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 "SWGWindowInfo.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGWindowInfo::SWGWindowInfo(QString* json) {
init();
this->fromJson(*json);
}
SWGWindowInfo::SWGWindowInfo() {
kind = nullptr;
m_kind_isSet = false;
device_set_index = 0;
m_device_set_index_isSet = false;
index = 0;
m_index_isSet = false;
title = nullptr;
m_title_isSet = false;
workspace_index = 0;
m_workspace_index_isSet = false;
hidden = 0;
m_hidden_isSet = false;
}
SWGWindowInfo::~SWGWindowInfo() {
this->cleanup();
}
void
SWGWindowInfo::init() {
kind = new QString("");
m_kind_isSet = false;
device_set_index = 0;
m_device_set_index_isSet = false;
index = 0;
m_index_isSet = false;
title = new QString("");
m_title_isSet = false;
workspace_index = 0;
m_workspace_index_isSet = false;
hidden = 0;
m_hidden_isSet = false;
}
void
SWGWindowInfo::cleanup() {
if(kind != nullptr) {
delete kind;
}
if(title != nullptr) {
delete title;
}
}
SWGWindowInfo*
SWGWindowInfo::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGWindowInfo::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&kind, pJson["kind"], "QString", "QString");
::SWGSDRangel::setValue(&device_set_index, pJson["deviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
::SWGSDRangel::setValue(&workspace_index, pJson["workspaceIndex"], "qint32", "");
::SWGSDRangel::setValue(&hidden, pJson["hidden"], "qint32", "");
}
QString
SWGWindowInfo::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGWindowInfo::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(kind != nullptr && *kind != QString("")){
toJsonValue(QString("kind"), kind, obj, QString("QString"));
}
if(m_device_set_index_isSet){
obj->insert("deviceSetIndex", QJsonValue(device_set_index));
}
if(m_index_isSet){
obj->insert("index", QJsonValue(index));
}
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(m_workspace_index_isSet){
obj->insert("workspaceIndex", QJsonValue(workspace_index));
}
if(m_hidden_isSet){
obj->insert("hidden", QJsonValue(hidden));
}
return obj;
}
QString*
SWGWindowInfo::getKind() {
return kind;
}
void
SWGWindowInfo::setKind(QString* kind) {
this->kind = kind;
this->m_kind_isSet = true;
}
qint32
SWGWindowInfo::getDeviceSetIndex() {
return device_set_index;
}
void
SWGWindowInfo::setDeviceSetIndex(qint32 device_set_index) {
this->device_set_index = device_set_index;
this->m_device_set_index_isSet = true;
}
qint32
SWGWindowInfo::getIndex() {
return index;
}
void
SWGWindowInfo::setIndex(qint32 index) {
this->index = index;
this->m_index_isSet = true;
}
QString*
SWGWindowInfo::getTitle() {
return title;
}
void
SWGWindowInfo::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
qint32
SWGWindowInfo::getWorkspaceIndex() {
return workspace_index;
}
void
SWGWindowInfo::setWorkspaceIndex(qint32 workspace_index) {
this->workspace_index = workspace_index;
this->m_workspace_index_isSet = true;
}
qint32
SWGWindowInfo::getHidden() {
return hidden;
}
void
SWGWindowInfo::setHidden(qint32 hidden) {
this->hidden = hidden;
this->m_hidden_isSet = true;
}
bool
SWGWindowInfo::isSet(){
bool isObjectUpdated = false;
do{
if(kind && *kind != QString("")){
isObjectUpdated = true; break;
}
if(m_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_index_isSet){
isObjectUpdated = true; break;
}
if(title && *title != QString("")){
isObjectUpdated = true; break;
}
if(m_workspace_index_isSet){
isObjectUpdated = true; break;
}
if(m_hidden_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

89
swagger/sdrangel/code/qt5/client/SWGWindowInfo.h

@ -0,0 +1,89 @@ @@ -0,0 +1,89 @@
/**
* 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: 7.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.
*/
/*
* SWGWindowInfo.h
*
* One window of the GUI
*/
#ifndef SWGWindowInfo_H_
#define SWGWindowInfo_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGWindowInfo: public SWGObject {
public:
SWGWindowInfo();
SWGWindowInfo(QString* json);
virtual ~SWGWindowInfo();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGWindowInfo* fromJson(QString &jsonString) override;
QString* getKind();
void setKind(QString* kind);
qint32 getDeviceSetIndex();
void setDeviceSetIndex(qint32 device_set_index);
qint32 getIndex();
void setIndex(qint32 index);
QString* getTitle();
void setTitle(QString* title);
qint32 getWorkspaceIndex();
void setWorkspaceIndex(qint32 workspace_index);
qint32 getHidden();
void setHidden(qint32 hidden);
virtual bool isSet() override;
private:
QString* kind;
bool m_kind_isSet;
qint32 device_set_index;
bool m_device_set_index_isSet;
qint32 index;
bool m_index_isSet;
QString* title;
bool m_title_isSet;
qint32 workspace_index;
bool m_workspace_index_isSet;
qint32 hidden;
bool m_hidden_isSet;
};
}
#endif /* SWGWindowInfo_H_ */

137
swagger/sdrangel/code/qt5/client/SWGWindowList.cpp

@ -0,0 +1,137 @@ @@ -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: 7.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 "SWGWindowList.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGWindowList::SWGWindowList(QString* json) {
init();
this->fromJson(*json);
}
SWGWindowList::SWGWindowList() {
window_count = 0;
m_window_count_isSet = false;
windows = nullptr;
m_windows_isSet = false;
}
SWGWindowList::~SWGWindowList() {
this->cleanup();
}
void
SWGWindowList::init() {
window_count = 0;
m_window_count_isSet = false;
windows = new QList<SWGWindowInfo*>();
m_windows_isSet = false;
}
void
SWGWindowList::cleanup() {
if(windows != nullptr) {
auto arr = windows;
for(auto o: *arr) {
delete o;
}
delete windows;
}
}
SWGWindowList*
SWGWindowList::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGWindowList::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&window_count, pJson["windowCount"], "qint32", "");
::SWGSDRangel::setValue(&windows, pJson["windows"], "QList", "SWGWindowInfo");
}
QString
SWGWindowList::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGWindowList::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_window_count_isSet){
obj->insert("windowCount", QJsonValue(window_count));
}
if(windows && windows->size() > 0){
toJsonArray((QList<void*>*)windows, obj, "windows", "SWGWindowInfo");
}
return obj;
}
qint32
SWGWindowList::getWindowCount() {
return window_count;
}
void
SWGWindowList::setWindowCount(qint32 window_count) {
this->window_count = window_count;
this->m_window_count_isSet = true;
}
QList<SWGWindowInfo*>*
SWGWindowList::getWindows() {
return windows;
}
void
SWGWindowList::setWindows(QList<SWGWindowInfo*>* windows) {
this->windows = windows;
this->m_windows_isSet = true;
}
bool
SWGWindowList::isSet(){
bool isObjectUpdated = false;
do{
if(m_window_count_isSet){
isObjectUpdated = true; break;
}
if(windows && (windows->size() > 0)){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

66
swagger/sdrangel/code/qt5/client/SWGWindowList.h

@ -0,0 +1,66 @@ @@ -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: 7.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.
*/
/*
* SWGWindowList.h
*
* Every device, spectrum, channel and feature window of the GUI
*/
#ifndef SWGWindowList_H_
#define SWGWindowList_H_
#include <QJsonObject>
#include "SWGWindowInfo.h"
#include <QList>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGWindowList: public SWGObject {
public:
SWGWindowList();
SWGWindowList(QString* json);
virtual ~SWGWindowList();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGWindowList* fromJson(QString &jsonString) override;
qint32 getWindowCount();
void setWindowCount(qint32 window_count);
QList<SWGWindowInfo*>* getWindows();
void setWindows(QList<SWGWindowInfo*>* windows);
virtual bool isSet() override;
private:
qint32 window_count;
bool m_window_count_isSet;
QList<SWGWindowInfo*>* windows;
bool m_windows_isSet;
};
}
#endif /* SWGWindowList_H_ */

23
swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.cpp

@ -30,6 +30,8 @@ SWGWorkspaceInfo::SWGWorkspaceInfo(QString* json) { @@ -30,6 +30,8 @@ SWGWorkspaceInfo::SWGWorkspaceInfo(QString* json) {
SWGWorkspaceInfo::SWGWorkspaceInfo() {
index = 0;
m_index_isSet = false;
hidden = 0;
m_hidden_isSet = false;
}
SWGWorkspaceInfo::~SWGWorkspaceInfo() {
@ -40,11 +42,14 @@ void @@ -40,11 +42,14 @@ void
SWGWorkspaceInfo::init() {
index = 0;
m_index_isSet = false;
hidden = 0;
m_hidden_isSet = false;
}
void
SWGWorkspaceInfo::cleanup() {
}
SWGWorkspaceInfo*
@ -60,6 +65,8 @@ void @@ -60,6 +65,8 @@ void
SWGWorkspaceInfo::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&index, pJson["index"], "qint32", "");
::SWGSDRangel::setValue(&hidden, pJson["hidden"], "qint32", "");
}
QString
@ -79,6 +86,9 @@ SWGWorkspaceInfo::asJsonObject() { @@ -79,6 +86,9 @@ SWGWorkspaceInfo::asJsonObject() {
if(m_index_isSet){
obj->insert("index", QJsonValue(index));
}
if(m_hidden_isSet){
obj->insert("hidden", QJsonValue(hidden));
}
return obj;
}
@ -93,6 +103,16 @@ SWGWorkspaceInfo::setIndex(qint32 index) { @@ -93,6 +103,16 @@ SWGWorkspaceInfo::setIndex(qint32 index) {
this->m_index_isSet = true;
}
qint32
SWGWorkspaceInfo::getHidden() {
return hidden;
}
void
SWGWorkspaceInfo::setHidden(qint32 hidden) {
this->hidden = hidden;
this->m_hidden_isSet = true;
}
bool
SWGWorkspaceInfo::isSet(){
@ -101,6 +121,9 @@ SWGWorkspaceInfo::isSet(){ @@ -101,6 +121,9 @@ SWGWorkspaceInfo::isSet(){
if(m_index_isSet){
isObjectUpdated = true; break;
}
if(m_hidden_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

8
swagger/sdrangel/code/qt5/client/SWGWorkspaceInfo.h

@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
/*
* SWGWorkspaceInfo.h
*
* Workspace information
* Where a window is and whether it is shown (GUI). On a PUT either field may be given alone: index moves the window, hidden hides or shows it
*/
#ifndef SWGWorkspaceInfo_H_
@ -44,6 +44,9 @@ public: @@ -44,6 +44,9 @@ public:
qint32 getIndex();
void setIndex(qint32 index);
qint32 getHidden();
void setHidden(qint32 hidden);
virtual bool isSet() override;
@ -51,6 +54,9 @@ private: @@ -51,6 +54,9 @@ private:
qint32 index;
bool m_index_isSet;
qint32 hidden;
bool m_hidden_isSet;
};
}

Loading…
Cancel
Save