DATV demod: implemented REST API for channel settings. Implements #825

This commit is contained in:
f4exb 2021-04-02 09:48:37 +02:00
parent 172b93577a
commit 2e96fef6e3
12 changed files with 940 additions and 43 deletions

View File

@ -18,10 +18,17 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QDebug>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include "SWGChannelSettings.h"
#include "SWGDATVDemodSettings.h"
#include "SWGChannelReport.h"
#include "device/deviceapi.h"
#include "datvdemod.h"
#include "maincore.h"
const char* const DATVDemod::m_channelIdURI = "sdrangel.channel.demoddatv";
const char* const DATVDemod::m_channelId = "DATVDemod";
@ -131,3 +138,356 @@ uint32_t DATVDemod::getNumberOfDeviceStreams() const
{
return m_deviceAPI->getNbSourceStreams();
}
int DATVDemod::webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage)
{
(void) errorMessage;
response.setDatvDemodSettings(new SWGSDRangel::SWGDATVDemodSettings());
response.getDatvDemodSettings()->init();
webapiFormatChannelSettings(response, m_settings);
return 200;
}
int DATVDemod::webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage)
{
(void) errorMessage;
DATVDemodSettings settings = m_settings;
webapiUpdateChannelSettings(settings, channelSettingsKeys, response);
MsgConfigureDATVDemod *msg = MsgConfigureDATVDemod::create(settings, force);
m_inputMessageQueue.push(msg);
qDebug("DATVDemod::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgConfigureDATVDemod *msgToGUI = MsgConfigureDATVDemod::create(settings, force);
m_guiMessageQueue->push(msgToGUI);
}
webapiFormatChannelSettings(response, settings);
return 200;
}
void DATVDemod::webapiUpdateChannelSettings(
DATVDemodSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response)
{
if (channelSettingsKeys.contains("rgbColor")) {
settings.m_rgbColor = response.getDatvDemodSettings()->getRgbColor();
}
if (channelSettingsKeys.contains("title")) {
settings.m_title = *response.getDatvDemodSettings()->getTitle();
}
if (channelSettingsKeys.contains("rfBandwidth")) {
settings.m_rfBandwidth = response.getDatvDemodSettings()->getRfBandwidth();
}
if (channelSettingsKeys.contains("centerFrequency")) {
settings.m_centerFrequency = response.getDatvDemodSettings()->getCenterFrequency();
}
if (channelSettingsKeys.contains("standard")) {
settings.m_standard = (DATVDemodSettings::dvb_version) response.getDatvDemodSettings()->getStandard();
}
if (channelSettingsKeys.contains("modulation")) {
settings.m_modulation = (DATVDemodSettings::DATVModulation) response.getDatvDemodSettings()->getModulation();
}
if (channelSettingsKeys.contains("fec")) {
settings.m_fec = (DATVDemodSettings::DATVCodeRate) response.getDatvDemodSettings()->getFec();
}
if (channelSettingsKeys.contains("softLDPC")) {
settings.m_softLDPC = response.getDatvDemodSettings()->getSoftLdpc() == 1;
}
if (channelSettingsKeys.contains("softLDPCToolPath")) {
settings.m_softLDPCToolPath = *response.getDatvDemodSettings()->getSoftLdpcToolPath();
}
if (channelSettingsKeys.contains("softLDPCMaxTrials")) {
settings.m_softLDPCMaxTrials = response.getDatvDemodSettings()->getSoftLdpcMaxTrials();
}
if (channelSettingsKeys.contains("maxBitflips")) {
settings.m_maxBitflips = response.getDatvDemodSettings()->getMaxBitflips();
}
if (channelSettingsKeys.contains("audioMute")) {
settings.m_audioMute = response.getDatvDemodSettings()->getAudioMute() == 1;
}
if (channelSettingsKeys.contains("audioDeviceName")) {
settings.m_audioDeviceName = *response.getDatvDemodSettings()->getAudioDeviceName();
}
if (channelSettingsKeys.contains("symbolRate")) {
settings.m_symbolRate = response.getDatvDemodSettings()->getSymbolRate();
}
if (channelSettingsKeys.contains("notchFilters")) {
settings.m_notchFilters = response.getDatvDemodSettings()->getNotchFilters();
}
if (channelSettingsKeys.contains("allowDrift")) {
settings.m_allowDrift = response.getDatvDemodSettings()->getAllowDrift() == 1;
}
if (channelSettingsKeys.contains("fastLock")) {
settings.m_fastLock = response.getDatvDemodSettings()->getFastLock() == 1;
}
if (channelSettingsKeys.contains("filter")) {
settings.m_filter = (DATVDemodSettings::dvb_sampler) response.getDatvDemodSettings()->getFilter();
}
if (channelSettingsKeys.contains("hardMetric")) {
settings.m_hardMetric = response.getDatvDemodSettings()->getHardMetric() == 1;
}
if (channelSettingsKeys.contains("rollOff")) {
settings.m_rollOff = response.getDatvDemodSettings()->getRollOff();
}
if (channelSettingsKeys.contains("viterbi")) {
settings.m_viterbi = response.getDatvDemodSettings()->getViterbi() == 1;
}
if (channelSettingsKeys.contains("excursion")) {
settings.m_excursion = response.getDatvDemodSettings()->getExcursion();
}
if (channelSettingsKeys.contains("audioVolume")) {
settings.m_audioVolume = response.getDatvDemodSettings()->getAudioVolume();
}
if (channelSettingsKeys.contains("videoMute")) {
settings.m_videoMute = response.getDatvDemodSettings()->getVideoMute() == 1;
}
if (channelSettingsKeys.contains("udpTSAddress")) {
settings.m_udpTSAddress = *response.getDatvDemodSettings()->getUdpTsAddress();
}
if (channelSettingsKeys.contains("udpTSPort")) {
settings.m_udpTSPort = response.getDatvDemodSettings()->getUdpTsPort();
}
if (channelSettingsKeys.contains("udpTS")) {
settings.m_udpTS = response.getDatvDemodSettings()->getUdpTs() == 1;
}
if (channelSettingsKeys.contains("streamIndex")) {
settings.m_streamIndex = response.getDatvDemodSettings()->getStreamIndex();
}
if (channelSettingsKeys.contains("useReverseAPI")) {
settings.m_useReverseAPI = response.getDatvDemodSettings()->getUseReverseApi() != 0;
}
if (channelSettingsKeys.contains("reverseAPIAddress")) {
settings.m_reverseAPIAddress = *response.getDatvDemodSettings()->getReverseApiAddress();
}
if (channelSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getDatvDemodSettings()->getReverseApiPort();
}
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
settings.m_reverseAPIDeviceIndex = response.getDatvDemodSettings()->getReverseApiDeviceIndex();
}
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
settings.m_reverseAPIChannelIndex = response.getDatvDemodSettings()->getReverseApiChannelIndex();
}
}
void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DATVDemodSettings& settings)
{
response.getDatvDemodSettings()->setRgbColor(settings.m_rgbColor);
if (response.getDatvDemodSettings()->getTitle()) {
*response.getDatvDemodSettings()->getTitle() = settings.m_title;
} else {
response.getDatvDemodSettings()->setTitle(new QString(settings.m_title));
}
response.getDatvDemodSettings()->setRfBandwidth(settings.m_rfBandwidth);
response.getDatvDemodSettings()->setCenterFrequency(settings.m_centerFrequency);
response.getDatvDemodSettings()->setStandard((int) settings.m_standard);
response.getDatvDemodSettings()->setModulation((int) settings.m_modulation);
response.getDatvDemodSettings()->setFec((int) settings.m_fec);
response.getDatvDemodSettings()->setSoftLdpc((int) settings.m_softLDPC ? 1 : 0);
if (response.getDatvDemodSettings()->getSoftLdpcToolPath()) {
*response.getDatvDemodSettings()->getSoftLdpcToolPath() = settings.m_softLDPCToolPath;
} else {
response.getDatvDemodSettings()->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath));
}
response.getDatvDemodSettings()->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials);
response.getDatvDemodSettings()->setMaxBitflips(settings.m_maxBitflips);
response.getDatvDemodSettings()->setAudioMute(settings.m_audioMute ? 1 : 0);
if (response.getDatvDemodSettings()->getAudioDeviceName()) {
*response.getDatvDemodSettings()->getAudioDeviceName() = settings.m_audioDeviceName;
} else {
response.getDatvDemodSettings()->setAudioDeviceName(new QString(settings.m_audioDeviceName));
}
response.getDatvDemodSettings()->setSymbolRate(settings.m_symbolRate);
response.getDatvDemodSettings()->setNotchFilters(settings.m_notchFilters);
response.getDatvDemodSettings()->setAllowDrift(settings.m_allowDrift ? 1 : 0);
response.getDatvDemodSettings()->setFastLock(settings.m_fastLock ? 1 : 0);
response.getDatvDemodSettings()->setFilter((int) settings.m_filter);
response.getDatvDemodSettings()->setHardMetric(settings.m_hardMetric ? 1 : 0);
response.getDatvDemodSettings()->setRollOff(settings.m_rollOff);
response.getDatvDemodSettings()->setViterbi(settings.m_viterbi ? 1 : 0);
response.getDatvDemodSettings()->setExcursion(settings.m_excursion);
response.getDatvDemodSettings()->setAudioVolume(settings.m_audioVolume);
response.getDatvDemodSettings()->setVideoMute(settings.m_videoMute ? 1 : 0);
if (response.getDatvDemodSettings()->getUdpTsAddress()) {
*response.getDatvDemodSettings()->getUdpTsAddress() = settings.m_udpTSAddress;
} else {
response.getDatvDemodSettings()->setUdpTsAddress(new QString(settings.m_udpTSAddress));
}
response.getDatvDemodSettings()->setStreamIndex(settings.m_streamIndex);
response.getDatvDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
if (response.getDatvDemodSettings()->getReverseApiAddress()) {
*response.getDatvDemodSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
} else {
response.getDatvDemodSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
}
response.getDatvDemodSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getDatvDemodSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
response.getDatvDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
}
void DATVDemod::sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const DATVDemodSettings& settings,
bool force)
{
QList<MessageQueue*>::iterator it = messageQueues->begin();
for (; it != messageQueues->end(); ++it)
{
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
MainCore::MsgChannelSettings *msg = MainCore::MsgChannelSettings::create(
this,
channelSettingsKeys,
swgChannelSettings,
force
);
(*it)->push(msg);
}
}
void DATVDemod::webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const DATVDemodSettings& settings,
bool force
)
{
swgChannelSettings->setDirection(0); // Single sink (Rx)
swgChannelSettings->setOriginatorChannelIndex(getIndexInDeviceSet());
swgChannelSettings->setOriginatorDeviceSetIndex(getDeviceSetIndex());
swgChannelSettings->setChannelType(new QString("DATVDemod"));
swgChannelSettings->setDatvDemodSettings(new SWGSDRangel::SWGDATVDemodSettings());
SWGSDRangel::SWGDATVDemodSettings *swgDATVDemodSettings = swgChannelSettings->getDatvDemodSettings();
// transfer data that has been modified. When force is on transfer all data except reverse API data
if (channelSettingsKeys.contains("rgbColor") || force) {
swgDATVDemodSettings->setRgbColor(settings.m_rgbColor);
}
if (channelSettingsKeys.contains("title") || force) {
swgDATVDemodSettings->setTitle(new QString(settings.m_title));
}
if (channelSettingsKeys.contains("rfBandwidth") || force) {
swgDATVDemodSettings->setRfBandwidth(settings.m_rfBandwidth);
}
if (channelSettingsKeys.contains("inputFrequencyOffset") || force) {
swgDATVDemodSettings->setCenterFrequency(settings.m_centerFrequency);
}
if (channelSettingsKeys.contains("standard") || force) {
swgDATVDemodSettings->setStandard((int) settings.m_standard);
}
if (channelSettingsKeys.contains("modulation") || force) {
swgDATVDemodSettings->setModulation((int) settings.m_modulation);
}
if (channelSettingsKeys.contains("fec") || force) {
swgDATVDemodSettings->setFec((int) settings.m_fec);
}
if (channelSettingsKeys.contains("softLDPC") || force) {
swgDATVDemodSettings->setSoftLdpc(settings.m_softLDPC ? 1 : 0);
}
if (channelSettingsKeys.contains("softLDPCToolPath") || force) {
swgDATVDemodSettings->setSoftLdpcToolPath(new QString(settings.m_softLDPCToolPath));
}
if (channelSettingsKeys.contains("softLDPCMaxTrials") || force) {
swgDATVDemodSettings->setSoftLdpcMaxTrials(settings.m_softLDPCMaxTrials);
}
if (channelSettingsKeys.contains("maxBitflips") || force) {
swgDATVDemodSettings->setMaxBitflips(settings.m_maxBitflips);
}
if (channelSettingsKeys.contains("audioMute") || force) {
swgDATVDemodSettings->setAudioMute(settings.m_audioMute ? 1 : 0);
}
if (channelSettingsKeys.contains("audioDeviceName") || force) {
swgDATVDemodSettings->setAudioDeviceName(new QString(settings.m_audioDeviceName));
}
if (channelSettingsKeys.contains("symbolRate") || force) {
swgDATVDemodSettings->setSymbolRate(settings.m_symbolRate);
}
if (channelSettingsKeys.contains("notchFilters") || force) {
swgDATVDemodSettings->setNotchFilters(settings.m_notchFilters);
}
if (channelSettingsKeys.contains("allowDrift") || force) {
swgDATVDemodSettings->setAllowDrift(settings.m_allowDrift ? 1 : 0);
}
if (channelSettingsKeys.contains("fastLock") || force) {
swgDATVDemodSettings->setFastLock(settings.m_fastLock ? 1 : 0);
}
if (channelSettingsKeys.contains("filter") || force) {
swgDATVDemodSettings->setFilter((int) settings.m_filter);
}
if (channelSettingsKeys.contains("hardMetric") || force) {
swgDATVDemodSettings->setHardMetric(settings.m_hardMetric ? 1 : 0);
}
if (channelSettingsKeys.contains("rollOff") || force) {
swgDATVDemodSettings->setRollOff(settings.m_rollOff);
}
if (channelSettingsKeys.contains("viterbi") || force) {
swgDATVDemodSettings->setHardMetric(settings.m_viterbi ? 1 : 0);
}
if (channelSettingsKeys.contains("excursion") || force) {
swgDATVDemodSettings->setExcursion(settings.m_excursion);
}
if (channelSettingsKeys.contains("audioVolume") || force) {
swgDATVDemodSettings->setAudioVolume(settings.m_audioVolume);
}
if (channelSettingsKeys.contains("videoMute") || force) {
swgDATVDemodSettings->setVideoMute(settings.m_videoMute ? 1 : 0);
}
if (channelSettingsKeys.contains("udpTSAddress") || force) {
swgDATVDemodSettings->setUdpTsAddress(new QString(settings.m_udpTSAddress));
}
if (channelSettingsKeys.contains("udpTSPort") || force) {
swgDATVDemodSettings->setUdpTsPort(settings.m_udpTSPort);
}
if (channelSettingsKeys.contains("udpTS") || force) {
swgDATVDemodSettings->setUdpTs(settings.m_udpTS ? 1 : 0);
}
if (channelSettingsKeys.contains("streamIndex") || force) {
swgDATVDemodSettings->setStreamIndex(settings.m_streamIndex);
}
}
void DATVDemod::networkManagerFinished(QNetworkReply *reply)
{
QNetworkReply::NetworkError replyError = reply->error();
if (replyError)
{
qWarning() << "DATVDemod::networkManagerFinished:"
<< " error(" << (int) replyError
<< "): " << replyError
<< ": " << reply->errorString();
}
else
{
QString answer = reply->readAll();
answer.chop(1); // remove last \n
qDebug("DATVDemod::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
}
reply->deleteLater();
}

View File

@ -22,6 +22,7 @@
class DeviceAPI;
#include <QNetworkRequest>
#include <QThread>
#include "channel/channelapi.h"
@ -32,6 +33,9 @@ class DeviceAPI;
#include "datvdemodbaseband.h"
class QNetworkAccessManager;
class QNetworkReply;
class DATVDemod : public BasebandSampleSink, public ChannelAPI
{
Q_OBJECT
@ -66,6 +70,25 @@ public:
return m_settings.m_centerFrequency;
}
virtual int webapiSettingsGet(
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response,
QString& errorMessage);
static void webapiFormatChannelSettings(
SWGSDRangel::SWGChannelSettings& response,
const DATVDemodSettings& settings);
static void webapiUpdateChannelSettings(
DATVDemodSettings& settings,
const QStringList& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings& response);
void setMessageQueueToGUI(MessageQueue* queue) override
{
ChannelAPI::setMessageQueueToGUI(queue);
@ -125,6 +148,22 @@ private:
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
void applySettings(const DATVDemodSettings& settings, bool force = false);
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DATVDemodSettings& settings, bool force);
void sendChannelSettings(
QList<MessageQueue*> *messageQueues,
QList<QString>& channelSettingsKeys,
const DATVDemodSettings& settings,
bool force
);
void webapiFormatChannelSettings(
QList<QString>& channelSettingsKeys,
SWGSDRangel::SWGChannelSettings *swgChannelSettings,
const DATVDemodSettings& settings,
bool force
);
private slots:
void networkManagerFinished(QNetworkReply *reply);
};
#endif // INCLUDE_DATVDEMOD_H

