2019-07-31 12:45:13 -04:00
|
|
|
/**
|
|
|
|
* SDRangel
|
2020-11-11 06:26:56 -05:00
|
|
|
* 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 ---
|
2019-07-31 12:45:13 -04:00
|
|
|
*
|
2022-05-14 08:24:37 -04:00
|
|
|
* OpenAPI spec version: 7.0.0
|
2019-07-31 12:45:13 -04:00
|
|
|
* 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 "SWGGLSpectrum.h"
|
|
|
|
|
|
|
|
#include "SWGHelpers.h"
|
|
|
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
namespace SWGSDRangel {
|
|
|
|
|
|
|
|
SWGGLSpectrum::SWGGLSpectrum(QString* json) {
|
|
|
|
init();
|
|
|
|
this->fromJson(*json);
|
|
|
|
}
|
|
|
|
|
|
|
|
SWGGLSpectrum::SWGGLSpectrum() {
|
|
|
|
fft_size = 0;
|
|
|
|
m_fft_size_isSet = false;
|
|
|
|
fft_overlap = 0;
|
|
|
|
m_fft_overlap_isSet = false;
|
2019-08-04 21:31:44 -04:00
|
|
|
fft_window = 0;
|
|
|
|
m_fft_window_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
ref_level = 0.0f;
|
|
|
|
m_ref_level_isSet = false;
|
|
|
|
power_range = 0.0f;
|
|
|
|
m_power_range_isSet = false;
|
2021-02-11 18:53:18 -05:00
|
|
|
fps_period_ms = 0;
|
|
|
|
m_fps_period_ms_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
display_waterfall = 0;
|
|
|
|
m_display_waterfall_isSet = false;
|
|
|
|
inverted_waterfall = 0;
|
|
|
|
m_inverted_waterfall_isSet = false;
|
|
|
|
display_max_hold = 0;
|
|
|
|
m_display_max_hold_isSet = false;
|
|
|
|
display_histogram = 0;
|
|
|
|
m_display_histogram_isSet = false;
|
|
|
|
decay = 0;
|
|
|
|
m_decay_isSet = false;
|
|
|
|
display_grid = 0;
|
|
|
|
m_display_grid_isSet = false;
|
|
|
|
display_grid_intensity = 0;
|
|
|
|
m_display_grid_intensity_isSet = false;
|
|
|
|
decay_divisor = 0;
|
|
|
|
m_decay_divisor_isSet = false;
|
|
|
|
histogram_stroke = 0;
|
|
|
|
m_histogram_stroke_isSet = false;
|
|
|
|
display_current = 0;
|
|
|
|
m_display_current_isSet = false;
|
|
|
|
display_trace_intensity = 0;
|
|
|
|
m_display_trace_intensity_isSet = false;
|
|
|
|
waterfall_share = 0.0f;
|
|
|
|
m_waterfall_share_isSet = false;
|
|
|
|
averaging_mode = 0;
|
|
|
|
m_averaging_mode_isSet = false;
|
|
|
|
averaging_value = 0;
|
|
|
|
m_averaging_value_isSet = false;
|
|
|
|
linear = 0;
|
|
|
|
m_linear_isSet = false;
|
2020-11-11 06:26:56 -05:00
|
|
|
ssb = 0;
|
|
|
|
m_ssb_isSet = false;
|
|
|
|
usb = 0;
|
|
|
|
m_usb_isSet = false;
|
2021-11-30 18:20:14 -05:00
|
|
|
ws_spectrum = 0;
|
|
|
|
m_ws_spectrum_isSet = false;
|
2020-11-11 06:26:56 -05:00
|
|
|
ws_spectrum_address = nullptr;
|
|
|
|
m_ws_spectrum_address_isSet = false;
|
2020-05-05 12:58:18 -04:00
|
|
|
ws_spectrum_port = 0;
|
|
|
|
m_ws_spectrum_port_isSet = false;
|
2022-01-22 01:35:23 -05:00
|
|
|
markers_display = 0;
|
|
|
|
m_markers_display_isSet = false;
|
2022-02-04 02:38:04 -05:00
|
|
|
use_calibration = 0;
|
|
|
|
m_use_calibration_isSet = false;
|
2022-02-05 05:56:08 -05:00
|
|
|
calibration_interp_mode = 0;
|
|
|
|
m_calibration_interp_mode_isSet = false;
|
2022-01-15 13:19:47 -05:00
|
|
|
histogram_markers = nullptr;
|
|
|
|
m_histogram_markers_isSet = false;
|
|
|
|
waterfall_markers = nullptr;
|
|
|
|
m_waterfall_markers_isSet = false;
|
2022-01-20 18:18:41 -05:00
|
|
|
annotation_markers = nullptr;
|
|
|
|
m_annotation_markers_isSet = false;
|
2022-01-30 01:43:50 -05:00
|
|
|
calibration_points = nullptr;
|
|
|
|
m_calibration_points_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGGLSpectrum::~SWGGLSpectrum() {
|
|
|
|
this->cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::init() {
|
|
|
|
fft_size = 0;
|
|
|
|
m_fft_size_isSet = false;
|
|
|
|
fft_overlap = 0;
|
|
|
|
m_fft_overlap_isSet = false;
|
2019-08-04 21:31:44 -04:00
|
|
|
fft_window = 0;
|
|
|
|
m_fft_window_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
ref_level = 0.0f;
|
|
|
|
m_ref_level_isSet = false;
|
|
|
|
power_range = 0.0f;
|
|
|
|
m_power_range_isSet = false;
|
2021-02-11 18:53:18 -05:00
|
|
|
fps_period_ms = 0;
|
|
|
|
m_fps_period_ms_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
display_waterfall = 0;
|
|
|
|
m_display_waterfall_isSet = false;
|
|
|
|
inverted_waterfall = 0;
|
|
|
|
m_inverted_waterfall_isSet = false;
|
|
|
|
display_max_hold = 0;
|
|
|
|
m_display_max_hold_isSet = false;
|
|
|
|
display_histogram = 0;
|
|
|
|
m_display_histogram_isSet = false;
|
|
|
|
decay = 0;
|
|
|
|
m_decay_isSet = false;
|
|
|
|
display_grid = 0;
|
|
|
|
m_display_grid_isSet = false;
|
|
|
|
display_grid_intensity = 0;
|
|
|
|
m_display_grid_intensity_isSet = false;
|
|
|
|
decay_divisor = 0;
|
|
|
|
m_decay_divisor_isSet = false;
|
|
|
|
histogram_stroke = 0;
|
|
|
|
m_histogram_stroke_isSet = false;
|
|
|
|
display_current = 0;
|
|
|
|
m_display_current_isSet = false;
|
|
|
|
display_trace_intensity = 0;
|
|
|
|
m_display_trace_intensity_isSet = false;
|
|
|
|
waterfall_share = 0.0f;
|
|
|
|
m_waterfall_share_isSet = false;
|
|
|
|
averaging_mode = 0;
|
|
|
|
m_averaging_mode_isSet = false;
|
|
|
|
averaging_value = 0;
|
|
|
|
m_averaging_value_isSet = false;
|
|
|
|
linear = 0;
|
|
|
|
m_linear_isSet = false;
|
2020-11-11 06:26:56 -05:00
|
|
|
ssb = 0;
|
|
|
|
m_ssb_isSet = false;
|
|
|
|
usb = 0;
|
|
|
|
m_usb_isSet = false;
|
2021-11-30 18:20:14 -05:00
|
|
|
ws_spectrum = 0;
|
|
|
|
m_ws_spectrum_isSet = false;
|
2020-11-11 06:26:56 -05:00
|
|
|
ws_spectrum_address = new QString("");
|
|
|
|
m_ws_spectrum_address_isSet = false;
|
2020-05-05 12:58:18 -04:00
|
|
|
ws_spectrum_port = 0;
|
|
|
|
m_ws_spectrum_port_isSet = false;
|
2022-01-22 01:35:23 -05:00
|
|
|
markers_display = 0;
|
|
|
|
m_markers_display_isSet = false;
|
2022-02-04 02:38:04 -05:00
|
|
|
use_calibration = 0;
|
|
|
|
m_use_calibration_isSet = false;
|
2022-02-05 05:56:08 -05:00
|
|
|
calibration_interp_mode = 0;
|
|
|
|
m_calibration_interp_mode_isSet = false;
|
2022-01-15 13:19:47 -05:00
|
|
|
histogram_markers = new QList<SWGSpectrumHistogramMarker*>();
|
|
|
|
m_histogram_markers_isSet = false;
|
|
|
|
waterfall_markers = new QList<SWGSpectrumWaterfallMarker*>();
|
|
|
|
m_waterfall_markers_isSet = false;
|
2022-01-20 18:18:41 -05:00
|
|
|
annotation_markers = new QList<SWGSpectrumAnnotationMarker*>();
|
|
|
|
m_annotation_markers_isSet = false;
|
2022-01-30 01:43:50 -05:00
|
|
|
calibration_points = new QList<SWGSpectrumCalibrationPoint*>();
|
|
|
|
m_calibration_points_isSet = false;
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::cleanup() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-02-11 18:53:18 -05:00
|
|
|
|
2021-11-30 18:20:14 -05:00
|
|
|
|
2019-07-31 12:45:13 -04:00
|
|
|
|
2020-11-11 06:26:56 -05:00
|
|
|
|
|
|
|
if(ws_spectrum_address != nullptr) {
|
|
|
|
delete ws_spectrum_address;
|
|
|
|
}
|
2020-05-05 12:58:18 -04:00
|
|
|
|
2022-01-22 01:35:23 -05:00
|
|
|
|
2022-02-04 02:38:04 -05:00
|
|
|
|
2022-02-05 05:56:08 -05:00
|
|
|
|
2022-01-15 13:19:47 -05:00
|
|
|
if(histogram_markers != nullptr) {
|
|
|
|
auto arr = histogram_markers;
|
|
|
|
for(auto o: *arr) {
|
|
|
|
delete o;
|
|
|
|
}
|
|
|
|
delete histogram_markers;
|
|
|
|
}
|
|
|
|
if(waterfall_markers != nullptr) {
|
|
|
|
auto arr = waterfall_markers;
|
|
|
|
for(auto o: *arr) {
|
|
|
|
delete o;
|
|
|
|
}
|
|
|
|
delete waterfall_markers;
|
|
|
|
}
|
2022-01-20 18:18:41 -05:00
|
|
|
if(annotation_markers != nullptr) {
|
|
|
|
auto arr = annotation_markers;
|
|
|
|
for(auto o: *arr) {
|
|
|
|
delete o;
|
|
|
|
}
|
|
|
|
delete annotation_markers;
|
|
|
|
}
|
2022-01-30 01:43:50 -05:00
|
|
|
if(calibration_points != nullptr) {
|
|
|
|
auto arr = calibration_points;
|
|
|
|
for(auto o: *arr) {
|
|
|
|
delete o;
|
|
|
|
}
|
|
|
|
delete calibration_points;
|
|
|
|
}
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGGLSpectrum*
|
|
|
|
SWGGLSpectrum::fromJson(QString &json) {
|
|
|
|
QByteArray array (json.toStdString().c_str());
|
|
|
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
|
|
|
QJsonObject jsonObject = doc.object();
|
|
|
|
this->fromJsonObject(jsonObject);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::fromJsonObject(QJsonObject &pJson) {
|
|
|
|
::SWGSDRangel::setValue(&fft_size, pJson["fftSize"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&fft_overlap, pJson["fftOverlap"], "qint32", "");
|
|
|
|
|
2019-08-04 21:31:44 -04:00
|
|
|
::SWGSDRangel::setValue(&fft_window, pJson["fftWindow"], "qint32", "");
|
2019-07-31 12:45:13 -04:00
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&ref_level, pJson["refLevel"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&power_range, pJson["powerRange"], "float", "");
|
|
|
|
|
2021-02-11 18:53:18 -05:00
|
|
|
::SWGSDRangel::setValue(&fps_period_ms, pJson["fpsPeriodMs"], "qint32", "");
|
|
|
|
|
2019-07-31 12:45:13 -04:00
|
|
|
::SWGSDRangel::setValue(&display_waterfall, pJson["displayWaterfall"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&inverted_waterfall, pJson["invertedWaterfall"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_max_hold, pJson["displayMaxHold"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_histogram, pJson["displayHistogram"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&decay, pJson["decay"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_grid, pJson["displayGrid"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_grid_intensity, pJson["displayGridIntensity"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&decay_divisor, pJson["decayDivisor"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&histogram_stroke, pJson["histogramStroke"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_current, pJson["displayCurrent"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&display_trace_intensity, pJson["displayTraceIntensity"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&waterfall_share, pJson["waterfallShare"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&averaging_mode, pJson["averagingMode"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&averaging_value, pJson["averagingValue"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&linear, pJson["linear"], "qint32", "");
|
|
|
|
|
2020-11-11 06:26:56 -05:00
|
|
|
::SWGSDRangel::setValue(&ssb, pJson["ssb"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&usb, pJson["usb"], "qint32", "");
|
|
|
|
|
2021-11-30 18:20:14 -05:00
|
|
|
::SWGSDRangel::setValue(&ws_spectrum, pJson["wsSpectrum"], "qint32", "");
|
|
|
|
|
2020-11-11 06:26:56 -05:00
|
|
|
::SWGSDRangel::setValue(&ws_spectrum_address, pJson["wsSpectrumAddress"], "QString", "QString");
|
|
|
|
|
2020-05-05 12:58:18 -04:00
|
|
|
::SWGSDRangel::setValue(&ws_spectrum_port, pJson["wsSpectrumPort"], "qint32", "");
|
|
|
|
|
2022-01-22 01:35:23 -05:00
|
|
|
::SWGSDRangel::setValue(&markers_display, pJson["markersDisplay"], "qint32", "");
|
|
|
|
|
2022-02-04 02:38:04 -05:00
|
|
|
::SWGSDRangel::setValue(&use_calibration, pJson["useCalibration"], "qint32", "");
|
|
|
|
|
2022-02-05 05:56:08 -05:00
|
|
|
::SWGSDRangel::setValue(&calibration_interp_mode, pJson["calibrationInterpMode"], "qint32", "");
|
|
|
|
|
2022-01-15 13:19:47 -05:00
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&histogram_markers, pJson["histogramMarkers"], "QList", "SWGSpectrumHistogramMarker");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&waterfall_markers, pJson["waterfallMarkers"], "QList", "SWGSpectrumWaterfallMarker");
|
2022-01-20 18:18:41 -05:00
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&annotation_markers, pJson["annotationMarkers"], "QList", "SWGSpectrumAnnotationMarker");
|
2022-01-30 01:43:50 -05:00
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&calibration_points, pJson["calibrationPoints"], "QList", "SWGSpectrumCalibrationPoint");
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
SWGGLSpectrum::asJson ()
|
|
|
|
{
|
|
|
|
QJsonObject* obj = this->asJsonObject();
|
|
|
|
|
|
|
|
QJsonDocument doc(*obj);
|
|
|
|
QByteArray bytes = doc.toJson();
|
|
|
|
delete obj;
|
|
|
|
return QString(bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
QJsonObject*
|
|
|
|
SWGGLSpectrum::asJsonObject() {
|
|
|
|
QJsonObject* obj = new QJsonObject();
|
|
|
|
if(m_fft_size_isSet){
|
|
|
|
obj->insert("fftSize", QJsonValue(fft_size));
|
|
|
|
}
|
|
|
|
if(m_fft_overlap_isSet){
|
|
|
|
obj->insert("fftOverlap", QJsonValue(fft_overlap));
|
|
|
|
}
|
2019-08-04 21:31:44 -04:00
|
|
|
if(m_fft_window_isSet){
|
|
|
|
obj->insert("fftWindow", QJsonValue(fft_window));
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
if(m_ref_level_isSet){
|
|
|
|
obj->insert("refLevel", QJsonValue(ref_level));
|
|
|
|
}
|
|
|
|
if(m_power_range_isSet){
|
|
|
|
obj->insert("powerRange", QJsonValue(power_range));
|
|
|
|
}
|
2021-02-11 18:53:18 -05:00
|
|
|
if(m_fps_period_ms_isSet){
|
|
|
|
obj->insert("fpsPeriodMs", QJsonValue(fps_period_ms));
|
|
|
|
}
|
2019-07-31 12:45:13 -04:00
|
|
|
if(m_display_waterfall_isSet){
|
|
|
|
obj->insert("displayWaterfall", QJsonValue(display_waterfall));
|
|
|
|
}
|
|
|
|
if(m_inverted_waterfall_isSet){
|
|
|
|
obj->insert("invertedWaterfall", QJsonValue(inverted_waterfall));
|
|
|
|
}
|
|
|
|
if(m_display_max_hold_isSet){
|
|
|
|
obj->insert("displayMaxHold", QJsonValue(display_max_hold));
|
|
|
|
}
|
|
|
|
if(m_display_histogram_isSet){
|
|
|
|
obj->insert("displayHistogram", QJsonValue(display_histogram));
|
|
|
|
}
|
|
|
|
if(m_decay_isSet){
|
|
|
|
obj->insert("decay", QJsonValue(decay));
|
|
|
|
}
|
|
|
|
if(m_display_grid_isSet){
|
|
|
|
obj->insert("displayGrid", QJsonValue(display_grid));
|
|
|
|
}
|
|
|
|
if(m_display_grid_intensity_isSet){
|
|
|
|
obj->insert("displayGridIntensity", QJsonValue(display_grid_intensity));
|
|
|
|
}
|
|
|
|
if(m_decay_divisor_isSet){
|
|
|
|
obj->insert("decayDivisor", QJsonValue(decay_divisor));
|
|
|
|
}
|
|
|
|
if(m_histogram_stroke_isSet){
|
|
|
|
obj->insert("histogramStroke", QJsonValue(histogram_stroke));
|
|
|
|
}
|
|
|
|
if(m_display_current_isSet){
|
|
|
|
obj->insert("displayCurrent", QJsonValue(display_current));
|
|
|
|
}
|
|
|
|
if(m_display_trace_intensity_isSet){
|
|
|
|
obj->insert("displayTraceIntensity", QJsonValue(display_trace_intensity));
|
|
|
|
}
|
|
|
|
if(m_waterfall_share_isSet){
|
|
|
|
obj->insert("waterfallShare", QJsonValue(waterfall_share));
|
|
|
|
}
|
|
|
|
if(m_averaging_mode_isSet){
|
|
|
|
obj->insert("averagingMode", QJsonValue(averaging_mode));
|
|
|
|
}
|
|
|
|
if(m_averaging_value_isSet){
|
|
|
|
obj->insert("averagingValue", QJsonValue(averaging_value));
|
|
|
|
}
|
|
|
|
if(m_linear_isSet){
|
|
|
|
obj->insert("linear", QJsonValue(linear));
|
|
|
|
}
|
2020-11-11 06:26:56 -05:00
|
|
|
if(m_ssb_isSet){
|
|
|
|
obj->insert("ssb", QJsonValue(ssb));
|
|
|
|
}
|
|
|
|
if(m_usb_isSet){
|
|
|
|
obj->insert("usb", QJsonValue(usb));
|
|
|
|
}
|
2021-11-30 18:20:14 -05:00
|
|
|
if(m_ws_spectrum_isSet){
|
|
|
|
obj->insert("wsSpectrum", QJsonValue(ws_spectrum));
|
|
|
|
}
|
2020-11-11 06:26:56 -05:00
|
|
|
if(ws_spectrum_address != nullptr && *ws_spectrum_address != QString("")){
|
|
|
|
toJsonValue(QString("wsSpectrumAddress"), ws_spectrum_address, obj, QString("QString"));
|
|
|
|
}
|
2020-05-05 12:58:18 -04:00
|
|
|
if(m_ws_spectrum_port_isSet){
|
|
|
|
obj->insert("wsSpectrumPort", QJsonValue(ws_spectrum_port));
|
|
|
|
}
|
2022-01-22 01:35:23 -05:00
|
|
|
if(m_markers_display_isSet){
|
|
|
|
obj->insert("markersDisplay", QJsonValue(markers_display));
|
|
|
|
}
|
2022-02-04 02:38:04 -05:00
|
|
|
if(m_use_calibration_isSet){
|
|
|
|
obj->insert("useCalibration", QJsonValue(use_calibration));
|
|
|
|
}
|
2022-02-05 05:56:08 -05:00
|
|
|
if(m_calibration_interp_mode_isSet){
|
|
|
|
obj->insert("calibrationInterpMode", QJsonValue(calibration_interp_mode));
|
|
|
|
}
|
2022-01-15 13:19:47 -05:00
|
|
|
if(histogram_markers && histogram_markers->size() > 0){
|
|
|
|
toJsonArray((QList<void*>*)histogram_markers, obj, "histogramMarkers", "SWGSpectrumHistogramMarker");
|
|
|
|
}
|
|
|
|
if(waterfall_markers && waterfall_markers->size() > 0){
|
|
|
|
toJsonArray((QList<void*>*)waterfall_markers, obj, "waterfallMarkers", "SWGSpectrumWaterfallMarker");
|
|
|
|
}
|
2022-01-20 18:18:41 -05:00
|
|
|
if(annotation_markers && annotation_markers->size() > 0){
|
|
|
|
toJsonArray((QList<void*>*)annotation_markers, obj, "annotationMarkers", "SWGSpectrumAnnotationMarker");
|
|
|
|
}
|
2022-01-30 01:43:50 -05:00
|
|
|
if(calibration_points && calibration_points->size() > 0){
|
|
|
|
toJsonArray((QList<void*>*)calibration_points, obj, "calibrationPoints", "SWGSpectrumCalibrationPoint");
|
|
|
|
}
|
2019-07-31 12:45:13 -04:00
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getFftSize() {
|
|
|
|
return fft_size;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setFftSize(qint32 fft_size) {
|
|
|
|
this->fft_size = fft_size;
|
|
|
|
this->m_fft_size_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getFftOverlap() {
|
|
|
|
return fft_overlap;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setFftOverlap(qint32 fft_overlap) {
|
|
|
|
this->fft_overlap = fft_overlap;
|
|
|
|
this->m_fft_overlap_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2019-08-04 21:31:44 -04:00
|
|
|
SWGGLSpectrum::getFftWindow() {
|
|
|
|
return fft_window;
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
void
|
2019-08-04 21:31:44 -04:00
|
|
|
SWGGLSpectrum::setFftWindow(qint32 fft_window) {
|
|
|
|
this->fft_window = fft_window;
|
|
|
|
this->m_fft_window_isSet = true;
|
2019-07-31 12:45:13 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
float
|
|
|
|
SWGGLSpectrum::getRefLevel() {
|
|
|
|
return ref_level;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setRefLevel(float ref_level) {
|
|
|
|
this->ref_level = ref_level;
|
|
|
|
this->m_ref_level_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
|
|
|
SWGGLSpectrum::getPowerRange() {
|
|
|
|
return power_range;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setPowerRange(float power_range) {
|
|
|
|
this->power_range = power_range;
|
|
|
|
this->m_power_range_isSet = true;
|
|
|
|
}
|
|
|
|
|
2021-02-11 18:53:18 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getFpsPeriodMs() {
|
|
|
|
return fps_period_ms;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setFpsPeriodMs(qint32 fps_period_ms) {
|
|
|
|
this->fps_period_ms = fps_period_ms;
|
|
|
|
this->m_fps_period_ms_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-07-31 12:45:13 -04:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayWaterfall() {
|
|
|
|
return display_waterfall;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayWaterfall(qint32 display_waterfall) {
|
|
|
|
this->display_waterfall = display_waterfall;
|
|
|
|
this->m_display_waterfall_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getInvertedWaterfall() {
|
|
|
|
return inverted_waterfall;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setInvertedWaterfall(qint32 inverted_waterfall) {
|
|
|
|
this->inverted_waterfall = inverted_waterfall;
|
|
|
|
this->m_inverted_waterfall_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayMaxHold() {
|
|
|
|
return display_max_hold;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayMaxHold(qint32 display_max_hold) {
|
|
|
|
this->display_max_hold = display_max_hold;
|
|
|
|
this->m_display_max_hold_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayHistogram() {
|
|
|
|
return display_histogram;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayHistogram(qint32 display_histogram) {
|
|
|
|
this->display_histogram = display_histogram;
|
|
|
|
this->m_display_histogram_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDecay() {
|
|
|
|
return decay;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDecay(qint32 decay) {
|
|
|
|
this->decay = decay;
|
|
|
|
this->m_decay_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayGrid() {
|
|
|
|
return display_grid;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayGrid(qint32 display_grid) {
|
|
|
|
this->display_grid = display_grid;
|
|
|
|
this->m_display_grid_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayGridIntensity() {
|
|
|
|
return display_grid_intensity;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayGridIntensity(qint32 display_grid_intensity) {
|
|
|
|
this->display_grid_intensity = display_grid_intensity;
|
|
|
|
this->m_display_grid_intensity_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDecayDivisor() {
|
|
|
|
return decay_divisor;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDecayDivisor(qint32 decay_divisor) {
|
|
|
|
this->decay_divisor = decay_divisor;
|
|
|
|
this->m_decay_divisor_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getHistogramStroke() {
|
|
|
|
return histogram_stroke;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setHistogramStroke(qint32 histogram_stroke) {
|
|
|
|
this->histogram_stroke = histogram_stroke;
|
|
|
|
this->m_histogram_stroke_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayCurrent() {
|
|
|
|
return display_current;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayCurrent(qint32 display_current) {
|
|
|
|
this->display_current = display_current;
|
|
|
|
this->m_display_current_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getDisplayTraceIntensity() {
|
|
|
|
return display_trace_intensity;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setDisplayTraceIntensity(qint32 display_trace_intensity) {
|
|
|
|
this->display_trace_intensity = display_trace_intensity;
|
|
|
|
this->m_display_trace_intensity_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
|
|
|
SWGGLSpectrum::getWaterfallShare() {
|
|
|
|
return waterfall_share;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setWaterfallShare(float waterfall_share) {
|
|
|
|
this->waterfall_share = waterfall_share;
|
|
|
|
this->m_waterfall_share_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getAveragingMode() {
|
|
|
|
return averaging_mode;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setAveragingMode(qint32 averaging_mode) {
|
|
|
|
this->averaging_mode = averaging_mode;
|
|
|
|
this->m_averaging_mode_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getAveragingValue() {
|
|
|
|
return averaging_value;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setAveragingValue(qint32 averaging_value) {
|
|
|
|
this->averaging_value = averaging_value;
|
|
|
|
this->m_averaging_value_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getLinear() {
|
|
|
|
return linear;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setLinear(qint32 linear) {
|
|
|
|
this->linear = linear;
|
|
|
|
this->m_linear_isSet = true;
|
|
|
|
}
|
|
|
|
|
2020-11-11 06:26:56 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getSsb() {
|
|
|
|
return ssb;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setSsb(qint32 ssb) {
|
|
|
|
this->ssb = ssb;
|
|
|
|
this->m_ssb_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getUsb() {
|
|
|
|
return usb;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setUsb(qint32 usb) {
|
|
|
|
this->usb = usb;
|
|
|
|
this->m_usb_isSet = true;
|
|
|
|
}
|
|
|
|
|
2021-11-30 18:20:14 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getWsSpectrum() {
|
|
|
|
return ws_spectrum;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setWsSpectrum(qint32 ws_spectrum) {
|
|
|
|
this->ws_spectrum = ws_spectrum;
|
|
|
|
this->m_ws_spectrum_isSet = true;
|
|
|
|
}
|
|
|
|
|
2020-11-11 06:26:56 -05:00
|
|
|
QString*
|
|
|
|
SWGGLSpectrum::getWsSpectrumAddress() {
|
|
|
|
return ws_spectrum_address;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setWsSpectrumAddress(QString* ws_spectrum_address) {
|
|
|
|
this->ws_spectrum_address = ws_spectrum_address;
|
|
|
|
this->m_ws_spectrum_address_isSet = true;
|
|
|
|
}
|
|
|
|
|
2020-05-05 12:58:18 -04:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getWsSpectrumPort() {
|
|
|
|
return ws_spectrum_port;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setWsSpectrumPort(qint32 ws_spectrum_port) {
|
|
|
|
this->ws_spectrum_port = ws_spectrum_port;
|
|
|
|
this->m_ws_spectrum_port_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-01-22 01:35:23 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getMarkersDisplay() {
|
|
|
|
return markers_display;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setMarkersDisplay(qint32 markers_display) {
|
|
|
|
this->markers_display = markers_display;
|
|
|
|
this->m_markers_display_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-02-04 02:38:04 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getUseCalibration() {
|
|
|
|
return use_calibration;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setUseCalibration(qint32 use_calibration) {
|
|
|
|
this->use_calibration = use_calibration;
|
|
|
|
this->m_use_calibration_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-02-05 05:56:08 -05:00
|
|
|
qint32
|
|
|
|
SWGGLSpectrum::getCalibrationInterpMode() {
|
|
|
|
return calibration_interp_mode;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setCalibrationInterpMode(qint32 calibration_interp_mode) {
|
|
|
|
this->calibration_interp_mode = calibration_interp_mode;
|
|
|
|
this->m_calibration_interp_mode_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-01-15 13:19:47 -05:00
|
|
|
QList<SWGSpectrumHistogramMarker*>*
|
|
|
|
SWGGLSpectrum::getHistogramMarkers() {
|
|
|
|
return histogram_markers;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setHistogramMarkers(QList<SWGSpectrumHistogramMarker*>* histogram_markers) {
|
|
|
|
this->histogram_markers = histogram_markers;
|
|
|
|
this->m_histogram_markers_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
QList<SWGSpectrumWaterfallMarker*>*
|
|
|
|
SWGGLSpectrum::getWaterfallMarkers() {
|
|
|
|
return waterfall_markers;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setWaterfallMarkers(QList<SWGSpectrumWaterfallMarker*>* waterfall_markers) {
|
|
|
|
this->waterfall_markers = waterfall_markers;
|
|
|
|
this->m_waterfall_markers_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-01-20 18:18:41 -05:00
|
|
|
QList<SWGSpectrumAnnotationMarker*>*
|
|
|
|
SWGGLSpectrum::getAnnotationMarkers() {
|
|
|
|
return annotation_markers;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setAnnotationMarkers(QList<SWGSpectrumAnnotationMarker*>* annotation_markers) {
|
|
|
|
this->annotation_markers = annotation_markers;
|
|
|
|
this->m_annotation_markers_isSet = true;
|
|
|
|
}
|
|
|
|
|
2022-01-30 01:43:50 -05:00
|
|
|
QList<SWGSpectrumCalibrationPoint*>*
|
|
|
|
SWGGLSpectrum::getCalibrationPoints() {
|
|
|
|
return calibration_points;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGGLSpectrum::setCalibrationPoints(QList<SWGSpectrumCalibrationPoint*>* calibration_points) {
|
|
|
|
this->calibration_points = calibration_points;
|
|
|
|
this->m_calibration_points_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-07-31 12:45:13 -04:00
|
|
|
|
|
|
|
bool
|
|
|
|
SWGGLSpectrum::isSet(){
|
|
|
|
bool isObjectUpdated = false;
|
|
|
|
do{
|
2019-08-03 20:50:32 -04:00
|
|
|
if(m_fft_size_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_fft_overlap_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-08-04 21:31:44 -04:00
|
|
|
if(m_fft_window_isSet){
|
2019-08-03 20:50:32 -04:00
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_ref_level_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_power_range_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2021-02-11 18:53:18 -05:00
|
|
|
if(m_fps_period_ms_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-08-03 20:50:32 -04:00
|
|
|
if(m_display_waterfall_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_inverted_waterfall_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_max_hold_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_histogram_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_decay_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_grid_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_grid_intensity_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_decay_divisor_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_histogram_stroke_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_current_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_display_trace_intensity_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_waterfall_share_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_averaging_mode_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_averaging_value_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_linear_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2020-11-11 06:26:56 -05:00
|
|
|
if(m_ssb_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_usb_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2021-11-30 18:20:14 -05:00
|
|
|
if(m_ws_spectrum_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2020-11-11 06:26:56 -05:00
|
|
|
if(ws_spectrum_address && *ws_spectrum_address != QString("")){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2020-05-05 12:58:18 -04:00
|
|
|
if(m_ws_spectrum_port_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-01-22 01:35:23 -05:00
|
|
|
if(m_markers_display_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-02-04 02:38:04 -05:00
|
|
|
if(m_use_calibration_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-02-05 05:56:08 -05:00
|
|
|
if(m_calibration_interp_mode_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-01-15 13:19:47 -05:00
|
|
|
if(histogram_markers && (histogram_markers->size() > 0)){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(waterfall_markers && (waterfall_markers->size() > 0)){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-01-20 18:18:41 -05:00
|
|
|
if(annotation_markers && (annotation_markers->size() > 0)){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2022-01-30 01:43:50 -05:00
|
|
|
if(calibration_points && (calibration_points->size() > 0)){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-07-31 12:45:13 -04:00
|
|
|
}while(false);
|
|
|
|
return isObjectUpdated;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|