15 changed files with 1134 additions and 1 deletions
@ -0,0 +1,206 @@
@@ -0,0 +1,206 @@
|
||||
/**
|
||||
* 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 "SWGMapDatalinkMessage.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGMapDatalinkMessage::SWGMapDatalinkMessage(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGMapDatalinkMessage::SWGMapDatalinkMessage() { |
||||
id = 0; |
||||
m_id_isSet = false; |
||||
received = nullptr; |
||||
m_received_isSet = false; |
||||
uplink = 0; |
||||
m_uplink_isSet = false; |
||||
station = nullptr; |
||||
m_station_isSet = false; |
||||
text = nullptr; |
||||
m_text_isSet = false; |
||||
} |
||||
|
||||
SWGMapDatalinkMessage::~SWGMapDatalinkMessage() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGMapDatalinkMessage::init() { |
||||
id = 0; |
||||
m_id_isSet = false; |
||||
received = new QString(""); |
||||
m_received_isSet = false; |
||||
uplink = 0; |
||||
m_uplink_isSet = false; |
||||
station = new QString(""); |
||||
m_station_isSet = false; |
||||
text = new QString(""); |
||||
m_text_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGMapDatalinkMessage::cleanup() { |
||||
|
||||
if(received != nullptr) {
|
||||
delete received; |
||||
} |
||||
|
||||
if(station != nullptr) {
|
||||
delete station; |
||||
} |
||||
if(text != nullptr) {
|
||||
delete text; |
||||
} |
||||
} |
||||
|
||||
SWGMapDatalinkMessage* |
||||
SWGMapDatalinkMessage::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGMapDatalinkMessage::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&id, pJson["id"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&received, pJson["received"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&uplink, pJson["uplink"], "qint32", ""); |
||||
|
||||
::SWGSDRangel::setValue(&station, pJson["station"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&text, pJson["text"], "QString", "QString"); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGMapDatalinkMessage::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGMapDatalinkMessage::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(m_id_isSet){ |
||||
obj->insert("id", QJsonValue(id)); |
||||
} |
||||
if(received != nullptr && *received != QString("")){ |
||||
toJsonValue(QString("received"), received, obj, QString("QString")); |
||||
} |
||||
if(m_uplink_isSet){ |
||||
obj->insert("uplink", QJsonValue(uplink)); |
||||
} |
||||
if(station != nullptr && *station != QString("")){ |
||||
toJsonValue(QString("station"), station, obj, QString("QString")); |
||||
} |
||||
if(text != nullptr && *text != QString("")){ |
||||
toJsonValue(QString("text"), text, obj, QString("QString")); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
qint32 |
||||
SWGMapDatalinkMessage::getId() { |
||||
return id; |
||||
} |
||||
void |
||||
SWGMapDatalinkMessage::setId(qint32 id) { |
||||
this->id = id; |
||||
this->m_id_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapDatalinkMessage::getReceived() { |
||||
return received; |
||||
} |
||||
void |
||||
SWGMapDatalinkMessage::setReceived(QString* received) { |
||||
this->received = received; |
||||
this->m_received_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGMapDatalinkMessage::getUplink() { |
||||
return uplink; |
||||
} |
||||
void |
||||
SWGMapDatalinkMessage::setUplink(qint32 uplink) { |
||||
this->uplink = uplink; |
||||
this->m_uplink_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapDatalinkMessage::getStation() { |
||||
return station; |
||||
} |
||||
void |
||||
SWGMapDatalinkMessage::setStation(QString* station) { |
||||
this->station = station; |
||||
this->m_station_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapDatalinkMessage::getText() { |
||||
return text; |
||||
} |
||||
void |
||||
SWGMapDatalinkMessage::setText(QString* text) { |
||||
this->text = text; |
||||
this->m_text_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGMapDatalinkMessage::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(m_id_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(received && *received != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_uplink_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(station && *station != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(text && *text != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,83 @@
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGMapDatalinkMessage.h |
||||
* |
||||
* Datalink ATC message (CPDLC / pre-departure clearance / oceanic clearance), shown on the Map's DCDU |
||||
*/ |
||||
|
||||
#ifndef SWGMapDatalinkMessage_H_ |
||||
#define SWGMapDatalinkMessage_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGMapDatalinkMessage: public SWGObject { |
||||
public: |
||||
SWGMapDatalinkMessage(); |
||||
SWGMapDatalinkMessage(QString* json); |
||||
virtual ~SWGMapDatalinkMessage(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGMapDatalinkMessage* fromJson(QString &jsonString) override; |
||||
|
||||
qint32 getId(); |
||||
void setId(qint32 id); |
||||
|
||||
QString* getReceived(); |
||||
void setReceived(QString* received); |
||||
|
||||
qint32 getUplink(); |
||||
void setUplink(qint32 uplink); |
||||
|
||||
QString* getStation(); |
||||
void setStation(QString* station); |
||||
|
||||
QString* getText(); |
||||
void setText(QString* text); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
qint32 id; |
||||
bool m_id_isSet; |
||||
|
||||
QString* received; |
||||
bool m_received_isSet; |
||||
|
||||
qint32 uplink; |
||||
bool m_uplink_isSet; |
||||
|
||||
QString* station; |
||||
bool m_station_isSet; |
||||
|
||||
QString* text; |
||||
bool m_text_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGMapDatalinkMessage_H_ */ |
||||
@ -0,0 +1,237 @@
@@ -0,0 +1,237 @@
|
||||
/**
|
||||
* 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 "SWGMapFlightPlan.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGMapFlightPlan::SWGMapFlightPlan(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGMapFlightPlan::SWGMapFlightPlan() { |
||||
departure = nullptr; |
||||
m_departure_isSet = false; |
||||
arrival = nullptr; |
||||
m_arrival_isSet = false; |
||||
arrival_runway = nullptr; |
||||
m_arrival_runway_isSet = false; |
||||
approach = nullptr; |
||||
m_approach_isSet = false; |
||||
active_waypoint = 0; |
||||
m_active_waypoint_isSet = false; |
||||
waypoints = nullptr; |
||||
m_waypoints_isSet = false; |
||||
} |
||||
|
||||
SWGMapFlightPlan::~SWGMapFlightPlan() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGMapFlightPlan::init() { |
||||
departure = new QString(""); |
||||
m_departure_isSet = false; |
||||
arrival = new QString(""); |
||||
m_arrival_isSet = false; |
||||
arrival_runway = new QString(""); |
||||
m_arrival_runway_isSet = false; |
||||
approach = new QString(""); |
||||
m_approach_isSet = false; |
||||
active_waypoint = 0; |
||||
m_active_waypoint_isSet = false; |
||||
waypoints = new QList<SWGMapRouteWaypoint*>(); |
||||
m_waypoints_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGMapFlightPlan::cleanup() { |
||||
if(departure != nullptr) {
|
||||
delete departure; |
||||
} |
||||
if(arrival != nullptr) {
|
||||
delete arrival; |
||||
} |
||||
if(arrival_runway != nullptr) {
|
||||
delete arrival_runway; |
||||
} |
||||
if(approach != nullptr) {
|
||||
delete approach; |
||||
} |
||||
|
||||
if(waypoints != nullptr) {
|
||||
auto arr = waypoints; |
||||
for(auto o: *arr) {
|
||||
delete o; |
||||
} |
||||
delete waypoints; |
||||
} |
||||
} |
||||
|
||||
SWGMapFlightPlan* |
||||
SWGMapFlightPlan::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGMapFlightPlan::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&departure, pJson["departure"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&arrival, pJson["arrival"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&arrival_runway, pJson["arrivalRunway"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&approach, pJson["approach"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&active_waypoint, pJson["activeWaypoint"], "qint32", ""); |
||||
|
||||
|
||||
::SWGSDRangel::setValue(&waypoints, pJson["waypoints"], "QList", "SWGMapRouteWaypoint"); |
||||
} |
||||
|
||||
QString |
||||
SWGMapFlightPlan::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGMapFlightPlan::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(departure != nullptr && *departure != QString("")){ |
||||
toJsonValue(QString("departure"), departure, obj, QString("QString")); |
||||
} |
||||
if(arrival != nullptr && *arrival != QString("")){ |
||||
toJsonValue(QString("arrival"), arrival, obj, QString("QString")); |
||||
} |
||||
if(arrival_runway != nullptr && *arrival_runway != QString("")){ |
||||
toJsonValue(QString("arrivalRunway"), arrival_runway, obj, QString("QString")); |
||||
} |
||||
if(approach != nullptr && *approach != QString("")){ |
||||
toJsonValue(QString("approach"), approach, obj, QString("QString")); |
||||
} |
||||
if(m_active_waypoint_isSet){ |
||||
obj->insert("activeWaypoint", QJsonValue(active_waypoint)); |
||||
} |
||||
if(waypoints && waypoints->size() > 0){ |
||||
toJsonArray((QList<void*>*)waypoints, obj, "waypoints", "SWGMapRouteWaypoint"); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapFlightPlan::getDeparture() { |
||||
return departure; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setDeparture(QString* departure) { |
||||
this->departure = departure; |
||||
this->m_departure_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapFlightPlan::getArrival() { |
||||
return arrival; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setArrival(QString* arrival) { |
||||
this->arrival = arrival; |
||||
this->m_arrival_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapFlightPlan::getArrivalRunway() { |
||||
return arrival_runway; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setArrivalRunway(QString* arrival_runway) { |
||||
this->arrival_runway = arrival_runway; |
||||
this->m_arrival_runway_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapFlightPlan::getApproach() { |
||||
return approach; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setApproach(QString* approach) { |
||||
this->approach = approach; |
||||
this->m_approach_isSet = true; |
||||
} |
||||
|
||||
qint32 |
||||
SWGMapFlightPlan::getActiveWaypoint() { |
||||
return active_waypoint; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setActiveWaypoint(qint32 active_waypoint) { |
||||
this->active_waypoint = active_waypoint; |
||||
this->m_active_waypoint_isSet = true; |
||||
} |
||||
|
||||
QList<SWGMapRouteWaypoint*>* |
||||
SWGMapFlightPlan::getWaypoints() { |
||||
return waypoints; |
||||
} |
||||
void |
||||
SWGMapFlightPlan::setWaypoints(QList<SWGMapRouteWaypoint*>* waypoints) { |
||||
this->waypoints = waypoints; |
||||
this->m_waypoints_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGMapFlightPlan::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(departure && *departure != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(arrival && *arrival != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(arrival_runway && *arrival_runway != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(approach && *approach != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(m_active_waypoint_isSet){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
if(waypoints && (waypoints->size() > 0)){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,91 @@
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGMapFlightPlan.h |
||||
* |
||||
* Flight plan / cleared route, drawn on the Map's ND (Navigation Display) |
||||
*/ |
||||
|
||||
#ifndef SWGMapFlightPlan_H_ |
||||
#define SWGMapFlightPlan_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include "SWGMapRouteWaypoint.h" |
||||
#include <QList> |
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGMapFlightPlan: public SWGObject { |
||||
public: |
||||
SWGMapFlightPlan(); |
||||
SWGMapFlightPlan(QString* json); |
||||
virtual ~SWGMapFlightPlan(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGMapFlightPlan* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getDeparture(); |
||||
void setDeparture(QString* departure); |
||||
|
||||
QString* getArrival(); |
||||
void setArrival(QString* arrival); |
||||
|
||||
QString* getArrivalRunway(); |
||||
void setArrivalRunway(QString* arrival_runway); |
||||
|
||||
QString* getApproach(); |
||||
void setApproach(QString* approach); |
||||
|
||||
qint32 getActiveWaypoint(); |
||||
void setActiveWaypoint(qint32 active_waypoint); |
||||
|
||||
QList<SWGMapRouteWaypoint*>* getWaypoints(); |
||||
void setWaypoints(QList<SWGMapRouteWaypoint*>* waypoints); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* departure; |
||||
bool m_departure_isSet; |
||||
|
||||
QString* arrival; |
||||
bool m_arrival_isSet; |
||||
|
||||
QString* arrival_runway; |
||||
bool m_arrival_runway_isSet; |
||||
|
||||
QString* approach; |
||||
bool m_approach_isSet; |
||||
|
||||
qint32 active_waypoint; |
||||
bool m_active_waypoint_isSet; |
||||
|
||||
QList<SWGMapRouteWaypoint*>* waypoints; |
||||
bool m_waypoints_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGMapFlightPlan_H_ */ |
||||
@ -0,0 +1,204 @@
@@ -0,0 +1,204 @@
|
||||
/**
|
||||
* 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 "SWGMapRouteWaypoint.h" |
||||
|
||||
#include "SWGHelpers.h" |
||||
|
||||
#include <QJsonDocument> |
||||
#include <QJsonArray> |
||||
#include <QObject> |
||||
#include <QDebug> |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
SWGMapRouteWaypoint::SWGMapRouteWaypoint(QString* json) { |
||||
init(); |
||||
this->fromJson(*json); |
||||
} |
||||
|
||||
SWGMapRouteWaypoint::SWGMapRouteWaypoint() { |
||||
name = nullptr; |
||||
m_name_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
altitude = 0.0f; |
||||
m_altitude_isSet = false; |
||||
eta = nullptr; |
||||
m_eta_isSet = false; |
||||
} |
||||
|
||||
SWGMapRouteWaypoint::~SWGMapRouteWaypoint() { |
||||
this->cleanup(); |
||||
} |
||||
|
||||
void |
||||
SWGMapRouteWaypoint::init() { |
||||
name = new QString(""); |
||||
m_name_isSet = false; |
||||
latitude = 0.0f; |
||||
m_latitude_isSet = false; |
||||
longitude = 0.0f; |
||||
m_longitude_isSet = false; |
||||
altitude = 0.0f; |
||||
m_altitude_isSet = false; |
||||
eta = new QString(""); |
||||
m_eta_isSet = false; |
||||
} |
||||
|
||||
void |
||||
SWGMapRouteWaypoint::cleanup() { |
||||
if(name != nullptr) {
|
||||
delete name; |
||||
} |
||||
|
||||
|
||||
|
||||
if(eta != nullptr) {
|
||||
delete eta; |
||||
} |
||||
} |
||||
|
||||
SWGMapRouteWaypoint* |
||||
SWGMapRouteWaypoint::fromJson(QString &json) { |
||||
QByteArray array (json.toStdString().c_str()); |
||||
QJsonDocument doc = QJsonDocument::fromJson(array); |
||||
QJsonObject jsonObject = doc.object(); |
||||
this->fromJsonObject(jsonObject); |
||||
return this; |
||||
} |
||||
|
||||
void |
||||
SWGMapRouteWaypoint::fromJsonObject(QJsonObject &pJson) { |
||||
::SWGSDRangel::setValue(&name, pJson["name"], "QString", "QString"); |
||||
|
||||
::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&altitude, pJson["altitude"], "float", ""); |
||||
|
||||
::SWGSDRangel::setValue(&eta, pJson["eta"], "QString", "QString"); |
||||
|
||||
} |
||||
|
||||
QString |
||||
SWGMapRouteWaypoint::asJson () |
||||
{ |
||||
QJsonObject* obj = this->asJsonObject(); |
||||
|
||||
QJsonDocument doc(*obj); |
||||
QByteArray bytes = doc.toJson(); |
||||
delete obj; |
||||
return QString(bytes); |
||||
} |
||||
|
||||
QJsonObject* |
||||
SWGMapRouteWaypoint::asJsonObject() { |
||||
QJsonObject* obj = new QJsonObject(); |
||||
if(name != nullptr && *name != QString("")){ |
||||
toJsonValue(QString("name"), name, 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(eta != nullptr && *eta != QString("")){ |
||||
toJsonValue(QString("eta"), eta, obj, QString("QString")); |
||||
} |
||||
|
||||
return obj; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapRouteWaypoint::getName() { |
||||
return name; |
||||
} |
||||
void |
||||
SWGMapRouteWaypoint::setName(QString* name) { |
||||
this->name = name; |
||||
this->m_name_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGMapRouteWaypoint::getLatitude() { |
||||
return latitude; |
||||
} |
||||
void |
||||
SWGMapRouteWaypoint::setLatitude(float latitude) { |
||||
this->latitude = latitude; |
||||
this->m_latitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGMapRouteWaypoint::getLongitude() { |
||||
return longitude; |
||||
} |
||||
void |
||||
SWGMapRouteWaypoint::setLongitude(float longitude) { |
||||
this->longitude = longitude; |
||||
this->m_longitude_isSet = true; |
||||
} |
||||
|
||||
float |
||||
SWGMapRouteWaypoint::getAltitude() { |
||||
return altitude; |
||||
} |
||||
void |
||||
SWGMapRouteWaypoint::setAltitude(float altitude) { |
||||
this->altitude = altitude; |
||||
this->m_altitude_isSet = true; |
||||
} |
||||
|
||||
QString* |
||||
SWGMapRouteWaypoint::getEta() { |
||||
return eta; |
||||
} |
||||
void |
||||
SWGMapRouteWaypoint::setEta(QString* eta) { |
||||
this->eta = eta; |
||||
this->m_eta_isSet = true; |
||||
} |
||||
|
||||
|
||||
bool |
||||
SWGMapRouteWaypoint::isSet(){ |
||||
bool isObjectUpdated = false; |
||||
do{ |
||||
if(name && *name != 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(eta && *eta != QString("")){ |
||||
isObjectUpdated = true; break; |
||||
} |
||||
}while(false); |
||||
return isObjectUpdated; |
||||
} |
||||
} |
||||
|
||||
@ -0,0 +1,83 @@
@@ -0,0 +1,83 @@
|
||||
/**
|
||||
* 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. |
||||
*/ |
||||
|
||||
/*
|
||||
* SWGMapRouteWaypoint.h |
||||
* |
||||
* A waypoint of a flight plan, for the Map's ND (Navigation Display) |
||||
*/ |
||||
|
||||
#ifndef SWGMapRouteWaypoint_H_ |
||||
#define SWGMapRouteWaypoint_H_ |
||||
|
||||
#include <QJsonObject> |
||||
|
||||
|
||||
#include <QString> |
||||
|
||||
#include "SWGObject.h" |
||||
#include "export.h" |
||||
|
||||
namespace SWGSDRangel { |
||||
|
||||
class SWG_API SWGMapRouteWaypoint: public SWGObject { |
||||
public: |
||||
SWGMapRouteWaypoint(); |
||||
SWGMapRouteWaypoint(QString* json); |
||||
virtual ~SWGMapRouteWaypoint(); |
||||
void init(); |
||||
void cleanup(); |
||||
|
||||
virtual QString asJson () override; |
||||
virtual QJsonObject* asJsonObject() override; |
||||
virtual void fromJsonObject(QJsonObject &json) override; |
||||
virtual SWGMapRouteWaypoint* fromJson(QString &jsonString) override; |
||||
|
||||
QString* getName(); |
||||
void setName(QString* name); |
||||
|
||||
float getLatitude(); |
||||
void setLatitude(float latitude); |
||||
|
||||
float getLongitude(); |
||||
void setLongitude(float longitude); |
||||
|
||||
float getAltitude(); |
||||
void setAltitude(float altitude); |
||||
|
||||
QString* getEta(); |
||||
void setEta(QString* eta); |
||||
|
||||
|
||||
virtual bool isSet() override; |
||||
|
||||
private: |
||||
QString* name; |
||||
bool m_name_isSet; |
||||
|
||||
float latitude; |
||||
bool m_latitude_isSet; |
||||
|
||||
float longitude; |
||||
bool m_longitude_isSet; |
||||
|
||||
float altitude; |
||||
bool m_altitude_isSet; |
||||
|
||||
QString* eta; |
||||
bool m_eta_isSet; |
||||
|
||||
}; |
||||
|
||||
} |
||||
|
||||
#endif /* SWGMapRouteWaypoint_H_ */ |
||||
Loading…
Reference in new issue