View File

@ -92,6 +92,15 @@ bool DATVDemodGUI::handleMessage(const Message& message)
displaySystemConfiguration();
return true;
}
else if (DATVDemod::MsgConfigureDATVDemod::match(message))
{
DATVDemod::MsgConfigureDATVDemod& cfg = (DATVDemod::MsgConfigureDATVDemod&) message;
m_settings = cfg.getSettings();
blockApplySettings(true);
displaySettings();
blockApplySettings(false);
return true;
}
else
{
return false;

View File

@ -699,7 +699,7 @@
</rect>
</property>
<property name="toolTip">
<string>Filter excursion (dB)</string>
<string>RRC filter envelope excursion (dB)</string>
</property>
<property name="minimum">
<number>1</number>

View File

@ -135,7 +135,11 @@ Push this button when you are lost...
- FIR Linear
- FIR Nearest
- RRC (Root Raised Cosine): when selected additional controls for roll-off factor (%) and excursion (dB) are provided.
- RRC (Root Raised Cosine).
When RRC is selected the additional controls for roll-off factor (%) and envelope excursion (dB) are effective. The lower the roll-off factor the steeper the sides of the filter. A higher value of the envelope excursion may help on weak signals.
Practically the RRC filter is mandatory for proper decoding of normal to weak signals. Strong signals may decode in any condition.
<h5>B.2a.12: Amount of data decoded</h5>

View File

@ -25,7 +25,7 @@
<file>webapi/doc/swagger/include/Command.yaml</file>
<file>webapi/doc/swagger/include/CWKeyer.yaml</file>
<file>webapi/doc/swagger/include/DATVDemod.yaml</file>
<file>webapi/doc/swagger/include/DATVMmod.yaml</file>
<file>webapi/doc/swagger/include/DATVMod.yaml</file>
<file>webapi/doc/swagger/include/DSDDemod.yaml</file>
<file>webapi/doc/swagger/include/DeviceActions.yaml</file>
<file>webapi/doc/swagger/include/DeviceSettings.yaml</file>

View File

@ -3346,19 +3346,35 @@ margin-bottom: 20px;
},
"standard" : {
"type" : "integer",
"description" : "see DATVDemodSettings::dvb_version"
"description" : "DVB bersion (see DATVDemodSettings::dvb_version)\n * 0 - DVB-S\n * 1 - DVB-S2\n"
},
"modulation" : {
"type" : "integer",
"description" : "see DATVDemodSettings::DATVModulation"
"description" : "Modulation type (DATVDemodSettings::DATVModulation)\n * 0 - BPSK\n * 1 - QPSK\n * 2 - PSK8\n * 3 - APSK16\n * 4 - APSK32\n * 5 - APSK64E\n * 6 - QAM16\n * 7 - QAM64\n * 8 - QAM256\n"
},
"fec" : {
"type" : "integer",
"description" : "see DATVDemodSettings::DATVCodeRate"
"description" : "FEC rate (see DATVDemodSettings::DATVCodeRate)\n * 0 - 1/2\n * 1 - 2/3\n * 2 - 4/6\n * 3 - 3/4\n * 4 - 4/6\n * 5 - 7/8\n * 6 - 4/5\n * 7 - 8/9\n * 8 - 9/10\n * 9 - 1/4\n * 10 - 1/3\n * 11 - 2/5\n * 12 - 3/5\n"
},
"softLDPC" : {
"type" : "integer",
"description" : "(boolean) engage sodt LDPC with LDPC tool sub processes (Linux only)"
},
"softLDPCToolPath" : {
"type" : "string",
"description" : "O/S path to the LDPC tool binary"
},
"softLDPCMaxTrials" : {
"type" : "integer",
"description" : "maximum number of trials in the soft LDPC algorithm (LDPC tool parameter)"
},
"maxBitflips" : {
"type" : "integer",
"description" : "maximum number of bit flips allowed in hard LDPC algorithm"
},
"audioMute" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) mute audio output"
},
"audioDeviceName" : {
"type" : "string"
@ -3371,27 +3387,28 @@ margin-bottom: 20px;
},
"allowDrift" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) allow a larger frequency drift (DVB-S)"
},
"fastLock" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) faster locking algorithm (DVB-S)"
},
"filter" : {
"type" : "integer",
"description" : "see DATVDemodSettings::dvb_sampler"
"description" : "Type of sumbol filtering (see DATVDemodSettings::dvb_sampler)\n * 0 - Nearest\n * 1 - Linear\n * 2 - Root Raised Cosine\n"
},
"hardMetric" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) (DVB-S)"
},
"rollOff" : {
"type" : "number",
"format" : "float"
"format" : "float",
"description" : "RRC filter roll-off factor (0..1)"
},
"viterbi" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) (DVB-S)"
},
"excursion" : {
"type" : "integer"
@ -3412,6 +3429,26 @@ margin-bottom: 20px;
"udpTS" : {
"type" : "integer",
"description" : "boolean"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "DATVDemod"
@ -45742,7 +45779,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-03-18T18:13:23.857+01:00
Generated 2021-04-01T20:39:21.587+02:00
</div>
</div>
</div>

View File

@ -10,16 +10,55 @@ DATVDemodSettings:
centerFrequency:
type: integer
standard:
description: see DATVDemodSettings::dvb_version
type: integer
description: >
DVB bersion (see DATVDemodSettings::dvb_version)
* 0 - DVB-S
* 1 - DVB-S2
modulation:
description: see DATVDemodSettings::DATVModulation
type: integer
description: >
Modulation type (DATVDemodSettings::DATVModulation)
* 0 - BPSK
* 1 - QPSK
* 2 - PSK8
* 3 - APSK16
* 4 - APSK32
* 5 - APSK64E
* 6 - QAM16
* 7 - QAM64
* 8 - QAM256
fec:
description: see DATVDemodSettings::DATVCodeRate
type: integer
description: >
FEC rate (see DATVDemodSettings::DATVCodeRate)
* 0 - 1/2
* 1 - 2/3
* 2 - 4/6
* 3 - 3/4
* 4 - 4/6
* 5 - 7/8
* 6 - 4/5
* 7 - 8/9
* 8 - 9/10
* 9 - 1/4
* 10 - 1/3
* 11 - 2/5
* 12 - 3/5
softLDPC:
description: (boolean) engage sodt LDPC with LDPC tool sub processes (Linux only)
type: integer
softLDPCToolPath:
description: O/S path to the LDPC tool binary
type: string
softLDPCMaxTrials:
description: maximum number of trials in the soft LDPC algorithm (LDPC tool parameter)
type: integer
maxBitflips:
description: maximum number of bit flips allowed in hard LDPC algorithm
type: integer
audioMute:
description: boolean
description: (boolean) mute audio output
type: integer
audioDeviceName:
type: string
@ -28,22 +67,27 @@ DATVDemodSettings:
notchFilters:
type: integer
allowDrift:
description: boolean
description: (boolean) allow a larger frequency drift (DVB-S)
type: integer
fastLock:
description: boolean
description: (boolean) faster locking algorithm (DVB-S)
type: integer
filter:
description: see DATVDemodSettings::dvb_sampler
description: >
Type of sumbol filtering (see DATVDemodSettings::dvb_sampler)
* 0 - Nearest
* 1 - Linear
* 2 - Root Raised Cosine
type: integer
hardMetric:
description: boolean
description: (boolean) (DVB-S)
type: integer
rollOff:
description: RRC filter roll-off factor (0..1)
type: number
format: float
viterbi:
description: boolean
description: (boolean) (DVB-S)
type: integer
excursion:
type: integer
@ -59,3 +103,17 @@ DATVDemodSettings:
udpTS:
description: boolean
type: integer
streamIndex:
description: MIMO channel. Not relevant when connected to SI (single Rx).
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer

View File

@ -10,16 +10,55 @@ DATVDemodSettings:
centerFrequency:
type: integer
standard:
description: see DATVDemodSettings::dvb_version
type: integer
description: >
DVB bersion (see DATVDemodSettings::dvb_version)
* 0 - DVB-S
* 1 - DVB-S2
modulation:
description: see DATVDemodSettings::DATVModulation
type: integer
description: >
Modulation type (DATVDemodSettings::DATVModulation)
* 0 - BPSK
* 1 - QPSK
* 2 - PSK8
* 3 - APSK16
* 4 - APSK32
* 5 - APSK64E
* 6 - QAM16
* 7 - QAM64
* 8 - QAM256
fec:
description: see DATVDemodSettings::DATVCodeRate
type: integer
description: >
FEC rate (see DATVDemodSettings::DATVCodeRate)
* 0 - 1/2
* 1 - 2/3
* 2 - 4/6
* 3 - 3/4
* 4 - 4/6
* 5 - 7/8
* 6 - 4/5
* 7 - 8/9
* 8 - 9/10
* 9 - 1/4
* 10 - 1/3
* 11 - 2/5
* 12 - 3/5
softLDPC:
description: (boolean) engage sodt LDPC with LDPC tool sub processes (Linux only)
type: integer
softLDPCToolPath:
description: O/S path to the LDPC tool binary
type: string
softLDPCMaxTrials:
description: maximum number of trials in the soft LDPC algorithm (LDPC tool parameter)
type: integer
maxBitflips:
description: maximum number of bit flips allowed in hard LDPC algorithm
type: integer
audioMute:
description: boolean
description: (boolean) mute audio output
type: integer
audioDeviceName:
type: string
@ -28,24 +67,30 @@ DATVDemodSettings:
notchFilters:
type: integer
allowDrift:
description: boolean
description: (boolean) allow a larger frequency drift (DVB-S)
type: integer
fastLock:
description: boolean
description: (boolean) faster locking algorithm (DVB-S)
type: integer
filter:
description: see DATVDemodSettings::dvb_sampler
description: >
Type of sumbol filtering (see DATVDemodSettings::dvb_sampler)
* 0 - Nearest
* 1 - Linear
* 2 - Root Raised Cosine
type: integer
hardMetric:
description: boolean
description: (boolean) (DVB-S)
type: integer
rollOff:
description: RRC filter roll-off factor (0..1)
type: number
format: float
viterbi:
description: boolean
description: (boolean) (DVB-S)
type: integer
excursion:
description: RRC filter envelope excursion (dB)
type: integer
audioVolume:
type: integer
@ -59,3 +104,17 @@ DATVDemodSettings:
udpTS:
description: boolean
type: integer
streamIndex:
description: MIMO channel. Not relevant when connected to SI (single Rx).
type: integer
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
reverseAPIChannelIndex:
type: integer

View File

@ -3346,19 +3346,35 @@ margin-bottom: 20px;
},
"standard" : {
"type" : "integer",
"description" : "see DATVDemodSettings::dvb_version"
"description" : "DVB bersion (see DATVDemodSettings::dvb_version)\n * 0 - DVB-S\n * 1 - DVB-S2\n"
},
"modulation" : {
"type" : "integer",
"description" : "see DATVDemodSettings::DATVModulation"
"description" : "Modulation type (DATVDemodSettings::DATVModulation)\n * 0 - BPSK\n * 1 - QPSK\n * 2 - PSK8\n * 3 - APSK16\n * 4 - APSK32\n * 5 - APSK64E\n * 6 - QAM16\n * 7 - QAM64\n * 8 - QAM256\n"
},
"fec" : {
"type" : "integer",
"description" : "see DATVDemodSettings::DATVCodeRate"
"description" : "FEC rate (see DATVDemodSettings::DATVCodeRate)\n * 0 - 1/2\n * 1 - 2/3\n * 2 - 4/6\n * 3 - 3/4\n * 4 - 4/6\n * 5 - 7/8\n * 6 - 4/5\n * 7 - 8/9\n * 8 - 9/10\n * 9 - 1/4\n * 10 - 1/3\n * 11 - 2/5\n * 12 - 3/5\n"
},
"softLDPC" : {
"type" : "integer",
"description" : "(boolean) engage sodt LDPC with LDPC tool sub processes (Linux only)"
},
"softLDPCToolPath" : {
"type" : "string",
"description" : "O/S path to the LDPC tool binary"
},
"softLDPCMaxTrials" : {
"type" : "integer",
"description" : "maximum number of trials in the soft LDPC algorithm (LDPC tool parameter)"
},
"maxBitflips" : {
"type" : "integer",
"description" : "maximum number of bit flips allowed in hard LDPC algorithm"
},
"audioMute" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) mute audio output"
},
"audioDeviceName" : {
"type" : "string"
@ -3371,27 +3387,28 @@ margin-bottom: 20px;
},
"allowDrift" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) allow a larger frequency drift (DVB-S)"
},
"fastLock" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) faster locking algorithm (DVB-S)"
},
"filter" : {
"type" : "integer",
"description" : "see DATVDemodSettings::dvb_sampler"
"description" : "Type of sumbol filtering (see DATVDemodSettings::dvb_sampler)\n * 0 - Nearest\n * 1 - Linear\n * 2 - Root Raised Cosine\n"
},
"hardMetric" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) (DVB-S)"
},
"rollOff" : {
"type" : "number",
"format" : "float"
"format" : "float",
"description" : "RRC filter roll-off factor (0..1)"
},
"viterbi" : {
"type" : "integer",
"description" : "boolean"
"description" : "(boolean) (DVB-S)"
},
"excursion" : {
"type" : "integer"
@ -3412,6 +3429,26 @@ margin-bottom: 20px;
"udpTS" : {
"type" : "integer",
"description" : "boolean"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
}
},
"description" : "DATVDemod"
@ -45742,7 +45779,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2021-03-18T18:13:23.857+01:00
Generated 2021-04-01T20:39:21.587+02:00
</div>
</div>
</div>

