Removed obsolete fields of Preset class

This commit is contained in:
f4exb 2019-07-31 23:33:22 +02:00
parent 1e4f9c16d4
commit fbdb72ceb4
8 changed files with 2 additions and 124 deletions

View File

@ -4408,15 +4408,6 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "boolean"
},
"sourceId" : {
"type" : "string"
},
"sourceSerial" : {
"type" : "string"
},
"sourceSequence" : {
"type" : "integer"
},
"channelConfigs" : {
"type" : "array",
"items" : {
@ -26969,7 +26960,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-07-31T22:51:22.964+02:00
Generated 2019-07-31T23:30:54.359+02:00
</div>
</div>
</div>

View File

@ -43,12 +43,6 @@ Preset:
iqImbalanceCorrection:
description: boolean
type: integer
sourceId:
type: string
sourceSerial:
type: string
sourceSequence:
type: integer
channelConfigs:
type: array
items:

View File

@ -17,10 +17,8 @@ void Preset::resetToDefaults()
m_spectrumConfig.clear();
m_layout.clear();
m_channelConfigs.clear();
m_sourceId.clear();
m_dcOffsetCorrection = false;
m_iqImbalanceCorrection = false;
m_sourceSequence = 0;
}
QByteArray Preset::serialize() const

View File

@ -113,11 +113,6 @@ protected:
bool m_dcOffsetCorrection;
bool m_iqImbalanceCorrection;
// sample source and sample source configuration TODO: obsolete?
QString m_sourceId;
QString m_sourceSerial;
int m_sourceSequence;
// channels and configurations
ChannelConfigs m_channelConfigs;

View File

@ -43,12 +43,6 @@ Preset:
iqImbalanceCorrection:
description: boolean
type: integer
sourceId:
type: string
sourceSerial:
type: string
sourceSequence:
type: integer
channelConfigs:
type: array
items:

View File

@ -4408,15 +4408,6 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "boolean"
},
"sourceId" : {
"type" : "string"
},
"sourceSerial" : {
"type" : "string"
},
"sourceSequence" : {
"type" : "integer"
},
"channelConfigs" : {
"type" : "array",
"items" : {
@ -26969,7 +26960,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2019-07-31T22:51:22.964+02:00
Generated 2019-07-31T23:30:54.359+02:00
</div>
</div>
</div>

View File

@ -42,12 +42,6 @@ SWGPreset::SWGPreset() {
m_dc_offset_correction_isSet = false;
iq_imbalance_correction = 0;
m_iq_imbalance_correction_isSet = false;
source_id = nullptr;
m_source_id_isSet = false;
source_serial = nullptr;
m_source_serial_isSet = false;
source_sequence = 0;
m_source_sequence_isSet = false;
channel_configs = nullptr;
m_channel_configs_isSet = false;
device_configs = nullptr;
@ -76,12 +70,6 @@ SWGPreset::init() {
m_dc_offset_correction_isSet = false;
iq_imbalance_correction = 0;
m_iq_imbalance_correction_isSet = false;
source_id = new QString("");
m_source_id_isSet = false;
source_serial = new QString("");
m_source_serial_isSet = false;
source_sequence = 0;
m_source_sequence_isSet = false;
channel_configs = new QList<SWGChannelConfig*>();
m_channel_configs_isSet = false;
device_configs = new QList<SWGDeviceConfig*>();
@ -105,13 +93,6 @@ SWGPreset::cleanup() {
}
if(source_id != nullptr) {
delete source_id;
}
if(source_serial != nullptr) {
delete source_serial;
}
if(channel_configs != nullptr) {
auto arr = channel_configs;
for(auto o: *arr) {
@ -156,12 +137,6 @@ SWGPreset::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&iq_imbalance_correction, pJson["iqImbalanceCorrection"], "qint32", "");
::SWGSDRangel::setValue(&source_id, pJson["sourceId"], "QString", "QString");
::SWGSDRangel::setValue(&source_serial, pJson["sourceSerial"], "QString", "QString");
::SWGSDRangel::setValue(&source_sequence, pJson["sourceSequence"], "qint32", "");
::SWGSDRangel::setValue(&channel_configs, pJson["channelConfigs"], "QList", "SWGChannelConfig");
@ -205,15 +180,6 @@ SWGPreset::asJsonObject() {
if(m_iq_imbalance_correction_isSet){
obj->insert("iqImbalanceCorrection", QJsonValue(iq_imbalance_correction));
}
if(source_id != nullptr && *source_id != QString("")){
toJsonValue(QString("sourceId"), source_id, obj, QString("QString"));
}
if(source_serial != nullptr && *source_serial != QString("")){
toJsonValue(QString("sourceSerial"), source_serial, obj, QString("QString"));
}
if(m_source_sequence_isSet){
obj->insert("sourceSequence", QJsonValue(source_sequence));
}
if(channel_configs->size() > 0){
toJsonArray((QList<void*>*)channel_configs, obj, "channelConfigs", "SWGChannelConfig");
}
@ -297,36 +263,6 @@ SWGPreset::setIqImbalanceCorrection(qint32 iq_imbalance_correction) {
this->m_iq_imbalance_correction_isSet = true;
}
QString*
SWGPreset::getSourceId() {
return source_id;
}
void
SWGPreset::setSourceId(QString* source_id) {
this->source_id = source_id;
this->m_source_id_isSet = true;
}
QString*
SWGPreset::getSourceSerial() {
return source_serial;
}
void
SWGPreset::setSourceSerial(QString* source_serial) {
this->source_serial = source_serial;
this->m_source_serial_isSet = true;
}
qint32
SWGPreset::getSourceSequence() {
return source_sequence;
}
void
SWGPreset::setSourceSequence(qint32 source_sequence) {
this->source_sequence = source_sequence;
this->m_source_sequence_isSet = true;
}
QList<SWGChannelConfig*>*
SWGPreset::getChannelConfigs() {
return channel_configs;
@ -369,9 +305,6 @@ SWGPreset::isSet(){
if(m_spectrum_config != nullptr && m_spectrum_config->isSet()){ isObjectUpdated = true; break;}
if(m_dc_offset_correction_isSet){ isObjectUpdated = true; break;}
if(m_iq_imbalance_correction_isSet){ isObjectUpdated = true; break;}
if(source_id != nullptr && *source_id != QString("")){ isObjectUpdated = true; break;}
if(source_serial != nullptr && *source_serial != QString("")){ isObjectUpdated = true; break;}
if(m_source_sequence_isSet){ isObjectUpdated = true; break;}
if(channel_configs->size() > 0){ isObjectUpdated = true; break;}
if(device_configs->size() > 0){ isObjectUpdated = true; break;}
if(layout != nullptr && *layout != QString("")){ isObjectUpdated = true; break;}

View File

@ -67,15 +67,6 @@ public:
qint32 getIqImbalanceCorrection();
void setIqImbalanceCorrection(qint32 iq_imbalance_correction);
QString* getSourceId();
void setSourceId(QString* source_id);
QString* getSourceSerial();
void setSourceSerial(QString* source_serial);
qint32 getSourceSequence();
void setSourceSequence(qint32 source_sequence);
QList<SWGChannelConfig*>* getChannelConfigs();
void setChannelConfigs(QList<SWGChannelConfig*>* channel_configs);
@ -110,15 +101,6 @@ private:
qint32 iq_imbalance_correction;
bool m_iq_imbalance_correction_isSet;
QString* source_id;
bool m_source_id_isSet;
QString* source_serial;
bool m_source_serial_isSet;
qint32 source_sequence;
bool m_source_sequence_isSet;
QList<SWGChannelConfig*>* channel_configs;
bool m_channel_configs_isSet;