1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-10 10:33:29 -05:00

AFC: settings fix REST API sources: generated code

This commit is contained in:
f4exb 2020-10-27 06:01:57 +01:00
parent ffdc6f69f0
commit 4ac114a924
19 changed files with 1189 additions and 2 deletions

View File

@ -696,6 +696,76 @@ margin-bottom: 20px;
<script> <script>
// Script section to load models into a JS Var // Script section to load models into a JS Var
var defs = {} var defs = {}
defs.AFCActions = {
"properties" : {
"ptt" : {
"type" : "integer",
"description" : "AFC action\n * 0 - release\n * 1 - engage\n"
}
},
"description" : "AFC actions"
};
defs.AFCReport = {
"properties" : {
"ptt" : {
"type" : "integer",
"description" : "AFC status\n * 0 - released\n * 1 - engaged\n"
}
},
"description" : "AFC report"
};
defs.AFCSettings = {
"properties" : {
"title" : {
"type" : "string"
},
"rgbColor" : {
"type" : "integer"
},
"trackerDeviceSetIndex" : {
"type" : "integer",
"description" : "index of the device set of frequency tracker being used"
},
"trackedDeviceSetIndex" : {
"type" : "integer",
"description" : "index of the device set being tracked (channels and possibly device)"
},
"hasTargetFrequency" : {
"type" : "integer",
"description" : "Adjust device frequency to match tracker frequency\n * 0 - disabled\n * 1 - enabled\n"
},
"transverterTarget" : {
"type" : "integer",
"description" : "Use transverter or device frequency for tracker frequency adjustment\n * 0 - device\n * 1 - transverter\n"
},
"targetFrequency" : {
"type" : "integer",
"format" : "int64",
"description" : "Target frequency for the tracker"
},
"freqTolerance" : {
"type" : "integer",
"format" : "int64"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "AFC settings"
};
defs.AMBEDevice = { defs.AMBEDevice = {
"properties" : { "properties" : {
"deviceRef" : { "deviceRef" : {
@ -3202,6 +3272,9 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Optional for reverse API. This is the feature index from where the message comes from." "description" : "Optional for reverse API. This is the feature index from where the message comes from."
}, },
"AFCActions" : {
"$ref" : "#/definitions/AFCActions"
},
"SimplePTTActions" : { "SimplePTTActions" : {
"$ref" : "#/definitions/SimplePTTActions" "$ref" : "#/definitions/SimplePTTActions"
} }
@ -3228,6 +3301,9 @@ margin-bottom: 20px;
"type" : "string", "type" : "string",
"description" : "Feature type code" "description" : "Feature type code"
}, },
"AFCReport" : {
"$ref" : "#/definitions/AFCReport"
},
"SimplePTTReport" : { "SimplePTTReport" : {
"$ref" : "#/definitions/SimplePTTReport" "$ref" : "#/definitions/SimplePTTReport"
} }
@ -3300,6 +3376,9 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Optional for reverse API. This is the feature index from where the message comes from." "description" : "Optional for reverse API. This is the feature index from where the message comes from."
}, },
"AFCSettings" : {
"$ref" : "#/definitions/AFCSettings"
},
"SimplePTTSettings" : { "SimplePTTSettings" : {
"$ref" : "#/definitions/SimplePTTSettings" "$ref" : "#/definitions/SimplePTTSettings"
}, },
@ -39969,7 +40048,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2020-10-11T08:49:12.690+02:00 Generated 2020-10-27T06:01:09.347+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,64 @@
AFCSettings:
description: "AFC settings"
properties:
title:
type: string
rgbColor:
type: integer
trackerDeviceSetIndex:
description: index of the device set of frequency tracker being used
type: integer
trackedDeviceSetIndex:
description: index of the device set being tracked (channels and possibly device)
type: integer
hasTargetFrequency:
type: integer
description: >
Adjust device frequency to match tracker frequency
* 0 - disabled
* 1 - enabled
transverterTarget:
type: integer
description: >
Use transverter or device frequency for tracker frequency adjustment
* 0 - device
* 1 - transverter
targetFrequency:
description: Target frequency for the tracker
type: integer
format: int64
freqTolerance:
descritpion: Frequency shift tolerance before tracker frequency is (re)adjusted
type: integer
format: int64
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer
AFCReport:
description: "AFC report"
properties:
ptt:
type: integer
description: >
AFC status
* 0 - released
* 1 - engaged
AFCActions:
description: "AFC actions"
properties:
ptt:
type: integer
description: >
AFC action
* 0 - release
* 1 - engage

View File

@ -13,5 +13,7 @@ FeatureActions:
originatorFeatureIndex: originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from. description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer type: integer
AFCActions:
$ref: "/doc/swagger/include/AFC.yaml#/AFCActions"
SimplePTTActions: SimplePTTActions:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTActions" $ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTActions"

View File

@ -7,5 +7,7 @@ FeatureReport:
featureType: featureType:
description: Feature type code description: Feature type code
type: string type: string
AFCReport:
$ref: "/doc/swagger/include/AFC.yaml#/AFCReport"
SimplePTTReport: SimplePTTReport:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTReport" $ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTReport"

View File

@ -13,6 +13,8 @@ FeatureSettings:
originatorFeatureIndex: originatorFeatureIndex:
description: Optional for reverse API. This is the feature index from where the message comes from. description: Optional for reverse API. This is the feature index from where the message comes from.
type: integer type: integer
AFCSettings:
$ref: "/doc/swagger/include/AFC.yaml#/AFCSettings"
SimplePTTSettings: SimplePTTSettings:
$ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTSettings" $ref: "/doc/swagger/include/SimplePTT.yaml#/SimplePTTSettings"
RigCtlServerSettings: RigCtlServerSettings:

View File

@ -696,6 +696,76 @@ margin-bottom: 20px;
<script> <script>
// Script section to load models into a JS Var // Script section to load models into a JS Var
var defs = {} var defs = {}
defs.AFCActions = {
"properties" : {
"ptt" : {
"type" : "integer",
"description" : "AFC action\n * 0 - release\n * 1 - engage\n"
}
},
"description" : "AFC actions"
};
defs.AFCReport = {
"properties" : {
"ptt" : {
"type" : "integer",
"description" : "AFC status\n * 0 - released\n * 1 - engaged\n"
}
},
"description" : "AFC report"
};
defs.AFCSettings = {
"properties" : {
"title" : {
"type" : "string"
},
"rgbColor" : {
"type" : "integer"
},
"trackerDeviceSetIndex" : {
"type" : "integer",
"description" : "index of the device set of frequency tracker being used"
},
"trackedDeviceSetIndex" : {
"type" : "integer",
"description" : "index of the device set being tracked (channels and possibly device)"
},
"hasTargetFrequency" : {
"type" : "integer",
"description" : "Adjust device frequency to match tracker frequency\n * 0 - disabled\n * 1 - enabled\n"
},
"transverterTarget" : {
"type" : "integer",
"description" : "Use transverter or device frequency for tracker frequency adjustment\n * 0 - device\n * 1 - transverter\n"
},
"targetFrequency" : {
"type" : "integer",
"format" : "int64",
"description" : "Target frequency for the tracker"
},
"freqTolerance" : {
"type" : "integer",
"format" : "int64"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "AFC settings"
};
defs.AMBEDevice = { defs.AMBEDevice = {
"properties" : { "properties" : {
"deviceRef" : { "deviceRef" : {
@ -3202,6 +3272,9 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Optional for reverse API. This is the feature index from where the message comes from." "description" : "Optional for reverse API. This is the feature index from where the message comes from."
}, },
"AFCActions" : {
"$ref" : "#/definitions/AFCActions"
},
"SimplePTTActions" : { "SimplePTTActions" : {
"$ref" : "#/definitions/SimplePTTActions" "$ref" : "#/definitions/SimplePTTActions"
} }
@ -3228,6 +3301,9 @@ margin-bottom: 20px;
"type" : "string", "type" : "string",
"description" : "Feature type code" "description" : "Feature type code"
}, },
"AFCReport" : {
"$ref" : "#/definitions/AFCReport"
},
"SimplePTTReport" : { "SimplePTTReport" : {
"$ref" : "#/definitions/SimplePTTReport" "$ref" : "#/definitions/SimplePTTReport"
} }
@ -3300,6 +3376,9 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"description" : "Optional for reverse API. This is the feature index from where the message comes from." "description" : "Optional for reverse API. This is the feature index from where the message comes from."
}, },
"AFCSettings" : {
"$ref" : "#/definitions/AFCSettings"
},
"SimplePTTSettings" : { "SimplePTTSettings" : {
"$ref" : "#/definitions/SimplePTTSettings" "$ref" : "#/definitions/SimplePTTSettings"
}, },
@ -39969,7 +40048,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2020-10-11T08:49:12.690+02:00 Generated 2020-10-27T06:01:09.347+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,108 @@
/**
* 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, USRP 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: 4.15.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 "SWGAFCActions.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGAFCActions::SWGAFCActions(QString* json) {
init();
this->fromJson(*json);
}
SWGAFCActions::SWGAFCActions() {
ptt = 0;
m_ptt_isSet = false;
}
SWGAFCActions::~SWGAFCActions() {
this->cleanup();
}
void
SWGAFCActions::init() {
ptt = 0;
m_ptt_isSet = false;
}
void
SWGAFCActions::cleanup() {
}
SWGAFCActions*
SWGAFCActions::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGAFCActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&ptt, pJson["ptt"], "qint32", "");
}
QString
SWGAFCActions::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGAFCActions::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_ptt_isSet){
obj->insert("ptt", QJsonValue(ptt));
}
return obj;
}
qint32
SWGAFCActions::getPtt() {
return ptt;
}
void
SWGAFCActions::setPtt(qint32 ptt) {
this->ptt = ptt;
this->m_ptt_isSet = true;
}
bool
SWGAFCActions::isSet(){
bool isObjectUpdated = false;
do{
if(m_ptt_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,58 @@
/**
* 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, USRP 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: 4.15.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.
*/
/*
* SWGAFCActions.h
*
* AFC actions
*/
#ifndef SWGAFCActions_H_
#define SWGAFCActions_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGAFCActions: public SWGObject {
public:
SWGAFCActions();
SWGAFCActions(QString* json);
virtual ~SWGAFCActions();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGAFCActions* fromJson(QString &jsonString) override;
qint32 getPtt();
void setPtt(qint32 ptt);
virtual bool isSet() override;
private:
qint32 ptt;
bool m_ptt_isSet;
};
}
#endif /* SWGAFCActions_H_ */

View File

@ -0,0 +1,108 @@
/**
* 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, USRP 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: 4.15.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 "SWGAFCReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGAFCReport::SWGAFCReport(QString* json) {
init();
this->fromJson(*json);
}
SWGAFCReport::SWGAFCReport() {
ptt = 0;
m_ptt_isSet = false;
}
SWGAFCReport::~SWGAFCReport() {
this->cleanup();
}
void
SWGAFCReport::init() {
ptt = 0;
m_ptt_isSet = false;
}
void
SWGAFCReport::cleanup() {
}
SWGAFCReport*
SWGAFCReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGAFCReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&ptt, pJson["ptt"], "qint32", "");
}
QString
SWGAFCReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGAFCReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_ptt_isSet){
obj->insert("ptt", QJsonValue(ptt));
}
return obj;
}
qint32
SWGAFCReport::getPtt() {
return ptt;
}
void
SWGAFCReport::setPtt(qint32 ptt) {
this->ptt = ptt;
this->m_ptt_isSet = true;
}
bool
SWGAFCReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_ptt_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,58 @@
/**
* 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, USRP 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: 4.15.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.
*/
/*
* SWGAFCReport.h
*
* AFC report
*/
#ifndef SWGAFCReport_H_
#define SWGAFCReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGAFCReport: public SWGObject {
public:
SWGAFCReport();
SWGAFCReport(QString* json);
virtual ~SWGAFCReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGAFCReport* fromJson(QString &jsonString) override;
qint32 getPtt();
void setPtt(qint32 ptt);
virtual bool isSet() override;
private:
qint32 ptt;
bool m_ptt_isSet;
};
}
#endif /* SWGAFCReport_H_ */

