1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-09-05 14:47:50 -04:00

DaemonSrc: added more report data to the report API

This commit is contained in:
f4exb 2018-09-02 19:27:38 +02:00
parent d5f5328ab2
commit b723479197
7 changed files with 174 additions and 4 deletions

View File

@ -447,5 +447,9 @@ void DaemonSrc::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& respons
response.getSdrDaemonChannelSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); response.getSdrDaemonChannelSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount());
response.getSdrDaemonChannelSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); response.getSdrDaemonChannelSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors);
response.getSdrDaemonChannelSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); response.getSdrDaemonChannelSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors);
response.getSdrDaemonChannelSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks);
response.getSdrDaemonChannelSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks);
response.getSdrDaemonChannelSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency);
response.getSdrDaemonChannelSourceReport()->setSampleRate(m_currentMeta.m_sampleRate);
} }

View File

@ -3202,6 +3202,22 @@ margin-bottom: 20px;
"tvUSec" : { "tvUSec" : {
"type" : "integer", "type" : "integer",
"description" : "Counts timestamp microseconds" "description" : "Counts timestamp microseconds"
},
"nbOriginalBlocks" : {
"type" : "integer",
"description" : "Number of original blocks per frame"
},
"nbFECBlocks" : {
"type" : "integer",
"description" : "Number of FEC blocks per frame"
},
"centerFreq" : {
"type" : "integer",
"description" : "Stream center frequency setting in kHz"
},
"sampleRate" : {
"type" : "integer",
"description" : "Stream nominal sample rate in S/s"
} }
}, },
"description" : "SDRDaemon channel source report" "description" : "SDRDaemon channel source report"
@ -28703,7 +28719,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2018-09-01T10:19:35.190+02:00 Generated 2018-09-02T19:22:42.257+02:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -36,3 +36,16 @@ SDRDaemonChannelSourceReport:
tvUSec: tvUSec:
description: "Counts timestamp microseconds" description: "Counts timestamp microseconds"
type: integer type: integer
nbOriginalBlocks:
description: "Number of original blocks per frame"
type: integer
nbFECBlocks:
description: "Number of FEC blocks per frame"
type: integer
centerFreq:
description: "Stream center frequency setting in kHz"
type: integer
sampleRate:
description: "Stream nominal sample rate in S/s"
type: integer

View File

@ -36,3 +36,16 @@ SDRDaemonChannelSourceReport:
tvUSec: tvUSec:
description: "Counts timestamp microseconds" description: "Counts timestamp microseconds"
type: integer type: integer
nbOriginalBlocks:
description: "Number of original blocks per frame"
type: integer
nbFECBlocks:
description: "Number of FEC blocks per frame"
type: integer
centerFreq:
description: "Stream center frequency setting in kHz"
type: integer
sampleRate:
description: "Stream nominal sample rate in S/s"
type: integer

View File

@ -3202,6 +3202,22 @@ margin-bottom: 20px;
"tvUSec" : { "tvUSec" : {
"type" : "integer", "type" : "integer",
"description" : "Counts timestamp microseconds" "description" : "Counts timestamp microseconds"
},
"nbOriginalBlocks" : {
"type" : "integer",
"description" : "Number of original blocks per frame"
},
"nbFECBlocks" : {
"type" : "integer",
"description" : "Number of FEC blocks per frame"
},
"centerFreq" : {
"type" : "integer",
"description" : "Stream center frequency setting in kHz"
},
"sampleRate" : {
"type" : "integer",
"description" : "Stream nominal sample rate in S/s"
} }
}, },
"description" : "SDRDaemon channel source report" "description" : "SDRDaemon channel source report"
@ -28703,7 +28719,7 @@ except ApiException as e:
</div> </div>
<div id="generator"> <div id="generator">
<div class="content"> <div class="content">
Generated 2018-09-01T10:19:35.190+02:00 Generated 2018-09-02T19:22:42.257+02:00
</div> </div>
</div> </div>
</div> </div>

View File

