115 changed files with 10130 additions and 418 deletions
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,162 @@
@@ -0,0 +1,162 @@
|
||||
/**
|
||||
* 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 "SWGAISReport.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGAISReport::SWGAISReport(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGAISReport::SWGAISReport() { |
||||
report_date_time = nullptr; |
||||
m_report_date_time_isSet = false; |
||||
vessel_count = 0; |
||||
m_vessel_count_isSet = false; |
||||
vessels = nullptr; |
||||
m_vessels_isSet = false; |
||||
} |
||||
|
||||
SWGAISReport::~SWGAISReport() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGAISReport::init() { |
||||
report_date_time = new QString(""); |
||||
m_report_date_time_isSet = false; |
||||
vessel_count = 0; |
||||
m_vessel_count_isSet = false; |
||||
vessels = new QList<SWGAISVessel*>(); |
||||
m_vessels_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGAISReport::cleanup() { |
||||
if(report_date_time != nullptr) {
|
||||
delete report_date_time; |
||||
} |
||||
|
||||
if(vessels != nullptr) {
|
||||
auto arr = vessels; |
||||
for(auto o: *arr) {
|
||||
delete o; |
||||
} |
||||
delete vessels; |
||||
} |
||||
} |
||||
|
||||
SWGAISReport* |
||||
SWGAISReport::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGAISReport::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&report_date_time, pJson["reportDateTime"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&vessel_count, pJson["vesselCount"], "qint32", ""); |
||||
|
||||
|
||||
::SWGSDRangel::setValue(&vessels, pJson["vessels"], "QList", "SWGAISVessel"); |
||||
} |
||||
|
||||
QString |
||||
SWGAISReport::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGAISReport::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(report_date_time != nullptr && *report_date_time != QString("")){ |
||||
toJsonValue(QString("reportDateTime"), report_date_time, obj, QString("QString")); |
||||
} |
||||
if(m_vessel_count_isSet){ |
||||
obj->insert("vesselCount", QJsonValue(vessel_count)); |
||||
} |
||||
if(vessels && vessels->size() > 0){ |
||||
toJsonArray((QList<void*>*)vessels, obj, "vessels", "SWGAISVessel"); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISReport::getReportDateTime() { |
||||
return report_date_time; |
||||
} |
||||
void |
||||
SWGAISReport::setReportDateTime(QString* report_date_time) { |
||||
this->report_date_time = report_date_time; |
||||
this->m_report_date_time_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAISReport::getVesselCount() { |
||||
return vessel_count; |
||||
} |
||||
void |
||||
SWGAISReport::setVesselCount(qint32 vessel_count) { |
||||
this->vessel_count = vessel_count; |
||||
this->m_vessel_count_isSet = true; |
||||
} |
||||
|
||||
QList<SWGAISVessel*>* |
||||
SWGAISReport::getVessels() { |
||||
return vessels; |
||||
} |
||||
void |
||||
SWGAISReport::setVessels(QList<SWGAISVessel*>* vessels) { |
||||
this->vessels = vessels; |
||||
this->m_vessels_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGAISReport::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(report_date_time && *report_date_time != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_vessel_count_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(vessels && (vessels->size() > 0)){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGAISReport.h |
||||
* |
||||
* Vessels heard by the AIS feature, which collects the decoded messages of every AIS demodulator in the instance. A field is present only once a message carrying it has been received, so an absent position means unknown rather than zero.
|
||||
*/ |
||||
|
||||
#ifndef SWGAISReport_H_ |
||||
#define SWGAISReport_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include "SWGAISVessel.h" |
||||
#include <QList> |
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGAISReport: public SWGObject { |
||||
public: |
||||
SWGAISReport(); |
||||
SWGAISReport(QString* json); |
||||
virtual ~SWGAISReport(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGAISReport* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getReportDateTime(); |
||||
void setReportDateTime(QString* report_date_time); |
||||
|
||||
qint32 getVesselCount(); |
||||
void setVesselCount(qint32 vessel_count); |
||||
|
||||
QList<SWGAISVessel*>* getVessels(); |
||||
void setVessels(QList<SWGAISVessel*>* vessels); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* report_date_time; |
||||
bool m_report_date_time_isSet; |
||||
|
||||
qint32 vessel_count; |
||||
bool m_vessel_count_isSet; |
||||
|
||||
QList<SWGAISVessel*>* vessels; |
||||
bool m_vessels_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGAISReport_H_ */ |
||||
@ -0,0 +1,521 @@
@@ -0,0 +1,521 @@
|
||||
/**
|
||||
* 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 "SWGAISVessel.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGAISVessel::SWGAISVessel(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGAISVessel::SWGAISVessel() { |
||||
mmsi = nullptr; |
||||
m_mmsi_isSet = false; |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
callsign = nullptr; |
||||
m_callsign_isSet = false; |
||||
imo = nullptr; |
||||
m_imo_isSet = false; |
||||
country = nullptr; |
||||
m_country_isSet = false; |
||||
type = nullptr; |
||||
m_type_isSet = false; |
||||
ship_type = nullptr; |
||||
m_ship_type_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
course = 0.0f; |
||||
m_course_isSet = false; |
||||
speed = 0.0f; |
||||
m_speed_isSet = false; |
||||
heading = 0; |
||||
m_heading_isSet = false; |
||||
status = nullptr; |
||||
m_status_isSet = false; |
||||
length = 0; |
||||
m_length_isSet = false; |
||||
destination = nullptr; |
||||
m_destination_isSet = false; |
||||
position_update = nullptr; |
||||
m_position_update_isSet = false; |
||||
last_update = nullptr; |
||||
m_last_update_isSet = false; |
||||
messages = 0; |
||||
m_messages_isSet = false; |
||||
} |
||||
|
||||
SWGAISVessel::~SWGAISVessel() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGAISVessel::init() { |
||||
mmsi = new QString(""); |
||||
m_mmsi_isSet = false; |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
callsign = new QString(""); |
||||
m_callsign_isSet = false; |
||||
imo = new QString(""); |
||||
m_imo_isSet = false; |
||||
country = new QString(""); |
||||
m_country_isSet = false; |
||||
type = new QString(""); |
||||
m_type_isSet = false; |
||||
ship_type = new QString(""); |
||||
m_ship_type_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
course = 0.0f; |
||||
m_course_isSet = false; |
||||
speed = 0.0f; |
||||
m_speed_isSet = false; |
||||
heading = 0; |
||||
m_heading_isSet = false; |
||||
status = new QString(""); |
||||
m_status_isSet = false; |
||||
length = 0; |
||||
m_length_isSet = false; |
||||
destination = new QString(""); |
||||
m_destination_isSet = false; |
||||
position_update = new QString(""); |
||||
m_position_update_isSet = false; |
||||
last_update = new QString(""); |
||||
m_last_update_isSet = false; |
||||
messages = 0; |
||||
m_messages_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGAISVessel::cleanup() { |
||||
if(mmsi != nullptr) {
|
||||
delete mmsi; |
||||
} |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
if(callsign != nullptr) {
|
||||
delete callsign; |
||||
} |
||||
if(imo != nullptr) {
|
||||
delete imo; |
||||
} |
||||
if(country != nullptr) {
|
||||
delete country; |
||||
} |
||||
if(type != nullptr) {
|
||||
delete type; |
||||
} |
||||
if(ship_type != nullptr) {
|
||||
delete ship_type; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(status != nullptr) {
|
||||
delete status; |
||||
} |
||||
|
||||
if(destination != nullptr) {
|
||||
delete destination; |
||||
} |
||||
if(position_update != nullptr) {
|
||||
delete position_update; |
||||
} |
||||
if(last_update != nullptr) {
|
||||
delete last_update; |
||||
} |
||||
|
||||
} |
||||
|
||||
SWGAISVessel* |
||||
SWGAISVessel::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGAISVessel::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&mmsi, pJson["mmsi"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&callsign, pJson["callsign"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&imo, pJson["imo"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&country, pJson["country"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&type, pJson["type"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&ship_type, pJson["shipType"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&course, pJson["course"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&speed, pJson["speed"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&heading, pJson["heading"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&status, pJson["status"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&length, pJson["length"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&destination, pJson["destination"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&position_update, pJson["positionUpdate"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&last_update, pJson["lastUpdate"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&messages, pJson["messages"], "qint32", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGAISVessel::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGAISVessel::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(mmsi != nullptr && *mmsi != QString("")){ |
||||
toJsonValue(QString("mmsi"), mmsi, obj, QString("QString")); |
||||
} |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(callsign != nullptr && *callsign != QString("")){ |
||||
toJsonValue(QString("callsign"), callsign, obj, QString("QString")); |
||||
} |
||||
if(imo != nullptr && *imo != QString("")){ |
||||
toJsonValue(QString("imo"), imo, obj, QString("QString")); |
||||
} |
||||
if(country != nullptr && *country != QString("")){ |
||||
toJsonValue(QString("country"), country, obj, QString("QString")); |
||||
} |
||||
if(type != nullptr && *type != QString("")){ |
||||
toJsonValue(QString("type"), type, obj, QString("QString")); |
||||
} |
||||
if(ship_type != nullptr && *ship_type != QString("")){ |
||||
toJsonValue(QString("shipType"), ship_type, obj, QString("QString")); |
||||
} |
||||
if(m_latitude_isSet){ |
||||
obj->insert("latitude", QJsonValue(latitude)); |
||||
} |
||||
if(m_longitude_isSet){ |
||||
obj->insert("longitude", QJsonValue(longitude)); |
||||
} |
||||
if(m_course_isSet){ |
||||
obj->insert("course", QJsonValue(course)); |
||||
} |
||||
if(m_speed_isSet){ |
||||
obj->insert("speed", QJsonValue(speed)); |
||||
} |
||||
if(m_heading_isSet){ |
||||
obj->insert("heading", QJsonValue(heading)); |
||||
} |
||||
if(status != nullptr && *status != QString("")){ |
||||
toJsonValue(QString("status"), status, obj, QString("QString")); |
||||
} |
||||
if(m_length_isSet){ |
||||
obj->insert("length", QJsonValue(length)); |
||||
} |
||||
if(destination != nullptr && *destination != QString("")){ |
||||
toJsonValue(QString("destination"), destination, obj, QString("QString")); |
||||
} |
||||
if(position_update != nullptr && *position_update != QString("")){ |
||||
toJsonValue(QString("positionUpdate"), position_update, obj, QString("QString")); |
||||
} |
||||
if(last_update != nullptr && *last_update != QString("")){ |
||||
toJsonValue(QString("lastUpdate"), last_update, obj, QString("QString")); |
||||
} |
||||
if(m_messages_isSet){ |
||||
obj->insert("messages", QJsonValue(messages)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getMmsi() { |
||||
return mmsi; |
||||
} |
||||
void |
||||
SWGAISVessel::setMmsi(QString* mmsi) { |
||||
this->mmsi = mmsi; |
||||
this->m_mmsi_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGAISVessel::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getCallsign() { |
||||
return callsign; |
||||
} |
||||
void |
||||
SWGAISVessel::setCallsign(QString* callsign) { |
||||
this->callsign = callsign; |
||||
this->m_callsign_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getImo() { |
||||
return imo; |
||||
} |
||||
void |
||||
SWGAISVessel::setImo(QString* imo) { |
||||
this->imo = imo; |
||||
this->m_imo_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getCountry() { |
||||
return country; |
||||
} |
||||
void |
||||
SWGAISVessel::setCountry(QString* country) { |
||||
this->country = country; |
||||
this->m_country_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getType() { |
||||
return type; |
||||
} |
||||
void |
||||
SWGAISVessel::setType(QString* type) { |
||||
this->type = type; |
||||
this->m_type_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getShipType() { |
||||
return ship_type; |
||||
} |
||||
void |
||||
SWGAISVessel::setShipType(QString* ship_type) { |
||||
this->ship_type = ship_type; |
||||
this->m_ship_type_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAISVessel::getLatitude() { |
||||
return latitude; |
||||
} |
||||
void |
||||
SWGAISVessel::setLatitude(float latitude) { |
||||
this->latitude = latitude; |
||||
this->m_latitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAISVessel::getLongitude() { |
||||
return longitude; |
||||
} |
||||
void |
||||
SWGAISVessel::setLongitude(float longitude) { |
||||
this->longitude = longitude; |
||||
this->m_longitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAISVessel::getCourse() { |
||||
return course; |
||||
} |
||||
void |
||||
SWGAISVessel::setCourse(float course) { |
||||
this->course = course; |
||||
this->m_course_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAISVessel::getSpeed() { |
||||
return speed; |
||||
} |
||||
void |
||||
SWGAISVessel::setSpeed(float speed) { |
||||
this->speed = speed; |
||||
this->m_speed_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAISVessel::getHeading() { |
||||
return heading; |
||||
} |
||||
void |
||||
SWGAISVessel::setHeading(qint32 heading) { |
||||
this->heading = heading; |
||||
this->m_heading_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getStatus() { |
||||
return status; |
||||
} |
||||
void |
||||
SWGAISVessel::setStatus(QString* status) { |
||||
this->status = status; |
||||
this->m_status_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAISVessel::getLength() { |
||||
return length; |
||||
} |
||||
void |
||||
SWGAISVessel::setLength(qint32 length) { |
||||
this->length = length; |
||||
this->m_length_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getDestination() { |
||||
return destination; |
||||
} |
||||
void |
||||
SWGAISVessel::setDestination(QString* destination) { |
||||
this->destination = destination; |
||||
this->m_destination_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getPositionUpdate() { |
||||
return position_update; |
||||
} |
||||
void |
||||
SWGAISVessel::setPositionUpdate(QString* position_update) { |
||||
this->position_update = position_update; |
||||
this->m_position_update_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAISVessel::getLastUpdate() { |
||||
return last_update; |
||||
} |
||||
void |
||||
SWGAISVessel::setLastUpdate(QString* last_update) { |
||||
this->last_update = last_update; |
||||
this->m_last_update_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAISVessel::getMessages() { |
||||
return messages; |
||||
} |
||||
void |
||||
SWGAISVessel::setMessages(qint32 messages) { |
||||
this->messages = messages; |
||||
this->m_messages_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGAISVessel::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(mmsi && *mmsi != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(callsign && *callsign != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(imo && *imo != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(country && *country != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(type && *type != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(ship_type && *ship_type != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_latitude_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_longitude_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_course_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_speed_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_heading_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(status && *status != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_length_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(destination && *destination != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(position_update && *position_update != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(last_update && *last_update != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_messages_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,161 @@
@@ -0,0 +1,161 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGAISVessel.h |
||||
* |
||||
* Vessel heard by the AIS feature |
||||
*/ |
||||
|
||||
#ifndef SWGAISVessel_H_ |
||||
#define SWGAISVessel_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGAISVessel: public SWGObject { |
||||
public: |
||||
SWGAISVessel(); |
||||
SWGAISVessel(QString* json); |
||||
virtual ~SWGAISVessel(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGAISVessel* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getMmsi(); |
||||
void setMmsi(QString* mmsi); |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
QString* getCallsign(); |
||||
void setCallsign(QString* callsign); |
||||
|
||||
QString* getImo(); |
||||
void setImo(QString* imo); |
||||
|
||||
QString* getCountry(); |
||||
void setCountry(QString* country); |
||||
|
||||
QString* getType(); |
||||
void setType(QString* type); |
||||
|
||||
QString* getShipType(); |
||||
void setShipType(QString* ship_type); |
||||
|
||||
float getLatitude(); |
||||
void setLatitude(float latitude); |
||||
|
||||
float getLongitude(); |
||||
void setLongitude(float longitude); |
||||
|
||||
float getCourse(); |
||||
void setCourse(float course); |
||||
|
||||
float getSpeed(); |
||||
void setSpeed(float speed); |
||||
|
||||
qint32 getHeading(); |
||||
void setHeading(qint32 heading); |
||||
|
||||
QString* getStatus(); |
||||
void setStatus(QString* status); |
||||
|
||||
qint32 getLength(); |
||||
void setLength(qint32 length); |
||||
|
||||
QString* getDestination(); |
||||
void setDestination(QString* destination); |
||||
|
||||
QString* getPositionUpdate(); |
||||
void setPositionUpdate(QString* position_update); |
||||
|
||||
QString* getLastUpdate(); |
||||
void setLastUpdate(QString* last_update); |
||||
|
||||
qint32 getMessages(); |
||||
void setMessages(qint32 messages); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* mmsi; |
||||
bool m_mmsi_isSet; |
||||
|
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
QString* callsign; |
||||
bool m_callsign_isSet; |
||||
|
||||
QString* imo; |
||||
bool m_imo_isSet; |
||||
|
||||
QString* country; |
||||
bool m_country_isSet; |
||||
|
||||
QString* type; |
||||
bool m_type_isSet; |
||||
|
||||
QString* ship_type; |
||||
bool m_ship_type_isSet; |
||||
|
||||
float latitude; |
||||
bool m_latitude_isSet; |
||||
|
||||
float longitude; |
||||
bool m_longitude_isSet; |
||||
|
||||
float course; |
||||
bool m_course_isSet; |
||||
|
||||
float speed; |
||||
bool m_speed_isSet; |
||||
|
||||
qint32 heading; |
||||
bool m_heading_isSet; |
||||
|
||||
QString* status; |
||||
bool m_status_isSet; |
||||
|
||||
qint32 length; |
||||
bool m_length_isSet; |
||||
|
||||
QString* destination; |
||||
bool m_destination_isSet; |
||||
|
||||
QString* position_update; |
||||
bool m_position_update_isSet; |
||||
|
||||
QString* last_update; |
||||
bool m_last_update_isSet; |
||||
|
||||
qint32 messages; |
||||
bool m_messages_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGAISVessel_H_ */ |
||||
@ -0,0 +1,208 @@
@@ -0,0 +1,208 @@
|
||||
/**
|
||||
* 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 "SWGAPRSReport.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGAPRSReport::SWGAPRSReport(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGAPRSReport::SWGAPRSReport() { |
||||
running_state = 0; |
||||
m_running_state_isSet = false; |
||||
report_date_time = nullptr; |
||||
m_report_date_time_isSet = false; |
||||
station_count = 0; |
||||
m_station_count_isSet = false; |
||||
packet_count = 0; |
||||
m_packet_count_isSet = false; |
||||
stations = nullptr; |
||||
m_stations_isSet = false; |
||||
} |
||||
|
||||
SWGAPRSReport::~SWGAPRSReport() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGAPRSReport::init() { |
||||
running_state = 0; |
||||
m_running_state_isSet = false; |
||||
report_date_time = new QString(""); |
||||
m_report_date_time_isSet = false; |
||||
station_count = 0; |
||||
m_station_count_isSet = false; |
||||
packet_count = 0; |
||||
m_packet_count_isSet = false; |
||||
stations = new QList<SWGAPRSStation*>(); |
||||
m_stations_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGAPRSReport::cleanup() { |
||||
|
||||
if(report_date_time != nullptr) {
|
||||
delete report_date_time; |
||||
} |
||||
|
||||
|
||||
if(stations != nullptr) {
|
||||
auto arr = stations; |
||||
for(auto o: *arr) {
|
||||
delete o; |
||||
} |
||||
delete stations; |
||||
} |
||||
} |
||||
|
||||
SWGAPRSReport* |
||||
SWGAPRSReport::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGAPRSReport::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&running_state, pJson["runningState"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&report_date_time, pJson["reportDateTime"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&station_count, pJson["stationCount"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&packet_count, pJson["packetCount"], "qint32", ""); |
||||
|
||||
|
||||
::SWGSDRangel::setValue(&stations, pJson["stations"], "QList", "SWGAPRSStation"); |
||||
} |
||||
|
||||
QString |
||||
SWGAPRSReport::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGAPRSReport::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(m_running_state_isSet){ |
||||
obj->insert("runningState", QJsonValue(running_state)); |
||||
} |
||||
if(report_date_time != nullptr && *report_date_time != QString("")){ |
||||
toJsonValue(QString("reportDateTime"), report_date_time, obj, QString("QString")); |
||||
} |
||||
if(m_station_count_isSet){ |
||||
obj->insert("stationCount", QJsonValue(station_count)); |
||||
} |
||||
if(m_packet_count_isSet){ |
||||
obj->insert("packetCount", QJsonValue(packet_count)); |
||||
} |
||||
if(stations && stations->size() > 0){ |
||||
toJsonArray((QList<void*>*)stations, obj, "stations", "SWGAPRSStation"); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSReport::getRunningState() { |
||||
return running_state; |
||||
} |
||||
void |
||||
SWGAPRSReport::setRunningState(qint32 running_state) { |
||||
this->running_state = running_state; |
||||
this->m_running_state_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSReport::getReportDateTime() { |
||||
return report_date_time; |
||||
} |
||||
void |
||||
SWGAPRSReport::setReportDateTime(QString* report_date_time) { |
||||
this->report_date_time = report_date_time; |
||||
this->m_report_date_time_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSReport::getStationCount() { |
||||
return station_count; |
||||
} |
||||
void |
||||
SWGAPRSReport::setStationCount(qint32 station_count) { |
||||
this->station_count = station_count; |
||||
this->m_station_count_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSReport::getPacketCount() { |
||||
return packet_count; |
||||
} |
||||
void |
||||
SWGAPRSReport::setPacketCount(qint32 packet_count) { |
||||
this->packet_count = packet_count; |
||||
this->m_packet_count_isSet = true; |
||||
} |
||||
|
||||
QList<SWGAPRSStation*>* |
||||
SWGAPRSReport::getStations() { |
||||
return stations; |
||||
} |
||||
void |
||||
SWGAPRSReport::setStations(QList<SWGAPRSStation*>* stations) { |
||||
this->stations = stations; |
||||
this->m_stations_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGAPRSReport::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(m_running_state_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(report_date_time && *report_date_time != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_station_count_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_packet_count_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(stations && (stations->size() > 0)){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,85 @@
@@ -0,0 +1,85 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGAPRSReport.h |
||||
* |
||||
* Stations and objects heard by the APRS feature, which collects the AX.25 packets of every packet demodulator in the instance. A field is present only once a packet carrying it has been received.
|
||||
*/ |
||||
|
||||
#ifndef SWGAPRSReport_H_ |
||||
#define SWGAPRSReport_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include "SWGAPRSStation.h" |
||||
#include <QList> |
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGAPRSReport: public SWGObject { |
||||
public: |
||||
SWGAPRSReport(); |
||||
SWGAPRSReport(QString* json); |
||||
virtual ~SWGAPRSReport(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGAPRSReport* fromJson(QString &jsonString) override; |
||||
|
||||
qint32 getRunningState(); |
||||
void setRunningState(qint32 running_state); |
||||
|
||||
QString* getReportDateTime(); |
||||
void setReportDateTime(QString* report_date_time); |
||||
|
||||
qint32 getStationCount(); |
||||
void setStationCount(qint32 station_count); |
||||
|
||||
qint32 getPacketCount(); |
||||
void setPacketCount(qint32 packet_count); |
||||
|
||||
QList<SWGAPRSStation*>* getStations(); |
||||
void setStations(QList<SWGAPRSStation*>* stations); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
qint32 running_state; |
||||
bool m_running_state_isSet; |
||||
|
||||
QString* report_date_time; |
||||
bool m_report_date_time_isSet; |
||||
|
||||
qint32 station_count; |
||||
bool m_station_count_isSet; |
||||
|
||||
qint32 packet_count; |
||||
bool m_packet_count_isSet; |
||||
|
||||
QList<SWGAPRSStation*>* stations; |
||||
bool m_stations_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGAPRSReport_H_ */ |
||||
@ -0,0 +1,584 @@
@@ -0,0 +1,584 @@
|
||||
/**
|
||||
* 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 "SWGAPRSStation.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGAPRSStation::SWGAPRSStation(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGAPRSStation::SWGAPRSStation() { |
||||
callsign = nullptr; |
||||
m_callsign_isSet = false; |
||||
is_object = 0; |
||||
m_is_object_isSet = false; |
||||
reporting_station = nullptr; |
||||
m_reporting_station_isSet = false; |
||||
symbol = nullptr; |
||||
m_symbol_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
altitude = 0.0f; |
||||
m_altitude_isSet = false; |
||||
course = 0.0f; |
||||
m_course_isSet = false; |
||||
speed = 0.0f; |
||||
m_speed_isSet = false; |
||||
status = nullptr; |
||||
m_status_isSet = false; |
||||
comment = nullptr; |
||||
m_comment_isSet = false; |
||||
power_watts = 0.0f; |
||||
m_power_watts_isSet = false; |
||||
antenna_height = 0.0f; |
||||
m_antenna_height_isSet = false; |
||||
antenna_gain = 0.0f; |
||||
m_antenna_gain_isSet = false; |
||||
antenna_directivity = nullptr; |
||||
m_antenna_directivity_isSet = false; |
||||
radio_range = 0.0f; |
||||
m_radio_range_isSet = false; |
||||
has_weather = 0; |
||||
m_has_weather_isSet = false; |
||||
has_telemetry = 0; |
||||
m_has_telemetry_isSet = false; |
||||
telemetry_project_name = nullptr; |
||||
m_telemetry_project_name_isSet = false; |
||||
packets = 0; |
||||
m_packets_isSet = false; |
||||
last_packet_date_time = nullptr; |
||||
m_last_packet_date_time_isSet = false; |
||||
} |
||||
|
||||
SWGAPRSStation::~SWGAPRSStation() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGAPRSStation::init() { |
||||
callsign = new QString(""); |
||||
m_callsign_isSet = false; |
||||
is_object = 0; |
||||
m_is_object_isSet = false; |
||||
reporting_station = new QString(""); |
||||
m_reporting_station_isSet = false; |
||||
symbol = new QString(""); |
||||
m_symbol_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
altitude = 0.0f; |
||||
m_altitude_isSet = false; |
||||
course = 0.0f; |
||||
m_course_isSet = false; |
||||
speed = 0.0f; |
||||
m_speed_isSet = false; |
||||
status = new QString(""); |
||||
m_status_isSet = false; |
||||
comment = new QString(""); |
||||
m_comment_isSet = false; |
||||
power_watts = 0.0f; |
||||
m_power_watts_isSet = false; |
||||
antenna_height = 0.0f; |
||||
m_antenna_height_isSet = false; |
||||
antenna_gain = 0.0f; |
||||
m_antenna_gain_isSet = false; |
||||
antenna_directivity = new QString(""); |
||||
m_antenna_directivity_isSet = false; |
||||
radio_range = 0.0f; |
||||
m_radio_range_isSet = false; |
||||
has_weather = 0; |
||||
m_has_weather_isSet = false; |
||||
has_telemetry = 0; |
||||
m_has_telemetry_isSet = false; |
||||
telemetry_project_name = new QString(""); |
||||
m_telemetry_project_name_isSet = false; |
||||
packets = 0; |
||||
m_packets_isSet = false; |
||||
last_packet_date_time = new QString(""); |
||||
m_last_packet_date_time_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGAPRSStation::cleanup() { |
||||
if(callsign != nullptr) {
|
||||
delete callsign; |
||||
} |
||||
|
||||
if(reporting_station != nullptr) {
|
||||
delete reporting_station; |
||||
} |
||||
if(symbol != nullptr) {
|
||||
delete symbol; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(status != nullptr) {
|
||||
delete status; |
||||
} |
||||
if(comment != nullptr) {
|
||||
delete comment; |
||||
} |
||||
|
||||
|
||||
|
||||
if(antenna_directivity != nullptr) {
|
||||
delete antenna_directivity; |
||||
} |
||||
|
||||
|
||||
|
||||
if(telemetry_project_name != nullptr) {
|
||||
delete telemetry_project_name; |
||||
} |
||||
|
||||
if(last_packet_date_time != nullptr) {
|
||||
delete last_packet_date_time; |
||||
} |
||||
} |
||||
|
||||
SWGAPRSStation* |
||||
SWGAPRSStation::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGAPRSStation::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&callsign, pJson["callsign"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&is_object, pJson["isObject"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&reporting_station, pJson["reportingStation"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&symbol, pJson["symbol"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&altitude, pJson["altitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&course, pJson["course"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&speed, pJson["speed"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&status, pJson["status"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&comment, pJson["comment"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&power_watts, pJson["powerWatts"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&antenna_height, pJson["antennaHeight"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&antenna_gain, pJson["antennaGain"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&antenna_directivity, pJson["antennaDirectivity"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&radio_range, pJson["radioRange"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&has_weather, pJson["hasWeather"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&has_telemetry, pJson["hasTelemetry"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&telemetry_project_name, pJson["telemetryProjectName"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&packets, pJson["packets"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&last_packet_date_time, pJson["lastPacketDateTime"], "QString", "QString"); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGAPRSStation::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGAPRSStation::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(callsign != nullptr && *callsign != QString("")){ |
||||
toJsonValue(QString("callsign"), callsign, obj, QString("QString")); |
||||
} |
||||
if(m_is_object_isSet){ |
||||
obj->insert("isObject", QJsonValue(is_object)); |
||||
} |
||||
if(reporting_station != nullptr && *reporting_station != QString("")){ |
||||
toJsonValue(QString("reportingStation"), reporting_station, obj, QString("QString")); |
||||
} |
||||
if(symbol != nullptr && *symbol != QString("")){ |
||||
toJsonValue(QString("symbol"), symbol, obj, QString("QString")); |
||||
} |
||||
if(m_latitude_isSet){ |
||||
obj->insert("latitude", QJsonValue(latitude)); |
||||
} |
||||
if(m_longitude_isSet){ |
||||
obj->insert("longitude", QJsonValue(longitude)); |
||||
} |
||||
if(m_altitude_isSet){ |
||||
obj->insert("altitude", QJsonValue(altitude)); |
||||
} |
||||
if(m_course_isSet){ |
||||
obj->insert("course", QJsonValue(course)); |
||||
} |
||||
if(m_speed_isSet){ |
||||
obj->insert("speed", QJsonValue(speed)); |
||||
} |
||||
if(status != nullptr && *status != QString("")){ |
||||
toJsonValue(QString("status"), status, obj, QString("QString")); |
||||
} |
||||
if(comment != nullptr && *comment != QString("")){ |
||||
toJsonValue(QString("comment"), comment, obj, QString("QString")); |
||||
} |
||||
if(m_power_watts_isSet){ |
||||
obj->insert("powerWatts", QJsonValue(power_watts)); |
||||
} |
||||
if(m_antenna_height_isSet){ |
||||
obj->insert("antennaHeight", QJsonValue(antenna_height)); |
||||
} |
||||
if(m_antenna_gain_isSet){ |
||||
obj->insert("antennaGain", QJsonValue(antenna_gain)); |
||||
} |
||||
if(antenna_directivity != nullptr && *antenna_directivity != QString("")){ |
||||
toJsonValue(QString("antennaDirectivity"), antenna_directivity, obj, QString("QString")); |
||||
} |
||||
if(m_radio_range_isSet){ |
||||
obj->insert("radioRange", QJsonValue(radio_range)); |
||||
} |
||||
if(m_has_weather_isSet){ |
||||
obj->insert("hasWeather", QJsonValue(has_weather)); |
||||
} |
||||
if(m_has_telemetry_isSet){ |
||||
obj->insert("hasTelemetry", QJsonValue(has_telemetry)); |
||||
} |
||||
if(telemetry_project_name != nullptr && *telemetry_project_name != QString("")){ |
||||
toJsonValue(QString("telemetryProjectName"), telemetry_project_name, obj, QString("QString")); |
||||
} |
||||
if(m_packets_isSet){ |
||||
obj->insert("packets", QJsonValue(packets)); |
||||
} |
||||
if(last_packet_date_time != nullptr && *last_packet_date_time != QString("")){ |
||||
toJsonValue(QString("lastPacketDateTime"), last_packet_date_time, obj, QString("QString")); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getCallsign() { |
||||
return callsign; |
||||
} |
||||
void |
||||
SWGAPRSStation::setCallsign(QString* callsign) { |
||||
this->callsign = callsign; |
||||
this->m_callsign_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSStation::getIsObject() { |
||||
return is_object; |
||||
} |
||||
void |
||||
SWGAPRSStation::setIsObject(qint32 is_object) { |
||||
this->is_object = is_object; |
||||
this->m_is_object_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getReportingStation() { |
||||
return reporting_station; |
||||
} |
||||
void |
||||
SWGAPRSStation::setReportingStation(QString* reporting_station) { |
||||
this->reporting_station = reporting_station; |
||||
this->m_reporting_station_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getSymbol() { |
||||
return symbol; |
||||
} |
||||
void |
||||
SWGAPRSStation::setSymbol(QString* symbol) { |
||||
this->symbol = symbol; |
||||
this->m_symbol_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getLatitude() { |
||||
return latitude; |
||||
} |
||||
void |
||||
SWGAPRSStation::setLatitude(float latitude) { |
||||
this->latitude = latitude; |
||||
this->m_latitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getLongitude() { |
||||
return longitude; |
||||
} |
||||
void |
||||
SWGAPRSStation::setLongitude(float longitude) { |
||||
this->longitude = longitude; |
||||
this->m_longitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getAltitude() { |
||||
return altitude; |
||||
} |
||||
void |
||||
SWGAPRSStation::setAltitude(float altitude) { |
||||
this->altitude = altitude; |
||||
this->m_altitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getCourse() { |
||||
return course; |
||||
} |
||||
void |
||||
SWGAPRSStation::setCourse(float course) { |
||||
this->course = course; |
||||
this->m_course_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getSpeed() { |
||||
return speed; |
||||
} |
||||
void |
||||
SWGAPRSStation::setSpeed(float speed) { |
||||
this->speed = speed; |
||||
this->m_speed_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getStatus() { |
||||
return status; |
||||
} |
||||
void |
||||
SWGAPRSStation::setStatus(QString* status) { |
||||
this->status = status; |
||||
this->m_status_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getComment() { |
||||
return comment; |
||||
} |
||||
void |
||||
SWGAPRSStation::setComment(QString* comment) { |
||||
this->comment = comment; |
||||
this->m_comment_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getPowerWatts() { |
||||
return power_watts; |
||||
} |
||||
void |
||||
SWGAPRSStation::setPowerWatts(float power_watts) { |
||||
this->power_watts = power_watts; |
||||
this->m_power_watts_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getAntennaHeight() { |
||||
return antenna_height; |
||||
} |
||||
void |
||||
SWGAPRSStation::setAntennaHeight(float antenna_height) { |
||||
this->antenna_height = antenna_height; |
||||
this->m_antenna_height_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getAntennaGain() { |
||||
return antenna_gain; |
||||
} |
||||
void |
||||
SWGAPRSStation::setAntennaGain(float antenna_gain) { |
||||
this->antenna_gain = antenna_gain; |
||||
this->m_antenna_gain_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getAntennaDirectivity() { |
||||
return antenna_directivity; |
||||
} |
||||
void |
||||
SWGAPRSStation::setAntennaDirectivity(QString* antenna_directivity) { |
||||
this->antenna_directivity = antenna_directivity; |
||||
this->m_antenna_directivity_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGAPRSStation::getRadioRange() { |
||||
return radio_range; |
||||
} |
||||
void |
||||
SWGAPRSStation::setRadioRange(float radio_range) { |
||||
this->radio_range = radio_range; |
||||
this->m_radio_range_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSStation::getHasWeather() { |
||||
return has_weather; |
||||
} |
||||
void |
||||
SWGAPRSStation::setHasWeather(qint32 has_weather) { |
||||
this->has_weather = has_weather; |
||||
this->m_has_weather_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSStation::getHasTelemetry() { |
||||
return has_telemetry; |
||||
} |
||||
void |
||||
SWGAPRSStation::setHasTelemetry(qint32 has_telemetry) { |
||||
this->has_telemetry = has_telemetry; |
||||
this->m_has_telemetry_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getTelemetryProjectName() { |
||||
return telemetry_project_name; |
||||
} |
||||
void |
||||
SWGAPRSStation::setTelemetryProjectName(QString* telemetry_project_name) { |
||||
this->telemetry_project_name = telemetry_project_name; |
||||
this->m_telemetry_project_name_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGAPRSStation::getPackets() { |
||||
return packets; |
||||
} |
||||
void |
||||
SWGAPRSStation::setPackets(qint32 packets) { |
||||
this->packets = packets; |
||||
this->m_packets_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGAPRSStation::getLastPacketDateTime() { |
||||
return last_packet_date_time; |
||||
} |
||||
void |
||||
SWGAPRSStation::setLastPacketDateTime(QString* last_packet_date_time) { |
||||
this->last_packet_date_time = last_packet_date_time; |
||||
this->m_last_packet_date_time_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGAPRSStation::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(callsign && *callsign != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_is_object_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(reporting_station && *reporting_station != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(symbol && *symbol != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_latitude_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_longitude_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_altitude_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_course_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_speed_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(status && *status != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(comment && *comment != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_power_watts_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_antenna_height_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_antenna_gain_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(antenna_directivity && *antenna_directivity != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_radio_range_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_has_weather_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_has_telemetry_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(telemetry_project_name && *telemetry_project_name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_packets_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(last_packet_date_time && *last_packet_date_time != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,179 @@
@@ -0,0 +1,179 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGAPRSStation.h |
||||
* |
||||
* Station or object heard by the APRS feature |
||||
*/ |
||||
|
||||
#ifndef SWGAPRSStation_H_ |
||||
#define SWGAPRSStation_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGAPRSStation: public SWGObject { |
||||
public: |
||||
SWGAPRSStation(); |
||||
SWGAPRSStation(QString* json); |
||||
virtual ~SWGAPRSStation(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGAPRSStation* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getCallsign(); |
||||
void setCallsign(QString* callsign); |
||||
|
||||
qint32 getIsObject(); |
||||
void setIsObject(qint32 is_object); |
||||
|
||||
QString* getReportingStation(); |
||||
void setReportingStation(QString* reporting_station); |
||||
|
||||
QString* getSymbol(); |
||||
void setSymbol(QString* symbol); |
||||
|
||||
float getLatitude(); |
||||
void setLatitude(float latitude); |
||||
|
||||
float getLongitude(); |
||||
void setLongitude(float longitude); |
||||
|
||||
float getAltitude(); |
||||
void setAltitude(float altitude); |
||||
|
||||
float getCourse(); |
||||
void setCourse(float course); |
||||
|
||||
float getSpeed(); |
||||
void setSpeed(float speed); |
||||
|
||||
QString* getStatus(); |
||||
void setStatus(QString* status); |
||||
|
||||
QString* getComment(); |
||||
void setComment(QString* comment); |
||||
|
||||
float getPowerWatts(); |
||||
void setPowerWatts(float power_watts); |
||||
|
||||
float getAntennaHeight(); |
||||
void setAntennaHeight(float antenna_height); |
||||
|
||||
float getAntennaGain(); |
||||
void setAntennaGain(float antenna_gain); |
||||
|
||||
QString* getAntennaDirectivity(); |
||||
void setAntennaDirectivity(QString* antenna_directivity); |
||||
|
||||
float getRadioRange(); |
||||
void setRadioRange(float radio_range); |
||||
|
||||
qint32 getHasWeather(); |
||||
void setHasWeather(qint32 has_weather); |
||||
|
||||
qint32 getHasTelemetry(); |
||||
void setHasTelemetry(qint32 has_telemetry); |
||||
|
||||
QString* getTelemetryProjectName(); |
||||
void setTelemetryProjectName(QString* telemetry_project_name); |
||||
|
||||
qint32 getPackets(); |
||||
void setPackets(qint32 packets); |
||||
|
||||
QString* getLastPacketDateTime(); |
||||
void setLastPacketDateTime(QString* last_packet_date_time); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* callsign; |
||||
bool m_callsign_isSet; |
||||
|
||||
qint32 is_object; |
||||
bool m_is_object_isSet; |
||||
|
||||
QString* reporting_station; |
||||
bool m_reporting_station_isSet; |
||||
|
||||
QString* symbol; |
||||
bool m_symbol_isSet; |
||||
|
||||
float latitude; |
||||
bool m_latitude_isSet; |
||||
|
||||
float longitude; |
||||
bool m_longitude_isSet; |
||||
|
||||
float altitude; |
||||
bool m_altitude_isSet; |
||||
|
||||
float course; |
||||
bool m_course_isSet; |
||||
|
||||
float speed; |
||||
bool m_speed_isSet; |
||||
|
||||
QString* status; |
||||
bool m_status_isSet; |
||||
|
||||
QString* comment; |
||||
bool m_comment_isSet; |
||||
|
||||
float power_watts; |
||||
bool m_power_watts_isSet; |
||||
|
||||
float antenna_height; |
||||
bool m_antenna_height_isSet; |
||||
|
||||
float antenna_gain; |
||||
bool m_antenna_gain_isSet; |
||||
|
||||
QString* antenna_directivity; |
||||
bool m_antenna_directivity_isSet; |
||||
|
||||
float radio_range; |
||||
bool m_radio_range_isSet; |
||||
|
||||
qint32 has_weather; |
||||
bool m_has_weather_isSet; |
||||
|
||||
qint32 has_telemetry; |
||||
bool m_has_telemetry_isSet; |
||||
|
||||
QString* telemetry_project_name; |
||||
bool m_telemetry_project_name_isSet; |
||||
|
||||
qint32 packets; |
||||
bool m_packets_isSet; |
||||
|
||||
QString* last_packet_date_time; |
||||
bool m_last_packet_date_time_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGAPRSStation_H_ */ |
||||
@ -0,0 +1,586 @@
@@ -0,0 +1,586 @@
|
||||
/**
|
||||
* 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 "SWGDABDemodReport.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGDABDemodReport::SWGDABDemodReport(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGDABDemodReport::SWGDABDemodReport() { |
||||
channel_power_db = 0.0f; |
||||
m_channel_power_db_isSet = false; |
||||
channel_sample_rate = 0; |
||||
m_channel_sample_rate_isSet = false; |
||||
audio_sample_rate = 0; |
||||
m_audio_sample_rate_isSet = false; |
||||
sync = 0; |
||||
m_sync_isSet = false; |
||||
snr = 0; |
||||
m_snr_isSet = false; |
||||
frequency_offset = 0; |
||||
m_frequency_offset_isSet = false; |
||||
ensemble_name = nullptr; |
||||
m_ensemble_name_isSet = false; |
||||
ensemble_id = 0; |
||||
m_ensemble_id_isSet = false; |
||||
programs = nullptr; |
||||
m_programs_isSet = false; |
||||
selected_program = nullptr; |
||||
m_selected_program_isSet = false; |
||||
audio_active = 0; |
||||
m_audio_active_isSet = false; |
||||
bitrate = 0; |
||||
m_bitrate_isSet = false; |
||||
audio = nullptr; |
||||
m_audio_isSet = false; |
||||
language = nullptr; |
||||
m_language_isSet = false; |
||||
program_type = nullptr; |
||||
m_program_type_isSet = false; |
||||
frame_quality = 0; |
||||
m_frame_quality_isSet = false; |
||||
reed_solomon_quality = 0; |
||||
m_reed_solomon_quality_isSet = false; |
||||
aac_quality = 0; |
||||
m_aac_quality_isSet = false; |
||||
fib_quality = 0; |
||||
m_fib_quality_isSet = false; |
||||
tii = 0; |
||||
m_tii_isSet = false; |
||||
data = nullptr; |
||||
m_data_isSet = false; |
||||
} |
||||
|
||||
SWGDABDemodReport::~SWGDABDemodReport() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGDABDemodReport::init() { |
||||
channel_power_db = 0.0f; |
||||
m_channel_power_db_isSet = false; |
||||
channel_sample_rate = 0; |
||||
m_channel_sample_rate_isSet = false; |
||||
audio_sample_rate = 0; |
||||
m_audio_sample_rate_isSet = false; |
||||
sync = 0; |
||||
m_sync_isSet = false; |
||||
snr = 0; |
||||
m_snr_isSet = false; |
||||
frequency_offset = 0; |
||||
m_frequency_offset_isSet = false; |
||||
ensemble_name = new QString(""); |
||||
m_ensemble_name_isSet = false; |
||||
ensemble_id = 0; |
||||
m_ensemble_id_isSet = false; |
||||
programs = new QList<SWG#/DABProgram*>(); |
||||
m_programs_isSet = false; |
||||
selected_program = new QString(""); |
||||
m_selected_program_isSet = false; |
||||
audio_active = 0; |
||||
m_audio_active_isSet = false; |
||||
bitrate = 0; |
||||
m_bitrate_isSet = false; |
||||
audio = new QString(""); |
||||
m_audio_isSet = false; |
||||
language = new QString(""); |
||||
m_language_isSet = false; |
||||
program_type = new QString(""); |
||||
m_program_type_isSet = false; |
||||
frame_quality = 0; |
||||
m_frame_quality_isSet = false; |
||||
reed_solomon_quality = 0; |
||||
m_reed_solomon_quality_isSet = false; |
||||
aac_quality = 0; |
||||
m_aac_quality_isSet = false; |
||||
fib_quality = 0; |
||||
m_fib_quality_isSet = false; |
||||
tii = 0; |
||||
m_tii_isSet = false; |
||||
data = new QString(""); |
||||
m_data_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGDABDemodReport::cleanup() { |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(ensemble_name != nullptr) {
|
||||
delete ensemble_name; |
||||
} |
||||
|
||||
if(programs != nullptr) {
|
||||
auto arr = programs; |
||||
for(auto o: *arr) {
|
||||
delete o; |
||||
} |
||||
delete programs; |
||||
} |
||||
if(selected_program != nullptr) {
|
||||
delete selected_program; |
||||
} |
||||
|
||||
|
||||
if(audio != nullptr) {
|
||||
delete audio; |
||||
} |
||||
if(language != nullptr) {
|
||||
delete language; |
||||
} |
||||
if(program_type != nullptr) {
|
||||
delete program_type; |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if(data != nullptr) {
|
||||
delete data; |
||||
} |
||||
} |
||||
|
||||
SWGDABDemodReport* |
||||
SWGDABDemodReport::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGDABDemodReport::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&audio_sample_rate, pJson["audioSampleRate"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&sync, pJson["sync"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&snr, pJson["snr"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&frequency_offset, pJson["frequencyOffset"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&ensemble_name, pJson["ensembleName"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&ensemble_id, pJson["ensembleId"], "qint32", ""); |
||||
|
||||
|
||||
::SWGSDRangel::setValue(&programs, pJson["programs"], "QList", "SWG#/DABProgram"); |
||||
::SWGSDRangel::setValue(&selected_program, pJson["selectedProgram"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&audio_active, pJson["audioActive"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&bitrate, pJson["bitrate"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&audio, pJson["audio"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&language, pJson["language"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&program_type, pJson["programType"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&frame_quality, pJson["frameQuality"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&reed_solomon_quality, pJson["reedSolomonQuality"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&aac_quality, pJson["aacQuality"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&fib_quality, pJson["fibQuality"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&tii, pJson["tii"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&data, pJson["data"], "QString", "QString"); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGDABDemodReport::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGDABDemodReport::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(m_channel_power_db_isSet){ |
||||
obj->insert("channelPowerDB", QJsonValue(channel_power_db)); |
||||
} |
||||
if(m_channel_sample_rate_isSet){ |
||||
obj->insert("channelSampleRate", QJsonValue(channel_sample_rate)); |
||||
} |
||||
if(m_audio_sample_rate_isSet){ |
||||
obj->insert("audioSampleRate", QJsonValue(audio_sample_rate)); |
||||
} |
||||
if(m_sync_isSet){ |
||||
obj->insert("sync", QJsonValue(sync)); |
||||
} |
||||
if(m_snr_isSet){ |
||||
obj->insert("snr", QJsonValue(snr)); |
||||
} |
||||
if(m_frequency_offset_isSet){ |
||||
obj->insert("frequencyOffset", QJsonValue(frequency_offset)); |
||||
} |
||||
if(ensemble_name != nullptr && *ensemble_name != QString("")){ |
||||
toJsonValue(QString("ensembleName"), ensemble_name, obj, QString("QString")); |
||||
} |
||||
if(m_ensemble_id_isSet){ |
||||
obj->insert("ensembleId", QJsonValue(ensemble_id)); |
||||
} |
||||
if(programs && programs->size() > 0){ |
||||
toJsonArray((QList<void*>*)programs, obj, "programs", "SWG#/DABProgram"); |
||||
} |
||||
if(selected_program != nullptr && *selected_program != QString("")){ |
||||
toJsonValue(QString("selectedProgram"), selected_program, obj, QString("QString")); |
||||
} |
||||
if(m_audio_active_isSet){ |
||||
obj->insert("audioActive", QJsonValue(audio_active)); |
||||
} |
||||
if(m_bitrate_isSet){ |
||||
obj->insert("bitrate", QJsonValue(bitrate)); |
||||
} |
||||
if(audio != nullptr && *audio != QString("")){ |
||||
toJsonValue(QString("audio"), audio, obj, QString("QString")); |
||||
} |
||||
if(language != nullptr && *language != QString("")){ |
||||
toJsonValue(QString("language"), language, obj, QString("QString")); |
||||
} |
||||
if(program_type != nullptr && *program_type != QString("")){ |
||||
toJsonValue(QString("programType"), program_type, obj, QString("QString")); |
||||
} |
||||
if(m_frame_quality_isSet){ |
||||
obj->insert("frameQuality", QJsonValue(frame_quality)); |
||||
} |
||||
if(m_reed_solomon_quality_isSet){ |
||||
obj->insert("reedSolomonQuality", QJsonValue(reed_solomon_quality)); |
||||
} |
||||
if(m_aac_quality_isSet){ |
||||
obj->insert("aacQuality", QJsonValue(aac_quality)); |
||||
} |
||||
if(m_fib_quality_isSet){ |
||||
obj->insert("fibQuality", QJsonValue(fib_quality)); |
||||
} |
||||
if(m_tii_isSet){ |
||||
obj->insert("tii", QJsonValue(tii)); |
||||
} |
||||
if(data != nullptr && *data != QString("")){ |
||||
toJsonValue(QString("data"), data, obj, QString("QString")); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
float |
||||
SWGDABDemodReport::getChannelPowerDb() { |
||||
return channel_power_db; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setChannelPowerDb(float channel_power_db) { |
||||
this->channel_power_db = channel_power_db; |
||||
this->m_channel_power_db_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getChannelSampleRate() { |
||||
return channel_sample_rate; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setChannelSampleRate(qint32 channel_sample_rate) { |
||||
this->channel_sample_rate = channel_sample_rate; |
||||
this->m_channel_sample_rate_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getAudioSampleRate() { |
||||
return audio_sample_rate; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setAudioSampleRate(qint32 audio_sample_rate) { |
||||
this->audio_sample_rate = audio_sample_rate; |
||||
this->m_audio_sample_rate_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getSync() { |
||||
return sync; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setSync(qint32 sync) { |
||||
this->sync = sync; |
||||
this->m_sync_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getSnr() { |
||||
return snr; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setSnr(qint32 snr) { |
||||
this->snr = snr; |
||||
this->m_snr_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getFrequencyOffset() { |
||||
return frequency_offset; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setFrequencyOffset(qint32 frequency_offset) { |
||||
this->frequency_offset = frequency_offset; |
||||
this->m_frequency_offset_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getEnsembleName() { |
||||
return ensemble_name; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setEnsembleName(QString* ensemble_name) { |
||||
this->ensemble_name = ensemble_name; |
||||
this->m_ensemble_name_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getEnsembleId() { |
||||
return ensemble_id; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setEnsembleId(qint32 ensemble_id) { |
||||
this->ensemble_id = ensemble_id; |
||||
this->m_ensemble_id_isSet = true; |
||||
} |
||||
|
||||
QList<SWG#/DABProgram*>* |
||||
SWGDABDemodReport::getPrograms() { |
||||
return programs; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setPrograms(QList<SWG#/DABProgram*>* programs) { |
||||
this->programs = programs; |
||||
this->m_programs_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getSelectedProgram() { |
||||
return selected_program; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setSelectedProgram(QString* selected_program) { |
||||
this->selected_program = selected_program; |
||||
this->m_selected_program_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getAudioActive() { |
||||
return audio_active; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setAudioActive(qint32 audio_active) { |
||||
this->audio_active = audio_active; |
||||
this->m_audio_active_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getBitrate() { |
||||
return bitrate; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setBitrate(qint32 bitrate) { |
||||
this->bitrate = bitrate; |
||||
this->m_bitrate_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getAudio() { |
||||
return audio; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setAudio(QString* audio) { |
||||
this->audio = audio; |
||||
this->m_audio_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getLanguage() { |
||||
return language; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setLanguage(QString* language) { |
||||
this->language = language; |
||||
this->m_language_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getProgramType() { |
||||
return program_type; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setProgramType(QString* program_type) { |
||||
this->program_type = program_type; |
||||
this->m_program_type_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getFrameQuality() { |
||||
return frame_quality; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setFrameQuality(qint32 frame_quality) { |
||||
this->frame_quality = frame_quality; |
||||
this->m_frame_quality_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getReedSolomonQuality() { |
||||
return reed_solomon_quality; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setReedSolomonQuality(qint32 reed_solomon_quality) { |
||||
this->reed_solomon_quality = reed_solomon_quality; |
||||
this->m_reed_solomon_quality_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getAacQuality() { |
||||
return aac_quality; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setAacQuality(qint32 aac_quality) { |
||||
this->aac_quality = aac_quality; |
||||
this->m_aac_quality_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getFibQuality() { |
||||
return fib_quality; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setFibQuality(qint32 fib_quality) { |
||||
this->fib_quality = fib_quality; |
||||
this->m_fib_quality_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABDemodReport::getTii() { |
||||
return tii; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setTii(qint32 tii) { |
||||
this->tii = tii; |
||||
this->m_tii_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABDemodReport::getData() { |
||||
return data; |
||||
} |
||||
void |
||||
SWGDABDemodReport::setData(QString* data) { |
||||
this->data = data; |
||||
this->m_data_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGDABDemodReport::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(m_channel_power_db_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_channel_sample_rate_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_audio_sample_rate_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_sync_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_snr_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_frequency_offset_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(ensemble_name && *ensemble_name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_ensemble_id_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(programs && (programs->size() > 0)){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(selected_program && *selected_program != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_audio_active_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_bitrate_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(audio && *audio != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(language && *language != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(program_type && *program_type != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_frame_quality_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_reed_solomon_quality_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_aac_quality_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_fib_quality_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_tii_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(data && *data != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,181 @@
@@ -0,0 +1,181 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGDABDemodReport.h |
||||
* |
||||
* Live DAB demodulator, ensemble and selected-programme status. Synchronization, discovered programmes and active audio do not by themselves prove clean reception; check SNR after selecting a programme and after every receiver gain change.
|
||||
*/ |
||||
|
||||
#ifndef SWGDABDemodReport_H_ |
||||
#define SWGDABDemodReport_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include "SWG#/DABProgram.h" |
||||
#include <QList> |
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGDABDemodReport: public SWGObject { |
||||
public: |
||||
SWGDABDemodReport(); |
||||
SWGDABDemodReport(QString* json); |
||||
virtual ~SWGDABDemodReport(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGDABDemodReport* fromJson(QString &jsonString) override; |
||||
|
||||
float getChannelPowerDb(); |
||||
void setChannelPowerDb(float channel_power_db); |
||||
|
||||
qint32 getChannelSampleRate(); |
||||
void setChannelSampleRate(qint32 channel_sample_rate); |
||||
|
||||
qint32 getAudioSampleRate(); |
||||
void setAudioSampleRate(qint32 audio_sample_rate); |
||||
|
||||
qint32 getSync(); |
||||
void setSync(qint32 sync); |
||||
|
||||
qint32 getSnr(); |
||||
void setSnr(qint32 snr); |
||||
|
||||
qint32 getFrequencyOffset(); |
||||
void setFrequencyOffset(qint32 frequency_offset); |
||||
|
||||
QString* getEnsembleName(); |
||||
void setEnsembleName(QString* ensemble_name); |
||||
|
||||
qint32 getEnsembleId(); |
||||
void setEnsembleId(qint32 ensemble_id); |
||||
|
||||
QList<SWG#/DABProgram*>* getPrograms(); |
||||
void setPrograms(QList<SWG#/DABProgram*>* programs); |
||||
|
||||
QString* getSelectedProgram(); |
||||
void setSelectedProgram(QString* selected_program); |
||||
|
||||
qint32 getAudioActive(); |
||||
void setAudioActive(qint32 audio_active); |
||||
|
||||
qint32 getBitrate(); |
||||
void setBitrate(qint32 bitrate); |
||||
|
||||
QString* getAudio(); |
||||
void setAudio(QString* audio); |
||||
|
||||
QString* getLanguage(); |
||||
void setLanguage(QString* language); |
||||
|
||||
QString* getProgramType(); |
||||
void setProgramType(QString* program_type); |
||||
|
||||
qint32 getFrameQuality(); |
||||
void setFrameQuality(qint32 frame_quality); |
||||
|
||||
qint32 getReedSolomonQuality(); |
||||
void setReedSolomonQuality(qint32 reed_solomon_quality); |
||||
|
||||
qint32 getAacQuality(); |
||||
void setAacQuality(qint32 aac_quality); |
||||
|
||||
qint32 getFibQuality(); |
||||
void setFibQuality(qint32 fib_quality); |
||||
|
||||
qint32 getTii(); |
||||
void setTii(qint32 tii); |
||||
|
||||
QString* getData(); |
||||
void setData(QString* data); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
float channel_power_db; |
||||
bool m_channel_power_db_isSet; |
||||
|
||||
qint32 channel_sample_rate; |
||||
bool m_channel_sample_rate_isSet; |
||||
|
||||
qint32 audio_sample_rate; |
||||
bool m_audio_sample_rate_isSet; |
||||
|
||||
qint32 sync; |
||||
bool m_sync_isSet; |
||||
|
||||
qint32 snr; |
||||
bool m_snr_isSet; |
||||
|
||||
qint32 frequency_offset; |
||||
bool m_frequency_offset_isSet; |
||||
|
||||
QString* ensemble_name; |
||||
bool m_ensemble_name_isSet; |
||||
|
||||
qint32 ensemble_id; |
||||
bool m_ensemble_id_isSet; |
||||
|
||||
QList<SWG#/DABProgram*>* programs; |
||||
bool m_programs_isSet; |
||||
|
||||
QString* selected_program; |
||||
bool m_selected_program_isSet; |
||||
|
||||
qint32 audio_active; |
||||
bool m_audio_active_isSet; |
||||
|
||||
qint32 bitrate; |
||||
bool m_bitrate_isSet; |
||||
|
||||
QString* audio; |
||||
bool m_audio_isSet; |
||||
|
||||
QString* language; |
||||
bool m_language_isSet; |
||||
|
||||
QString* program_type; |
||||
bool m_program_type_isSet; |
||||
|
||||
qint32 frame_quality; |
||||
bool m_frame_quality_isSet; |
||||
|
||||
qint32 reed_solomon_quality; |
||||
bool m_reed_solomon_quality_isSet; |
||||
|
||||
qint32 aac_quality; |
||||
bool m_aac_quality_isSet; |
||||
|
||||
qint32 fib_quality; |
||||
bool m_fib_quality_isSet; |
||||
|
||||
qint32 tii; |
||||
bool m_tii_isSet; |
||||
|
||||
QString* data; |
||||
bool m_data_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGDABDemodReport_H_ */ |
||||
@ -0,0 +1,133 @@
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 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 "SWGDABProgram.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGDABProgram::SWGDABProgram(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGDABProgram::SWGDABProgram() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
id = 0; |
||||
m_id_isSet = false; |
||||
} |
||||
|
||||
SWGDABProgram::~SWGDABProgram() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGDABProgram::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
id = 0; |
||||
m_id_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGDABProgram::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
} |
||||
|
||||
SWGDABProgram* |
||||
SWGDABProgram::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGDABProgram::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&id, pJson["id"], "qint32", ""); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGDABProgram::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGDABProgram::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, obj, QString("QString")); |
||||
} |
||||
if(m_id_isSet){ |
||||
obj->insert("id", QJsonValue(id)); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGDABProgram::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGDABProgram::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGDABProgram::getId() { |
||||
return id; |
||||
} |
||||
void |
||||
SWGDABProgram::setId(qint32 id) { |
||||
this->id = id; |
||||
this->m_id_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGDABProgram::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_id_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,65 @@
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* SDRangel |
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
* |
||||
* OpenAPI spec version: 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGDABProgram.h |
||||
* |
||||
* A programme service discovered in the currently tuned DAB ensemble. |
||||
*/ |
||||
|
||||
#ifndef SWGDABProgram_H_ |
||||
#define SWGDABProgram_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGDABProgram: public SWGObject { |
||||
public: |
||||
SWGDABProgram(); |
||||
SWGDABProgram(QString* json); |
||||
virtual ~SWGDABProgram(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGDABProgram* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
qint32 getId(); |
||||
void setId(qint32 id); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
qint32 id; |
||||
bool m_id_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGDABProgram_H_ */ |
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue