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

AFC: REST API: added tracker adjustment period: generated code

This commit is contained in:
f4exb 2020-10-27 06:19:13 +01:00
parent d5fa8f45c1
commit 8462090038
5 changed files with 42 additions and 2 deletions

View File

@ -747,6 +747,10 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"format" : "int64" "format" : "int64"
}, },
"trackerAdjustPeriod" : {
"type" : "integer",
"description" : "Tracker channel frequency adjustment period in seconds"
},
"useReverseAPI" : { "useReverseAPI" : {
"type" : "integer", "type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)" "description" : "Synchronize with reverse API (1 for yes, 0 for no)"
@ -40048,7 +40052,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2020-10-27T06:01:09.347+01:00 Generated 2020-10-27T06:18:18.403+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -31,6 +31,9 @@ AFCSettings:
descritpion: Frequency shift tolerance before tracker frequency is (re)adjusted descritpion: Frequency shift tolerance before tracker frequency is (re)adjusted
type: integer type: integer
format: int64 format: int64
trackerAdjustPeriod:
description: Tracker channel frequency adjustment period in seconds
type: integer
useReverseAPI: useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no) description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer type: integer

View File

@ -747,6 +747,10 @@ margin-bottom: 20px;
"type" : "integer", "type" : "integer",
"format" : "int64" "format" : "int64"
}, },
"trackerAdjustPeriod" : {
"type" : "integer",
"description" : "Tracker channel frequency adjustment period in seconds"
},
"useReverseAPI" : { "useReverseAPI" : {
"type" : "integer", "type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)" "description" : "Synchronize with reverse API (1 for yes, 0 for no)"
@ -40048,7 +40052,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2020-10-27T06:01:09.347+01:00 Generated 2020-10-27T06:18:18.403+01:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -44,6 +44,8 @@ SWGAFCSettings::SWGAFCSettings() {
m_target_frequency_isSet = false; m_target_frequency_isSet = false;
freq_tolerance = 0L; freq_tolerance = 0L;
m_freq_tolerance_isSet = false; m_freq_tolerance_isSet = false;
tracker_adjust_period = 0;
m_tracker_adjust_period_isSet = false;
use_reverse_api = 0; use_reverse_api = 0;
m_use_reverse_api_isSet = false; m_use_reverse_api_isSet = false;
reverse_api_address = nullptr; reverse_api_address = nullptr;
@ -78,6 +80,8 @@ SWGAFCSettings::init() {
m_target_frequency_isSet = false; m_target_frequency_isSet = false;
freq_tolerance = 0L; freq_tolerance = 0L;
m_freq_tolerance_isSet = false; m_freq_tolerance_isSet = false;
tracker_adjust_period = 0;
m_tracker_adjust_period_isSet = false;
use_reverse_api = 0; use_reverse_api = 0;
m_use_reverse_api_isSet = false; m_use_reverse_api_isSet = false;
reverse_api_address = new QString(""); reverse_api_address = new QString("");
@ -103,6 +107,7 @@ SWGAFCSettings::cleanup() {
if(reverse_api_address != nullptr) { if(reverse_api_address != nullptr) {
delete reverse_api_address; delete reverse_api_address;
} }
@ -138,6 +143,8 @@ SWGAFCSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&freq_tolerance, pJson["freqTolerance"], "qint64", ""); ::SWGSDRangel::setValue(&freq_tolerance, pJson["freqTolerance"], "qint64", "");
::SWGSDRangel::setValue(&tracker_adjust_period, pJson["trackerAdjustPeriod"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", ""); ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString"); ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
@ -188,6 +195,9 @@ SWGAFCSettings::asJsonObject() {
if(m_freq_tolerance_isSet){ if(m_freq_tolerance_isSet){
obj->insert("freqTolerance", QJsonValue(freq_tolerance)); obj->insert("freqTolerance", QJsonValue(freq_tolerance));
} }
if(m_tracker_adjust_period_isSet){
obj->insert("trackerAdjustPeriod", QJsonValue(tracker_adjust_period));
}
if(m_use_reverse_api_isSet){ if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api)); obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
} }
@ -287,6 +297,16 @@ SWGAFCSettings::setFreqTolerance(qint64 freq_tolerance) {
this->m_freq_tolerance_isSet = true; this->m_freq_tolerance_isSet = true;
} }
qint32
SWGAFCSettings::getTrackerAdjustPeriod() {
return tracker_adjust_period;
}
void
SWGAFCSettings::setTrackerAdjustPeriod(qint32 tracker_adjust_period) {
this->tracker_adjust_period = tracker_adjust_period;
this->m_tracker_adjust_period_isSet = true;
}
qint32 qint32
SWGAFCSettings::getUseReverseApi() { SWGAFCSettings::getUseReverseApi() {
return use_reverse_api; return use_reverse_api;
@ -366,6 +386,9 @@ SWGAFCSettings::isSet(){
if(m_freq_tolerance_isSet){ if(m_freq_tolerance_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }
if(m_tracker_adjust_period_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){ if(m_use_reverse_api_isSet){
isObjectUpdated = true; break; isObjectUpdated = true; break;
} }

View File

@ -66,6 +66,9 @@ public:
qint64 getFreqTolerance(); qint64 getFreqTolerance();
void setFreqTolerance(qint64 freq_tolerance); void setFreqTolerance(qint64 freq_tolerance);
qint32 getTrackerAdjustPeriod();
void setTrackerAdjustPeriod(qint32 tracker_adjust_period);
qint32 getUseReverseApi(); qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api); void setUseReverseApi(qint32 use_reverse_api);
@ -109,6 +112,9 @@ private:
qint64 freq_tolerance; qint64 freq_tolerance;
bool m_freq_tolerance_isSet; bool m_freq_tolerance_isSet;
qint32 tracker_adjust_period;
bool m_tracker_adjust_period_isSet;
qint32 use_reverse_api; qint32 use_reverse_api;
bool m_use_reverse_api_isSet; bool m_use_reverse_api_isSet;