mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-10 18:43:28 -05:00
Add scanState to FreqScanner Report
This commit is contained in:
parent
092efb3780
commit
c1d55b9af1
@ -7278,6 +7278,10 @@ margin-bottom: 20px;
|
||||
"channelSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"scanState" : {
|
||||
"type" : "integer",
|
||||
"description" : "(IDLE=0, START_SCAN=1, SCANNING=2, WAIT_FOR_END_TX=3, WAIT_FOR_RETRANSMISSION=4)"
|
||||
},
|
||||
"channelState" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
@ -59115,7 +59119,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-06-21T10:02:32.986+02:00
|
||||
Generated 2024-06-21T11:03:53.536+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,6 +59,9 @@ FreqScannerReport:
|
||||
properties:
|
||||
channelSampleRate:
|
||||
type: integer
|
||||
scanState:
|
||||
description: (IDLE=0, START_SCAN=1, SCANNING=2, WAIT_FOR_END_TX=3, WAIT_FOR_RETRANSMISSION=4)
|
||||
type: integer
|
||||
channelState:
|
||||
type: array
|
||||
items:
|
||||
|
@ -59,6 +59,9 @@ FreqScannerReport:
|
||||
properties:
|
||||
channelSampleRate:
|
||||
type: integer
|
||||
scanState:
|
||||
description: (IDLE=0, START_SCAN=1, SCANNING=2, WAIT_FOR_END_TX=3, WAIT_FOR_RETRANSMISSION=4)
|
||||
type: integer
|
||||
channelState:
|
||||
type: array
|
||||
items:
|
||||
|
@ -7278,6 +7278,10 @@ margin-bottom: 20px;
|
||||
"channelSampleRate" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"scanState" : {
|
||||
"type" : "integer",
|
||||
"description" : "(IDLE=0, START_SCAN=1, SCANNING=2, WAIT_FOR_END_TX=3, WAIT_FOR_RETRANSMISSION=4)"
|
||||
},
|
||||
"channelState" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
@ -59115,7 +59119,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-06-21T10:02:32.986+02:00
|
||||
Generated 2024-06-21T11:03:53.536+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,6 +30,8 @@ SWGFreqScannerReport::SWGFreqScannerReport(QString* json) {
|
||||
SWGFreqScannerReport::SWGFreqScannerReport() {
|
||||
channel_sample_rate = 0;
|
||||
m_channel_sample_rate_isSet = false;
|
||||
scan_state = 0;
|
||||
m_scan_state_isSet = false;
|
||||
channel_state = nullptr;
|
||||
m_channel_state_isSet = false;
|
||||
}
|
||||
@ -42,6 +44,8 @@ void
|
||||
SWGFreqScannerReport::init() {
|
||||
channel_sample_rate = 0;
|
||||
m_channel_sample_rate_isSet = false;
|
||||
scan_state = 0;
|
||||
m_scan_state_isSet = false;
|
||||
channel_state = new QList<SWGFreqScannerChannelState*>();
|
||||
m_channel_state_isSet = false;
|
||||
}
|
||||
@ -49,6 +53,7 @@ SWGFreqScannerReport::init() {
|
||||
void
|
||||
SWGFreqScannerReport::cleanup() {
|
||||
|
||||
|
||||
if(channel_state != nullptr) {
|
||||
auto arr = channel_state;
|
||||
for(auto o: *arr) {
|
||||
@ -71,6 +76,8 @@ void
|
||||
SWGFreqScannerReport::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&scan_state, pJson["scanState"], "qint32", "");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&channel_state, pJson["channelState"], "QList", "SWGFreqScannerChannelState");
|
||||
}
|
||||
@ -92,6 +99,9 @@ SWGFreqScannerReport::asJsonObject() {
|
||||
if(m_channel_sample_rate_isSet){
|
||||
obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
|
||||
}
|
||||
if(m_scan_state_isSet){
|
||||
obj->insert("scanState", QJsonValue(scan_state));
|
||||
}
|
||||
if(channel_state && channel_state->size() > 0){
|
||||
toJsonArray((QList<void*>*)channel_state, obj, "channelState", "SWGFreqScannerChannelState");
|
||||
}
|
||||
@ -109,6 +119,16 @@ SWGFreqScannerReport::setChannelSampleRate(qint32 channel_sample_rate) {
|
||||
this->m_channel_sample_rate_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGFreqScannerReport::getScanState() {
|
||||
return scan_state;
|
||||
}
|
||||
void
|
||||
SWGFreqScannerReport::setScanState(qint32 scan_state) {
|
||||
this->scan_state = scan_state;
|
||||
this->m_scan_state_isSet = true;
|
||||
}
|
||||
|
||||
QList<SWGFreqScannerChannelState*>*
|
||||
SWGFreqScannerReport::getChannelState() {
|
||||
return channel_state;
|
||||
@ -127,6 +147,9 @@ SWGFreqScannerReport::isSet(){
|
||||
if(m_channel_sample_rate_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_scan_state_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(channel_state && (channel_state->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -46,6 +46,9 @@ public:
|
||||
qint32 getChannelSampleRate();
|
||||
void setChannelSampleRate(qint32 channel_sample_rate);
|
||||
|
||||
qint32 getScanState();
|
||||
void setScanState(qint32 scan_state);
|
||||
|
||||
QList<SWGFreqScannerChannelState*>* getChannelState();
|
||||
void setChannelState(QList<SWGFreqScannerChannelState*>* channel_state);
|
||||
|
||||
@ -56,6 +59,9 @@ private:
|
||||
qint32 channel_sample_rate;
|
||||
bool m_channel_sample_rate_isSet;
|
||||
|
||||
qint32 scan_state;
|
||||
bool m_scan_state_isSet;
|
||||
|
||||
QList<SWGFreqScannerChannelState*>* channel_state;
|
||||
bool m_channel_state_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user