@ -42,6 +42,14 @@ SWGSDRDaemonChannelSourceReport::SWGSDRDaemonChannelSourceReport() {
m_tv_sec_isSet = false; m_tv_sec_isSet = false;
tv_u_sec = 0; tv_u_sec = 0;
m_tv_u_sec_isSet = false; m_tv_u_sec_isSet = false;
nb_original_blocks = 0;
m_nb_original_blocks_isSet = false;
nb_fec_blocks = 0;
m_nb_fec_blocks_isSet = false;
center_freq = 0;
m_center_freq_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
} }
SWGSDRDaemonChannelSourceReport::~SWGSDRDaemonChannelSourceReport() { SWGSDRDaemonChannelSourceReport::~SWGSDRDaemonChannelSourceReport() {
@ -64,6 +72,14 @@ SWGSDRDaemonChannelSourceReport::init() {
m_tv_sec_isSet = false; m_tv_sec_isSet = false;
tv_u_sec = 0; tv_u_sec = 0;
m_tv_u_sec_isSet = false; m_tv_u_sec_isSet = false;
nb_original_blocks = 0;
m_nb_original_blocks_isSet = false;
nb_fec_blocks = 0;
m_nb_fec_blocks_isSet = false;
center_freq = 0;
m_center_freq_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
} }
void void
@ -75,6 +91,10 @@ SWGSDRDaemonChannelSourceReport::cleanup() {
} }
SWGSDRDaemonChannelSourceReport* SWGSDRDaemonChannelSourceReport*
@ -102,6 +122,14 @@ SWGSDRDaemonChannelSourceReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&tv_u_sec, pJson["tvUSec"], "qint32", ""); ::SWGSDRangel::setValue(&tv_u_sec, pJson["tvUSec"], "qint32", "");
::SWGSDRangel::setValue(&nb_original_blocks, pJson["nbOriginalBlocks"], "qint32", "");
::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", "");
::SWGSDRangel::setValue(&center_freq, pJson["centerFreq"], "qint32", "");
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
} }
QString QString
@ -139,6 +167,18 @@ SWGSDRDaemonChannelSourceReport::asJsonObject() {
if(m_tv_u_sec_isSet){ if(m_tv_u_sec_isSet){
obj->insert("tvUSec", QJsonValue(tv_u_sec)); obj->insert("tvUSec", QJsonValue(tv_u_sec));
} }
if(m_nb_original_blocks_isSet){
obj->insert("nbOriginalBlocks", QJsonValue(nb_original_blocks));
}
if(m_nb_fec_blocks_isSet){
obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks));
}
if(m_center_freq_isSet){
obj->insert("centerFreq", QJsonValue(center_freq));
}
if(m_sample_rate_isSet){
obj->insert("sampleRate", QJsonValue(sample_rate));
}
return obj; return obj;
} }
@ -213,6 +253,46 @@ SWGSDRDaemonChannelSourceReport::setTvUSec(qint32 tv_u_sec) {
this->m_tv_u_sec_isSet = true; this->m_tv_u_sec_isSet = true;
} }
qint32
SWGSDRDaemonChannelSourceReport::getNbOriginalBlocks() {
return nb_original_blocks;
}
void
SWGSDRDaemonChannelSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) {
this->nb_original_blocks = nb_original_blocks;
this->m_nb_original_blocks_isSet = true;
}
qint32
SWGSDRDaemonChannelSourceReport::getNbFecBlocks() {
return nb_fec_blocks;
}
void
SWGSDRDaemonChannelSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) {
this->nb_fec_blocks = nb_fec_blocks;
this->m_nb_fec_blocks_isSet = true;
}
qint32
SWGSDRDaemonChannelSourceReport::getCenterFreq() {
return center_freq;
}
void
SWGSDRDaemonChannelSourceReport::setCenterFreq(qint32 center_freq) {
this->center_freq = center_freq;
this->m_center_freq_isSet = true;
}
qint32
SWGSDRDaemonChannelSourceReport::getSampleRate() {
return sample_rate;
}
void
SWGSDRDaemonChannelSourceReport::setSampleRate(qint32 sample_rate) {
this->sample_rate = sample_rate;
this->m_sample_rate_isSet = true;
}
bool bool
SWGSDRDaemonChannelSourceReport::isSet(){ SWGSDRDaemonChannelSourceReport::isSet(){
@ -225,6 +305,10 @@ SWGSDRDaemonChannelSourceReport::isSet(){
if(m_uncorrectable_errors_count_isSet){ isObjectUpdated = true; break;} if(m_uncorrectable_errors_count_isSet){ isObjectUpdated = true; break;}
if(m_tv_sec_isSet){ isObjectUpdated = true; break;} if(m_tv_sec_isSet){ isObjectUpdated = true; break;}
if(m_tv_u_sec_isSet){ isObjectUpdated = true; break;} if(m_tv_u_sec_isSet){ isObjectUpdated = true; break;}
if(m_nb_original_blocks_isSet){ isObjectUpdated = true; break;}
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
if(m_center_freq_isSet){ isObjectUpdated = true; break;}
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
}while(false); }while(false);
return isObjectUpdated; return isObjectUpdated;
} }

View File

@ -62,6 +62,18 @@ public:
qint32 getTvUSec(); qint32 getTvUSec();
void setTvUSec(qint32 tv_u_sec); void setTvUSec(qint32 tv_u_sec);
qint32 getNbOriginalBlocks();
void setNbOriginalBlocks(qint32 nb_original_blocks);
qint32 getNbFecBlocks();
void setNbFecBlocks(qint32 nb_fec_blocks);
qint32 getCenterFreq();
void setCenterFreq(qint32 center_freq);
qint32 getSampleRate();
void setSampleRate(qint32 sample_rate);
virtual bool isSet() override; virtual bool isSet() override;
@ -87,6 +99,18 @@ private:
qint32 tv_u_sec; qint32 tv_u_sec;
bool m_tv_u_sec_isSet; bool m_tv_u_sec_isSet;
qint32 nb_original_blocks;
bool m_nb_original_blocks_isSet;
qint32 nb_fec_blocks;
bool m_nb_fec_blocks_isSet;
qint32 center_freq;
bool m_center_freq_isSet;
qint32 sample_rate;
bool m_sample_rate_isSet;
}; };
} }