2017-12-10 19:27:08 +00:00
|
|
|
/**
|
|
|
|
* SDRangel
|
2018-09-11 12:52:16 +00:00
|
|
|
* 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 ---
|
2017-12-10 19:27:08 +00:00
|
|
|
*
|
2019-05-05 22:39:53 +00:00
|
|
|
* OpenAPI spec version: 4.7.0
|
2017-12-10 19:27:08 +00:00
|
|
|
* 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 "SWGChannelSettings.h"
|
|
|
|
|
|
|
|
#include "SWGHelpers.h"
|
|
|
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
namespace SWGSDRangel {
|
|
|
|
|
2018-02-14 00:42:35 +00:00
|
|
|
SWGChannelSettings::SWGChannelSettings(QString* json) {
|
2017-12-10 19:27:08 +00:00
|
|
|
init();
|
2018-02-14 00:42:35 +00:00
|
|
|
this->fromJson(*json);
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGChannelSettings::SWGChannelSettings() {
|
2018-02-14 00:42:35 +00:00
|
|
|
channel_type = nullptr;
|
|
|
|
m_channel_type_isSet = false;
|
|
|
|
tx = 0;
|
|
|
|
m_tx_isSet = false;
|
2019-03-25 00:15:27 +00:00
|
|
|
originator_device_set_index = 0;
|
|
|
|
m_originator_device_set_index_isSet = false;
|
|
|
|
originator_channel_index = 0;
|
|
|
|
m_originator_channel_index_isSet = false;
|
2018-03-21 22:49:16 +00:00
|
|
|
am_demod_settings = nullptr;
|
|
|
|
m_am_demod_settings_isSet = false;
|
2018-04-05 22:54:18 +00:00
|
|
|
am_mod_settings = nullptr;
|
|
|
|
m_am_mod_settings_isSet = false;
|
2018-04-14 22:52:39 +00:00
|
|
|
atv_mod_settings = nullptr;
|
|
|
|
m_atv_mod_settings_isSet = false;
|
2018-05-23 12:56:29 +00:00
|
|
|
bfm_demod_settings = nullptr;
|
|
|
|
m_bfm_demod_settings_isSet = false;
|
2018-05-24 10:17:29 +00:00
|
|
|
dsd_demod_settings = nullptr;
|
|
|
|
m_dsd_demod_settings_isSet = false;
|
2019-02-25 01:06:15 +00:00
|
|
|
free_dv_demod_settings = nullptr;
|
|
|
|
m_free_dv_demod_settings_isSet = false;
|
2019-02-22 06:17:27 +00:00
|
|
|
free_dv_mod_settings = nullptr;
|
|
|
|
m_free_dv_mod_settings_isSet = false;
|
2019-05-03 23:55:58 +00:00
|
|
|
freq_tracker_settings = nullptr;
|
|
|
|
m_freq_tracker_settings_isSet = false;
|
2018-02-14 00:42:35 +00:00
|
|
|
nfm_demod_settings = nullptr;
|
|
|
|
m_nfm_demod_settings_isSet = false;
|
|
|
|
nfm_mod_settings = nullptr;
|
|
|
|
m_nfm_mod_settings_isSet = false;
|
2019-05-02 02:02:40 +00:00
|
|
|
local_sink_settings = nullptr;
|
|
|
|
m_local_sink_settings_isSet = false;
|
2019-01-22 22:39:12 +00:00
|
|
|
remote_sink_settings = nullptr;
|
|
|
|
m_remote_sink_settings_isSet = false;
|
2019-01-22 23:44:13 +00:00
|
|
|
remote_source_settings = nullptr;
|
|
|
|
m_remote_source_settings_isSet = false;
|
2018-04-12 21:49:29 +00:00
|
|
|
ssb_mod_settings = nullptr;
|
|
|
|
m_ssb_mod_settings_isSet = false;
|
2018-05-26 13:53:22 +00:00
|
|
|
ssb_demod_settings = nullptr;
|
|
|
|
m_ssb_demod_settings_isSet = false;
|
2018-09-11 21:22:59 +00:00
|
|
|
udp_source_settings = nullptr;
|
|
|
|
m_udp_source_settings_isSet = false;
|
2018-09-11 22:36:30 +00:00
|
|
|
udp_sink_settings = nullptr;
|
|
|
|
m_udp_sink_settings_isSet = false;
|
2018-05-25 08:08:47 +00:00
|
|
|
wfm_demod_settings = nullptr;
|
|
|
|
m_wfm_demod_settings_isSet = false;
|
2018-04-08 22:37:17 +00:00
|
|
|
wfm_mod_settings = nullptr;
|
|
|
|
m_wfm_mod_settings_isSet = false;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGChannelSettings::~SWGChannelSettings() {
|
|
|
|
this->cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGChannelSettings::init() {
|
|
|
|
channel_type = new QString("");
|
2018-02-12 17:20:27 +00:00
|
|
|
m_channel_type_isSet = false;
|
2017-12-10 19:27:08 +00:00
|
|
|
tx = 0;
|
2018-02-12 17:20:27 +00:00
|
|
|
m_tx_isSet = false;
|
2019-03-25 00:15:27 +00:00
|
|
|
originator_device_set_index = 0;
|
|
|
|
m_originator_device_set_index_isSet = false;
|
|
|
|
originator_channel_index = 0;
|
|
|
|
m_originator_channel_index_isSet = false;
|
2018-03-21 22:49:16 +00:00
|
|
|
am_demod_settings = new SWGAMDemodSettings();
|
|
|
|
m_am_demod_settings_isSet = false;
|
2018-04-05 22:54:18 +00:00
|
|
|
am_mod_settings = new SWGAMModSettings();
|
|
|
|
m_am_mod_settings_isSet = false;
|
2018-04-14 22:52:39 +00:00
|
|
|
atv_mod_settings = new SWGATVModSettings();
|
|
|
|
m_atv_mod_settings_isSet = false;
|
2018-05-23 12:56:29 +00:00
|
|
|
bfm_demod_settings = new SWGBFMDemodSettings();
|
|
|
|
m_bfm_demod_settings_isSet = false;
|
2018-05-24 10:17:29 +00:00
|
|
|
dsd_demod_settings = new SWGDSDDemodSettings();
|
|
|
|
m_dsd_demod_settings_isSet = false;
|
2019-02-25 01:06:15 +00:00
|
|
|
free_dv_demod_settings = new SWGFreeDVDemodSettings();
|
|
|
|
m_free_dv_demod_settings_isSet = false;
|
2019-02-22 06:17:27 +00:00
|
|
|
free_dv_mod_settings = new SWGFreeDVModSettings();
|
|
|
|
m_free_dv_mod_settings_isSet = false;
|
2019-05-03 23:55:58 +00:00
|
|
|
freq_tracker_settings = new SWGFreqTrackerSettings();
|
|
|
|
m_freq_tracker_settings_isSet = false;
|
2017-12-10 19:27:08 +00:00
|
|
|
nfm_demod_settings = new SWGNFMDemodSettings();
|
2018-02-12 17:20:27 +00:00
|
|
|
m_nfm_demod_settings_isSet = false;
|
2017-12-10 19:27:08 +00:00
|
|
|
nfm_mod_settings = new SWGNFMModSettings();
|
2018-02-12 17:20:27 +00:00
|
|
|
m_nfm_mod_settings_isSet = false;
|
2019-05-02 02:02:40 +00:00
|
|
|
local_sink_settings = new SWGLocalSinkSettings();
|
|
|
|
m_local_sink_settings_isSet = false;
|
2019-01-22 22:39:12 +00:00
|
|
|
remote_sink_settings = new SWGRemoteSinkSettings();
|
|
|
|
m_remote_sink_settings_isSet = false;
|
2019-01-22 23:44:13 +00:00
|
|
|
remote_source_settings = new SWGRemoteSourceSettings();
|
|
|
|
m_remote_source_settings_isSet = false;
|
2018-04-12 21:49:29 +00:00
|
|
|
ssb_mod_settings = new SWGSSBModSettings();
|
|
|
|
m_ssb_mod_settings_isSet = false;
|
2018-05-26 13:53:22 +00:00
|
|
|
ssb_demod_settings = new SWGSSBDemodSettings();
|
|
|
|
m_ssb_demod_settings_isSet = false;
|
2018-09-11 21:22:59 +00:00
|
|
|
udp_source_settings = new SWGUDPSourceSettings();
|
|
|
|
m_udp_source_settings_isSet = false;
|
2018-09-11 22:36:30 +00:00
|
|
|
udp_sink_settings = new SWGUDPSinkSettings();
|
|
|
|
m_udp_sink_settings_isSet = false;
|
2018-05-25 08:08:47 +00:00
|
|
|
wfm_demod_settings = new SWGWFMDemodSettings();
|
|
|
|
m_wfm_demod_settings_isSet = false;
|
2018-04-08 22:37:17 +00:00
|
|
|
wfm_mod_settings = new SWGWFMModSettings();
|
|
|
|
m_wfm_mod_settings_isSet = false;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
SWGChannelSettings::cleanup() {
|
2018-02-12 17:20:27 +00:00
|
|
|
if(channel_type != nullptr) {
|
2017-12-10 19:27:08 +00:00
|
|
|
delete channel_type;
|
|
|
|
}
|
|
|
|
|
2019-03-25 00:15:27 +00:00
|
|
|
|
|
|
|
|
2018-03-21 22:49:16 +00:00
|
|
|
if(am_demod_settings != nullptr) {
|
|
|
|
delete am_demod_settings;
|
|
|
|
}
|
2018-04-05 22:54:18 +00:00
|
|
|
if(am_mod_settings != nullptr) {
|
|
|
|
delete am_mod_settings;
|
|
|
|
}
|
2018-04-14 22:52:39 +00:00
|
|
|
if(atv_mod_settings != nullptr) {
|
|
|
|
delete atv_mod_settings;
|
|
|
|
}
|
2018-05-23 12:56:29 +00:00
|
|
|
if(bfm_demod_settings != nullptr) {
|
|
|
|
delete bfm_demod_settings;
|
|
|
|
}
|
2018-05-24 10:17:29 +00:00
|
|
|
if(dsd_demod_settings != nullptr) {
|
|
|
|
delete dsd_demod_settings;
|
|
|
|
}
|
2019-02-25 01:06:15 +00:00
|
|
|
if(free_dv_demod_settings != nullptr) {
|
|
|
|
delete free_dv_demod_settings;
|
|
|
|
}
|
2019-02-22 06:17:27 +00:00
|
|
|
if(free_dv_mod_settings != nullptr) {
|
|
|
|
delete free_dv_mod_settings;
|
|
|
|
}
|
2019-05-03 23:55:58 +00:00
|
|
|
if(freq_tracker_settings != nullptr) {
|
|
|
|
delete freq_tracker_settings;
|
|
|
|
}
|
2018-02-12 17:20:27 +00:00
|
|
|
if(nfm_demod_settings != nullptr) {
|
2017-12-10 19:27:08 +00:00
|
|
|
delete nfm_demod_settings;
|
|
|
|
}
|
2018-02-12 17:20:27 +00:00
|
|
|
if(nfm_mod_settings != nullptr) {
|
2017-12-10 19:27:08 +00:00
|
|
|
delete nfm_mod_settings;
|
|
|
|
}
|
2019-05-02 02:02:40 +00:00
|
|
|
if(local_sink_settings != nullptr) {
|
|
|
|
delete local_sink_settings;
|
|
|
|
}
|
2019-01-22 22:39:12 +00:00
|
|
|
if(remote_sink_settings != nullptr) {
|
|
|
|
delete remote_sink_settings;
|
2018-08-23 14:06:47 +00:00
|
|
|
}
|
2019-01-22 23:44:13 +00:00
|
|
|
if(remote_source_settings != nullptr) {
|
|
|
|
delete remote_source_settings;
|
2018-08-29 23:56:53 +00:00
|
|
|
}
|
2018-04-12 21:49:29 +00:00
|
|
|
if(ssb_mod_settings != nullptr) {
|
|
|
|
delete ssb_mod_settings;
|
|
|
|
}
|
2018-05-26 13:53:22 +00:00
|
|
|
if(ssb_demod_settings != nullptr) {
|
|
|
|
delete ssb_demod_settings;
|
|
|
|
}
|
2018-09-11 21:22:59 +00:00
|
|
|
if(udp_source_settings != nullptr) {
|
|
|
|
delete udp_source_settings;
|
2018-04-15 16:25:22 +00:00
|
|
|
}
|
2018-09-11 22:36:30 +00:00
|
|
|
if(udp_sink_settings != nullptr) {
|
|
|
|
delete udp_sink_settings;
|
2018-05-25 08:45:40 +00:00
|
|
|
}
|
2018-05-25 08:08:47 +00:00
|
|
|
if(wfm_demod_settings != nullptr) {
|
|
|
|
delete wfm_demod_settings;
|
|
|
|
}
|
2018-04-08 22:37:17 +00:00
|
|
|
if(wfm_mod_settings != nullptr) {
|
|
|
|
delete wfm_mod_settings;
|
|
|
|
}
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGChannelSettings*
|
2018-02-14 00:42:35 +00:00
|
|
|
SWGChannelSettings::fromJson(QString &json) {
|
2017-12-10 19:27:08 +00:00
|
|
|
QByteArray array (json.toStdString().c_str());
|
|
|
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
|
|
|
QJsonObject jsonObject = doc.object();
|
|
|
|
this->fromJsonObject(jsonObject);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2018-02-14 00:42:35 +00:00
|
|
|
SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
|
2017-12-10 19:27:08 +00:00
|
|
|
::SWGSDRangel::setValue(&channel_type, pJson["channelType"], "QString", "QString");
|
2018-02-12 17:20:27 +00:00
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
::SWGSDRangel::setValue(&tx, pJson["tx"], "qint32", "");
|
2018-02-12 17:20:27 +00:00
|
|
|
|
2019-03-25 00:15:27 +00:00
|
|
|
::SWGSDRangel::setValue(&originator_device_set_index, pJson["originatorDeviceSetIndex"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&originator_channel_index, pJson["originatorChannelIndex"], "qint32", "");
|
|
|
|
|
2018-03-21 22:49:16 +00:00
|
|
|
::SWGSDRangel::setValue(&am_demod_settings, pJson["AMDemodSettings"], "SWGAMDemodSettings", "SWGAMDemodSettings");
|
|
|
|
|
2018-04-05 22:54:18 +00:00
|
|
|
::SWGSDRangel::setValue(&am_mod_settings, pJson["AMModSettings"], "SWGAMModSettings", "SWGAMModSettings");
|
|
|
|
|
2018-04-14 22:52:39 +00:00
|
|
|
::SWGSDRangel::setValue(&atv_mod_settings, pJson["ATVModSettings"], "SWGATVModSettings", "SWGATVModSettings");
|
|
|
|
|
2018-05-23 12:56:29 +00:00
|
|
|
::SWGSDRangel::setValue(&bfm_demod_settings, pJson["BFMDemodSettings"], "SWGBFMDemodSettings", "SWGBFMDemodSettings");
|
|
|
|
|
2018-05-24 10:17:29 +00:00
|
|
|
::SWGSDRangel::setValue(&dsd_demod_settings, pJson["DSDDemodSettings"], "SWGDSDDemodSettings", "SWGDSDDemodSettings");
|
|
|
|
|
2019-02-25 01:06:15 +00:00
|
|
|
::SWGSDRangel::setValue(&free_dv_demod_settings, pJson["FreeDVDemodSettings"], "SWGFreeDVDemodSettings", "SWGFreeDVDemodSettings");
|
|
|
|
|
2019-02-22 06:17:27 +00:00
|
|
|
::SWGSDRangel::setValue(&free_dv_mod_settings, pJson["FreeDVModSettings"], "SWGFreeDVModSettings", "SWGFreeDVModSettings");
|
|
|
|
|
2019-05-03 23:55:58 +00:00
|
|
|
::SWGSDRangel::setValue(&freq_tracker_settings, pJson["FreqTrackerSettings"], "SWGFreqTrackerSettings", "SWGFreqTrackerSettings");
|
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
::SWGSDRangel::setValue(&nfm_demod_settings, pJson["NFMDemodSettings"], "SWGNFMDemodSettings", "SWGNFMDemodSettings");
|
2018-02-12 17:20:27 +00:00
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
::SWGSDRangel::setValue(&nfm_mod_settings, pJson["NFMModSettings"], "SWGNFMModSettings", "SWGNFMModSettings");
|
2018-02-12 17:20:27 +00:00
|
|
|
|
2019-05-02 02:02:40 +00:00
|
|
|
::SWGSDRangel::setValue(&local_sink_settings, pJson["LocalSinkSettings"], "SWGLocalSinkSettings", "SWGLocalSinkSettings");
|
|
|
|
|
2019-01-22 22:39:12 +00:00
|
|
|
::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings");
|
2018-08-23 14:06:47 +00:00
|
|
|
|
2019-01-22 23:44:13 +00:00
|
|
|
::SWGSDRangel::setValue(&remote_source_settings, pJson["RemoteSourceSettings"], "SWGRemoteSourceSettings", "SWGRemoteSourceSettings");
|
2018-08-29 23:56:53 +00:00
|
|
|
|
2018-04-12 21:49:29 +00:00
|
|
|
::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings");
|
|
|
|
|
2018-05-26 13:53:22 +00:00
|
|
|
::SWGSDRangel::setValue(&ssb_demod_settings, pJson["SSBDemodSettings"], "SWGSSBDemodSettings", "SWGSSBDemodSettings");
|
|
|
|
|
2018-09-11 21:22:59 +00:00
|
|
|
::SWGSDRangel::setValue(&udp_source_settings, pJson["UDPSourceSettings"], "SWGUDPSourceSettings", "SWGUDPSourceSettings");
|
2018-04-15 16:25:22 +00:00
|
|
|
|
2018-09-11 22:36:30 +00:00
|
|
|
::SWGSDRangel::setValue(&udp_sink_settings, pJson["UDPSinkSettings"], "SWGUDPSinkSettings", "SWGUDPSinkSettings");
|
2018-05-25 08:45:40 +00:00
|
|
|
|
2018-05-25 08:08:47 +00:00
|
|
|
::SWGSDRangel::setValue(&wfm_demod_settings, pJson["WFMDemodSettings"], "SWGWFMDemodSettings", "SWGWFMDemodSettings");
|
|
|
|
|
2018-04-08 22:37:17 +00:00
|
|
|
::SWGSDRangel::setValue(&wfm_mod_settings, pJson["WFMModSettings"], "SWGWFMModSettings", "SWGWFMModSettings");
|
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
|
|
|
SWGChannelSettings::asJson ()
|
|
|
|
{
|
2018-02-14 00:42:35 +00:00
|
|
|
QJsonObject* obj = this->asJsonObject();
|
|
|
|
|
|
|
|
QJsonDocument doc(*obj);
|
2017-12-10 19:27:08 +00:00
|
|
|
QByteArray bytes = doc.toJson();
|
2018-02-14 00:42:35 +00:00
|
|
|
delete obj;
|
2017-12-10 19:27:08 +00:00
|
|
|
return QString(bytes);
|
|
|
|
}
|
|
|
|
|
2018-02-14 00:42:35 +00:00
|
|
|
QJsonObject*
|
2017-12-10 19:27:08 +00:00
|
|
|
SWGChannelSettings::asJsonObject() {
|
2018-02-14 00:42:35 +00:00
|
|
|
QJsonObject* obj = new QJsonObject();
|
2018-02-12 17:20:27 +00:00
|
|
|
if(channel_type != nullptr && *channel_type != QString("")){
|
|
|
|
toJsonValue(QString("channelType"), channel_type, obj, QString("QString"));
|
|
|
|
}
|
|
|
|
if(m_tx_isSet){
|
2018-02-14 00:42:35 +00:00
|
|
|
obj->insert("tx", QJsonValue(tx));
|
2018-02-12 17:20:27 +00:00
|
|
|
}
|
2019-03-25 00:15:27 +00:00
|
|
|
if(m_originator_device_set_index_isSet){
|
|
|
|
obj->insert("originatorDeviceSetIndex", QJsonValue(originator_device_set_index));
|
|
|
|
}
|
|
|
|
if(m_originator_channel_index_isSet){
|
|
|
|
obj->insert("originatorChannelIndex", QJsonValue(originator_channel_index));
|
|
|
|
}
|
2018-03-21 22:49:16 +00:00
|
|
|
if((am_demod_settings != nullptr) && (am_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("AMDemodSettings"), am_demod_settings, obj, QString("SWGAMDemodSettings"));
|
|
|
|
}
|
2018-04-05 22:54:18 +00:00
|
|
|
if((am_mod_settings != nullptr) && (am_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("AMModSettings"), am_mod_settings, obj, QString("SWGAMModSettings"));
|
|
|
|
}
|
2018-04-14 22:52:39 +00:00
|
|
|
if((atv_mod_settings != nullptr) && (atv_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("ATVModSettings"), atv_mod_settings, obj, QString("SWGATVModSettings"));
|
|
|
|
}
|
2018-05-23 12:56:29 +00:00
|
|
|
if((bfm_demod_settings != nullptr) && (bfm_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("BFMDemodSettings"), bfm_demod_settings, obj, QString("SWGBFMDemodSettings"));
|
|
|
|
}
|
2018-05-24 10:17:29 +00:00
|
|
|
if((dsd_demod_settings != nullptr) && (dsd_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("DSDDemodSettings"), dsd_demod_settings, obj, QString("SWGDSDDemodSettings"));
|
|
|
|
}
|
2019-02-25 01:06:15 +00:00
|
|
|
if((free_dv_demod_settings != nullptr) && (free_dv_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("FreeDVDemodSettings"), free_dv_demod_settings, obj, QString("SWGFreeDVDemodSettings"));
|
|
|
|
}
|
2019-02-22 06:17:27 +00:00
|
|
|
if((free_dv_mod_settings != nullptr) && (free_dv_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("FreeDVModSettings"), free_dv_mod_settings, obj, QString("SWGFreeDVModSettings"));
|
|
|
|
}
|
2019-05-03 23:55:58 +00:00
|
|
|
if((freq_tracker_settings != nullptr) && (freq_tracker_settings->isSet())){
|
|
|
|
toJsonValue(QString("FreqTrackerSettings"), freq_tracker_settings, obj, QString("SWGFreqTrackerSettings"));
|
|
|
|
}
|
2018-02-12 17:20:27 +00:00
|
|
|
if((nfm_demod_settings != nullptr) && (nfm_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("NFMDemodSettings"), nfm_demod_settings, obj, QString("SWGNFMDemodSettings"));
|
|
|
|
}
|
|
|
|
if((nfm_mod_settings != nullptr) && (nfm_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("NFMModSettings"), nfm_mod_settings, obj, QString("SWGNFMModSettings"));
|
|
|
|
}
|
2019-05-02 02:02:40 +00:00
|
|
|
if((local_sink_settings != nullptr) && (local_sink_settings->isSet())){
|
|
|
|
toJsonValue(QString("LocalSinkSettings"), local_sink_settings, obj, QString("SWGLocalSinkSettings"));
|
|
|
|
}
|
2019-01-22 22:39:12 +00:00
|
|
|
if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){
|
|
|
|
toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings"));
|
2018-08-23 14:06:47 +00:00
|
|
|
}
|
2019-01-22 23:44:13 +00:00
|
|
|
if((remote_source_settings != nullptr) && (remote_source_settings->isSet())){
|
|
|
|
toJsonValue(QString("RemoteSourceSettings"), remote_source_settings, obj, QString("SWGRemoteSourceSettings"));
|
2018-08-29 23:56:53 +00:00
|
|
|
}
|
2018-04-12 21:49:29 +00:00
|
|
|
if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings"));
|
|
|
|
}
|
2018-05-26 13:53:22 +00:00
|
|
|
if((ssb_demod_settings != nullptr) && (ssb_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("SSBDemodSettings"), ssb_demod_settings, obj, QString("SWGSSBDemodSettings"));
|
|
|
|
}
|
2018-09-11 21:22:59 +00:00
|
|
|
if((udp_source_settings != nullptr) && (udp_source_settings->isSet())){
|
|
|
|
toJsonValue(QString("UDPSourceSettings"), udp_source_settings, obj, QString("SWGUDPSourceSettings"));
|
2018-04-15 16:25:22 +00:00
|
|
|
}
|
2018-09-11 22:36:30 +00:00
|
|
|
if((udp_sink_settings != nullptr) && (udp_sink_settings->isSet())){
|
|
|
|
toJsonValue(QString("UDPSinkSettings"), udp_sink_settings, obj, QString("SWGUDPSinkSettings"));
|
2018-05-25 08:45:40 +00:00
|
|
|
}
|
2018-05-25 08:08:47 +00:00
|
|
|
if((wfm_demod_settings != nullptr) && (wfm_demod_settings->isSet())){
|
|
|
|
toJsonValue(QString("WFMDemodSettings"), wfm_demod_settings, obj, QString("SWGWFMDemodSettings"));
|
|
|
|
}
|
2018-04-08 22:37:17 +00:00
|
|
|
if((wfm_mod_settings != nullptr) && (wfm_mod_settings->isSet())){
|
|
|
|
toJsonValue(QString("WFMModSettings"), wfm_mod_settings, obj, QString("SWGWFMModSettings"));
|
|
|
|
}
|
2017-12-10 19:27:08 +00:00
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
|
|
|
SWGChannelSettings::getChannelType() {
|
|
|
|
return channel_type;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setChannelType(QString* channel_type) {
|
|
|
|
this->channel_type = channel_type;
|
2018-02-12 17:20:27 +00:00
|
|
|
this->m_channel_type_isSet = true;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGChannelSettings::getTx() {
|
|
|
|
return tx;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setTx(qint32 tx) {
|
|
|
|
this->tx = tx;
|
2018-02-12 17:20:27 +00:00
|
|
|
this->m_tx_isSet = true;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
2019-03-25 00:15:27 +00:00
|
|
|
qint32
|
|
|
|
SWGChannelSettings::getOriginatorDeviceSetIndex() {
|
|
|
|
return originator_device_set_index;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setOriginatorDeviceSetIndex(qint32 originator_device_set_index) {
|
|
|
|
this->originator_device_set_index = originator_device_set_index;
|
|
|
|
this->m_originator_device_set_index_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGChannelSettings::getOriginatorChannelIndex() {
|
|
|
|
return originator_channel_index;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setOriginatorChannelIndex(qint32 originator_channel_index) {
|
|
|
|
this->originator_channel_index = originator_channel_index;
|
|
|
|
this->m_originator_channel_index_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-03-21 22:49:16 +00:00
|
|
|
SWGAMDemodSettings*
|
|
|
|
SWGChannelSettings::getAmDemodSettings() {
|
|
|
|
return am_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setAmDemodSettings(SWGAMDemodSettings* am_demod_settings) {
|
|
|
|
this->am_demod_settings = am_demod_settings;
|
|
|
|
this->m_am_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-04-05 22:54:18 +00:00
|
|
|
SWGAMModSettings*
|
|
|
|
SWGChannelSettings::getAmModSettings() {
|
|
|
|
return am_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setAmModSettings(SWGAMModSettings* am_mod_settings) {
|
|
|
|
this->am_mod_settings = am_mod_settings;
|
|
|
|
this->m_am_mod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-04-14 22:52:39 +00:00
|
|
|
SWGATVModSettings*
|
|
|
|
SWGChannelSettings::getAtvModSettings() {
|
|
|
|
return atv_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setAtvModSettings(SWGATVModSettings* atv_mod_settings) {
|
|
|
|
this->atv_mod_settings = atv_mod_settings;
|
|
|
|
this->m_atv_mod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-23 12:56:29 +00:00
|
|
|
SWGBFMDemodSettings*
|
|
|
|
SWGChannelSettings::getBfmDemodSettings() {
|
|
|
|
return bfm_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setBfmDemodSettings(SWGBFMDemodSettings* bfm_demod_settings) {
|
|
|
|
this->bfm_demod_settings = bfm_demod_settings;
|
|
|
|
this->m_bfm_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-24 10:17:29 +00:00
|
|
|
SWGDSDDemodSettings*
|
|
|
|
SWGChannelSettings::getDsdDemodSettings() {
|
|
|
|
return dsd_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setDsdDemodSettings(SWGDSDDemodSettings* dsd_demod_settings) {
|
|
|
|
this->dsd_demod_settings = dsd_demod_settings;
|
|
|
|
this->m_dsd_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-02-25 01:06:15 +00:00
|
|
|
SWGFreeDVDemodSettings*
|
|
|
|
SWGChannelSettings::getFreeDvDemodSettings() {
|
|
|
|
return free_dv_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setFreeDvDemodSettings(SWGFreeDVDemodSettings* free_dv_demod_settings) {
|
|
|
|
this->free_dv_demod_settings = free_dv_demod_settings;
|
|
|
|
this->m_free_dv_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-02-22 06:17:27 +00:00
|
|
|
SWGFreeDVModSettings*
|
|
|
|
SWGChannelSettings::getFreeDvModSettings() {
|
|
|
|
return free_dv_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setFreeDvModSettings(SWGFreeDVModSettings* free_dv_mod_settings) {
|
|
|
|
this->free_dv_mod_settings = free_dv_mod_settings;
|
|
|
|
this->m_free_dv_mod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-05-03 23:55:58 +00:00
|
|
|
SWGFreqTrackerSettings*
|
|
|
|
SWGChannelSettings::getFreqTrackerSettings() {
|
|
|
|
return freq_tracker_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setFreqTrackerSettings(SWGFreqTrackerSettings* freq_tracker_settings) {
|
|
|
|
this->freq_tracker_settings = freq_tracker_settings;
|
|
|
|
this->m_freq_tracker_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
SWGNFMDemodSettings*
|
|
|
|
SWGChannelSettings::getNfmDemodSettings() {
|
|
|
|
return nfm_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setNfmDemodSettings(SWGNFMDemodSettings* nfm_demod_settings) {
|
|
|
|
this->nfm_demod_settings = nfm_demod_settings;
|
2018-02-12 17:20:27 +00:00
|
|
|
this->m_nfm_demod_settings_isSet = true;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SWGNFMModSettings*
|
|
|
|
SWGChannelSettings::getNfmModSettings() {
|
|
|
|
return nfm_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setNfmModSettings(SWGNFMModSettings* nfm_mod_settings) {
|
|
|
|
this->nfm_mod_settings = nfm_mod_settings;
|
2018-02-12 17:20:27 +00:00
|
|
|
this->m_nfm_mod_settings_isSet = true;
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|
2019-05-02 02:02:40 +00:00
|
|
|
SWGLocalSinkSettings*
|
|
|
|
SWGChannelSettings::getLocalSinkSettings() {
|
|
|
|
return local_sink_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setLocalSinkSettings(SWGLocalSinkSettings* local_sink_settings) {
|
|
|
|
this->local_sink_settings = local_sink_settings;
|
|
|
|
this->m_local_sink_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-01-22 22:39:12 +00:00
|
|
|
SWGRemoteSinkSettings*
|
|
|
|
SWGChannelSettings::getRemoteSinkSettings() {
|
|
|
|
return remote_sink_settings;
|
2018-08-23 14:06:47 +00:00
|
|
|
}
|
|
|
|
void
|
2019-01-22 22:39:12 +00:00
|
|
|
SWGChannelSettings::setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings) {
|
|
|
|
this->remote_sink_settings = remote_sink_settings;
|
|
|
|
this->m_remote_sink_settings_isSet = true;
|
2018-08-23 14:06:47 +00:00
|
|
|
}
|
|
|
|
|
2019-01-22 23:44:13 +00:00
|
|
|
SWGRemoteSourceSettings*
|
|
|
|
SWGChannelSettings::getRemoteSourceSettings() {
|
|
|
|
return remote_source_settings;
|
2018-08-29 23:56:53 +00:00
|
|
|
}
|
|
|
|
void
|
2019-01-22 23:44:13 +00:00
|
|
|
SWGChannelSettings::setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings) {
|
|
|
|
this->remote_source_settings = remote_source_settings;
|
|
|
|
this->m_remote_source_settings_isSet = true;
|
2018-08-29 23:56:53 +00:00
|
|
|
}
|
|
|
|
|
2018-04-12 21:49:29 +00:00
|
|
|
SWGSSBModSettings*
|
|
|
|
SWGChannelSettings::getSsbModSettings() {
|
|
|
|
return ssb_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setSsbModSettings(SWGSSBModSettings* ssb_mod_settings) {
|
|
|
|
this->ssb_mod_settings = ssb_mod_settings;
|
|
|
|
this->m_ssb_mod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-05-26 13:53:22 +00:00
|
|
|
SWGSSBDemodSettings*
|
|
|
|
SWGChannelSettings::getSsbDemodSettings() {
|
|
|
|
return ssb_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setSsbDemodSettings(SWGSSBDemodSettings* ssb_demod_settings) {
|
|
|
|
this->ssb_demod_settings = ssb_demod_settings;
|
|
|
|
this->m_ssb_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-09-11 21:22:59 +00:00
|
|
|
SWGUDPSourceSettings*
|
|
|
|
SWGChannelSettings::getUdpSourceSettings() {
|
|
|
|
return udp_source_settings;
|
2018-04-15 16:25:22 +00:00
|
|
|
}
|
|
|
|
void
|
2018-09-11 21:22:59 +00:00
|
|
|
SWGChannelSettings::setUdpSourceSettings(SWGUDPSourceSettings* udp_source_settings) {
|
|
|
|
this->udp_source_settings = udp_source_settings;
|
|
|
|
this->m_udp_source_settings_isSet = true;
|
2018-04-15 16:25:22 +00:00
|
|
|
}
|
|
|
|
|
2018-09-11 22:36:30 +00:00
|
|
|
SWGUDPSinkSettings*
|
|
|
|
SWGChannelSettings::getUdpSinkSettings() {
|
|
|
|
return udp_sink_settings;
|
2018-05-25 08:45:40 +00:00
|
|
|
}
|
|
|
|
void
|
2018-09-11 22:36:30 +00:00
|
|
|
SWGChannelSettings::setUdpSinkSettings(SWGUDPSinkSettings* udp_sink_settings) {
|
|
|
|
this->udp_sink_settings = udp_sink_settings;
|
|
|
|
this->m_udp_sink_settings_isSet = true;
|
2018-05-25 08:45:40 +00:00
|
|
|
}
|
|
|
|
|
2018-05-25 08:08:47 +00:00
|
|
|
SWGWFMDemodSettings*
|
|
|
|
SWGChannelSettings::getWfmDemodSettings() {
|
|
|
|
return wfm_demod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setWfmDemodSettings(SWGWFMDemodSettings* wfm_demod_settings) {
|
|
|
|
this->wfm_demod_settings = wfm_demod_settings;
|
|
|
|
this->m_wfm_demod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-04-08 22:37:17 +00:00
|
|
|
SWGWFMModSettings*
|
|
|
|
SWGChannelSettings::getWfmModSettings() {
|
|
|
|
return wfm_mod_settings;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGChannelSettings::setWfmModSettings(SWGWFMModSettings* wfm_mod_settings) {
|
|
|
|
this->wfm_mod_settings = wfm_mod_settings;
|
|
|
|
this->m_wfm_mod_settings_isSet = true;
|
|
|
|
}
|
|
|
|
|
2017-12-10 19:27:08 +00:00
|
|
|
|
2018-02-12 17:20:27 +00:00
|
|
|
bool
|
|
|
|
SWGChannelSettings::isSet(){
|
|
|
|
bool isObjectUpdated = false;
|
|
|
|
do{
|
|
|
|
if(channel_type != nullptr && *channel_type != QString("")){ isObjectUpdated = true; break;}
|
|
|
|
if(m_tx_isSet){ isObjectUpdated = true; break;}
|
2019-03-25 00:15:27 +00:00
|
|
|
if(m_originator_device_set_index_isSet){ isObjectUpdated = true; break;}
|
|
|
|
if(m_originator_channel_index_isSet){ isObjectUpdated = true; break;}
|
2018-03-21 22:49:16 +00:00
|
|
|
if(am_demod_settings != nullptr && am_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-04-05 22:54:18 +00:00
|
|
|
if(am_mod_settings != nullptr && am_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-04-14 22:52:39 +00:00
|
|
|
if(atv_mod_settings != nullptr && atv_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-23 12:56:29 +00:00
|
|
|
if(bfm_demod_settings != nullptr && bfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-24 10:17:29 +00:00
|
|
|
if(dsd_demod_settings != nullptr && dsd_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-02-25 01:06:15 +00:00
|
|
|
if(free_dv_demod_settings != nullptr && free_dv_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-02-22 06:17:27 +00:00
|
|
|
if(free_dv_mod_settings != nullptr && free_dv_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-05-03 23:55:58 +00:00
|
|
|
if(freq_tracker_settings != nullptr && freq_tracker_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-02-12 17:20:27 +00:00
|
|
|
if(nfm_demod_settings != nullptr && nfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
|
|
|
if(nfm_mod_settings != nullptr && nfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-05-02 02:02:40 +00:00
|
|
|
if(local_sink_settings != nullptr && local_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-01-22 22:39:12 +00:00
|
|
|
if(remote_sink_settings != nullptr && remote_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
2019-01-22 23:44:13 +00:00
|
|
|
if(remote_source_settings != nullptr && remote_source_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-04-12 21:49:29 +00:00
|
|
|
if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-26 13:53:22 +00:00
|
|
|
if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-09-11 21:22:59 +00:00
|
|
|
if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-09-11 22:36:30 +00:00
|
|
|
if(udp_sink_settings != nullptr && udp_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-05-25 08:08:47 +00:00
|
|
|
if(wfm_demod_settings != nullptr && wfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-04-08 22:37:17 +00:00
|
|
|
if(wfm_mod_settings != nullptr && wfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
2018-02-12 17:20:27 +00:00
|
|
|
}while(false);
|
|
|
|
return isObjectUpdated;
|
|
|
|
}
|
2017-12-10 19:27:08 +00:00
|
|
|
}
|
|
|
|
|