mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04:00
DaemonSource: pass device center frequency and baseband sample rate in the report
This commit is contained in:
parent
67f523e629
commit
b75eb08a91
@ -451,5 +451,7 @@ void DaemonSrc::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons
|
|||||||
response.getDaemonSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks);
|
response.getDaemonSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks);
|
||||||
response.getDaemonSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency);
|
response.getDaemonSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency);
|
||||||
response.getDaemonSourceReport()->setSampleRate(m_currentMeta.m_sampleRate);
|
response.getDaemonSourceReport()->setSampleRate(m_currentMeta.m_sampleRate);
|
||||||
|
response.getDaemonSourceReport()->setDeviceCenterFreq(m_deviceAPI->getSampleSink()->getCenterFrequency()/1000);
|
||||||
|
response.getDaemonSourceReport()->setDeviceSampleRate(m_deviceAPI->getSampleSink()->getSampleRate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1742,6 +1742,14 @@ margin-bottom: 20px;
|
|||||||
"sampleRate" : {
|
"sampleRate" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "Stream nominal sample rate in S/s"
|
"description" : "Stream nominal sample rate in S/s"
|
||||||
|
},
|
||||||
|
"deviceCenterFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device center frequency in kHz"
|
||||||
|
},
|
||||||
|
"deviceSampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device baseband sample rate in S/s"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Daemon channel source report"
|
"description" : "Daemon channel source report"
|
||||||
@ -28716,7 +28724,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-09-04T20:03:50.896+02:00
|
Generated 2018-09-06T20:10:22.329+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,4 +48,10 @@ DaemonSourceReport:
|
|||||||
sampleRate:
|
sampleRate:
|
||||||
description: "Stream nominal sample rate in S/s"
|
description: "Stream nominal sample rate in S/s"
|
||||||
type: integer
|
type: integer
|
||||||
|
deviceCenterFreq:
|
||||||
|
description: "Device center frequency in kHz"
|
||||||
|
type: integer
|
||||||
|
deviceSampleRate:
|
||||||
|
description: "Device baseband sample rate in S/s"
|
||||||
|
type: integer
|
||||||
|
|
@ -48,4 +48,10 @@ DaemonSourceReport:
|
|||||||
sampleRate:
|
sampleRate:
|
||||||
description: "Stream nominal sample rate in S/s"
|
description: "Stream nominal sample rate in S/s"
|
||||||
type: integer
|
type: integer
|
||||||
|
deviceCenterFreq:
|
||||||
|
description: "Device center frequency in kHz"
|
||||||
|
type: integer
|
||||||
|
deviceSampleRate:
|
||||||
|
description: "Device baseband sample rate in S/s"
|
||||||
|
type: integer
|
||||||
|
|
@ -1742,6 +1742,14 @@ margin-bottom: 20px;
|
|||||||
"sampleRate" : {
|
"sampleRate" : {
|
||||||
"type" : "integer",
|
"type" : "integer",
|
||||||
"description" : "Stream nominal sample rate in S/s"
|
"description" : "Stream nominal sample rate in S/s"
|
||||||
|
},
|
||||||
|
"deviceCenterFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device center frequency in kHz"
|
||||||
|
},
|
||||||
|
"deviceSampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device baseband sample rate in S/s"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Daemon channel source report"
|
"description" : "Daemon channel source report"
|
||||||
@ -28716,7 +28724,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-09-04T20:03:50.896+02:00
|
Generated 2018-09-06T20:10:22.329+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,6 +50,10 @@ SWGDaemonSourceReport::SWGDaemonSourceReport() {
|
|||||||
m_center_freq_isSet = false;
|
m_center_freq_isSet = false;
|
||||||
sample_rate = 0;
|
sample_rate = 0;
|
||||||
m_sample_rate_isSet = false;
|
m_sample_rate_isSet = false;
|
||||||
|
device_center_freq = 0;
|
||||||
|
m_device_center_freq_isSet = false;
|
||||||
|
device_sample_rate = 0;
|
||||||
|
m_device_sample_rate_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport::~SWGDaemonSourceReport() {
|
SWGDaemonSourceReport::~SWGDaemonSourceReport() {
|
||||||
@ -80,6 +84,10 @@ SWGDaemonSourceReport::init() {
|
|||||||
m_center_freq_isSet = false;
|
m_center_freq_isSet = false;
|
||||||
sample_rate = 0;
|
sample_rate = 0;
|
||||||
m_sample_rate_isSet = false;
|
m_sample_rate_isSet = false;
|
||||||
|
device_center_freq = 0;
|
||||||
|
m_device_center_freq_isSet = false;
|
||||||
|
device_sample_rate = 0;
|
||||||
|
m_device_sample_rate_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -95,6 +103,8 @@ SWGDaemonSourceReport::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport*
|
SWGDaemonSourceReport*
|
||||||
@ -130,6 +140,10 @@ SWGDaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&device_center_freq, pJson["deviceCenterFreq"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&device_sample_rate, pJson["deviceSampleRate"], "qint32", "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -179,6 +193,12 @@ SWGDaemonSourceReport::asJsonObject() {
|
|||||||
if(m_sample_rate_isSet){
|
if(m_sample_rate_isSet){
|
||||||
obj->insert("sampleRate", QJsonValue(sample_rate));
|
obj->insert("sampleRate", QJsonValue(sample_rate));
|
||||||
}
|
}
|
||||||
|
if(m_device_center_freq_isSet){
|
||||||
|
obj->insert("deviceCenterFreq", QJsonValue(device_center_freq));
|
||||||
|
}
|
||||||
|
if(m_device_sample_rate_isSet){
|
||||||
|
obj->insert("deviceSampleRate", QJsonValue(device_sample_rate));
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -293,6 +313,26 @@ SWGDaemonSourceReport::setSampleRate(qint32 sample_rate) {
|
|||||||
this->m_sample_rate_isSet = true;
|
this->m_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGDaemonSourceReport::getDeviceCenterFreq() {
|
||||||
|
return device_center_freq;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGDaemonSourceReport::setDeviceCenterFreq(qint32 device_center_freq) {
|
||||||
|
this->device_center_freq = device_center_freq;
|
||||||
|
this->m_device_center_freq_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGDaemonSourceReport::getDeviceSampleRate() {
|
||||||
|
return device_sample_rate;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGDaemonSourceReport::setDeviceSampleRate(qint32 device_sample_rate) {
|
||||||
|
this->device_sample_rate = device_sample_rate;
|
||||||
|
this->m_device_sample_rate_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGDaemonSourceReport::isSet(){
|
SWGDaemonSourceReport::isSet(){
|
||||||
@ -309,6 +349,8 @@ SWGDaemonSourceReport::isSet(){
|
|||||||
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_center_freq_isSet){ isObjectUpdated = true; break;}
|
if(m_center_freq_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_device_center_freq_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(m_device_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||||
}while(false);
|
}while(false);
|
||||||
return isObjectUpdated;
|
return isObjectUpdated;
|
||||||
}
|
}
|
||||||
|
@ -74,6 +74,12 @@ public:
|
|||||||
qint32 getSampleRate();
|
qint32 getSampleRate();
|
||||||
void setSampleRate(qint32 sample_rate);
|
void setSampleRate(qint32 sample_rate);
|
||||||
|
|
||||||
|
qint32 getDeviceCenterFreq();
|
||||||
|
void setDeviceCenterFreq(qint32 device_center_freq);
|
||||||
|
|
||||||
|
qint32 getDeviceSampleRate();
|
||||||
|
void setDeviceSampleRate(qint32 device_sample_rate);
|
||||||
|
|
||||||
|
|
||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
@ -111,6 +117,12 @@ private:
|
|||||||
qint32 sample_rate;
|
qint32 sample_rate;
|
||||||
bool m_sample_rate_isSet;
|
bool m_sample_rate_isSet;
|
||||||
|
|
||||||
|
qint32 device_center_freq;
|
||||||
|
bool m_device_center_freq_isSet;
|
||||||
|
|
||||||
|
qint32 device_sample_rate;
|
||||||
|
bool m_device_sample_rate_isSet;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user