mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
SigMF file sink: updated API with new record size log2
This commit is contained in:
parent
e97ea32f3b
commit
ef2fbb844e
@ -363,6 +363,9 @@ void SigMFFileSink::applySettings(const SigMFFileSinkSettings& settings, bool fo
|
||||
if ((settings.m_squelchRecordingEnable != m_settings.m_squelchRecordingEnable) || force) {
|
||||
reverseAPIKeys.append("squelchRecordingEnable");
|
||||
}
|
||||
if ((settings.m_log2RecordSampleSize != m_settings.m_log2RecordSampleSize) || force) {
|
||||
reverseAPIKeys.append("log2RecordSampleSize");
|
||||
}
|
||||
|
||||
if (m_settings.m_streamIndex != settings.m_streamIndex)
|
||||
{
|
||||
@ -570,6 +573,9 @@ void SigMFFileSink::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("squelchRecordingEnable")) {
|
||||
settings.m_squelchRecordingEnable = response.getSigMfFileSinkSettings()->getSquelchRecordingEnable() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("log2RecordSampleSize")) {
|
||||
settings.m_log2RecordSampleSize = response.getSigMfFileSinkSettings()->getLog2RecordSampleSize();
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getSigMfFileSinkSettings()->getStreamIndex();
|
||||
}
|
||||
@ -626,6 +632,7 @@ void SigMFFileSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings&
|
||||
response.getSigMfFileSinkSettings()->setPreRecordTime(settings.m_preRecordTime);
|
||||
response.getSigMfFileSinkSettings()->setSquelchPostRecordTime(settings.m_squelchPostRecordTime);
|
||||
response.getSigMfFileSinkSettings()->setSquelchRecordingEnable(settings.m_squelchRecordingEnable ? 1 : 0);
|
||||
response.getSigMfFileSinkSettings()->setLog2RecordSampleSize(settings.m_log2RecordSampleSize);
|
||||
response.getSigMfFileSinkSettings()->setStreamIndex(settings.m_streamIndex);
|
||||
response.getSigMfFileSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
@ -794,6 +801,9 @@ void SigMFFileSink::webapiFormatChannelSettings(
|
||||
if (channelSettingsKeys.contains("squelchRecordingEnable")) {
|
||||
swgSigMFFileSinkSettings->setSquelchRecordingEnable(settings.m_squelchRecordingEnable ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("log2RecordSampleSize")) {
|
||||
swgSigMFFileSinkSettings->setLog2RecordSampleSize(settings.m_log2RecordSampleSize);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
swgSigMFFileSinkSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
|
@ -14562,6 +14562,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Automatic recording triggered by spectrum squalch * 0 - disabled * 1 - enabled\n"
|
||||
},
|
||||
"log2RecordSampleSize" : {
|
||||
"type" : "integer",
|
||||
"description" : "log2 of recording sample (I or Q) size in bits. Can be 3, 4 or 5."
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -58773,7 +58777,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-03-03T22:27:13.533+01:00
|
||||
Generated 2024-03-04T22:20:15.730+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,6 +34,9 @@ SigMFFileSinkSettings:
|
||||
Automatic recording triggered by spectrum squalch
|
||||
* 0 - disabled
|
||||
* 1 - enabled
|
||||
log2RecordSampleSize:
|
||||
type: integer
|
||||
description: log2 of recording sample (I or Q) size in bits. Can be 3, 4 or 5.
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
|
@ -34,6 +34,9 @@ SigMFFileSinkSettings:
|
||||
Automatic recording triggered by spectrum squalch
|
||||
* 0 - disabled
|
||||
* 1 - enabled
|
||||
log2RecordSampleSize:
|
||||
type: integer
|
||||
description: log2 of recording sample (I or Q) size in bits. Can be 3, 4 or 5.
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
|
@ -14562,6 +14562,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "Automatic recording triggered by spectrum squalch * 0 - disabled * 1 - enabled\n"
|
||||
},
|
||||
"log2RecordSampleSize" : {
|
||||
"type" : "integer",
|
||||
"description" : "log2 of recording sample (I or Q) size in bits. Can be 3, 4 or 5."
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -58773,7 +58777,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2024-03-03T22:27:13.533+01:00
|
||||
Generated 2024-03-04T22:20:15.730+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -48,6 +48,8 @@ SWGSigMFFileSinkSettings::SWGSigMFFileSinkSettings() {
|
||||
m_squelch_post_record_time_isSet = false;
|
||||
squelch_recording_enable = 0;
|
||||
m_squelch_recording_enable_isSet = false;
|
||||
log2_record_sample_size = 0;
|
||||
m_log2_record_sample_size_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -94,6 +96,8 @@ SWGSigMFFileSinkSettings::init() {
|
||||
m_squelch_post_record_time_isSet = false;
|
||||
squelch_recording_enable = 0;
|
||||
m_squelch_recording_enable_isSet = false;
|
||||
log2_record_sample_size = 0;
|
||||
m_log2_record_sample_size_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -132,6 +136,7 @@ SWGSigMFFileSinkSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
if(reverse_api_address != nullptr) {
|
||||
delete reverse_api_address;
|
||||
}
|
||||
@ -180,6 +185,8 @@ SWGSigMFFileSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&squelch_recording_enable, pJson["squelchRecordingEnable"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&log2_record_sample_size, pJson["log2RecordSampleSize"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||
@ -244,6 +251,9 @@ SWGSigMFFileSinkSettings::asJsonObject() {
|
||||
if(m_squelch_recording_enable_isSet){
|
||||
obj->insert("squelchRecordingEnable", QJsonValue(squelch_recording_enable));
|
||||
}
|
||||
if(m_log2_record_sample_size_isSet){
|
||||
obj->insert("log2RecordSampleSize", QJsonValue(log2_record_sample_size));
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||
}
|
||||
@ -375,6 +385,16 @@ SWGSigMFFileSinkSettings::setSquelchRecordingEnable(qint32 squelch_recording_ena
|
||||
this->m_squelch_recording_enable_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSigMFFileSinkSettings::getLog2RecordSampleSize() {
|
||||
return log2_record_sample_size;
|
||||
}
|
||||
void
|
||||
SWGSigMFFileSinkSettings::setLog2RecordSampleSize(qint32 log2_record_sample_size) {
|
||||
this->log2_record_sample_size = log2_record_sample_size;
|
||||
this->m_log2_record_sample_size_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGSigMFFileSinkSettings::getStreamIndex() {
|
||||
return stream_index;
|
||||
@ -500,6 +520,9 @@ SWGSigMFFileSinkSettings::isSet(){
|
||||
if(m_squelch_recording_enable_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_log2_record_sample_size_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -75,6 +75,9 @@ public:
|
||||
qint32 getSquelchRecordingEnable();
|
||||
void setSquelchRecordingEnable(qint32 squelch_recording_enable);
|
||||
|
||||
qint32 getLog2RecordSampleSize();
|
||||
void setLog2RecordSampleSize(qint32 log2_record_sample_size);
|
||||
|
||||
qint32 getStreamIndex();
|
||||
void setStreamIndex(qint32 stream_index);
|
||||
|
||||
@ -136,6 +139,9 @@ private:
|
||||
qint32 squelch_recording_enable;
|
||||
bool m_squelch_recording_enable_isSet;
|
||||
|
||||
qint32 log2_record_sample_size;
|
||||
bool m_log2_record_sample_size_isSet;
|
||||
|
||||
qint32 stream_index;
|
||||
bool m_stream_index_isSet;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user