2018-04-15 12:25:22 -04:00
|
|
|
/**
|
|
|
|
* SDRangel
|
2020-10-02 17:45:28 -04: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, 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 ---
|
2018-04-15 12:25:22 -04:00
|
|
|
*
|
2020-08-09 00:46:27 -04:00
|
|
|
* OpenAPI spec version: 4.15.0
|
2018-04-15 12:25:22 -04: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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2018-09-11 17:22:59 -04:00
|
|
|
#include "SWGUDPSourceSettings.h"
|
2018-04-15 12:25:22 -04:00
|
|
|
|
|
|
|
#include "SWGHelpers.h"
|
|
|
|
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonArray>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
namespace SWGSDRangel {
|
|
|
|
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::SWGUDPSourceSettings(QString* json) {
|
2018-04-15 12:25:22 -04:00
|
|
|
init();
|
|
|
|
this->fromJson(*json);
|
|
|
|
}
|
|
|
|
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::SWGUDPSourceSettings() {
|
2018-04-15 12:25:22 -04:00
|
|
|
sample_format = 0;
|
|
|
|
m_sample_format_isSet = false;
|
|
|
|
input_sample_rate = 0.0f;
|
|
|
|
m_input_sample_rate_isSet = false;
|
|
|
|
input_frequency_offset = 0L;
|
|
|
|
m_input_frequency_offset_isSet = false;
|
|
|
|
rf_bandwidth = 0.0f;
|
|
|
|
m_rf_bandwidth_isSet = false;
|
|
|
|
low_cutoff = 0.0f;
|
|
|
|
m_low_cutoff_isSet = false;
|
|
|
|
fm_deviation = 0;
|
|
|
|
m_fm_deviation_isSet = false;
|
|
|
|
am_mod_factor = 0.0f;
|
|
|
|
m_am_mod_factor_isSet = false;
|
|
|
|
channel_mute = 0;
|
|
|
|
m_channel_mute_isSet = false;
|
|
|
|
gain_in = 0.0f;
|
|
|
|
m_gain_in_isSet = false;
|
|
|
|
gain_out = 0.0f;
|
|
|
|
m_gain_out_isSet = false;
|
|
|
|
squelch = 0.0f;
|
|
|
|
m_squelch_isSet = false;
|
|
|
|
squelch_gate = 0.0f;
|
|
|
|
m_squelch_gate_isSet = false;
|
|
|
|
squelch_enabled = 0;
|
|
|
|
m_squelch_enabled_isSet = false;
|
|
|
|
auto_rw_balance = 0;
|
|
|
|
m_auto_rw_balance_isSet = false;
|
|
|
|
stereo_input = 0;
|
|
|
|
m_stereo_input_isSet = false;
|
|
|
|
rgb_color = 0;
|
|
|
|
m_rgb_color_isSet = false;
|
|
|
|
udp_address = nullptr;
|
|
|
|
m_udp_address_isSet = false;
|
|
|
|
udp_port = 0;
|
|
|
|
m_udp_port_isSet = false;
|
2020-08-24 18:15:54 -04:00
|
|
|
multicast_address = nullptr;
|
|
|
|
m_multicast_address_isSet = false;
|
|
|
|
multicast_join = 0;
|
|
|
|
m_multicast_join_isSet = false;
|
2018-04-15 12:25:22 -04:00
|
|
|
title = nullptr;
|
|
|
|
m_title_isSet = false;
|
2019-09-22 14:26:09 -04:00
|
|
|
stream_index = 0;
|
|
|
|
m_stream_index_isSet = false;
|
2018-12-21 11:10:55 -05:00
|
|
|
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;
|
2018-04-15 12:25:22 -04:00
|
|
|
}
|
|
|
|
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::~SWGUDPSourceSettings() {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->cleanup();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::init() {
|
2018-04-15 12:25:22 -04:00
|
|
|
sample_format = 0;
|
|
|
|
m_sample_format_isSet = false;
|
|
|
|
input_sample_rate = 0.0f;
|
|
|
|
m_input_sample_rate_isSet = false;
|
|
|
|
input_frequency_offset = 0L;
|
|
|
|
m_input_frequency_offset_isSet = false;
|
|
|
|
rf_bandwidth = 0.0f;
|
|
|
|
m_rf_bandwidth_isSet = false;
|
|
|
|
low_cutoff = 0.0f;
|
|
|
|
m_low_cutoff_isSet = false;
|
|
|
|
fm_deviation = 0;
|
|
|
|
m_fm_deviation_isSet = false;
|
|
|
|
am_mod_factor = 0.0f;
|
|
|
|
m_am_mod_factor_isSet = false;
|
|
|
|
channel_mute = 0;
|
|
|
|
m_channel_mute_isSet = false;
|
|
|
|
gain_in = 0.0f;
|
|
|
|
m_gain_in_isSet = false;
|
|
|
|
gain_out = 0.0f;
|
|
|
|
m_gain_out_isSet = false;
|
|
|
|
squelch = 0.0f;
|
|
|
|
m_squelch_isSet = false;
|
|
|
|
squelch_gate = 0.0f;
|
|
|
|
m_squelch_gate_isSet = false;
|
|
|
|
squelch_enabled = 0;
|
|
|
|
m_squelch_enabled_isSet = false;
|
|
|
|
auto_rw_balance = 0;
|
|
|
|
m_auto_rw_balance_isSet = false;
|
|
|
|
stereo_input = 0;
|
|
|
|
m_stereo_input_isSet = false;
|
|
|
|
rgb_color = 0;
|
|
|
|
m_rgb_color_isSet = false;
|
|
|
|
udp_address = new QString("");
|
|
|
|
m_udp_address_isSet = false;
|
|
|
|
udp_port = 0;
|
|
|
|
m_udp_port_isSet = false;
|
2020-08-24 18:15:54 -04:00
|
|
|
multicast_address = new QString("");
|
|
|
|
m_multicast_address_isSet = false;
|
|
|
|
multicast_join = 0;
|
|
|
|
m_multicast_join_isSet = false;
|
2018-04-15 12:25:22 -04:00
|
|
|
title = new QString("");
|
|
|
|
m_title_isSet = false;
|
2019-09-22 14:26:09 -04:00
|
|
|
stream_index = 0;
|
|
|
|
m_stream_index_isSet = false;
|
2018-12-21 11:10:55 -05:00
|
|
|
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;
|
2018-04-15 12:25:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::cleanup() {
|
2018-04-15 12:25:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(udp_address != nullptr) {
|
|
|
|
delete udp_address;
|
|
|
|
}
|
|
|
|
|
2020-08-24 18:15:54 -04:00
|
|
|
if(multicast_address != nullptr) {
|
|
|
|
delete multicast_address;
|
|
|
|
}
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
if(title != nullptr) {
|
|
|
|
delete title;
|
|
|
|
}
|
2018-12-21 11:10:55 -05:00
|
|
|
|
2019-09-22 14:26:09 -04:00
|
|
|
|
2018-12-21 11:10:55 -05:00
|
|
|
if(reverse_api_address != nullptr) {
|
|
|
|
delete reverse_api_address;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
}
|
|
|
|
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings*
|
|
|
|
SWGUDPSourceSettings::fromJson(QString &json) {
|
2018-04-15 12:25:22 -04:00
|
|
|
QByteArray array (json.toStdString().c_str());
|
|
|
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
|
|
|
QJsonObject jsonObject = doc.object();
|
|
|
|
this->fromJsonObject(jsonObject);
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
2018-04-15 12:25:22 -04:00
|
|
|
::SWGSDRangel::setValue(&sample_format, pJson["sampleFormat"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&input_sample_rate, pJson["inputSampleRate"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&input_frequency_offset, pJson["inputFrequencyOffset"], "qint64", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&rf_bandwidth, pJson["rfBandwidth"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&low_cutoff, pJson["lowCutoff"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&fm_deviation, pJson["fmDeviation"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&am_mod_factor, pJson["amModFactor"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&channel_mute, pJson["channelMute"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&gain_in, pJson["gainIn"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&gain_out, pJson["gainOut"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&squelch, pJson["squelch"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&squelch_gate, pJson["squelchGate"], "float", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&squelch_enabled, pJson["squelchEnabled"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&auto_rw_balance, pJson["autoRWBalance"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&stereo_input, pJson["stereoInput"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&udp_address, pJson["udpAddress"], "QString", "QString");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", "");
|
|
|
|
|
2020-08-24 18:15:54 -04:00
|
|
|
::SWGSDRangel::setValue(&multicast_address, pJson["multicastAddress"], "QString", "QString");
|
|
|
|
|
|
|
|
::SWGSDRangel::setValue(&multicast_join, pJson["multicastJoin"], "qint32", "");
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
|
|
|
|
2019-09-22 14:26:09 -04:00
|
|
|
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
|
|
|
|
2018-12-21 11:10:55 -05:00
|
|
|
::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", "");
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
QString
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::asJson ()
|
2018-04-15 12:25:22 -04:00
|
|
|
{
|
|
|
|
QJsonObject* obj = this->asJsonObject();
|
|
|
|
|
|
|
|
QJsonDocument doc(*obj);
|
|
|
|
QByteArray bytes = doc.toJson();
|
|
|
|
delete obj;
|
|
|
|
return QString(bytes);
|
|
|
|
}
|
|
|
|
|
|
|
|
QJsonObject*
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::asJsonObject() {
|
2018-04-15 12:25:22 -04:00
|
|
|
QJsonObject* obj = new QJsonObject();
|
|
|
|
if(m_sample_format_isSet){
|
|
|
|
obj->insert("sampleFormat", QJsonValue(sample_format));
|
|
|
|
}
|
|
|
|
if(m_input_sample_rate_isSet){
|
|
|
|
obj->insert("inputSampleRate", QJsonValue(input_sample_rate));
|
|
|
|
}
|
|
|
|
if(m_input_frequency_offset_isSet){
|
|
|
|
obj->insert("inputFrequencyOffset", QJsonValue(input_frequency_offset));
|
|
|
|
}
|
|
|
|
if(m_rf_bandwidth_isSet){
|
|
|
|
obj->insert("rfBandwidth", QJsonValue(rf_bandwidth));
|
|
|
|
}
|
|
|
|
if(m_low_cutoff_isSet){
|
|
|
|
obj->insert("lowCutoff", QJsonValue(low_cutoff));
|
|
|
|
}
|
|
|
|
if(m_fm_deviation_isSet){
|
|
|
|
obj->insert("fmDeviation", QJsonValue(fm_deviation));
|
|
|
|
}
|
|
|
|
if(m_am_mod_factor_isSet){
|
|
|
|
obj->insert("amModFactor", QJsonValue(am_mod_factor));
|
|
|
|
}
|
|
|
|
if(m_channel_mute_isSet){
|
|
|
|
obj->insert("channelMute", QJsonValue(channel_mute));
|
|
|
|
}
|
|
|
|
if(m_gain_in_isSet){
|
|
|
|
obj->insert("gainIn", QJsonValue(gain_in));
|
|
|
|
}
|
|
|
|
if(m_gain_out_isSet){
|
|
|
|
obj->insert("gainOut", QJsonValue(gain_out));
|
|
|
|
}
|
|
|
|
if(m_squelch_isSet){
|
|
|
|
obj->insert("squelch", QJsonValue(squelch));
|
|
|
|
}
|
|
|
|
if(m_squelch_gate_isSet){
|
|
|
|
obj->insert("squelchGate", QJsonValue(squelch_gate));
|
|
|
|
}
|
|
|
|
if(m_squelch_enabled_isSet){
|
|
|
|
obj->insert("squelchEnabled", QJsonValue(squelch_enabled));
|
|
|
|
}
|
|
|
|
if(m_auto_rw_balance_isSet){
|
|
|
|
obj->insert("autoRWBalance", QJsonValue(auto_rw_balance));
|
|
|
|
}
|
|
|
|
if(m_stereo_input_isSet){
|
|
|
|
obj->insert("stereoInput", QJsonValue(stereo_input));
|
|
|
|
}
|
|
|
|
if(m_rgb_color_isSet){
|
|
|
|
obj->insert("rgbColor", QJsonValue(rgb_color));
|
|
|
|
}
|
|
|
|
if(udp_address != nullptr && *udp_address != QString("")){
|
|
|
|
toJsonValue(QString("udpAddress"), udp_address, obj, QString("QString"));
|
|
|
|
}
|
|
|
|
if(m_udp_port_isSet){
|
|
|
|
obj->insert("udpPort", QJsonValue(udp_port));
|
|
|
|
}
|
2020-08-24 18:15:54 -04:00
|
|
|
if(multicast_address != nullptr && *multicast_address != QString("")){
|
|
|
|
toJsonValue(QString("multicastAddress"), multicast_address, obj, QString("QString"));
|
|
|
|
}
|
|
|
|
if(m_multicast_join_isSet){
|
|
|
|
obj->insert("multicastJoin", QJsonValue(multicast_join));
|
|
|
|
}
|
2018-04-15 12:25:22 -04:00
|
|
|
if(title != nullptr && *title != QString("")){
|
|
|
|
toJsonValue(QString("title"), title, obj, QString("QString"));
|
|
|
|
}
|
2019-09-22 14:26:09 -04:00
|
|
|
if(m_stream_index_isSet){
|
|
|
|
obj->insert("streamIndex", QJsonValue(stream_index));
|
|
|
|
}
|
2018-12-21 11:10:55 -05:00
|
|
|
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));
|
|
|
|
}
|
2018-04-15 12:25:22 -04:00
|
|
|
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getSampleFormat() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return sample_format;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setSampleFormat(qint32 sample_format) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->sample_format = sample_format;
|
|
|
|
this->m_sample_format_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getInputSampleRate() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return input_sample_rate;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setInputSampleRate(float input_sample_rate) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->input_sample_rate = input_sample_rate;
|
|
|
|
this->m_input_sample_rate_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint64
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getInputFrequencyOffset() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return input_frequency_offset;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setInputFrequencyOffset(qint64 input_frequency_offset) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->input_frequency_offset = input_frequency_offset;
|
|
|
|
this->m_input_frequency_offset_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getRfBandwidth() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return rf_bandwidth;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setRfBandwidth(float rf_bandwidth) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->rf_bandwidth = rf_bandwidth;
|
|
|
|
this->m_rf_bandwidth_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getLowCutoff() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return low_cutoff;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setLowCutoff(float low_cutoff) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->low_cutoff = low_cutoff;
|
|
|
|
this->m_low_cutoff_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getFmDeviation() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return fm_deviation;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setFmDeviation(qint32 fm_deviation) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->fm_deviation = fm_deviation;
|
|
|
|
this->m_fm_deviation_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getAmModFactor() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return am_mod_factor;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setAmModFactor(float am_mod_factor) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->am_mod_factor = am_mod_factor;
|
|
|
|
this->m_am_mod_factor_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getChannelMute() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return channel_mute;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setChannelMute(qint32 channel_mute) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->channel_mute = channel_mute;
|
|
|
|
this->m_channel_mute_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getGainIn() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return gain_in;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setGainIn(float gain_in) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->gain_in = gain_in;
|
|
|
|
this->m_gain_in_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getGainOut() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return gain_out;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setGainOut(float gain_out) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->gain_out = gain_out;
|
|
|
|
this->m_gain_out_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getSquelch() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return squelch;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setSquelch(float squelch) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->squelch = squelch;
|
|
|
|
this->m_squelch_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
float
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getSquelchGate() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return squelch_gate;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setSquelchGate(float squelch_gate) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->squelch_gate = squelch_gate;
|
|
|
|
this->m_squelch_gate_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getSquelchEnabled() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return squelch_enabled;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setSquelchEnabled(qint32 squelch_enabled) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->squelch_enabled = squelch_enabled;
|
|
|
|
this->m_squelch_enabled_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getAutoRwBalance() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return auto_rw_balance;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setAutoRwBalance(qint32 auto_rw_balance) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->auto_rw_balance = auto_rw_balance;
|
|
|
|
this->m_auto_rw_balance_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getStereoInput() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return stereo_input;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setStereoInput(qint32 stereo_input) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->stereo_input = stereo_input;
|
|
|
|
this->m_stereo_input_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getRgbColor() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return rgb_color;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setRgbColor(qint32 rgb_color) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->rgb_color = rgb_color;
|
|
|
|
this->m_rgb_color_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getUdpAddress() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return udp_address;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setUdpAddress(QString* udp_address) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->udp_address = udp_address;
|
|
|
|
this->m_udp_address_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getUdpPort() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return udp_port;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setUdpPort(qint32 udp_port) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->udp_port = udp_port;
|
|
|
|
this->m_udp_port_isSet = true;
|
|
|
|
}
|
|
|
|
|
2020-08-24 18:15:54 -04:00
|
|
|
QString*
|
|
|
|
SWGUDPSourceSettings::getMulticastAddress() {
|
|
|
|
return multicast_address;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setMulticastAddress(QString* multicast_address) {
|
|
|
|
this->multicast_address = multicast_address;
|
|
|
|
this->m_multicast_address_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getMulticastJoin() {
|
|
|
|
return multicast_join;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setMulticastJoin(qint32 multicast_join) {
|
|
|
|
this->multicast_join = multicast_join;
|
|
|
|
this->m_multicast_join_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
QString*
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::getTitle() {
|
2018-04-15 12:25:22 -04:00
|
|
|
return title;
|
|
|
|
}
|
|
|
|
void
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::setTitle(QString* title) {
|
2018-04-15 12:25:22 -04:00
|
|
|
this->title = title;
|
|
|
|
this->m_title_isSet = true;
|
|
|
|
}
|
|
|
|
|
2019-09-22 14:26:09 -04:00
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getStreamIndex() {
|
|
|
|
return stream_index;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setStreamIndex(qint32 stream_index) {
|
|
|
|
this->stream_index = stream_index;
|
|
|
|
this->m_stream_index_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-12-21 11:10:55 -05:00
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getUseReverseApi() {
|
|
|
|
return use_reverse_api;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setUseReverseApi(qint32 use_reverse_api) {
|
|
|
|
this->use_reverse_api = use_reverse_api;
|
|
|
|
this->m_use_reverse_api_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString*
|
|
|
|
SWGUDPSourceSettings::getReverseApiAddress() {
|
|
|
|
return reverse_api_address;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setReverseApiAddress(QString* reverse_api_address) {
|
|
|
|
this->reverse_api_address = reverse_api_address;
|
|
|
|
this->m_reverse_api_address_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getReverseApiPort() {
|
|
|
|
return reverse_api_port;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setReverseApiPort(qint32 reverse_api_port) {
|
|
|
|
this->reverse_api_port = reverse_api_port;
|
|
|
|
this->m_reverse_api_port_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getReverseApiDeviceIndex() {
|
|
|
|
return reverse_api_device_index;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
|
|
|
this->reverse_api_device_index = reverse_api_device_index;
|
|
|
|
this->m_reverse_api_device_index_isSet = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
qint32
|
|
|
|
SWGUDPSourceSettings::getReverseApiChannelIndex() {
|
|
|
|
return reverse_api_channel_index;
|
|
|
|
}
|
|
|
|
void
|
|
|
|
SWGUDPSourceSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
|
|
|
this->reverse_api_channel_index = reverse_api_channel_index;
|
|
|
|
this->m_reverse_api_channel_index_isSet = true;
|
|
|
|
}
|
|
|
|
|
2018-04-15 12:25:22 -04:00
|
|
|
|
|
|
|
bool
|
2018-09-11 17:22:59 -04:00
|
|
|
SWGUDPSourceSettings::isSet(){
|
2018-04-15 12:25:22 -04:00
|
|
|
bool isObjectUpdated = false;
|
|
|
|
do{
|
2019-08-03 20:50:32 -04:00
|
|
|
if(m_sample_format_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_input_sample_rate_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_input_frequency_offset_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_rf_bandwidth_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_low_cutoff_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_fm_deviation_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_am_mod_factor_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_channel_mute_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_gain_in_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_gain_out_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_squelch_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_squelch_gate_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_squelch_enabled_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_auto_rw_balance_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_stereo_input_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_rgb_color_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(udp_address && *udp_address != QString("")){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_udp_port_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2020-08-24 18:15:54 -04:00
|
|
|
if(multicast_address && *multicast_address != QString("")){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
|
|
|
if(m_multicast_join_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-08-03 20:50:32 -04:00
|
|
|
if(title && *title != QString("")){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-09-22 14:26:09 -04:00
|
|
|
if(m_stream_index_isSet){
|
|
|
|
isObjectUpdated = true; break;
|
|
|
|
}
|
2019-08-03 20:50:32 -04:00
|
|
|
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;
|
|
|
|
}
|
2018-04-15 12:25:22 -04:00
|
|
|
}while(false);
|
|
|
|
return isObjectUpdated;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|