Browse Source

Regenerate swagger

chirpmodem-v8.1.0
srcejon 3 months ago
parent
commit
926b07f68a
  1. 74
      sdrbase/resources/webapi/doc/swagger/include/Map.yaml
  2. 50
      swagger/sdrangel/code/qt5/client/SWGMapAircraftState.cpp
  3. 14
      swagger/sdrangel/code/qt5/client/SWGMapAircraftState.h
  4. 25
      swagger/sdrangel/code/qt5/client/SWGMapAnimation.cpp
  5. 6
      swagger/sdrangel/code/qt5/client/SWGMapAnimation.h
  6. 206
      swagger/sdrangel/code/qt5/client/SWGMapDatalinkMessage.cpp
  7. 83
      swagger/sdrangel/code/qt5/client/SWGMapDatalinkMessage.h
  8. 237
      swagger/sdrangel/code/qt5/client/SWGMapFlightPlan.cpp
  9. 91
      swagger/sdrangel/code/qt5/client/SWGMapFlightPlan.h
  10. 25
      swagger/sdrangel/code/qt5/client/SWGMapItem.cpp
  11. 6
      swagger/sdrangel/code/qt5/client/SWGMapItem.h
  12. 25
      swagger/sdrangel/code/qt5/client/SWGMapItem_2.cpp
  13. 6
      swagger/sdrangel/code/qt5/client/SWGMapItem_2.h
  14. 204
      swagger/sdrangel/code/qt5/client/SWGMapRouteWaypoint.cpp
  15. 83
      swagger/sdrangel/code/qt5/client/SWGMapRouteWaypoint.h

74
sdrbase/resources/webapi/doc/swagger/include/Map.yaml

@ -193,6 +193,9 @@ MapItem: @@ -193,6 +193,9 @@ MapItem:
type: integer
aircraftState:
$ref: "/doc/swagger/include/Map.yaml#/MapAircraftState"
loopSound:
description: "Sound to loop while the item is on the 3D map, spatially located at the item. Either the name of an engine sound set (cfm, v2500, 777, 787, A380, jet), whose -n1/-n2/-idle recordings the map layers and mixes by phase of flight, or an audio file name from the Map's audio directory (e.g. helicopter.wav). Empty for none"
type: string
MapAnimation:
description: "Animation to play in the model on the 3D map"
@ -227,6 +230,9 @@ MapAnimation: @@ -227,6 +230,9 @@ MapAnimation:
stop:
description: "Stop a looped animation from playing"
type: integer
sound:
description: "Audio file to play when the animation starts (from the Map's audio directory, e.g. A320_gear.wav), spatially located at the map item. Empty for none"
type: string
MapCoordinate:
description: "A map coordinate"
@ -330,4 +336,70 @@ MapAircraftState: @@ -330,4 +336,70 @@ MapAircraftState:
staticAirTemperature:
type: number
format: float
flightPlan:
$ref: "/doc/swagger/include/Map.yaml#/MapFlightPlan"
datalinkMessage:
$ref: "/doc/swagger/include/Map.yaml#/MapDatalinkMessage"
MapDatalinkMessage:
description: "Datalink ATC message (CPDLC / pre-departure clearance / oceanic clearance), shown on the Map's DCDU"
properties:
id:
description: "Sequence number, incremented for each message for an aircraft"
type: integer
received:
description: "Date and time the message was received (ISO 8601 extended format)"
type: string
uplink:
description: "1 ground to air, 0 air to ground"
type: integer
station:
description: "Ground station / ATC facility, e.g. EDDS. Empty if unknown"
type: string
text:
type: string
MapFlightPlan:
description: "Flight plan / cleared route, drawn on the Map's ND (Navigation Display)"
properties:
departure:
description: "ICAO of departure airport"
type: string
arrival:
description: "ICAO of arrival airport"
type: string
arrivalRunway:
description: "Arrival runway, e.g. 27R. Empty if unknown"
type: string
approach:
description: "Arrival approach procedure as filed, e.g. ILSY01R. Empty if unknown"
type: string
activeWaypoint:
description: "Index in to waypoints of the waypoint being flown to, -1 if unknown"
type: integer
waypoints:
type: array
items:
$ref: "/doc/swagger/include/Map.yaml#/MapRouteWaypoint"
MapRouteWaypoint:
description: "A waypoint of a flight plan, for the Map's ND (Navigation Display)"
properties:
name:
type: string
latitude:
description: "Latitude in decimal degrees, positive to the North. NaN if the waypoint could not be placed"
type: number
format: float
longitude:
description: "Longitude in decimal degrees, positive to the East. NaN if the waypoint could not be placed"
type: number
format: float
altitude:
description: "Expected or constrained altitude at this waypoint in feet. NaN if unknown"
type: number
format: float
eta:
description: "Estimated time over this waypoint (ISO 8601 extended format). Empty if unknown"
type: string