View File

@ -42,6 +42,14 @@ SWGDATVDemodSettings::SWGDATVDemodSettings() {
m_modulation_isSet = false;
fec = 0;
m_fec_isSet = false;
soft_ldpc = 0;
m_soft_ldpc_isSet = false;
soft_ldpc_tool_path = nullptr;
m_soft_ldpc_tool_path_isSet = false;
soft_ldpc_max_trials = 0;
m_soft_ldpc_max_trials_isSet = false;
max_bitflips = 0;
m_max_bitflips_isSet = false;
audio_mute = 0;
m_audio_mute_isSet = false;
audio_device_name = nullptr;
@ -74,6 +82,18 @@ SWGDATVDemodSettings::SWGDATVDemodSettings() {
m_udp_ts_port_isSet = false;
udp_ts = 0;
m_udp_ts_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
SWGDATVDemodSettings::~SWGDATVDemodSettings() {
@ -96,6 +116,14 @@ SWGDATVDemodSettings::init() {
m_modulation_isSet = false;
fec = 0;
m_fec_isSet = false;
soft_ldpc = 0;
m_soft_ldpc_isSet = false;
soft_ldpc_tool_path = new QString("");
m_soft_ldpc_tool_path_isSet = false;
soft_ldpc_max_trials = 0;
m_soft_ldpc_max_trials_isSet = false;
max_bitflips = 0;
m_max_bitflips_isSet = false;
audio_mute = 0;
m_audio_mute_isSet = false;
audio_device_name = new QString("");
@ -128,6 +156,18 @@ SWGDATVDemodSettings::init() {
m_udp_ts_port_isSet = false;
udp_ts = 0;
m_udp_ts_isSet = false;
stream_index = 0;
m_stream_index_isSet = false;
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
reverse_api_channel_index = 0;
m_reverse_api_channel_index_isSet = false;
}
void
@ -142,6 +182,12 @@ SWGDATVDemodSettings::cleanup() {
if(soft_ldpc_tool_path != nullptr) {
delete soft_ldpc_tool_path;
}
if(audio_device_name != nullptr) {
delete audio_device_name;
}
@ -161,6 +207,14 @@ SWGDATVDemodSettings::cleanup() {
}
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGDATVDemodSettings*
@ -188,6 +242,14 @@ SWGDATVDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&fec, pJson["fec"], "qint32", "");
::SWGSDRangel::setValue(&soft_ldpc, pJson["softLDPC"], "qint32", "");
::SWGSDRangel::setValue(&soft_ldpc_tool_path, pJson["softLDPCToolPath"], "QString", "QString");
::SWGSDRangel::setValue(&soft_ldpc_max_trials, pJson["softLDPCMaxTrials"], "qint32", "");
::SWGSDRangel::setValue(&max_bitflips, pJson["maxBitflips"], "qint32", "");
::SWGSDRangel::setValue(&audio_mute, pJson["audioMute"], "qint32", "");
::SWGSDRangel::setValue(&audio_device_name, pJson["audioDeviceName"], "QString", "QString");
@ -220,6 +282,18 @@ SWGDATVDemodSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&udp_ts, pJson["udpTS"], "qint32", "");
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
}
QString
@ -257,6 +331,18 @@ SWGDATVDemodSettings::asJsonObject() {
if(m_fec_isSet){
obj->insert("fec", QJsonValue(fec));
}
if(m_soft_ldpc_isSet){
obj->insert("softLDPC", QJsonValue(soft_ldpc));
}
if(soft_ldpc_tool_path != nullptr && *soft_ldpc_tool_path != QString("")){
toJsonValue(QString("softLDPCToolPath"), soft_ldpc_tool_path, obj, QString("QString"));
}
if(m_soft_ldpc_max_trials_isSet){
obj->insert("softLDPCMaxTrials", QJsonValue(soft_ldpc_max_trials));
}
if(m_max_bitflips_isSet){
obj->insert("maxBitflips", QJsonValue(max_bitflips));
}
if(m_audio_mute_isSet){
obj->insert("audioMute", QJsonValue(audio_mute));
}
@ -305,6 +391,24 @@ SWGDATVDemodSettings::asJsonObject() {
if(m_udp_ts_isSet){
obj->insert("udpTS", QJsonValue(udp_ts));
}
if(m_stream_index_isSet){
obj->insert("streamIndex", QJsonValue(stream_index));
}
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_device_index_isSet){
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
}
if(m_reverse_api_channel_index_isSet){
obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
}
return obj;
}
@ -379,6 +483,46 @@ SWGDATVDemodSettings::setFec(qint32 fec) {
this->m_fec_isSet = true;
}
qint32
SWGDATVDemodSettings::getSoftLdpc() {
return soft_ldpc;
}
void
SWGDATVDemodSettings::setSoftLdpc(qint32 soft_ldpc) {
this->soft_ldpc = soft_ldpc;
this->m_soft_ldpc_isSet = true;
}
QString*
SWGDATVDemodSettings::getSoftLdpcToolPath() {
return soft_ldpc_tool_path;
}
void
SWGDATVDemodSettings::setSoftLdpcToolPath(QString* soft_ldpc_tool_path) {
this->soft_ldpc_tool_path = soft_ldpc_tool_path;
this->m_soft_ldpc_tool_path_isSet = true;
}
qint32
SWGDATVDemodSettings::getSoftLdpcMaxTrials() {
return soft_ldpc_max_trials;
}
void
SWGDATVDemodSettings::setSoftLdpcMaxTrials(qint32 soft_ldpc_max_trials) {
this->soft_ldpc_max_trials = soft_ldpc_max_trials;
this->m_soft_ldpc_max_trials_isSet = true;
}
qint32
SWGDATVDemodSettings::getMaxBitflips() {
return max_bitflips;
}
void
SWGDATVDemodSettings::setMaxBitflips(qint32 max_bitflips) {
this->max_bitflips = max_bitflips;
this->m_max_bitflips_isSet = true;
}
qint32
SWGDATVDemodSettings::getAudioMute() {
return audio_mute;
@ -539,6 +683,66 @@ SWGDATVDemodSettings::setUdpTs(qint32 udp_ts) {
this->m_udp_ts_isSet = true;
}
qint32
SWGDATVDemodSettings::getStreamIndex() {
return stream_index;
}
void
SWGDATVDemodSettings::setStreamIndex(qint32 stream_index) {
this->stream_index = stream_index;
this->m_stream_index_isSet = true;
}
qint32
SWGDATVDemodSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGDATVDemodSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGDATVDemodSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGDATVDemodSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGDATVDemodSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGDATVDemodSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGDATVDemodSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGDATVDemodSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
qint32
SWGDATVDemodSettings::getReverseApiChannelIndex() {
return reverse_api_channel_index;
}
void
SWGDATVDemodSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
this->reverse_api_channel_index = reverse_api_channel_index;
this->m_reverse_api_channel_index_isSet = true;
}
bool
SWGDATVDemodSettings::isSet(){
@ -565,6 +769,18 @@ SWGDATVDemodSettings::isSet(){
if(m_fec_isSet){
isObjectUpdated = true; break;
}
if(m_soft_ldpc_isSet){
isObjectUpdated = true; break;
}
if(soft_ldpc_tool_path && *soft_ldpc_tool_path != QString("")){
isObjectUpdated = true; break;
}
if(m_soft_ldpc_max_trials_isSet){
isObjectUpdated = true; break;
}
if(m_max_bitflips_isSet){
isObjectUpdated = true; break;
}
if(m_audio_mute_isSet){
isObjectUpdated = true; break;
}
@ -613,6 +829,24 @@ SWGDATVDemodSettings::isSet(){
if(m_udp_ts_isSet){
isObjectUpdated = true; break;
}
if(m_stream_index_isSet){
isObjectUpdated = true; break;
}
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_device_index_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_channel_index_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -63,6 +63,18 @@ public:
qint32 getFec();
void setFec(qint32 fec);
qint32 getSoftLdpc();
void setSoftLdpc(qint32 soft_ldpc);
QString* getSoftLdpcToolPath();
void setSoftLdpcToolPath(QString* soft_ldpc_tool_path);
qint32 getSoftLdpcMaxTrials();
void setSoftLdpcMaxTrials(qint32 soft_ldpc_max_trials);
qint32 getMaxBitflips();
void setMaxBitflips(qint32 max_bitflips);
qint32 getAudioMute();
void setAudioMute(qint32 audio_mute);
@ -111,6 +123,24 @@ public:
qint32 getUdpTs();
void setUdpTs(qint32 udp_ts);
qint32 getStreamIndex();
void setStreamIndex(qint32 stream_index);
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiDeviceIndex();
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
qint32 getReverseApiChannelIndex();
void setReverseApiChannelIndex(qint32 reverse_api_channel_index);
virtual bool isSet() override;
@ -136,6 +166,18 @@ private:
qint32 fec;
bool m_fec_isSet;
qint32 soft_ldpc;
bool m_soft_ldpc_isSet;
QString* soft_ldpc_tool_path;
bool m_soft_ldpc_tool_path_isSet;
qint32 soft_ldpc_max_trials;
bool m_soft_ldpc_max_trials_isSet;
qint32 max_bitflips;
bool m_max_bitflips_isSet;
qint32 audio_mute;
bool m_audio_mute_isSet;
@ -184,6 +226,24 @@ private:
qint32 udp_ts;
bool m_udp_ts_isSet;
qint32 stream_index;
bool m_stream_index_isSet;
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_device_index;
bool m_reverse_api_device_index_isSet;
qint32 reverse_api_channel_index;
bool m_reverse_api_channel_index_isSet;
};
}