From 2e389d260737ef329e30c58668838f8c91b4c4f2 Mon Sep 17 00:00:00 2001 From: srcejon Date: Thu, 8 Feb 2024 11:07:57 +0000 Subject: [PATCH] Update Sky Map yaml --- sdrbase/resources/webapi/doc/html2/index.html | 70 +++++- .../resources/webapi/doc/swagger/swagger.yaml | 4 + swagger/sdrangel/api/swagger/swagger.yaml | 4 + swagger/sdrangel/code/html2/index.html | 70 +++++- .../code/qt5/client/SWGModelFactory.h | 12 + .../code/qt5/client/SWGSkyMapTarget.cpp | 225 ++++++++++++++++++ .../code/qt5/client/SWGSkyMapTarget.h | 89 +++++++ .../code/qt5/client/SWGSkyMapTarget_2.cpp | 225 ++++++++++++++++++ .../code/qt5/client/SWGSkyMapTarget_2.h | 89 +++++++ 9 files changed, 786 insertions(+), 2 deletions(-) create mode 100644 swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.h create mode 100644 swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.cpp create mode 100644 swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.h diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index 37bca3eca..d5f743301 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -14749,6 +14749,74 @@ margin-bottom: 20px; } }, "description" : "Sky Map" +}; + defs.SkyMapTarget = { + "properties" : { + "ra" : { + "type" : "number", + "format" : "float", + "description" : "Right ascension of target (In decimal hours, J2000)" + }, + "dec" : { + "type" : "number", + "format" : "float", + "description" : "Declination of target (In decimal degrees, J2000)" + }, + "latitude" : { + "type" : "number", + "format" : "float", + "description" : "Latitude in decimal degrees (North positive) of observation/antenna location" + }, + "longitude" : { + "type" : "number", + "format" : "float", + "description" : "Longitude in decimal degrees (East positive) of observation/antenna location" + }, + "hpbw" : { + "type" : "number", + "format" : "float", + "description" : "Antenna half-power beam width in degrees" + }, + "dateTime" : { + "type" : "string", + "description" : "Date and time of observation. ISO 8601 extended format: yyyy-MM-ddTHH:mm:ss with Z suffix for UTC. Empty string for current time." + } + }, + "description" : "Sky Map target. Sent by other plugins to skymap.target message queue." +}; + defs.SkyMapTarget_2 = { + "properties" : { + "ra" : { + "type" : "number", + "format" : "float", + "description" : "Right ascension of target (In decimal hours, J2000)" + }, + "dec" : { + "type" : "number", + "format" : "float", + "description" : "Declination of target (In decimal degrees, J2000)" + }, + "latitude" : { + "type" : "number", + "format" : "float", + "description" : "Latitude in decimal degrees (North positive) of observation/antenna location" + }, + "longitude" : { + "type" : "number", + "format" : "float", + "description" : "Longitude in decimal degrees (East positive) of observation/antenna location" + }, + "hpbw" : { + "type" : "number", + "format" : "float", + "description" : "Antenna half-power beam width in degrees" + }, + "dateTime" : { + "type" : "string", + "description" : "Date and time of observation. ISO 8601 extended format: yyyy-MM-ddTHH:mm:ss with Z suffix for UTC. Empty string for current time." + } + }, + "description" : "Sky Map target. Sent by other plugins to skymap.target message queue." }; defs.SoapySDRFrequencySetting = { "properties" : { @@ -58560,7 +58628,7 @@ except ApiException as e:
- Generated 2024-02-08T11:25:37.924+01:00 + Generated 2024-02-08T12:07:33.630+01:00
diff --git a/sdrbase/resources/webapi/doc/swagger/swagger.yaml b/sdrbase/resources/webapi/doc/swagger/swagger.yaml index 28e6d17ff..43511de31 100644 --- a/sdrbase/resources/webapi/doc/swagger/swagger.yaml +++ b/sdrbase/resources/webapi/doc/swagger/swagger.yaml @@ -3263,6 +3263,10 @@ definitions: StarTrackerDisplayLoSSettings: $ref: "/doc/swagger/include/StarTracker.yaml#/StarTrackerDisplayLoSSettings" + # Sky Map target passed from Star Tracker plugin + SkyMapTarget: + $ref: "/doc/swagger/include/SkyMap.yaml#/SkyMapTarget" + # This isn't in GS232Controller, as it may eventually be used by other controllers or features TargetAzimuthElevation: description: "A target azimuth and elevation" diff --git a/swagger/sdrangel/api/swagger/swagger.yaml b/swagger/sdrangel/api/swagger/swagger.yaml index 3bc1a4173..342397bca 100644 --- a/swagger/sdrangel/api/swagger/swagger.yaml +++ b/swagger/sdrangel/api/swagger/swagger.yaml @@ -3263,6 +3263,10 @@ definitions: StarTrackerDisplayLoSSettings: $ref: "http://swgserver:8081/api/swagger/include/StarTracker.yaml#/StarTrackerDisplayLoSSettings" + # Sky Map target passed from Star Tracker plugin + SkyMapTarget: + $ref: "http://swgserver:8081/api/swagger/include/SkyMap.yaml#/SkyMapTarget" + # This isn't in GS232Controller, as it may eventually be used by other controllers or features TargetAzimuthElevation: description: "A target azimuth and elevation" diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index 37bca3eca..d5f743301 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -14749,6 +14749,74 @@ margin-bottom: 20px; } }, "description" : "Sky Map" +}; + defs.SkyMapTarget = { + "properties" : { + "ra" : { + "type" : "number", + "format" : "float", + "description" : "Right ascension of target (In decimal hours, J2000)" + }, + "dec" : { + "type" : "number", + "format" : "float", + "description" : "Declination of target (In decimal degrees, J2000)" + }, + "latitude" : { + "type" : "number", + "format" : "float", + "description" : "Latitude in decimal degrees (North positive) of observation/antenna location" + }, + "longitude" : { + "type" : "number", + "format" : "float", + "description" : "Longitude in decimal degrees (East positive) of observation/antenna location" + }, + "hpbw" : { + "type" : "number", + "format" : "float", + "description" : "Antenna half-power beam width in degrees" + }, + "dateTime" : { + "type" : "string", + "description" : "Date and time of observation. ISO 8601 extended format: yyyy-MM-ddTHH:mm:ss with Z suffix for UTC. Empty string for current time." + } + }, + "description" : "Sky Map target. Sent by other plugins to skymap.target message queue." +}; + defs.SkyMapTarget_2 = { + "properties" : { + "ra" : { + "type" : "number", + "format" : "float", + "description" : "Right ascension of target (In decimal hours, J2000)" + }, + "dec" : { + "type" : "number", + "format" : "float", + "description" : "Declination of target (In decimal degrees, J2000)" + }, + "latitude" : { + "type" : "number", + "format" : "float", + "description" : "Latitude in decimal degrees (North positive) of observation/antenna location" + }, + "longitude" : { + "type" : "number", + "format" : "float", + "description" : "Longitude in decimal degrees (East positive) of observation/antenna location" + }, + "hpbw" : { + "type" : "number", + "format" : "float", + "description" : "Antenna half-power beam width in degrees" + }, + "dateTime" : { + "type" : "string", + "description" : "Date and time of observation. ISO 8601 extended format: yyyy-MM-ddTHH:mm:ss with Z suffix for UTC. Empty string for current time." + } + }, + "description" : "Sky Map target. Sent by other plugins to skymap.target message queue." }; defs.SoapySDRFrequencySetting = { "properties" : { @@ -58560,7 +58628,7 @@ except ApiException as e:
- Generated 2024-02-08T11:25:37.924+01:00 + Generated 2024-02-08T12:07:33.630+01:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h index 71b73b330..0fdf242bc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGModelFactory.h +++ b/swagger/sdrangel/code/qt5/client/SWGModelFactory.h @@ -322,6 +322,8 @@ #include "SWGSkyMapActions.h" #include "SWGSkyMapReport.h" #include "SWGSkyMapSettings.h" +#include "SWGSkyMapTarget.h" +#include "SWGSkyMapTarget_2.h" #include "SWGSoapySDRFrequencySetting.h" #include "SWGSoapySDRGainSetting.h" #include "SWGSoapySDRInputSettings.h" @@ -1918,6 +1920,16 @@ namespace SWGSDRangel { obj->init(); return obj; } + if(QString("SWGSkyMapTarget").compare(type) == 0) { + SWGSkyMapTarget *obj = new SWGSkyMapTarget(); + obj->init(); + return obj; + } + if(QString("SWGSkyMapTarget_2").compare(type) == 0) { + SWGSkyMapTarget_2 *obj = new SWGSkyMapTarget_2(); + obj->init(); + return obj; + } if(QString("SWGSoapySDRFrequencySetting").compare(type) == 0) { SWGSoapySDRFrequencySetting *obj = new SWGSoapySDRFrequencySetting(); obj->init(); diff --git a/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.cpp b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.cpp new file mode 100644 index 000000000..a91664db4 --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.cpp @@ -0,0 +1,225 @@ +/** + * 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 "SWGSkyMapTarget.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSkyMapTarget::SWGSkyMapTarget(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSkyMapTarget::SWGSkyMapTarget() { + ra = 0.0f; + m_ra_isSet = false; + dec = 0.0f; + m_dec_isSet = false; + latitude = 0.0f; + m_latitude_isSet = false; + longitude = 0.0f; + m_longitude_isSet = false; + hpbw = 0.0f; + m_hpbw_isSet = false; + date_time = nullptr; + m_date_time_isSet = false; +} + +SWGSkyMapTarget::~SWGSkyMapTarget() { + this->cleanup(); +} + +void +SWGSkyMapTarget::init() { + ra = 0.0f; + m_ra_isSet = false; + dec = 0.0f; + m_dec_isSet = false; + latitude = 0.0f; + m_latitude_isSet = false; + longitude = 0.0f; + m_longitude_isSet = false; + hpbw = 0.0f; + m_hpbw_isSet = false; + date_time = new QString(""); + m_date_time_isSet = false; +} + +void +SWGSkyMapTarget::cleanup() { + + + + + + if(date_time != nullptr) { + delete date_time; + } +} + +SWGSkyMapTarget* +SWGSkyMapTarget::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSkyMapTarget::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&ra, pJson["ra"], "float", ""); + + ::SWGSDRangel::setValue(&dec, pJson["dec"], "float", ""); + + ::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); + + ::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); + + ::SWGSDRangel::setValue(&hpbw, pJson["hpbw"], "float", ""); + + ::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString"); + +} + +QString +SWGSkyMapTarget::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSkyMapTarget::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_ra_isSet){ + obj->insert("ra", QJsonValue(ra)); + } + if(m_dec_isSet){ + obj->insert("dec", QJsonValue(dec)); + } + if(m_latitude_isSet){ + obj->insert("latitude", QJsonValue(latitude)); + } + if(m_longitude_isSet){ + obj->insert("longitude", QJsonValue(longitude)); + } + if(m_hpbw_isSet){ + obj->insert("hpbw", QJsonValue(hpbw)); + } + if(date_time != nullptr && *date_time != QString("")){ + toJsonValue(QString("dateTime"), date_time, obj, QString("QString")); + } + + return obj; +} + +float +SWGSkyMapTarget::getRa() { + return ra; +} +void +SWGSkyMapTarget::setRa(float ra) { + this->ra = ra; + this->m_ra_isSet = true; +} + +float +SWGSkyMapTarget::getDec() { + return dec; +} +void +SWGSkyMapTarget::setDec(float dec) { + this->dec = dec; + this->m_dec_isSet = true; +} + +float +SWGSkyMapTarget::getLatitude() { + return latitude; +} +void +SWGSkyMapTarget::setLatitude(float latitude) { + this->latitude = latitude; + this->m_latitude_isSet = true; +} + +float +SWGSkyMapTarget::getLongitude() { + return longitude; +} +void +SWGSkyMapTarget::setLongitude(float longitude) { + this->longitude = longitude; + this->m_longitude_isSet = true; +} + +float +SWGSkyMapTarget::getHpbw() { + return hpbw; +} +void +SWGSkyMapTarget::setHpbw(float hpbw) { + this->hpbw = hpbw; + this->m_hpbw_isSet = true; +} + +QString* +SWGSkyMapTarget::getDateTime() { + return date_time; +} +void +SWGSkyMapTarget::setDateTime(QString* date_time) { + this->date_time = date_time; + this->m_date_time_isSet = true; +} + + +bool +SWGSkyMapTarget::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_ra_isSet){ + isObjectUpdated = true; break; + } + if(m_dec_isSet){ + isObjectUpdated = true; break; + } + if(m_latitude_isSet){ + isObjectUpdated = true; break; + } + if(m_longitude_isSet){ + isObjectUpdated = true; break; + } + if(m_hpbw_isSet){ + isObjectUpdated = true; break; + } + if(date_time && *date_time != QString("")){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.h b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.h new file mode 100644 index 000000000..5a174127a --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget.h @@ -0,0 +1,89 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSkyMapTarget.h + * + * Sky Map target. Sent by other plugins to skymap.target message queue. + */ + +#ifndef SWGSkyMapTarget_H_ +#define SWGSkyMapTarget_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSkyMapTarget: public SWGObject { +public: + SWGSkyMapTarget(); + SWGSkyMapTarget(QString* json); + virtual ~SWGSkyMapTarget(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSkyMapTarget* fromJson(QString &jsonString) override; + + float getRa(); + void setRa(float ra); + + float getDec(); + void setDec(float dec); + + float getLatitude(); + void setLatitude(float latitude); + + float getLongitude(); + void setLongitude(float longitude); + + float getHpbw(); + void setHpbw(float hpbw); + + QString* getDateTime(); + void setDateTime(QString* date_time); + + + virtual bool isSet() override; + +private: + float ra; + bool m_ra_isSet; + + float dec; + bool m_dec_isSet; + + float latitude; + bool m_latitude_isSet; + + float longitude; + bool m_longitude_isSet; + + float hpbw; + bool m_hpbw_isSet; + + QString* date_time; + bool m_date_time_isSet; + +}; + +} + +#endif /* SWGSkyMapTarget_H_ */ diff --git a/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.cpp b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.cpp new file mode 100644 index 000000000..b35b9e51b --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.cpp @@ -0,0 +1,225 @@ +/** + * 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 "SWGSkyMapTarget_2.h" + +#include "SWGHelpers.h" + +#include +#include +#include +#include + +namespace SWGSDRangel { + +SWGSkyMapTarget_2::SWGSkyMapTarget_2(QString* json) { + init(); + this->fromJson(*json); +} + +SWGSkyMapTarget_2::SWGSkyMapTarget_2() { + ra = 0.0f; + m_ra_isSet = false; + dec = 0.0f; + m_dec_isSet = false; + latitude = 0.0f; + m_latitude_isSet = false; + longitude = 0.0f; + m_longitude_isSet = false; + hpbw = 0.0f; + m_hpbw_isSet = false; + date_time = nullptr; + m_date_time_isSet = false; +} + +SWGSkyMapTarget_2::~SWGSkyMapTarget_2() { + this->cleanup(); +} + +void +SWGSkyMapTarget_2::init() { + ra = 0.0f; + m_ra_isSet = false; + dec = 0.0f; + m_dec_isSet = false; + latitude = 0.0f; + m_latitude_isSet = false; + longitude = 0.0f; + m_longitude_isSet = false; + hpbw = 0.0f; + m_hpbw_isSet = false; + date_time = new QString(""); + m_date_time_isSet = false; +} + +void +SWGSkyMapTarget_2::cleanup() { + + + + + + if(date_time != nullptr) { + delete date_time; + } +} + +SWGSkyMapTarget_2* +SWGSkyMapTarget_2::fromJson(QString &json) { + QByteArray array (json.toStdString().c_str()); + QJsonDocument doc = QJsonDocument::fromJson(array); + QJsonObject jsonObject = doc.object(); + this->fromJsonObject(jsonObject); + return this; +} + +void +SWGSkyMapTarget_2::fromJsonObject(QJsonObject &pJson) { + ::SWGSDRangel::setValue(&ra, pJson["ra"], "float", ""); + + ::SWGSDRangel::setValue(&dec, pJson["dec"], "float", ""); + + ::SWGSDRangel::setValue(&latitude, pJson["latitude"], "float", ""); + + ::SWGSDRangel::setValue(&longitude, pJson["longitude"], "float", ""); + + ::SWGSDRangel::setValue(&hpbw, pJson["hpbw"], "float", ""); + + ::SWGSDRangel::setValue(&date_time, pJson["dateTime"], "QString", "QString"); + +} + +QString +SWGSkyMapTarget_2::asJson () +{ + QJsonObject* obj = this->asJsonObject(); + + QJsonDocument doc(*obj); + QByteArray bytes = doc.toJson(); + delete obj; + return QString(bytes); +} + +QJsonObject* +SWGSkyMapTarget_2::asJsonObject() { + QJsonObject* obj = new QJsonObject(); + if(m_ra_isSet){ + obj->insert("ra", QJsonValue(ra)); + } + if(m_dec_isSet){ + obj->insert("dec", QJsonValue(dec)); + } + if(m_latitude_isSet){ + obj->insert("latitude", QJsonValue(latitude)); + } + if(m_longitude_isSet){ + obj->insert("longitude", QJsonValue(longitude)); + } + if(m_hpbw_isSet){ + obj->insert("hpbw", QJsonValue(hpbw)); + } + if(date_time != nullptr && *date_time != QString("")){ + toJsonValue(QString("dateTime"), date_time, obj, QString("QString")); + } + + return obj; +} + +float +SWGSkyMapTarget_2::getRa() { + return ra; +} +void +SWGSkyMapTarget_2::setRa(float ra) { + this->ra = ra; + this->m_ra_isSet = true; +} + +float +SWGSkyMapTarget_2::getDec() { + return dec; +} +void +SWGSkyMapTarget_2::setDec(float dec) { + this->dec = dec; + this->m_dec_isSet = true; +} + +float +SWGSkyMapTarget_2::getLatitude() { + return latitude; +} +void +SWGSkyMapTarget_2::setLatitude(float latitude) { + this->latitude = latitude; + this->m_latitude_isSet = true; +} + +float +SWGSkyMapTarget_2::getLongitude() { + return longitude; +} +void +SWGSkyMapTarget_2::setLongitude(float longitude) { + this->longitude = longitude; + this->m_longitude_isSet = true; +} + +float +SWGSkyMapTarget_2::getHpbw() { + return hpbw; +} +void +SWGSkyMapTarget_2::setHpbw(float hpbw) { + this->hpbw = hpbw; + this->m_hpbw_isSet = true; +} + +QString* +SWGSkyMapTarget_2::getDateTime() { + return date_time; +} +void +SWGSkyMapTarget_2::setDateTime(QString* date_time) { + this->date_time = date_time; + this->m_date_time_isSet = true; +} + + +bool +SWGSkyMapTarget_2::isSet(){ + bool isObjectUpdated = false; + do{ + if(m_ra_isSet){ + isObjectUpdated = true; break; + } + if(m_dec_isSet){ + isObjectUpdated = true; break; + } + if(m_latitude_isSet){ + isObjectUpdated = true; break; + } + if(m_longitude_isSet){ + isObjectUpdated = true; break; + } + if(m_hpbw_isSet){ + isObjectUpdated = true; break; + } + if(date_time && *date_time != QString("")){ + isObjectUpdated = true; break; + } + }while(false); + return isObjectUpdated; +} +} + diff --git a/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.h b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.h new file mode 100644 index 000000000..e7aa0d15b --- /dev/null +++ b/swagger/sdrangel/code/qt5/client/SWGSkyMapTarget_2.h @@ -0,0 +1,89 @@ +/** + * SDRangel + * This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time --- + * + * OpenAPI spec version: 7.0.0 + * Contact: f4exb06@gmail.com + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +/* + * SWGSkyMapTarget_2.h + * + * Sky Map target. Sent by other plugins to skymap.target message queue. + */ + +#ifndef SWGSkyMapTarget_2_H_ +#define SWGSkyMapTarget_2_H_ + +#include + + +#include + +#include "SWGObject.h" +#include "export.h" + +namespace SWGSDRangel { + +class SWG_API SWGSkyMapTarget_2: public SWGObject { +public: + SWGSkyMapTarget_2(); + SWGSkyMapTarget_2(QString* json); + virtual ~SWGSkyMapTarget_2(); + void init(); + void cleanup(); + + virtual QString asJson () override; + virtual QJsonObject* asJsonObject() override; + virtual void fromJsonObject(QJsonObject &json) override; + virtual SWGSkyMapTarget_2* fromJson(QString &jsonString) override; + + float getRa(); + void setRa(float ra); + + float getDec(); + void setDec(float dec); + + float getLatitude(); + void setLatitude(float latitude); + + float getLongitude(); + void setLongitude(float longitude); + + float getHpbw(); + void setHpbw(float hpbw); + + QString* getDateTime(); + void setDateTime(QString* date_time); + + + virtual bool isSet() override; + +private: + float ra; + bool m_ra_isSet; + + float dec; + bool m_dec_isSet; + + float latitude; + bool m_latitude_isSet; + + float longitude; + bool m_longitude_isSet; + + float hpbw; + bool m_hpbw_isSet; + + QString* date_time; + bool m_date_time_isSet; + +}; + +} + +#endif /* SWGSkyMapTarget_2_H_ */