50
swagger/sdrangel/code/qt5/client/SWGMapAircraftState.cpp

@ -78,6 +78,10 @@ SWGMapAircraftState::SWGMapAircraftState() { @@ -78,6 +78,10 @@ SWGMapAircraftState::SWGMapAircraftState() {
m_wind_direction_isSet = false;
static_air_temperature = 0.0f;
m_static_air_temperature_isSet = false;
flight_plan = nullptr;
m_flight_plan_isSet = false;
datalink_message = nullptr;
m_datalink_message_isSet = false;
}
SWGMapAircraftState::~SWGMapAircraftState() {
@ -136,6 +140,10 @@ SWGMapAircraftState::init() { @@ -136,6 +140,10 @@ SWGMapAircraftState::init() {
m_wind_direction_isSet = false;
static_air_temperature = 0.0f;
m_static_air_temperature_isSet = false;
flight_plan = new SWGMapFlightPlan();
m_flight_plan_isSet = false;
datalink_message = new SWGMapDatalinkMessage();
m_datalink_message_isSet = false;
}
void
@ -175,6 +183,12 @@ SWGMapAircraftState::cleanup() { @@ -175,6 +183,12 @@ SWGMapAircraftState::cleanup() {
if(flight_plan != nullptr) {
delete flight_plan;
}
if(datalink_message != nullptr) {
delete datalink_message;
}
}
SWGMapAircraftState*
@ -238,6 +252,10 @@ SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) { @@ -238,6 +252,10 @@ SWGMapAircraftState::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&static_air_temperature, pJson["staticAirTemperature"], "float", "");
::SWGSDRangel::setValue(&flight_plan, pJson["flightPlan"], "SWGMapFlightPlan", "SWGMapFlightPlan");
::SWGSDRangel::setValue(&datalink_message, pJson["datalinkMessage"], "SWGMapDatalinkMessage", "SWGMapDatalinkMessage");
}
QString
@ -329,6 +347,12 @@ SWGMapAircraftState::asJsonObject() { @@ -329,6 +347,12 @@ SWGMapAircraftState::asJsonObject() {
if(m_static_air_temperature_isSet){
obj->insert("staticAirTemperature", QJsonValue(static_air_temperature));
}
if((flight_plan != nullptr) && (flight_plan->isSet())){
toJsonValue(QString("flightPlan"), flight_plan, obj, QString("SWGMapFlightPlan"));
}
if((datalink_message != nullptr) && (datalink_message->isSet())){
toJsonValue(QString("datalinkMessage"), datalink_message, obj, QString("SWGMapDatalinkMessage"));
}
return obj;
}
@ -583,6 +607,26 @@ SWGMapAircraftState::setStaticAirTemperature(float static_air_temperature) { @@ -583,6 +607,26 @@ SWGMapAircraftState::setStaticAirTemperature(float static_air_temperature) {
this->m_static_air_temperature_isSet = true;
}
SWGMapFlightPlan*
SWGMapAircraftState::getFlightPlan() {
return flight_plan;
}
void
SWGMapAircraftState::setFlightPlan(SWGMapFlightPlan* flight_plan) {
this->flight_plan = flight_plan;
this->m_flight_plan_isSet = true;
}
SWGMapDatalinkMessage*
SWGMapAircraftState::getDatalinkMessage() {
return datalink_message;
}
void
SWGMapAircraftState::setDatalinkMessage(SWGMapDatalinkMessage* datalink_message) {
this->datalink_message = datalink_message;
this->m_datalink_message_isSet = true;
}
bool
SWGMapAircraftState::isSet(){
@ -663,6 +707,12 @@ SWGMapAircraftState::isSet(){ @@ -663,6 +707,12 @@ SWGMapAircraftState::isSet(){
if(m_static_air_temperature_isSet){
isObjectUpdated = true; break;
}
if(flight_plan && flight_plan->isSet()){
isObjectUpdated = true; break;
}
if(datalink_message && datalink_message->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

14
swagger/sdrangel/code/qt5/client/SWGMapAircraftState.h

@ -22,6 +22,8 @@ @@ -22,6 +22,8 @@
#include <QJsonObject>
#include "SWGMapDatalinkMessage.h"
#include "SWGMapFlightPlan.h"
#include <QString>
#include "SWGObject.h"
@ -117,6 +119,12 @@ public: @@ -117,6 +119,12 @@ public:
float getStaticAirTemperature();
void setStaticAirTemperature(float static_air_temperature);
SWGMapFlightPlan* getFlightPlan();
void setFlightPlan(SWGMapFlightPlan* flight_plan);
SWGMapDatalinkMessage* getDatalinkMessage();
void setDatalinkMessage(SWGMapDatalinkMessage* datalink_message);
virtual bool isSet() override;
@ -196,6 +204,12 @@ private: @@ -196,6 +204,12 @@ private:
float static_air_temperature;
bool m_static_air_temperature_isSet;
SWGMapFlightPlan* flight_plan;
bool m_flight_plan_isSet;
SWGMapDatalinkMessage* datalink_message;
bool m_datalink_message_isSet;
};
}

25
swagger/sdrangel/code/qt5/client/SWGMapAnimation.cpp

@ -44,6 +44,8 @@ SWGMapAnimation::SWGMapAnimation() { @@ -44,6 +44,8 @@ SWGMapAnimation::SWGMapAnimation() {
m_duration_isSet = false;
stop = 0;
m_stop_isSet = false;
sound = nullptr;
m_sound_isSet = false;
}
SWGMapAnimation::~SWGMapAnimation() {
@ -68,6 +70,8 @@ SWGMapAnimation::init() { @@ -68,6 +70,8 @@ SWGMapAnimation::init() {
m_duration_isSet = false;
stop = 0;
m_stop_isSet = false;
sound = new QString("");
m_sound_isSet = false;
}
void
@ -84,6 +88,9 @@ SWGMapAnimation::cleanup() { @@ -84,6 +88,9 @@ SWGMapAnimation::cleanup() {
if(sound != nullptr) {
delete sound;
}
}
SWGMapAnimation*
@ -113,6 +120,8 @@ SWGMapAnimation::fromJsonObject(QJsonObject &pJson) { @@ -113,6 +120,8 @@ SWGMapAnimation::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&stop, pJson["stop"], "qint32", "");
::SWGSDRangel::setValue(&sound, pJson["sound"], "QString", "QString");
}
QString
@ -153,6 +162,9 @@ SWGMapAnimation::asJsonObject() { @@ -153,6 +162,9 @@ SWGMapAnimation::asJsonObject() {
if(m_stop_isSet){
obj->insert("stop", QJsonValue(stop));
}
if(sound != nullptr && *sound != QString("")){
toJsonValue(QString("sound"), sound, obj, QString("QString"));
}
return obj;
}
@ -237,6 +249,16 @@ SWGMapAnimation::setStop(qint32 stop) { @@ -237,6 +249,16 @@ SWGMapAnimation::setStop(qint32 stop) {
this->m_stop_isSet = true;
}
QString*
SWGMapAnimation::getSound() {
return sound;
}
void
SWGMapAnimation::setSound(QString* sound) {
this->sound = sound;
this->m_sound_isSet = true;
}
bool
SWGMapAnimation::isSet(){
@ -266,6 +288,9 @@ SWGMapAnimation::isSet(){ @@ -266,6 +288,9 @@ SWGMapAnimation::isSet(){
if(m_stop_isSet){
isObjectUpdated = true; break;
}
if(sound && *sound != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

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

@ -66,6 +66,9 @@ public: @@ -66,6 +66,9 @@ public:
qint32 getStop();
void setStop(qint32 stop);
QString* getSound();
void setSound(QString* sound);
virtual bool isSet() override;
@ -94,6 +97,9 @@ private: @@ -94,6 +97,9 @@ private:
qint32 stop;
bool m_stop_isSet;
QString* sound;
bool m_sound_isSet;
};
}

206
swagger/sdrangel/code/qt5/client/SWGMapDatalinkMessage.cpp

@ -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;
}
}

83
swagger/sdrangel/code/qt5/client/SWGMapDatalinkMessage.h

@ -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&#39;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_ */

237
swagger/sdrangel/code/qt5/client/SWGMapFlightPlan.cpp

@ -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;
}
}

91
swagger/sdrangel/code/qt5/client/SWGMapFlightPlan.h

@ -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&#39;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_ */

25
swagger/sdrangel/code/qt5/client/SWGMapItem.cpp

@ -104,6 +104,8 @@ SWGMapItem::SWGMapItem() { @@ -104,6 +104,8 @@ SWGMapItem::SWGMapItem() {
m_color_isSet = false;
aircraft_state = nullptr;
m_aircraft_state_isSet = false;
loop_sound = nullptr;
m_loop_sound_isSet = false;
}
SWGMapItem::~SWGMapItem() {
@ -188,6 +190,8 @@ SWGMapItem::init() { @@ -188,6 +190,8 @@ SWGMapItem::init() {
m_color_isSet = false;
aircraft_state = new SWGMapAircraftState();
m_aircraft_state_isSet = false;
loop_sound = new QString("");
m_loop_sound_isSet = false;
}
void
@ -280,6 +284,9 @@ SWGMapItem::cleanup() { @@ -280,6 +284,9 @@ SWGMapItem::cleanup() {
if(aircraft_state != nullptr) {
delete aircraft_state;
}
if(loop_sound != nullptr) {
delete loop_sound;
}
}
SWGMapItem*
@ -369,6 +376,8 @@ SWGMapItem::fromJsonObject(QJsonObject &pJson) { @@ -369,6 +376,8 @@ SWGMapItem::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&aircraft_state, pJson["aircraftState"], "SWGMapAircraftState", "SWGMapAircraftState");
::SWGSDRangel::setValue(&loop_sound, pJson["loopSound"], "QString", "QString");
}
QString
@ -499,6 +508,9 @@ SWGMapItem::asJsonObject() { @@ -499,6 +508,9 @@ SWGMapItem::asJsonObject() {
if((aircraft_state != nullptr) && (aircraft_state->isSet())){
toJsonValue(QString("aircraftState"), aircraft_state, obj, QString("SWGMapAircraftState"));
}
if(loop_sound != nullptr && *loop_sound != QString("")){
toJsonValue(QString("loopSound"), loop_sound, obj, QString("QString"));
}
return obj;
}
@ -883,6 +895,16 @@ SWGMapItem::setAircraftState(SWGMapAircraftState* aircraft_state) { @@ -883,6 +895,16 @@ SWGMapItem::setAircraftState(SWGMapAircraftState* aircraft_state) {
this->m_aircraft_state_isSet = true;
}
QString*
SWGMapItem::getLoopSound() {
return loop_sound;
}
void
SWGMapItem::setLoopSound(QString* loop_sound) {
this->loop_sound = loop_sound;
this->m_loop_sound_isSet = true;
}
bool
SWGMapItem::isSet(){
@ -1002,6 +1024,9 @@ SWGMapItem::isSet(){ @@ -1002,6 +1024,9 @@ SWGMapItem::isSet(){
if(aircraft_state && aircraft_state->isSet()){
isObjectUpdated = true; break;
}
if(loop_sound && *loop_sound != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

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

@ -160,6 +160,9 @@ public: @@ -160,6 +160,9 @@ public:
SWGMapAircraftState* getAircraftState();
void setAircraftState(SWGMapAircraftState* aircraft_state);
QString* getLoopSound();
void setLoopSound(QString* loop_sound);
virtual bool isSet() override;
@ -278,6 +281,9 @@ private: @@ -278,6 +281,9 @@ private:
SWGMapAircraftState* aircraft_state;
bool m_aircraft_state_isSet;
QString* loop_sound;
bool m_loop_sound_isSet;
};
}

25
swagger/sdrangel/code/qt5/client/SWGMapItem_2.cpp

@ -104,6 +104,8 @@ SWGMapItem_2::SWGMapItem_2() { @@ -104,6 +104,8 @@ SWGMapItem_2::SWGMapItem_2() {
m_color_isSet = false;
aircraft_state = nullptr;
m_aircraft_state_isSet = false;
loop_sound = nullptr;
m_loop_sound_isSet = false;
}
SWGMapItem_2::~SWGMapItem_2() {
@ -188,6 +190,8 @@ SWGMapItem_2::init() { @@ -188,6 +190,8 @@ SWGMapItem_2::init() {
m_color_isSet = false;
aircraft_state = new SWGMapAircraftState();
m_aircraft_state_isSet = false;
loop_sound = new QString("");
m_loop_sound_isSet = false;
}
void
@ -280,6 +284,9 @@ SWGMapItem_2::cleanup() { @@ -280,6 +284,9 @@ SWGMapItem_2::cleanup() {
if(aircraft_state != nullptr) {
delete aircraft_state;
}
if(loop_sound != nullptr) {
delete loop_sound;
}
}
SWGMapItem_2*
@ -369,6 +376,8 @@ SWGMapItem_2::fromJsonObject(QJsonObject &pJson) { @@ -369,6 +376,8 @@ SWGMapItem_2::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&aircraft_state, pJson["aircraftState"], "SWGMapAircraftState", "SWGMapAircraftState");
::SWGSDRangel::setValue(&loop_sound, pJson["loopSound"], "QString", "QString");
}
QString
@ -499,6 +508,9 @@ SWGMapItem_2::asJsonObject() { @@ -499,6 +508,9 @@ SWGMapItem_2::asJsonObject() {
if((aircraft_state != nullptr) && (aircraft_state->isSet())){
toJsonValue(QString("aircraftState"), aircraft_state, obj, QString("SWGMapAircraftState"));
}
if(loop_sound != nullptr && *loop_sound != QString("")){
toJsonValue(QString("loopSound"), loop_sound, obj, QString("QString"));
}
return obj;
}
@ -883,6 +895,16 @@ SWGMapItem_2::setAircraftState(SWGMapAircraftState* aircraft_state) { @@ -883,6 +895,16 @@ SWGMapItem_2::setAircraftState(SWGMapAircraftState* aircraft_state) {
this->m_aircraft_state_isSet = true;
}
QString*
SWGMapItem_2::getLoopSound() {
return loop_sound;
}
void
SWGMapItem_2::setLoopSound(QString* loop_sound) {
this->loop_sound = loop_sound;
this->m_loop_sound_isSet = true;
}
bool
SWGMapItem_2::isSet(){
@ -1002,6 +1024,9 @@ SWGMapItem_2::isSet(){ @@ -1002,6 +1024,9 @@ SWGMapItem_2::isSet(){
if(aircraft_state && aircraft_state->isSet()){
isObjectUpdated = true; break;
}
if(loop_sound && *loop_sound != QString("")){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

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

@ -160,6 +160,9 @@ public: @@ -160,6 +160,9 @@ public:
SWGMapAircraftState* getAircraftState();
void setAircraftState(SWGMapAircraftState* aircraft_state);
QString* getLoopSound();
void setLoopSound(QString* loop_sound);
virtual bool isSet() override;
@ -278,6 +281,9 @@ private: @@ -278,6 +281,9 @@ private:
SWGMapAircraftState* aircraft_state;
bool m_aircraft_state_isSet;
QString* loop_sound;
bool m_loop_sound_isSet;
};
}

204
swagger/sdrangel/code/qt5/client/SWGMapRouteWaypoint.cpp

@ -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;
}
}

83
swagger/sdrangel/code/qt5/client/SWGMapRouteWaypoint.h

@ -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&#39;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…
Cancel
Save