View File

@ -0,0 +1,388 @@
/**
* 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, USRP 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: 4.15.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 "SWGAFCSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGAFCSettings::SWGAFCSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGAFCSettings::SWGAFCSettings() {
title = nullptr;
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
tracker_device_set_index = 0;
m_tracker_device_set_index_isSet = false;
tracked_device_set_index = 0;
m_tracked_device_set_index_isSet = false;
has_target_frequency = 0;
m_has_target_frequency_isSet = false;
transverter_target = 0;
m_transverter_target_isSet = false;
target_frequency = 0L;
m_target_frequency_isSet = false;
freq_tolerance = 0L;
m_freq_tolerance_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
SWGAFCSettings::~SWGAFCSettings() {
this->cleanup();
}
void
SWGAFCSettings::init() {
title = new QString("");
m_title_isSet = false;
rgb_color = 0;
m_rgb_color_isSet = false;
tracker_device_set_index = 0;
m_tracker_device_set_index_isSet = false;
tracked_device_set_index = 0;
m_tracked_device_set_index_isSet = false;
has_target_frequency = 0;
m_has_target_frequency_isSet = false;
transverter_target = 0;
m_transverter_target_isSet = false;
target_frequency = 0L;
m_target_frequency_isSet = false;
freq_tolerance = 0L;
m_freq_tolerance_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
void
SWGAFCSettings::cleanup() {
if(title != nullptr) {
delete title;
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGAFCSettings*
SWGAFCSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGAFCSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
::SWGSDRangel::setValue(&tracker_device_set_index, pJson["trackerDeviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&tracked_device_set_index, pJson["trackedDeviceSetIndex"], "qint32", "");
::SWGSDRangel::setValue(&has_target_frequency, pJson["hasTargetFrequency"], "qint32", "");
::SWGSDRangel::setValue(&transverter_target, pJson["transverterTarget"], "qint32", "");
::SWGSDRangel::setValue(&target_frequency, pJson["targetFrequency"], "qint64", "");
::SWGSDRangel::setValue(&freq_tolerance, pJson["freqTolerance"], "qint64", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
}
QString
SWGAFCSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGAFCSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(title != nullptr && *title != QString("")){
toJsonValue(QString("title"), title, obj, QString("QString"));
}
if(m_rgb_color_isSet){
obj->insert("rgbColor", QJsonValue(rgb_color));
}
if(m_tracker_device_set_index_isSet){
obj->insert("trackerDeviceSetIndex", QJsonValue(tracker_device_set_index));
}
if(m_tracked_device_set_index_isSet){
obj->insert("trackedDeviceSetIndex", QJsonValue(tracked_device_set_index));
}
if(m_has_target_frequency_isSet){
obj->insert("hasTargetFrequency", QJsonValue(has_target_frequency));
}
if(m_transverter_target_isSet){
obj->insert("transverterTarget", QJsonValue(transverter_target));
}
if(m_target_frequency_isSet){
obj->insert("targetFrequency", QJsonValue(target_frequency));
}
if(m_freq_tolerance_isSet){
obj->insert("freqTolerance", QJsonValue(freq_tolerance));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_device_index_isSet){
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
}
if(m_reverse_api_channel_index_isSet){
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
}
return obj;
}
QString*
SWGAFCSettings::getTitle() {
return title;
}
void
SWGAFCSettings::setTitle(QString* title) {
this->title = title;
this->m_title_isSet = true;
}
qint32
SWGAFCSettings::getRgbColor() {
return rgb_color;
}
void
SWGAFCSettings::setRgbColor(qint32 rgb_color) {
this->rgb_color = rgb_color;
this->m_rgb_color_isSet = true;
}
qint32
SWGAFCSettings::getTrackerDeviceSetIndex() {
return tracker_device_set_index;
}
void
SWGAFCSettings::setTrackerDeviceSetIndex(qint32 tracker_device_set_index) {
this->tracker_device_set_index = tracker_device_set_index;
this->m_tracker_device_set_index_isSet = true;
}
qint32
SWGAFCSettings::getTrackedDeviceSetIndex() {
return tracked_device_set_index;
}
void
SWGAFCSettings::setTrackedDeviceSetIndex(qint32 tracked_device_set_index) {
this->tracked_device_set_index = tracked_device_set_index;
this->m_tracked_device_set_index_isSet = true;
}
qint32
SWGAFCSettings::getHasTargetFrequency() {
return has_target_frequency;
}
void
SWGAFCSettings::setHasTargetFrequency(qint32 has_target_frequency) {
this->has_target_frequency = has_target_frequency;
this->m_has_target_frequency_isSet = true;
}
qint32
SWGAFCSettings::getTransverterTarget() {
return transverter_target;
}
void
SWGAFCSettings::setTransverterTarget(qint32 transverter_target) {
this->transverter_target = transverter_target;
this->m_transverter_target_isSet = true;
}
qint64
SWGAFCSettings::getTargetFrequency() {
return target_frequency;
}
void
SWGAFCSettings::setTargetFrequency(qint64 target_frequency) {
this->target_frequency = target_frequency;
this->m_target_frequency_isSet = true;
}
qint64
SWGAFCSettings::getFreqTolerance() {
return freq_tolerance;
}
void
SWGAFCSettings::setFreqTolerance(qint64 freq_tolerance) {
this->freq_tolerance = freq_tolerance;
this->m_freq_tolerance_isSet = true;
}
qint32
SWGAFCSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGAFCSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGAFCSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGAFCSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGAFCSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGAFCSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGAFCSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGAFCSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
qint32
SWGAFCSettings::getReverseApiChannelIndex() {
return reverse_api_channel_index;
}
void
SWGAFCSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
this->reverse_api_channel_index = reverse_api_channel_index;
this->m_reverse_api_channel_index_isSet = true;
}
bool
SWGAFCSettings::isSet(){
bool isObjectUpdated = false;
do{
if(title && *title != QString("")){
isObjectUpdated = true; break;
}
if(m_rgb_color_isSet){
isObjectUpdated = true; break;
}
if(m_tracker_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_tracked_device_set_index_isSet){
isObjectUpdated = true; break;
}
if(m_has_target_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_transverter_target_isSet){
isObjectUpdated = true; break;
}
if(m_target_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_freq_tolerance_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_device_index_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_channel_index_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,131 @@
/**
* 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, USRP 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: 4.15.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.
*/
/*
* SWGAFCSettings.h
*
* AFC settings
*/
#ifndef SWGAFCSettings_H_
#define SWGAFCSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGAFCSettings: public SWGObject {
public:
SWGAFCSettings();
SWGAFCSettings(QString* json);
virtual ~SWGAFCSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGAFCSettings* fromJson(QString &jsonString) override;
QString* getTitle();
void setTitle(QString* title);
qint32 getRgbColor();
void setRgbColor(qint32 rgb_color);
qint32 getTrackerDeviceSetIndex();
void setTrackerDeviceSetIndex(qint32 tracker_device_set_index);
qint32 getTrackedDeviceSetIndex();
void setTrackedDeviceSetIndex(qint32 tracked_device_set_index);
qint32 getHasTargetFrequency();
void setHasTargetFrequency(qint32 has_target_frequency);
qint32 getTransverterTarget();
void setTransverterTarget(qint32 transverter_target);
qint64 getTargetFrequency();
void setTargetFrequency(qint64 target_frequency);
qint64 getFreqTolerance();
void setFreqTolerance(qint64 freq_tolerance);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiDeviceIndex();
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
qint32 getReverseApiChannelIndex();
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
virtual bool isSet() override;
private:
QString* title;
bool m_title_isSet;
qint32 rgb_color;
bool m_rgb_color_isSet;
qint32 tracker_device_set_index;
bool m_tracker_device_set_index_isSet;
qint32 tracked_device_set_index;
bool m_tracked_device_set_index_isSet;
qint32 has_target_frequency;
bool m_has_target_frequency_isSet;
qint32 transverter_target;
bool m_transverter_target_isSet;
qint64 target_frequency;
bool m_target_frequency_isSet;
qint64 freq_tolerance;
bool m_freq_tolerance_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_device_index;
bool m_reverse_api_device_index_isSet;
qint32 reverse_api_channel_index;
bool m_reverse_api_channel_index_isSet;
};
}
#endif /* SWGAFCSettings_H_ */

