19 changed files with 6877 additions and 1498 deletions
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -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(¢er_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; |
||||
} |
||||
} |
||||
|
||||
@ -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_ */ |
||||
@ -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; |
||||
} |
||||
} |
||||
|
||||
@ -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_ */ |
||||
@ -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; |
||||
} |
||||
} |
||||
|
||||
@ -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_ */ |
||||
@ -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; |
||||
} |
||||
} |
||||
|
||||
@ -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_ */ |
||||
Loading…
Reference in new issue