View File

@ -34,6 +34,8 @@ SWGFeatureActions::SWGFeatureActions() {
m_originator_feature_set_index_isSet = false; m_originator_feature_set_index_isSet = false;
originator_feature_index = 0; originator_feature_index = 0;
m_originator_feature_index_isSet = false; m_originator_feature_index_isSet = false;
afc_actions = nullptr;
m_afc_actions_isSet = false;
simple_ptt_actions = nullptr; simple_ptt_actions = nullptr;
m_simple_ptt_actions_isSet = false; m_simple_ptt_actions_isSet = false;
} }
@ -50,6 +52,8 @@ SWGFeatureActions::init() {
m_originator_feature_set_index_isSet = false; m_originator_feature_set_index_isSet = false;
originator_feature_index = 0; originator_feature_index = 0;
m_originator_feature_index_isSet = false; m_originator_feature_index_isSet = false;
afc_actions = new SWGAFCActions();
m_afc_actions_isSet = false;
simple_ptt_actions = new SWGSimplePTTActions(); simple_ptt_actions = new SWGSimplePTTActions();
m_simple_ptt_actions_isSet = false; m_simple_ptt_actions_isSet = false;
} }
@ -61,6 +65,9 @@ SWGFeatureActions::cleanup() {
} }
if(afc_actions != nullptr) {
delete afc_actions;
}
if(simple_ptt_actions != nullptr) { if(simple_ptt_actions != nullptr) {
delete simple_ptt_actions; delete simple_ptt_actions;
} }
@ -83,6 +90,8 @@ SWGFeatureActions::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&originator_feature_index, pJson["originatorFeatureIndex"], "qint32", ""); ::SWGSDRangel::setValue(&originator_feature_index, pJson["originatorFeatureIndex"], "qint32", "");
::SWGSDRangel::setValue(&afc_actions, pJson["AFCActions"], "SWGAFCActions", "SWGAFCActions");
::SWGSDRangel::setValue(&simple_ptt_actions, pJson["SimplePTTActions"], "SWGSimplePTTActions", "SWGSimplePTTActions"); ::SWGSDRangel::setValue(&simple_ptt_actions, pJson["SimplePTTActions"], "SWGSimplePTTActions", "SWGSimplePTTActions");
} }
@ -110,6 +119,9 @@ SWGFeatureActions::asJsonObject() {
if(m_originator_feature_index_isSet){ if(m_originator_feature_index_isSet){
obj->insert("originatorFeatureIndex", QJsonValue(originator_feature_index)); obj->insert("originatorFeatureIndex", QJsonValue(originator_feature_index));
} }
if((afc_actions != nullptr) && (afc_actions->isSet())){
toJsonValue(QString("AFCActions"), afc_actions, obj, QString("SWGAFCActions"));
}
if((simple_ptt_actions != nullptr) && (simple_ptt_actions->isSet())){ if((simple_ptt_actions != nullptr) && (simple_ptt_actions->isSet())){
toJsonValue(QString("SimplePTTActions"), simple_ptt_actions, obj, QString("SWGSimplePTTActions")); toJsonValue(QString("SimplePTTActions"), simple_ptt_actions, obj, QString("SWGSimplePTTActions"));
} }
@ -147,6 +159,16 @@ SWGFeatureActions::setOriginatorFeatureIndex(qint32 originator_feature_index) {
this->m_originator_feature_index_isSet = true; this->m_originator_feature_index_isSet = true;
} }
SWGAFCActions*
SWGFeatureActions::getAfcActions() {
return afc_actions;
}
void
SWGFeatureActions::setAfcActions(SWGAFCActions* afc_actions) {
this->afc_actions = afc_actions;
this->m_afc_actions_isSet = true;
}
SWGSimplePTTActions* SWGSimplePTTActions*
SWGFeatureActions::getSimplePttActions() { SWGFeatureActions::getSimplePttActions() {
return simple_ptt_actions; return simple_ptt_actions;
@ -171,6 +193,9 @@ SWGFeatureActions::isSet(){
if(m_originator_feature_index_isSet){ if(m_originator_feature_index_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(afc_actions && afc_actions->isSet()){
isObjectUpdated = true; break;
}
if(simple_ptt_actions && simple_ptt_actions->isSet()){ if(simple_ptt_actions && simple_ptt_actions->isSet()){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -22,6 +22,7 @@
#include <QJsonObject> #include <QJsonObject>
#include "SWGAFCActions.h"
#include "SWGSimplePTTActions.h" #include "SWGSimplePTTActions.h"
#include <QString> #include <QString>
@ -52,6 +53,9 @@ public:
qint32 getOriginatorFeatureIndex(); qint32 getOriginatorFeatureIndex();
void setOriginatorFeatureIndex(qint32 originator_feature_index); void setOriginatorFeatureIndex(qint32 originator_feature_index);
SWGAFCActions* getAfcActions();
void setAfcActions(SWGAFCActions* afc_actions);
SWGSimplePTTActions* getSimplePttActions(); SWGSimplePTTActions* getSimplePttActions();
void setSimplePttActions(SWGSimplePTTActions* simple_ptt_actions); void setSimplePttActions(SWGSimplePTTActions* simple_ptt_actions);
@ -68,6 +72,9 @@ private:
qint32 originator_feature_index; qint32 originator_feature_index;
bool m_originator_feature_index_isSet; bool m_originator_feature_index_isSet;
SWGAFCActions* afc_actions;
bool m_afc_actions_isSet;
SWGSimplePTTActions* simple_ptt_actions; SWGSimplePTTActions* simple_ptt_actions;
bool m_simple_ptt_actions_isSet; bool m_simple_ptt_actions_isSet;

View File

@ -30,6 +30,8 @@ SWGFeatureReport::SWGFeatureReport(QString* json) {
SWGFeatureReport::SWGFeatureReport() { SWGFeatureReport::SWGFeatureReport() {
feature_type = nullptr; feature_type = nullptr;
m_feature_type_isSet = false; m_feature_type_isSet = false;
afc_report = nullptr;
m_afc_report_isSet = false;
simple_ptt_report = nullptr; simple_ptt_report = nullptr;
m_simple_ptt_report_isSet = false; m_simple_ptt_report_isSet = false;
} }
@ -42,6 +44,8 @@ void
SWGFeatureReport::init() { SWGFeatureReport::init() {
feature_type = new QString(""); feature_type = new QString("");
m_feature_type_isSet = false; m_feature_type_isSet = false;
afc_report = new SWGAFCReport();
m_afc_report_isSet = false;
simple_ptt_report = new SWGSimplePTTReport(); simple_ptt_report = new SWGSimplePTTReport();
m_simple_ptt_report_isSet = false; m_simple_ptt_report_isSet = false;
} }
@ -51,6 +55,9 @@ SWGFeatureReport::cleanup() {
if(feature_type != nullptr) { if(feature_type != nullptr) {
delete feature_type; delete feature_type;
} }
if(afc_report != nullptr) {
delete afc_report;
}
if(simple_ptt_report != nullptr) { if(simple_ptt_report != nullptr) {
delete simple_ptt_report; delete simple_ptt_report;
} }
@ -69,6 +76,8 @@ void
SWGFeatureReport::fromJsonObject(QJsonObject &pJson) { SWGFeatureReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&feature_type, pJson["featureType"], "QString", "QString"); ::SWGSDRangel::setValue(&feature_type, pJson["featureType"], "QString", "QString");
::SWGSDRangel::setValue(&afc_report, pJson["AFCReport"], "SWGAFCReport", "SWGAFCReport");
::SWGSDRangel::setValue(&simple_ptt_report, pJson["SimplePTTReport"], "SWGSimplePTTReport", "SWGSimplePTTReport"); ::SWGSDRangel::setValue(&simple_ptt_report, pJson["SimplePTTReport"], "SWGSimplePTTReport", "SWGSimplePTTReport");
} }
@ -90,6 +99,9 @@ SWGFeatureReport::asJsonObject() {
if(feature_type != nullptr && *feature_type != QString("")){ if(feature_type != nullptr && *feature_type != QString("")){
toJsonValue(QString("featureType"), feature_type, obj, QString("QString")); toJsonValue(QString("featureType"), feature_type, obj, QString("QString"));
} }
if((afc_report != nullptr) && (afc_report->isSet())){
toJsonValue(QString("AFCReport"), afc_report, obj, QString("SWGAFCReport"));
}
if((simple_ptt_report != nullptr) && (simple_ptt_report->isSet())){ if((simple_ptt_report != nullptr) && (simple_ptt_report->isSet())){
toJsonValue(QString("SimplePTTReport"), simple_ptt_report, obj, QString("SWGSimplePTTReport")); toJsonValue(QString("SimplePTTReport"), simple_ptt_report, obj, QString("SWGSimplePTTReport"));
} }
@ -107,6 +119,16 @@ SWGFeatureReport::setFeatureType(QString* feature_type) {
this->m_feature_type_isSet = true; this->m_feature_type_isSet = true;
} }
SWGAFCReport*
SWGFeatureReport::getAfcReport() {
return afc_report;
}
void
SWGFeatureReport::setAfcReport(SWGAFCReport* afc_report) {
this->afc_report = afc_report;
this->m_afc_report_isSet = true;
}
SWGSimplePTTReport* SWGSimplePTTReport*
SWGFeatureReport::getSimplePttReport() { SWGFeatureReport::getSimplePttReport() {
return simple_ptt_report; return simple_ptt_report;
@ -125,6 +147,9 @@ SWGFeatureReport::isSet(){
if(feature_type && *feature_type != QString("")){ if(feature_type && *feature_type != QString("")){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(afc_report && afc_report->isSet()){
isObjectUpdated = true; break;
}
if(simple_ptt_report && simple_ptt_report->isSet()){ if(simple_ptt_report && simple_ptt_report->isSet()){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -22,6 +22,7 @@
#include <QJsonObject> #include <QJsonObject>
#include "SWGAFCReport.h"
#include "SWGSimplePTTReport.h" #include "SWGSimplePTTReport.h"
#include <QString> #include <QString>
@ -46,6 +47,9 @@ public:
QString* getFeatureType(); QString* getFeatureType();
void setFeatureType(QString* feature_type); void setFeatureType(QString* feature_type);
SWGAFCReport* getAfcReport();
void setAfcReport(SWGAFCReport* afc_report);
SWGSimplePTTReport* getSimplePttReport(); SWGSimplePTTReport* getSimplePttReport();
void setSimplePttReport(SWGSimplePTTReport* simple_ptt_report); void setSimplePttReport(SWGSimplePTTReport* simple_ptt_report);
@ -56,6 +60,9 @@ private:
QString* feature_type; QString* feature_type;
bool m_feature_type_isSet; bool m_feature_type_isSet;
SWGAFCReport* afc_report;
bool m_afc_report_isSet;
SWGSimplePTTReport* simple_ptt_report; SWGSimplePTTReport* simple_ptt_report;
bool m_simple_ptt_report_isSet; bool m_simple_ptt_report_isSet;

View File

@ -34,6 +34,8 @@ SWGFeatureSettings::SWGFeatureSettings() {
m_originator_feature_set_index_isSet = false; m_originator_feature_set_index_isSet = false;
originator_feature_index = 0; originator_feature_index = 0;
m_originator_feature_index_isSet = false; m_originator_feature_index_isSet = false;
afc_settings = nullptr;
m_afc_settings_isSet = false;
simple_ptt_settings = nullptr; simple_ptt_settings = nullptr;
m_simple_ptt_settings_isSet = false; m_simple_ptt_settings_isSet = false;
rig_ctl_server_settings = nullptr; rig_ctl_server_settings = nullptr;
@ -52,6 +54,8 @@ SWGFeatureSettings::init() {
m_originator_feature_set_index_isSet = false; m_originator_feature_set_index_isSet = false;
originator_feature_index = 0; originator_feature_index = 0;
m_originator_feature_index_isSet = false; m_originator_feature_index_isSet = false;
afc_settings = new SWGAFCSettings();
m_afc_settings_isSet = false;
simple_ptt_settings = new SWGSimplePTTSettings(); simple_ptt_settings = new SWGSimplePTTSettings();
m_simple_ptt_settings_isSet = false; m_simple_ptt_settings_isSet = false;
rig_ctl_server_settings = new SWGRigCtlServerSettings(); rig_ctl_server_settings = new SWGRigCtlServerSettings();
@ -65,6 +69,9 @@ SWGFeatureSettings::cleanup() {
} }
if(afc_settings != nullptr) {
delete afc_settings;
}
if(simple_ptt_settings != nullptr) { if(simple_ptt_settings != nullptr) {
delete simple_ptt_settings; delete simple_ptt_settings;
} }
@ -90,6 +97,8 @@ SWGFeatureSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&originator_feature_index, pJson["originatorFeatureIndex"], "qint32", ""); ::SWGSDRangel::setValue(&originator_feature_index, pJson["originatorFeatureIndex"], "qint32", "");
::SWGSDRangel::setValue(&afc_settings, pJson["AFCSettings"], "SWGAFCSettings", "SWGAFCSettings");
::SWGSDRangel::setValue(&simple_ptt_settings, pJson["SimplePTTSettings"], "SWGSimplePTTSettings", "SWGSimplePTTSettings"); ::SWGSDRangel::setValue(&simple_ptt_settings, pJson["SimplePTTSettings"], "SWGSimplePTTSettings", "SWGSimplePTTSettings");
::SWGSDRangel::setValue(&rig_ctl_server_settings, pJson["RigCtlServerSettings"], "SWGRigCtlServerSettings", "SWGRigCtlServerSettings"); ::SWGSDRangel::setValue(&rig_ctl_server_settings, pJson["RigCtlServerSettings"], "SWGRigCtlServerSettings", "SWGRigCtlServerSettings");
@ -119,6 +128,9 @@ SWGFeatureSettings::asJsonObject() {
if(m_originator_feature_index_isSet){ if(m_originator_feature_index_isSet){
obj->insert("originatorFeatureIndex", QJsonValue(originator_feature_index)); obj->insert("originatorFeatureIndex", QJsonValue(originator_feature_index));
} }
if((afc_settings != nullptr) && (afc_settings->isSet())){
toJsonValue(QString("AFCSettings"), afc_settings, obj, QString("SWGAFCSettings"));
}
if((simple_ptt_settings != nullptr) && (simple_ptt_settings->isSet())){ if((simple_ptt_settings != nullptr) && (simple_ptt_settings->isSet())){
toJsonValue(QString("SimplePTTSettings"), simple_ptt_settings, obj, QString("SWGSimplePTTSettings")); toJsonValue(QString("SimplePTTSettings"), simple_ptt_settings, obj, QString("SWGSimplePTTSettings"));
} }
@ -159,6 +171,16 @@ SWGFeatureSettings::setOriginatorFeatureIndex(qint32 originator_feature_index) {
this->m_originator_feature_index_isSet = true; this->m_originator_feature_index_isSet = true;
} }
SWGAFCSettings*
SWGFeatureSettings::getAfcSettings() {
return afc_settings;
}
void
SWGFeatureSettings::setAfcSettings(SWGAFCSettings* afc_settings) {
this->afc_settings = afc_settings;
this->m_afc_settings_isSet = true;
}
SWGSimplePTTSettings* SWGSimplePTTSettings*
SWGFeatureSettings::getSimplePttSettings() { SWGFeatureSettings::getSimplePttSettings() {
return simple_ptt_settings; return simple_ptt_settings;
@ -193,6 +215,9 @@ SWGFeatureSettings::isSet(){
if(m_originator_feature_index_isSet){ if(m_originator_feature_index_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(afc_settings && afc_settings->isSet()){
isObjectUpdated = true; break;
}
if(simple_ptt_settings && simple_ptt_settings->isSet()){ if(simple_ptt_settings && simple_ptt_settings->isSet()){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -22,6 +22,7 @@
#include <QJsonObject> #include <QJsonObject>
#include "SWGAFCSettings.h"
#include "SWGRigCtlServerSettings.h" #include "SWGRigCtlServerSettings.h"
#include "SWGSimplePTTSettings.h" #include "SWGSimplePTTSettings.h"
#include <QString> #include <QString>
@ -53,6 +54,9 @@ public:
qint32 getOriginatorFeatureIndex(); qint32 getOriginatorFeatureIndex();
void setOriginatorFeatureIndex(qint32 originator_feature_index); void setOriginatorFeatureIndex(qint32 originator_feature_index);
SWGAFCSettings* getAfcSettings();
void setAfcSettings(SWGAFCSettings* afc_settings);
SWGSimplePTTSettings* getSimplePttSettings(); SWGSimplePTTSettings* getSimplePttSettings();
void setSimplePttSettings(SWGSimplePTTSettings* simple_ptt_settings); void setSimplePttSettings(SWGSimplePTTSettings* simple_ptt_settings);
@ -72,6 +76,9 @@ private:
qint32 originator_feature_index; qint32 originator_feature_index;
bool m_originator_feature_index_isSet; bool m_originator_feature_index_isSet;
SWGAFCSettings* afc_settings;
bool m_afc_settings_isSet;
SWGSimplePTTSettings* simple_ptt_settings; SWGSimplePTTSettings* simple_ptt_settings;
bool m_simple_ptt_settings_isSet; bool m_simple_ptt_settings_isSet;

View File

@ -14,6 +14,9 @@
#define ModelFactory_H_ #define ModelFactory_H_
#include "SWGAFCActions.h"
#include "SWGAFCReport.h"
#include "SWGAFCSettings.h"
#include "SWGAMBEDevice.h" #include "SWGAMBEDevice.h"
#include "SWGAMBEDevices.h" #include "SWGAMBEDevices.h"
#include "SWGAMDemodReport.h" #include "SWGAMDemodReport.h"
@ -203,6 +206,15 @@
namespace SWGSDRangel { namespace SWGSDRangel {
inline void* create(QString type) { inline void* create(QString type) {
if(QString("SWGAFCActions").compare(type) == 0) {
return new SWGAFCActions();
}
if(QString("SWGAFCReport").compare(type) == 0) {
return new SWGAFCReport();
}
if(QString("SWGAFCSettings").compare(type) == 0) {
return new SWGAFCSettings();
}
if(QString("SWGAMBEDevice").compare(type) == 0) { if(QString("SWGAMBEDevice").compare(type) == 0) {
return new SWGAMBEDevice(); return new SWGAMBEDevice();
} }