mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Compare commits
12 Commits
d7d85f8b05
...
1abbb18a96
Author | SHA1 | Date | |
---|---|---|---|
|
1abbb18a96 | ||
|
9a7337f3d8 | ||
|
689f139698 | ||
|
072b44a4fd | ||
|
072b5ef546 | ||
|
2638ee9a4b | ||
|
608a1e9908 | ||
|
88d1d0abf7 | ||
|
b0c49f3b50 | ||
|
4b1a861717 | ||
|
ed720673f3 | ||
|
69ff3dc648 |
3
.github/workflows/sdrangel.yml
vendored
3
.github/workflows/sdrangel.yml
vendored
@ -4,6 +4,8 @@ name: SDRangel CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
@ -31,7 +33,6 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
lfs: true
|
||||
fetch-depth: 0
|
||||
- name: Print env
|
||||
run: |
|
||||
|
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,3 +1,3 @@
|
||||
[submodule "external/windows"]
|
||||
path = external/windows
|
||||
url = https://github.com/f4exb/sdrangel-windows-libraries-lfs.git
|
||||
url = https://github.com/f4exb/sdrangel-windows-libraries.git
|
||||
|
2
external/windows
vendored
2
external/windows
vendored
@ -1 +1 @@
|
||||
Subproject commit ad7597800190713b04a26e396de561424b42e496
|
||||
Subproject commit f20b21d50f9ef3930f6979759adc5af32f65c92a
|
@ -114,7 +114,7 @@ template<typename T> struct datvconstellation: runnable
|
||||
unsigned long decimation;
|
||||
long pixels_per_frame;
|
||||
cstln_lut<eucl_ss, 256> **cstln; // Optional ptr to optional constellation
|
||||
TVScreen *m_objDATVScreen;
|
||||
TVScreen *m_tvScreen;
|
||||
pipereader<std::complex<T> > in;
|
||||
unsigned long phase;
|
||||
std::vector<int> cstln_rows;
|
||||
@ -126,14 +126,14 @@ template<typename T> struct datvconstellation: runnable
|
||||
T _xymin,
|
||||
T _xymax,
|
||||
const char *_name = nullptr,
|
||||
TVScreen *objDATVScreen = nullptr) :
|
||||
TVScreen *tvScreen = nullptr) :
|
||||
runnable(sch, _name ? _name : _in.name),
|
||||
xymin(_xymin),
|
||||
xymax(_xymax),
|
||||
decimation(DEFAULT_GUI_DECIMATION),
|
||||
pixels_per_frame(1024),
|
||||
cstln(0),
|
||||
m_objDATVScreen(objDATVScreen),
|
||||
m_tvScreen(tvScreen),
|
||||
in(_in),
|
||||
phase(0)
|
||||
{
|
||||
@ -144,16 +144,16 @@ template<typename T> struct datvconstellation: runnable
|
||||
//Symbols
|
||||
while (in.readable() >= pixels_per_frame)
|
||||
{
|
||||
if ((!phase) && m_objDATVScreen)
|
||||
if ((!phase) && m_tvScreen)
|
||||
{
|
||||
m_objDATVScreen->resetImage();
|
||||
m_tvScreen->resetImage();
|
||||
|
||||
std::complex<T> *p = in.rd(), *pend = p + pixels_per_frame;
|
||||
|
||||
for (; p < pend; ++p)
|
||||
{
|
||||
m_objDATVScreen->selectRow(256 * (p->real() - xymin) / (xymax - xymin));
|
||||
m_objDATVScreen->setDataColor(
|
||||
m_tvScreen->selectRow(256 * (p->real() - xymin) / (xymax - xymin));
|
||||
m_tvScreen->setDataColor(
|
||||
256 - 256 * ((p->imag() - xymin) / (xymax - xymin)),
|
||||
255, 0, 255);
|
||||
}
|
||||
@ -166,12 +166,12 @@ template<typename T> struct datvconstellation: runnable
|
||||
|
||||
for (;(row_it != cstln_rows.end()) && (col_it != cstln_cols.end()); ++row_it, ++col_it)
|
||||
{
|
||||
m_objDATVScreen->selectRow(*row_it);
|
||||
m_objDATVScreen->setDataColor(*col_it, 250, 250, 5);
|
||||
m_tvScreen->selectRow(*row_it);
|
||||
m_tvScreen->setDataColor(*col_it, 250, 250, 5);
|
||||
}
|
||||
}
|
||||
|
||||
m_objDATVScreen->renderImage(0);
|
||||
m_tvScreen->renderImage(0);
|
||||
}
|
||||
|
||||
in.read(pixels_per_frame);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include <QDebug>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
#include <QBuffer>
|
||||
|
||||
#include "SWGChannelSettings.h"
|
||||
#include "SWGDATVDemodSettings.h"
|
||||
@ -29,6 +30,7 @@
|
||||
|
||||
#include "datvdemod.h"
|
||||
#include "maincore.h"
|
||||
#include "util/db.h"
|
||||
|
||||
const char* const DATVDemod::m_channelIdURI = "sdrangel.channel.demoddatv";
|
||||
const char* const DATVDemod::m_channelId = "DATVDemod";
|
||||
@ -50,11 +52,15 @@ DATVDemod::DATVDemod(DeviceAPI *deviceAPI) :
|
||||
m_deviceAPI->addChannelSink(this);
|
||||
m_deviceAPI->addChannelSinkAPI(this);
|
||||
|
||||
m_networkManager = new QNetworkAccessManager();
|
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
}
|
||||
|
||||
DATVDemod::~DATVDemod()
|
||||
{
|
||||
qDebug("DATVDemod::~DATVDemod");
|
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
delete m_networkManager;
|
||||
m_deviceAPI->removeChannelSinkAPI(this);
|
||||
m_deviceAPI->removeChannelSink(this);
|
||||
|
||||
@ -128,9 +134,106 @@ void DATVDemod::applySettings(const DATVDemodSettings& settings, bool force)
|
||||
QString debugMsg = tr("DATVDemod::applySettings: force: %1").arg(force);
|
||||
settings.debug(debugMsg);
|
||||
|
||||
QList<QString> reverseAPIKeys;
|
||||
|
||||
if (settings.m_rgbColor != m_settings.m_rgbColor) {
|
||||
reverseAPIKeys.append("rgbColor");
|
||||
}
|
||||
if (settings.m_title != m_settings.m_title) {
|
||||
reverseAPIKeys.append("title");
|
||||
}
|
||||
if (settings.m_rfBandwidth != m_settings.m_rfBandwidth) {
|
||||
reverseAPIKeys.append("rfBandwidth");
|
||||
}
|
||||
if (settings.m_centerFrequency != m_settings.m_centerFrequency) {
|
||||
reverseAPIKeys.append("centerFrequency");
|
||||
}
|
||||
if (settings.m_standard != m_settings.m_standard) {
|
||||
reverseAPIKeys.append("standard");
|
||||
}
|
||||
if (settings.m_modulation != m_settings.m_modulation) {
|
||||
reverseAPIKeys.append("modulation");
|
||||
}
|
||||
if (settings.m_fec != m_settings.m_fec) {
|
||||
reverseAPIKeys.append("fec");
|
||||
}
|
||||
if (settings.m_softLDPC != m_settings.m_softLDPC) {
|
||||
reverseAPIKeys.append("softLDPC");
|
||||
}
|
||||
if (settings.m_softLDPCToolPath != m_settings.m_softLDPCToolPath) {
|
||||
reverseAPIKeys.append("softLDPCToolPath");
|
||||
}
|
||||
if (settings.m_softLDPCMaxTrials != m_settings.m_softLDPCMaxTrials) {
|
||||
reverseAPIKeys.append("softLDPCMaxTrials");
|
||||
}
|
||||
if (settings.m_maxBitflips != m_settings.m_maxBitflips) {
|
||||
reverseAPIKeys.append("maxBitflips");
|
||||
}
|
||||
if (settings.m_audioMute != m_settings.m_audioMute) {
|
||||
reverseAPIKeys.append("audioMute");
|
||||
}
|
||||
if (settings.m_audioDeviceName != m_settings.m_audioDeviceName) {
|
||||
reverseAPIKeys.append("audioDeviceName");
|
||||
}
|
||||
if (settings.m_symbolRate != m_settings.m_symbolRate) {
|
||||
reverseAPIKeys.append("symbolRate");
|
||||
}
|
||||
if (settings.m_notchFilters != m_settings.m_notchFilters) {
|
||||
reverseAPIKeys.append("notchFilters");
|
||||
}
|
||||
if (settings.m_allowDrift != m_settings.m_allowDrift) {
|
||||
reverseAPIKeys.append("allowDrift");
|
||||
}
|
||||
if (settings.m_fastLock != m_settings.m_fastLock) {
|
||||
reverseAPIKeys.append("fastLock");
|
||||
}
|
||||
if (settings.m_filter != m_settings.m_filter) {
|
||||
reverseAPIKeys.append("filter");
|
||||
}
|
||||
if (settings.m_hardMetric != m_settings.m_hardMetric) {
|
||||
reverseAPIKeys.append("hardMetric");
|
||||
}
|
||||
if (settings.m_rollOff != m_settings.m_rollOff) {
|
||||
reverseAPIKeys.append("rollOff");
|
||||
}
|
||||
if (settings.m_viterbi != m_settings.m_viterbi) {
|
||||
reverseAPIKeys.append("viterbi");
|
||||
}
|
||||
if (settings.m_excursion != m_settings.m_excursion) {
|
||||
reverseAPIKeys.append("excursion");
|
||||
}
|
||||
if (settings.m_audioVolume != m_settings.m_audioVolume) {
|
||||
reverseAPIKeys.append("audioVolume");
|
||||
}
|
||||
if (settings.m_videoMute != m_settings.m_videoMute) {
|
||||
reverseAPIKeys.append("videoMute");
|
||||
}
|
||||
if (settings.m_udpTSAddress != m_settings.m_udpTSAddress) {
|
||||
reverseAPIKeys.append("udpTSAddress");
|
||||
}
|
||||
if (settings.m_udpTSPort != m_settings.m_udpTSPort) {
|
||||
reverseAPIKeys.append("udpTSPort");
|
||||
}
|
||||
if (settings.m_udpTS != m_settings.m_udpTS) {
|
||||
reverseAPIKeys.append("udpTS");
|
||||
}
|
||||
if (settings.m_playerEnable != m_settings.m_playerEnable) {
|
||||
reverseAPIKeys.append("playerEnable");
|
||||
}
|
||||
|
||||
DATVDemodBaseband::MsgConfigureDATVDemodBaseband *msg = DATVDemodBaseband::MsgConfigureDATVDemodBaseband::create(settings, force);
|
||||
m_basebandSink->getInputMessageQueue()->push(msg);
|
||||
|
||||
if (settings.m_useReverseAPI)
|
||||
{
|
||||
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||
|
||||
(m_settings.m_reverseAPIAddress != settings.m_reverseAPIAddress) ||
|
||||
(m_settings.m_reverseAPIPort != settings.m_reverseAPIPort) ||
|
||||
(m_settings.m_reverseAPIDeviceIndex != settings.m_reverseAPIDeviceIndex) ||
|
||||
(m_settings.m_reverseAPIChannelIndex != settings.m_reverseAPIChannelIndex);
|
||||
webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force);
|
||||
}
|
||||
|
||||
m_settings = settings;
|
||||
}
|
||||
|
||||
@ -150,6 +253,17 @@ int DATVDemod::webapiSettingsGet(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int DATVDemod::webapiReportGet(
|
||||
SWGSDRangel::SWGChannelReport& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
response.setDatvDemodReport(new SWGSDRangel::SWGDATVDemodReport());
|
||||
response.getDatvDemodReport()->init();
|
||||
webapiFormatChannelReport(response);
|
||||
return 200;
|
||||
}
|
||||
|
||||
int DATVDemod::webapiSettingsPutPatch(
|
||||
bool force,
|
||||
const QStringList& channelSettingsKeys,
|
||||
@ -262,6 +376,9 @@ void DATVDemod::webapiUpdateChannelSettings(
|
||||
if (channelSettingsKeys.contains("udpTS")) {
|
||||
settings.m_udpTS = response.getDatvDemodSettings()->getUdpTs() == 1;
|
||||
}
|
||||
if (channelSettingsKeys.contains("playerEnable")) {
|
||||
settings.m_playerEnable = response.getDatvDemodSettings()->getPlayerEnable() == 1;
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex")) {
|
||||
settings.m_streamIndex = response.getDatvDemodSettings()->getStreamIndex();
|
||||
}
|
||||
@ -333,6 +450,9 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
|
||||
response.getDatvDemodSettings()->setUdpTsAddress(new QString(settings.m_udpTSAddress));
|
||||
}
|
||||
|
||||
response.getDatvDemodSettings()->setUdpTsPort(settings.m_udpTSPort);
|
||||
response.getDatvDemodSettings()->setUdpTs(settings.m_udpTS ? 1 : 0);
|
||||
response.getDatvDemodSettings()->setPlayerEnable(settings.m_playerEnable ? 1 : 0);
|
||||
response.getDatvDemodSettings()->setStreamIndex(settings.m_streamIndex);
|
||||
response.getDatvDemodSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
@ -347,6 +467,22 @@ void DATVDemod::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& res
|
||||
response.getDatvDemodSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
}
|
||||
|
||||
void DATVDemod::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
||||
{
|
||||
double magsq = getMagSq() / (SDR_RX_SCALED*SDR_RX_SCALED);
|
||||
response.getDatvDemodReport()->setChannelPowerDb(CalcDb::dbPower(magsq));
|
||||
response.getDatvDemodReport()->setAudioActive(audioActive() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setAudioDecodeOk(audioDecodeOK() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setModcodCodeRate(getModcodCodeRate());
|
||||
response.getDatvDemodReport()->setModcodModulation(getModcodModulation());
|
||||
response.getDatvDemodReport()->setSetByModcod(isCstlnSetByModcod() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setUdpRunning(udpRunning() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setVideoActive(videoActive() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setVideoDecodeOk(videoDecodeOK() ? 1 : 0);
|
||||
response.getDatvDemodReport()->setMer(getMERAvg());
|
||||
response.getDatvDemodReport()->setCnr(getCNRAvg());
|
||||
}
|
||||
|
||||
void DATVDemod::sendChannelSettings(
|
||||
QList<MessageQueue*> *messageQueues,
|
||||
QList<QString>& channelSettingsKeys,
|
||||
@ -466,11 +602,39 @@ void DATVDemod::webapiFormatChannelSettings(
|
||||
if (channelSettingsKeys.contains("udpTS") || force) {
|
||||
swgDATVDemodSettings->setUdpTs(settings.m_udpTS ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("playerEnable") || force) {
|
||||
swgDATVDemodSettings->setPlayerEnable(settings.m_playerEnable ? 1 : 0);
|
||||
}
|
||||
if (channelSettingsKeys.contains("streamIndex") || force) {
|
||||
swgDATVDemodSettings->setStreamIndex(settings.m_streamIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void DATVDemod::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DATVDemodSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||
webapiFormatChannelSettings(channelSettingsKeys, swgChannelSettings, settings, force);
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
.arg(settings.m_reverseAPIPort)
|
||||
.arg(settings.m_reverseAPIDeviceIndex)
|
||||
.arg(settings.m_reverseAPIChannelIndex);
|
||||
m_networkRequest.setUrl(QUrl(channelSettingsURL));
|
||||
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
|
||||
|
||||
QBuffer *buffer = new QBuffer();
|
||||
buffer->open((QBuffer::ReadWrite));
|
||||
buffer->write(swgChannelSettings->asJson().toUtf8());
|
||||
buffer->seek(0);
|
||||
|
||||
// Always use PATCH to avoid passing reverse API settings
|
||||
QNetworkReply *reply = m_networkManager->sendCustomRequest(m_networkRequest, "PATCH", buffer);
|
||||
buffer->setParent(reply);
|
||||
|
||||
delete swgChannelSettings;
|
||||
}
|
||||
|
||||
void DATVDemod::networkManagerFinished(QNetworkReply *reply)
|
||||
{
|
||||
QNetworkReply::NetworkError replyError = reply->error();
|
||||
|
@ -80,6 +80,10 @@ public:
|
||||
SWGSDRangel::SWGChannelSettings& response,
|
||||
QString& errorMessage);
|
||||
|
||||
virtual int webapiReportGet(
|
||||
SWGSDRangel::SWGChannelReport& response,
|
||||
QString& errorMessage);
|
||||
|
||||
static void webapiFormatChannelSettings(
|
||||
SWGSDRangel::SWGChannelSettings& response,
|
||||
const DATVDemodSettings& settings);
|
||||
@ -95,11 +99,7 @@ public:
|
||||
m_basebandSink->setMessageQueueToGUI(queue);
|
||||
}
|
||||
|
||||
void SetTVScreen(TVScreen *objScreen) { m_basebandSink->setTVScreen(objScreen); }
|
||||
void setMERLabel(QLabel *merLabel) { m_basebandSink->setMERLabel(merLabel); }
|
||||
void setCNRLabel(QLabel *cnrLabel) { m_basebandSink->setCNRLabel(cnrLabel); }
|
||||
void setMERMeter(LevelMeterSignalDB *merMeter) { m_basebandSink->setMERMeter(merMeter); }
|
||||
void setCNRMeter(LevelMeterSignalDB *cnrMeter) { m_basebandSink->setCNRMeter(cnrMeter); }
|
||||
void SetTVScreen(TVScreen *tvScreen) { m_basebandSink->setTVScreen(tvScreen); }
|
||||
void SetVideoRender(DATVideoRender *objScreen) { m_basebandSink->SetVideoRender(objScreen); }
|
||||
DATVideostream *getVideoStream() { return m_basebandSink->getVideoStream(); }
|
||||
DATVUDPStream *getUDPStream() { return m_basebandSink->getUDPStream(); }
|
||||
@ -116,6 +116,15 @@ public:
|
||||
int getModcodCodeRate() const { return m_basebandSink->getModcodCodeRate(); }
|
||||
bool isCstlnSetByModcod() const { return m_basebandSink->isCstlnSetByModcod(); }
|
||||
|
||||
float getMERAvg() const { return m_basebandSink->getMERAvg(); }
|
||||
float getMERRMS() const { return m_basebandSink->getMERRMS(); }
|
||||
float getMERPeak() const { return m_basebandSink->getMERPeak(); }
|
||||
int getMERNbAvg() const { return m_basebandSink->getMERNbAvg(); }
|
||||
float getCNRAvg() const { return m_basebandSink->getCNRAvg(); }
|
||||
float getCNRRMS() const { return m_basebandSink->getCNRRMS(); }
|
||||
float getCNRPeak() const { return m_basebandSink->getCNRPeak(); }
|
||||
int getCNRNbAvg() const { return m_basebandSink->getCNRNbAvg(); }
|
||||
|
||||
static const char* const m_channelIdURI;
|
||||
static const char* const m_channelId;
|
||||
|
||||
@ -148,8 +157,11 @@ private:
|
||||
DATVDemodBaseband* m_basebandSink;
|
||||
DATVDemodSettings m_settings;
|
||||
int m_basebandSampleRate; //!< stored from device message used when starting baseband sink
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkRequest m_networkRequest;
|
||||
|
||||
void applySettings(const DATVDemodSettings& settings, bool force = false);
|
||||
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DATVDemodSettings& settings, bool force);
|
||||
void sendChannelSettings(
|
||||
QList<MessageQueue*> *messageQueues,
|
||||
|
@ -66,10 +66,14 @@ public:
|
||||
int getChannelSampleRate() const;
|
||||
double getMagSq() const { return m_sink.getMagSq(); }
|
||||
void setTVScreen(TVScreen *tvScreen) { m_sink.setTVScreen(tvScreen); }
|
||||
void setMERLabel(QLabel *merLabel) { m_sink.setMERLabel(merLabel); }
|
||||
void setCNRLabel(QLabel *cnrLabel) { m_sink.setCNRLabel(cnrLabel); }
|
||||
void setMERMeter(LevelMeterSignalDB *merMeter) { m_sink.setMERMeter(merMeter); }
|
||||
void setCNRMeter(LevelMeterSignalDB *cnrMeter) { m_sink.setCNRMeter(cnrMeter); }
|
||||
float getMERAvg() const { return m_sink.getMERAvg(); }
|
||||
float getMERRMS() const { return m_sink.getMERRMS(); }
|
||||
float getMERPeak() const { return m_sink.getMERPeak(); }
|
||||
int getMERNbAvg() const { return m_sink.getMERNbAvg(); }
|
||||
float getCNRAvg() const { return m_sink.getCNRAvg(); }
|
||||
float getCNRRMS() const { return m_sink.getCNRRMS(); }
|
||||
float getCNRPeak() const { return m_sink.getCNRPeak(); }
|
||||
int getCNRNbAvg() const { return m_sink.getCNRNbAvg(); }
|
||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_sink.setMessageQueueToGUI(messageQueue); }
|
||||
void setBasebandSampleRate(int sampleRate); //!< To be used when supporting thread is stopped
|
||||
void SetVideoRender(DATVideoRender *objScreen) { m_sink.SetVideoRender(objScreen); }
|
||||
|
@ -167,7 +167,7 @@ void DATVDemodGUI::onMenuDialogCalled(const QPoint &p)
|
||||
else if ((m_contextMenuType == ContextMenuStreamSettings) && (m_deviceUISet->m_deviceMIMOEngine))
|
||||
{
|
||||
DeviceStreamSelectionDialog dialog(this);
|
||||
dialog.setNumberOfStreams(m_objDATVDemod->getNumberOfDeviceStreams());
|
||||
dialog.setNumberOfStreams(m_datvDemod->getNumberOfDeviceStreams());
|
||||
dialog.setStreamIndex(m_settings.m_streamIndex);
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
@ -196,6 +196,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->screenTV->setColor(true);
|
||||
ui->screenTV->resizeTVScreen(256,256);
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
@ -209,20 +210,16 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
||||
ui->cnrMeter->setRange(0, 30);
|
||||
ui->cnrMeter->setAverageSmoothing(2);
|
||||
|
||||
m_objDATVDemod = (DATVDemod*) rxChannel;
|
||||
m_objDATVDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_datvDemod = (DATVDemod*) rxChannel;
|
||||
m_datvDemod->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
m_objDATVDemod->SetTVScreen(ui->screenTV);
|
||||
m_objDATVDemod->setMERLabel(ui->merText);
|
||||
m_objDATVDemod->setCNRLabel(ui->cnrText);
|
||||
m_objDATVDemod->setMERMeter(ui->merMeter);
|
||||
m_objDATVDemod->setCNRMeter(ui->cnrMeter);
|
||||
m_objDATVDemod->SetVideoRender(ui->screenTV_2);
|
||||
m_datvDemod->SetTVScreen(ui->screenTV);
|
||||
m_datvDemod->SetVideoRender(ui->screenTV_2);
|
||||
|
||||
if (m_settings.m_playerEnable) {
|
||||
connect(m_objDATVDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
} else {
|
||||
connect(m_objDATVDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
}
|
||||
|
||||
connect(ui->screenTV_2, &DATVideoRender::onMetaDataChanged, this, &DATVDemodGUI::on_StreamMetaDataChanged);
|
||||
@ -233,6 +230,7 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
|
||||
m_intReadyDecodedData=0;
|
||||
m_objTimer.setInterval(1000);
|
||||
connect(&m_objTimer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tickMeter())); // 50 ms
|
||||
m_objTimer.start();
|
||||
|
||||
ui->fullScreen->setVisible(false);
|
||||
@ -380,13 +378,13 @@ void DATVDemodGUI::displaySettings()
|
||||
|
||||
if (m_settings.m_playerEnable)
|
||||
{
|
||||
disconnect(m_objDATVDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_objDATVDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
disconnect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect(m_objDATVDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_objDATVDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
disconnect(m_datvDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
}
|
||||
|
||||
blockApplySettings(false);
|
||||
@ -457,7 +455,7 @@ void DATVDemodGUI::applySettings(bool force)
|
||||
m_settings.debug(msg);
|
||||
|
||||
DATVDemod::MsgConfigureDATVDemod* message = DATVDemod::MsgConfigureDATVDemod::create(m_settings, force);
|
||||
m_objDATVDemod->getInputMessageQueue()->push(message);
|
||||
m_datvDemod->getInputMessageQueue()->push(message);
|
||||
}
|
||||
}
|
||||
|
||||
@ -505,16 +503,16 @@ void DATVDemodGUI::ldpcToolSelect()
|
||||
|
||||
void DATVDemodGUI::tick()
|
||||
{
|
||||
if (m_objDATVDemod)
|
||||
if (m_datvDemod)
|
||||
{
|
||||
m_objMagSqAverage(m_objDATVDemod->getMagSq());
|
||||
m_objMagSqAverage(m_datvDemod->getMagSq());
|
||||
double magSqDB = CalcDb::dbPower(m_objMagSqAverage / (SDR_RX_SCALED*SDR_RX_SCALED));
|
||||
ui->channePowerText->setText(tr("%1 dB").arg(magSqDB, 0, 'f', 1));
|
||||
|
||||
if ((m_modcodModulationIndex != m_objDATVDemod->getModcodModulation()) || (m_modcodCodeRateIndex != m_objDATVDemod->getModcodCodeRate()))
|
||||
if ((m_modcodModulationIndex != m_datvDemod->getModcodModulation()) || (m_modcodCodeRateIndex != m_datvDemod->getModcodCodeRate()))
|
||||
{
|
||||
m_modcodModulationIndex = m_objDATVDemod->getModcodModulation();
|
||||
m_modcodCodeRateIndex = m_objDATVDemod->getModcodCodeRate();
|
||||
m_modcodModulationIndex = m_datvDemod->getModcodModulation();
|
||||
m_modcodCodeRateIndex = m_datvDemod->getModcodCodeRate();
|
||||
DATVDemodSettings::DATVModulation modulation = DATVDemodSettings::getModulationFromLeanDVBCode(m_modcodModulationIndex);
|
||||
DATVDemodSettings::DATVCodeRate rate = DATVDemodSettings::getCodeRateFromLeanDVBCode(m_modcodCodeRateIndex);
|
||||
QString modcodModulationStr = DATVDemodSettings::getStrFromModulation(modulation);
|
||||
@ -522,9 +520,9 @@ void DATVDemodGUI::tick()
|
||||
ui->statusText->setText(tr("MCOD %1 %2").arg(modcodModulationStr).arg(modcodCodeRateStr));
|
||||
}
|
||||
|
||||
if (m_cstlnSetByModcod != m_objDATVDemod->isCstlnSetByModcod())
|
||||
if (m_cstlnSetByModcod != m_datvDemod->isCstlnSetByModcod())
|
||||
{
|
||||
m_cstlnSetByModcod = m_objDATVDemod->isCstlnSetByModcod();
|
||||
m_cstlnSetByModcod = m_datvDemod->isCstlnSetByModcod();
|
||||
|
||||
if (m_cstlnSetByModcod) {
|
||||
ui->statusText->setStyleSheet("QLabel { background-color : green; }");
|
||||
@ -540,9 +538,9 @@ void DATVDemodGUI::tick()
|
||||
ui->lblRate->setText(QString("Speed: %1b/s").arg(formatBytes(m_intLastSpeed)));
|
||||
}
|
||||
|
||||
if (m_objDATVDemod->audioActive())
|
||||
if (m_datvDemod->audioActive())
|
||||
{
|
||||
if (m_objDATVDemod->audioDecodeOK()) {
|
||||
if (m_datvDemod->audioDecodeOK()) {
|
||||
ui->audioMute->setStyleSheet("QToolButton { background-color : green; }");
|
||||
} else {
|
||||
ui->audioMute->setStyleSheet("QToolButton { background-color : red; }");
|
||||
@ -553,9 +551,9 @@ void DATVDemodGUI::tick()
|
||||
ui->audioMute->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
if (m_objDATVDemod->videoActive())
|
||||
if (m_datvDemod->videoActive())
|
||||
{
|
||||
if (m_objDATVDemod->videoDecodeOK()) {
|
||||
if (m_datvDemod->videoDecodeOK()) {
|
||||
ui->videoMute->setStyleSheet("QToolButton { background-color : green; }");
|
||||
} else {
|
||||
ui->videoMute->setStyleSheet("QToolButton { background-color : red; }");
|
||||
@ -569,7 +567,7 @@ void DATVDemodGUI::tick()
|
||||
m_intPreviousDecodedData = m_intLastDecodedData;
|
||||
|
||||
//Try to start video rendering
|
||||
bool success = m_objDATVDemod->playVideo();
|
||||
bool success = m_datvDemod->playVideo();
|
||||
|
||||
if (success) {
|
||||
ui->playerIndicator->setStyleSheet("QLabel { background-color: rgb(85, 232, 85); border-radius: 8px; }"); // green
|
||||
@ -577,13 +575,19 @@ void DATVDemodGUI::tick()
|
||||
ui->playerIndicator->setStyleSheet("QLabel { background-color: gray; border-radius: 8px; }");
|
||||
}
|
||||
|
||||
if (m_objDATVDemod->udpRunning()) {
|
||||
if (m_datvDemod->udpRunning()) {
|
||||
ui->udpIndicator->setStyleSheet("QLabel { background-color: rgb(85, 232, 85); border-radius: 8px; }"); // green
|
||||
} else {
|
||||
ui->udpIndicator->setStyleSheet("QLabel { background-color: gray; border-radius: 8px; }");
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
void DATVDemodGUI::tickMeter()
|
||||
{
|
||||
ui->merMeter->levelChanged(m_datvDemod->getMERRMS(), m_datvDemod->getMERPeak(), m_datvDemod->getMERNbAvg());
|
||||
ui->cnrMeter->levelChanged(m_datvDemod->getCNRRMS(), m_datvDemod->getCNRPeak(), m_datvDemod->getCNRNbAvg());
|
||||
ui->merText->setText(QString("%1").arg(m_datvDemod->getMERAvg(), 0, 'f', 1));
|
||||
ui->cnrText->setText(QString("%1").arg(m_datvDemod->getCNRAvg(), 0, 'f', 1));
|
||||
}
|
||||
|
||||
void DATVDemodGUI::on_cmbStandard_currentIndexChanged(int index)
|
||||
@ -841,13 +845,13 @@ void DATVDemodGUI::on_playerEnable_clicked()
|
||||
|
||||
if (m_settings.m_playerEnable)
|
||||
{
|
||||
disconnect(m_objDATVDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_objDATVDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
disconnect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
}
|
||||
else
|
||||
{
|
||||
disconnect(m_objDATVDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_objDATVDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
disconnect(m_datvDemod->getVideoStream(), &DATVideostream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
connect(m_datvDemod->getUDPStream(), &DATVUDPStream::fifoData, this, &DATVDemodGUI::on_StreamDataAvailable);
|
||||
}
|
||||
|
||||
applySettings();
|
||||
|
@ -64,6 +64,7 @@ private slots:
|
||||
void audioSelect();
|
||||
void ldpcToolSelect();
|
||||
void tick();
|
||||
void tickMeter();
|
||||
|
||||
void on_cmbStandard_currentIndexChanged(int index);
|
||||
void on_cmbModulation_currentIndexChanged(const QString &arg1);
|
||||
@ -100,7 +101,7 @@ private:
|
||||
DeviceUISet* m_deviceUISet;
|
||||
|
||||
ChannelMarker m_objChannelMarker;
|
||||
DATVDemod* m_objDATVDemod;
|
||||
DATVDemod* m_datvDemod;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
DATVDemodSettings m_settings;
|
||||
|
||||
|
@ -34,15 +34,11 @@ const unsigned int DATVDemodSink::m_rfFilterFftLength = 1024;
|
||||
|
||||
DATVDemodSink::DATVDemodSink() :
|
||||
m_blnNeedConfigUpdate(false),
|
||||
m_objRegisteredTVScreen(nullptr),
|
||||
m_objRegisteredVideoRender(nullptr),
|
||||
m_objVideoStream(new DATVideostream()),
|
||||
m_tvScreen(nullptr),
|
||||
m_videoRender(nullptr),
|
||||
m_videoStream(new DATVideostream()),
|
||||
m_udpStream(leansdr::tspacket::SIZE),
|
||||
m_objRenderThread(nullptr),
|
||||
m_merLabel(nullptr),
|
||||
m_cnrLabel(nullptr),
|
||||
m_merMeter(nullptr),
|
||||
m_cnrMeter(nullptr),
|
||||
m_videoThread(nullptr),
|
||||
m_audioFifo(48000),
|
||||
m_blnRenderingVideo(false),
|
||||
m_cstlnSetByModcod(false),
|
||||
@ -64,14 +60,14 @@ DATVDemodSink::~DATVDemodSink()
|
||||
m_blnInitialized = false;
|
||||
|
||||
//Immediately exit from DATVideoStream if waiting for data before killing thread
|
||||
m_objVideoStream->setThreadTimeout(0);
|
||||
m_objVideoStream->deleteLater();
|
||||
m_videoStream->setThreadTimeout(0);
|
||||
m_videoStream->deleteLater();
|
||||
|
||||
stopVideo();
|
||||
CleanUpDATVFramework();
|
||||
|
||||
if (m_objRenderThread) {
|
||||
delete m_objRenderThread;
|
||||
if (m_videoThread) {
|
||||
delete m_videoThread;
|
||||
}
|
||||
|
||||
delete m_objRFFilter;
|
||||
@ -79,50 +75,33 @@ DATVDemodSink::~DATVDemodSink()
|
||||
|
||||
void DATVDemodSink::stopVideo()
|
||||
{
|
||||
if (m_objRenderThread)
|
||||
if (m_videoThread)
|
||||
{
|
||||
if (m_objRenderThread->isRunning())
|
||||
if (m_videoThread->isRunning())
|
||||
{
|
||||
m_objRenderThread->stopRendering();
|
||||
m_objRenderThread->quit();
|
||||
m_objRenderThread->wait();
|
||||
m_videoThread->stopRendering();
|
||||
m_videoThread->quit();
|
||||
m_videoThread->wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool DATVDemodSink::setTVScreen(TVScreen *objScreen)
|
||||
void DATVDemodSink::setTVScreen(TVScreen *tvScreen)
|
||||
{
|
||||
m_objRegisteredTVScreen = objScreen;
|
||||
return true;
|
||||
m_tvScreen = tvScreen;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setMERLabel(QLabel *merLabel) {
|
||||
m_merLabel = merLabel;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setCNRLabel(QLabel *cnrLabel) {
|
||||
m_cnrLabel = cnrLabel;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setMERMeter(LevelMeterSignalDB *merMeter) {
|
||||
m_merMeter = merMeter;
|
||||
}
|
||||
|
||||
void DATVDemodSink::setCNRMeter(LevelMeterSignalDB *cnrMeter) {
|
||||
m_cnrMeter = cnrMeter;
|
||||
}
|
||||
|
||||
void DATVDemodSink::SetVideoRender(DATVideoRender *objScreen)
|
||||
void DATVDemodSink::SetVideoRender(DATVideoRender *screen)
|
||||
{
|
||||
m_objRegisteredVideoRender = objScreen;
|
||||
m_objRegisteredVideoRender->setAudioFIFO(&m_audioFifo);
|
||||
m_objRenderThread = new DATVideoRenderThread(m_objRegisteredVideoRender, m_objVideoStream);
|
||||
m_videoRender = screen;
|
||||
m_videoRender->setAudioFIFO(&m_audioFifo);
|
||||
m_videoThread = new DATVideoRenderThread(m_videoRender, m_videoStream);
|
||||
}
|
||||
|
||||
bool DATVDemodSink::audioActive()
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
return m_objRegisteredVideoRender->getAudioStreamIndex() >= 0;
|
||||
if (m_videoRender) {
|
||||
return m_videoRender->getAudioStreamIndex() >= 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -130,8 +109,8 @@ bool DATVDemodSink::audioActive()
|
||||
|
||||
bool DATVDemodSink::videoActive()
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
return m_objRegisteredVideoRender->getVideoStreamIndex() >= 0;
|
||||
if (m_videoRender) {
|
||||
return m_videoRender->getVideoStreamIndex() >= 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -139,8 +118,8 @@ bool DATVDemodSink::videoActive()
|
||||
|
||||
bool DATVDemodSink::audioDecodeOK()
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
return m_objRegisteredVideoRender->getAudioDecodeOK();
|
||||
if (m_videoRender) {
|
||||
return m_videoRender->getAudioDecodeOK();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -148,8 +127,8 @@ bool DATVDemodSink::audioDecodeOK()
|
||||
|
||||
bool DATVDemodSink::videoDecodeOK()
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
return m_objRegisteredVideoRender->getVideoDecodeOK();
|
||||
if (m_videoRender) {
|
||||
return m_videoRender->getVideoDecodeOK();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -171,27 +150,27 @@ bool DATVDemodSink::playVideo()
|
||||
{
|
||||
QMutexLocker mlock(&m_mutex);
|
||||
|
||||
if (m_objVideoStream == nullptr) {
|
||||
if (m_videoStream == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_objRegisteredVideoRender == nullptr) {
|
||||
if (m_videoRender == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_objRenderThread == nullptr) {
|
||||
if (m_videoThread == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_objRenderThread->isRunning()) {
|
||||
if (m_videoThread->isRunning()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_objVideoStream->bytesAvailable() > 0)
|
||||
if (m_videoStream->bytesAvailable() > 0)
|
||||
{
|
||||
m_objVideoStream->setMultiThreaded(true);
|
||||
m_objVideoStream->setThreadTimeout(DATVideoRenderThread::videoThreadTimeoutMs);
|
||||
m_objRenderThread->start();
|
||||
m_videoStream->setMultiThreaded(true);
|
||||
m_videoStream->setThreadTimeout(DATVideoRenderThread::videoThreadTimeoutMs);
|
||||
m_videoThread->start();
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -199,8 +178,8 @@ bool DATVDemodSink::playVideo()
|
||||
|
||||
void DATVDemodSink::CleanUpDATVFramework()
|
||||
{
|
||||
if (m_objVideoStream) {
|
||||
m_objVideoStream->cleanUp();
|
||||
if (m_videoStream) {
|
||||
m_videoStream->cleanUp();
|
||||
}
|
||||
|
||||
if (m_objScheduler != nullptr)
|
||||
@ -233,8 +212,8 @@ void DATVDemodSink::CleanUpDATVFramework()
|
||||
if (r_cnr != nullptr) {
|
||||
delete r_cnr;
|
||||
}
|
||||
if (r_cnrGauge != nullptr) {
|
||||
delete r_cnrGauge;
|
||||
if (r_cnrMeter != nullptr) {
|
||||
delete r_cnrMeter;
|
||||
}
|
||||
|
||||
//FILTERING
|
||||
@ -267,8 +246,8 @@ void DATVDemodSink::CleanUpDATVFramework()
|
||||
if (p_mer != nullptr) {
|
||||
delete p_mer;
|
||||
}
|
||||
if (r_merGauge != nullptr) {
|
||||
delete r_merGauge;
|
||||
if (r_merMeter != nullptr) {
|
||||
delete r_merMeter;
|
||||
}
|
||||
if (p_sampled != nullptr) {
|
||||
delete p_sampled;
|
||||
@ -460,7 +439,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
|
||||
// CNR ESTIMATION
|
||||
p_cnr = nullptr;
|
||||
r_cnr = nullptr;
|
||||
r_cnrGauge = nullptr;
|
||||
r_cnrMeter = nullptr;
|
||||
|
||||
//FILTERING
|
||||
r_resample = nullptr;
|
||||
@ -477,7 +456,7 @@ void DATVDemodSink::ResetDATVFrameworkPointers()
|
||||
p_freq = nullptr;
|
||||
p_ss = nullptr;
|
||||
p_mer = nullptr;
|
||||
r_merGauge = nullptr;
|
||||
r_merMeter = nullptr;
|
||||
p_sampled = nullptr;
|
||||
|
||||
//DECIMATION
|
||||
@ -576,7 +555,7 @@ void DATVDemodSink::InitDATVFramework()
|
||||
m_objCfg.rrc_rej = (float) m_settings.m_excursion; //dB
|
||||
m_objCfg.rrc_steps = 0; //auto
|
||||
|
||||
m_objVideoStream->resetTotalReceived();
|
||||
m_videoStream->resetTotalReceived();
|
||||
m_udpStream.resetTotalReceived();
|
||||
|
||||
switch(m_settings.m_modulation)
|
||||
@ -789,24 +768,18 @@ void DATVDemodSink::InitDATVFramework()
|
||||
|
||||
//constellation
|
||||
|
||||
if (m_objRegisteredTVScreen)
|
||||
if (m_tvScreen)
|
||||
{
|
||||
qDebug("DATVDemodSink::InitDATVFramework: Register DVBSTVSCREEN");
|
||||
qDebug("DATVDemodSink::InitDATVFramework: Register DVB constellation TV screen");
|
||||
|
||||
m_objRegisteredTVScreen->resizeTVScreen(256,256);
|
||||
r_scope_symbols = new leansdr::datvconstellation<leansdr::f32>(m_objScheduler, *p_sampled, -128,128, nullptr, m_objRegisteredTVScreen);
|
||||
r_scope_symbols = new leansdr::datvconstellation<leansdr::f32>(m_objScheduler, *p_sampled, -128,128, nullptr, m_tvScreen);
|
||||
r_scope_symbols->decimation = 1;
|
||||
r_scope_symbols->cstln = &m_objDemodulator->cstln;
|
||||
r_scope_symbols->calculate_cstln_points();
|
||||
}
|
||||
|
||||
if (m_merLabel && m_merMeter) {
|
||||
r_merGauge = new leansdr::datvgauge(m_objScheduler, *p_mer, m_merLabel, m_merMeter);
|
||||
}
|
||||
|
||||
if (m_cnrLabel && m_cnrMeter) {
|
||||
r_cnrGauge = new leansdr::datvgauge(m_objScheduler, *p_cnr, m_cnrLabel, m_cnrMeter);
|
||||
}
|
||||
r_merMeter = new leansdr::datvmeter(m_objScheduler, *p_mer);
|
||||
r_cnrMeter = new leansdr::datvmeter(m_objScheduler, *p_cnr);
|
||||
|
||||
// DECONVOLUTION AND SYNCHRONIZATION
|
||||
|
||||
@ -875,7 +848,7 @@ void DATVDemodSink::InitDATVFramework()
|
||||
|
||||
// OUTPUT
|
||||
if (m_settings.m_playerEnable) {
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, m_objVideoStream, &m_udpStream);
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, m_videoStream, &m_udpStream);
|
||||
} else {
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
|
||||
}
|
||||
@ -920,7 +893,7 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
m_objCfg.rrc_rej = (float) m_settings.m_excursion; //dB
|
||||
m_objCfg.rrc_steps = 0; //auto
|
||||
|
||||
m_objVideoStream->resetTotalReceived();
|
||||
m_videoStream->resetTotalReceived();
|
||||
m_udpStream.resetTotalReceived();
|
||||
|
||||
switch(m_settings.m_modulation)
|
||||
@ -1100,23 +1073,17 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
|
||||
//constellation
|
||||
|
||||
if (m_objRegisteredTVScreen)
|
||||
if (m_tvScreen)
|
||||
{
|
||||
qDebug("DATVDemodSink::InitDATVS2Framework: Register DVBS 2 TVSCREEN");
|
||||
m_objRegisteredTVScreen->resizeTVScreen(256,256);
|
||||
r_scope_symbols_dvbs2 = new leansdr::datvdvbs2constellation<leansdr::f32>(m_objScheduler, *p_cstln /* *p_sampled */ /* *p_cstln */, -128,128, nullptr, m_objRegisteredTVScreen);
|
||||
r_scope_symbols_dvbs2 = new leansdr::datvdvbs2constellation<leansdr::f32>(m_objScheduler, *p_cstln /* *p_sampled */ /* *p_cstln */, -128,128, nullptr, m_tvScreen);
|
||||
r_scope_symbols_dvbs2->decimation = 1;
|
||||
r_scope_symbols_dvbs2->cstln = (leansdr::cstln_base**) &objDemodulatorDVBS2->cstln;
|
||||
r_scope_symbols_dvbs2->calculate_cstln_points();
|
||||
}
|
||||
|
||||
if (m_merLabel && m_merMeter) {
|
||||
r_merGauge = new leansdr::datvgauge(m_objScheduler, *p_mer, m_merLabel, m_merMeter);
|
||||
}
|
||||
|
||||
if (m_cnrLabel && m_cnrMeter) {
|
||||
r_cnrGauge = new leansdr::datvgauge(m_objScheduler, *p_cnr, m_cnrLabel, m_cnrMeter);
|
||||
}
|
||||
r_merMeter = new leansdr::datvmeter(m_objScheduler, *p_mer);
|
||||
r_cnrMeter = new leansdr::datvmeter(m_objScheduler, *p_cnr);
|
||||
|
||||
// Bit-flipping mode.
|
||||
// Deinterleave into hard bits.
|
||||
@ -1243,7 +1210,7 @@ void DATVDemodSink::InitDATVS2Framework()
|
||||
|
||||
// OUTPUT
|
||||
if (m_settings.m_playerEnable) {
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, m_objVideoStream, &m_udpStream);
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, m_videoStream, &m_udpStream);
|
||||
} else {
|
||||
r_videoplayer = new leansdr::datvvideoplayer<leansdr::tspacket>(m_objScheduler, *p_tspackets, nullptr, &m_udpStream);
|
||||
}
|
||||
@ -1440,22 +1407,22 @@ void DATVDemodSink::applySettings(const DATVDemodSettings& settings, bool force)
|
||||
|
||||
if ((settings.m_audioVolume) != (m_settings.m_audioVolume) || force)
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
m_objRegisteredVideoRender->setAudioVolume(settings.m_audioVolume);
|
||||
if (m_videoRender) {
|
||||
m_videoRender->setAudioVolume(settings.m_audioVolume);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_audioMute) != (m_settings.m_audioMute) || force)
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
m_objRegisteredVideoRender->setAudioMute(settings.m_audioMute);
|
||||
if (m_videoRender) {
|
||||
m_videoRender->setAudioMute(settings.m_audioMute);
|
||||
}
|
||||
}
|
||||
|
||||
if ((settings.m_videoMute) != (m_settings.m_videoMute) || force)
|
||||
{
|
||||
if (m_objRegisteredVideoRender) {
|
||||
m_objRegisteredVideoRender->setVideoMute(settings.m_videoMute);
|
||||
if (m_videoRender) {
|
||||
m_videoRender->setVideoMute(settings.m_videoMute);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "leansdr/iess.h"
|
||||
|
||||
#include "datvconstellation.h"
|
||||
#include "datvgauge.h"
|
||||
#include "datvmeter.h"
|
||||
#include "datvdvbs2constellation.h"
|
||||
#include "datvvideoplayer.h"
|
||||
#include "datvideostream.h"
|
||||
@ -51,7 +51,6 @@
|
||||
class TVScreen;
|
||||
class DATVideoRender;
|
||||
class QLabel;
|
||||
class LevelMeterSignalDB;
|
||||
|
||||
class DATVDemodSink : public ChannelSampleSink {
|
||||
public:
|
||||
@ -60,13 +59,9 @@ public:
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end);
|
||||
|
||||
bool setTVScreen(TVScreen *objScreen);
|
||||
void setMERLabel(QLabel *merLabel);
|
||||
void setCNRLabel(QLabel *cnrLabel);
|
||||
void setMERMeter(LevelMeterSignalDB *merMeter);
|
||||
void setCNRMeter(LevelMeterSignalDB *cnrMeter);
|
||||
void SetVideoRender(DATVideoRender *objScreen);
|
||||
DATVideostream *getVideoStream() { return m_objVideoStream; }
|
||||
void setTVScreen(TVScreen *tvScreen);
|
||||
void SetVideoRender(DATVideoRender *screen);
|
||||
DATVideostream *getVideoStream() { return m_videoStream; }
|
||||
DATVUDPStream *getUDPStream() { return &m_udpStream; }
|
||||
bool audioActive();
|
||||
bool audioDecodeOK();
|
||||
@ -85,6 +80,38 @@ public:
|
||||
void setMessageQueueToGUI(MessageQueue *messageQueue) { m_messageQueueToGUI = messageQueue; }
|
||||
AudioFifo *getAudioFifo() { return &m_audioFifo; }
|
||||
|
||||
float getMERAvg() const {
|
||||
return r_merMeter ? r_merMeter->m_avg : 0;
|
||||
}
|
||||
|
||||
float getMERRMS() const {
|
||||
return r_merMeter ? r_merMeter->m_rms : 0;
|
||||
}
|
||||
|
||||
float getMERPeak() const {
|
||||
return r_merMeter ? r_merMeter->m_peak : 0;
|
||||
}
|
||||
|
||||
int getMERNbAvg() const {
|
||||
return r_merMeter ? r_merMeter->m_nbAvg : 1;
|
||||
}
|
||||
|
||||
float getCNRAvg() const {
|
||||
return r_cnrMeter ? r_cnrMeter->m_avg : 0;
|
||||
}
|
||||
|
||||
float getCNRRMS() const {
|
||||
return r_cnrMeter ? r_cnrMeter->m_rms : 0;
|
||||
}
|
||||
|
||||
float getCNRPeak() const {
|
||||
return r_cnrMeter ? r_cnrMeter->m_peak : 0;
|
||||
}
|
||||
|
||||
int getCNRNbAvg() const {
|
||||
return r_cnrMeter ? r_cnrMeter->m_nbAvg : 1;
|
||||
}
|
||||
|
||||
void applySettings(const DATVDemodSettings& settings, bool force = false);
|
||||
void applyChannelSettings(int channelSampleRate, int channelFrequencyOffset, bool force = false);
|
||||
|
||||
@ -286,19 +313,15 @@ private:
|
||||
//CONSTELLATION
|
||||
leansdr::datvconstellation<leansdr::f32> *r_scope_symbols;
|
||||
leansdr::datvdvbs2constellation<leansdr::f32> *r_scope_symbols_dvbs2;
|
||||
leansdr::datvgauge *r_merGauge;
|
||||
leansdr::datvgauge *r_cnrGauge;
|
||||
leansdr::datvmeter *r_merMeter;
|
||||
leansdr::datvmeter *r_cnrMeter;
|
||||
|
||||
//*************** DATV PARAMETERS ***************
|
||||
TVScreen *m_objRegisteredTVScreen;
|
||||
DATVideoRender *m_objRegisteredVideoRender;
|
||||
DATVideostream *m_objVideoStream;
|
||||
TVScreen *m_tvScreen;
|
||||
DATVideoRender *m_videoRender;
|
||||
DATVideostream *m_videoStream;
|
||||
DATVUDPStream m_udpStream;
|
||||
DATVideoRenderThread *m_objRenderThread;
|
||||
QLabel *m_merLabel;
|
||||
QLabel *m_cnrLabel;
|
||||
LevelMeterSignalDB *m_merMeter;
|
||||
LevelMeterSignalDB *m_cnrMeter;
|
||||
DATVideoRenderThread *m_videoThread;
|
||||
|
||||
// Audio
|
||||
AudioFifo m_audioFifo;
|
||||
|
@ -23,6 +23,8 @@
|
||||
#include <QIODevice>
|
||||
#include <QThread>
|
||||
#include <QWidget>
|
||||
#include <QTextStream>
|
||||
#include <QDebug>
|
||||
|
||||
#include "datvideostream.h"
|
||||
#include "gui/tvscreen.h"
|
||||
|
@ -16,42 +16,39 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef DATVGAUGE_H
|
||||
#define DATVGAUGE_H
|
||||
#ifndef DATVMETER_H
|
||||
#define DATVMETER_H
|
||||
|
||||
#include <QLabel>
|
||||
#include <QString>
|
||||
|
||||
#include "leansdr/framework.h"
|
||||
#include "leansdr/sdr.h"
|
||||
|
||||
#include "gui/levelmeter.h"
|
||||
|
||||
namespace leansdr {
|
||||
|
||||
struct datvgauge: runnable
|
||||
struct datvmeter: runnable
|
||||
{
|
||||
leansdr::pipereader<leansdr::f32> m_in;
|
||||
QLabel *m_label;
|
||||
LevelMeterSignalDB *m_levelMeter;
|
||||
float m_avg;
|
||||
float m_rms;
|
||||
float m_peak;
|
||||
static const int m_nbAvg = 10;
|
||||
leansdr::f32 m_samples[m_nbAvg];
|
||||
leansdr::f32 m_sum;
|
||||
int m_index;
|
||||
|
||||
datvgauge(
|
||||
datvmeter(
|
||||
scheduler *sch,
|
||||
leansdr::pipebuf<leansdr::f32> &in,
|
||||
QLabel *label = nullptr,
|
||||
LevelMeterSignalDB *levelMeter = nullptr,
|
||||
const char *_name = nullptr
|
||||
) :
|
||||
runnable(sch, _name ? _name : in.name),
|
||||
m_in(in),
|
||||
m_label(label),
|
||||
m_levelMeter(levelMeter)
|
||||
m_in(in)
|
||||
{
|
||||
std::fill(m_samples, m_samples+m_nbAvg, 0);
|
||||
m_avg = 0.0f;
|
||||
m_rms = 0.0f;
|
||||
m_peak = 0.0f;
|
||||
m_sum = 0;
|
||||
m_index = 0;
|
||||
}
|
||||
@ -66,8 +63,9 @@ struct datvgauge: runnable
|
||||
oldest = *p;
|
||||
leansdr::f32 avg = m_sum/m_nbAvg;
|
||||
|
||||
m_levelMeter->levelChanged(avg/30.0, *p/30.0, m_nbAvg);
|
||||
m_label->setText(QString("%1").arg(avg, 0, 'f', 1));
|
||||
m_avg = avg;
|
||||
m_rms = avg/30;
|
||||
m_peak = *p/30;
|
||||
m_in.read(1);
|
||||
|
||||
if (m_index == m_nbAvg) {
|
@ -26,6 +26,9 @@
|
||||
<string>ChirpChat Modulator</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="verticalLayoutWidget">
|
||||
<property name="windowTitle">
|
||||
<string>RF/mod/coder settings</string>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -495,6 +498,9 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="verticalLayoutWidget_2">
|
||||
<property name="windowTitle">
|
||||
<string>Payload</string>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -748,6 +748,12 @@ margin-bottom: 20px;
|
||||
"beastPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"logFilename" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"logEnabled" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -3047,6 +3053,9 @@ margin-bottom: 20px;
|
||||
"ChirpChatModReport" : {
|
||||
"$ref" : "#/definitions/ChirpChatModReport"
|
||||
},
|
||||
"DATVDemodReport" : {
|
||||
"$ref" : "#/definitions/DATVDemodReport"
|
||||
},
|
||||
"DATVModReport" : {
|
||||
"$ref" : "#/definitions/DATVModReport"
|
||||
},
|
||||
@ -3766,6 +3775,56 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "DABDemod"
|
||||
};
|
||||
defs.DATVDemodReport = {
|
||||
"properties" : {
|
||||
"channelPowerDB" : {
|
||||
"type" : "number",
|
||||
"format" : "float",
|
||||
"description" : "power received in channel (dB)"
|
||||
},
|
||||
"audioActive" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio is active (1 for yes, 0 for now)"
|
||||
},
|
||||
"audioDecodeOK" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio decode (1 for OK, 0 for KO)"
|
||||
},
|
||||
"videoActive" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio is active (1 for yes, 0 for now)"
|
||||
},
|
||||
"videoDecodeOK" : {
|
||||
"type" : "integer",
|
||||
"description" : "Video decode (1 for OK, 0 for KO)"
|
||||
},
|
||||
"udpRunning" : {
|
||||
"type" : "integer",
|
||||
"description" : "UDP thread (1 running, 0 idle)"
|
||||
},
|
||||
"modcodModulation" : {
|
||||
"type" : "integer",
|
||||
"description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\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"
|
||||
},
|
||||
"modcodCodeRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "Code rate (FEC) set by DVB-S2 MODCOD\n * -1: Unset\n * 0: 1/2\n * 1: 2/3\n * 2: 4/6\n * 3: 3/4\n * 4: 5/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"
|
||||
},
|
||||
"setByModcod" : {
|
||||
"type" : "integer",
|
||||
"description" : "Modulation and code rate set by DVB-S2 MODCOD (1 for yes, 0 for no)"
|
||||
},
|
||||
"mer" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"cnr" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "DATVDemod"
|
||||
};
|
||||
defs.DATVDemodSettings = {
|
||||
"properties" : {
|
||||
@ -3868,6 +3927,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "boolean"
|
||||
},
|
||||
"playerEnable" : {
|
||||
"type" : "integer",
|
||||
"description" : "boolean"
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -7860,14 +7923,15 @@ margin-bottom: 20px;
|
||||
"fftCount" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"frequencySpec" : {
|
||||
"type" : "integer"
|
||||
"sweepSpec" : {
|
||||
"type" : "integer",
|
||||
"description" : "(0 - Range, 1 - Step, 2 - List)"
|
||||
},
|
||||
"startFrequency" : {
|
||||
"startValue" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"stopFrequency" : {
|
||||
"stopValue" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
@ -7878,9 +7942,13 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"frequencies" : {
|
||||
"list" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"setting" : {
|
||||
"type" : "string",
|
||||
"description" : "The device setting to sweep (E.g. centerFrequency or gain)"
|
||||
},
|
||||
"visaDevice" : {
|
||||
"type" : "string"
|
||||
},
|
||||
@ -51162,7 +51230,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2021-10-23T19:53:41.859+02:00
|
||||
Generated 2021-11-03T19:37:30.169+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,6 +22,10 @@ ADSBDemodSettings:
|
||||
type: string
|
||||
beastPort:
|
||||
type: integer
|
||||
logFilename:
|
||||
type: string
|
||||
logEnabled:
|
||||
type: integer
|
||||
rgbColor:
|
||||
type: integer
|
||||
title:
|
||||
|
@ -29,6 +29,8 @@ ChannelReport:
|
||||
$ref: "/doc/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodReport"
|
||||
ChirpChatModReport:
|
||||
$ref: "/doc/swagger/include/ChirpChatMod.yaml#/ChirpChatModReport"
|
||||
DATVDemodReport:
|
||||
$ref: "/doc/swagger/include/DATVDemod.yaml#/DATVDemodReport"
|
||||
DATVModReport:
|
||||
$ref: "/doc/swagger/include/DATVMod.yaml#/DATVModReport"
|
||||
DSDDemodReport:
|
||||
|
@ -104,6 +104,9 @@ DATVDemodSettings:
|
||||
udpTS:
|
||||
description: boolean
|
||||
type: integer
|
||||
playerEnable:
|
||||
description: boolean
|
||||
type: integer
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
@ -118,3 +121,67 @@ DATVDemodSettings:
|
||||
type: integer
|
||||
reverseAPIChannelIndex:
|
||||
type: integer
|
||||
|
||||
DATVDemodReport:
|
||||
description: DATVDemod
|
||||
properties:
|
||||
channelPowerDB:
|
||||
description: power received in channel (dB)
|
||||
type: number
|
||||
format: float
|
||||
audioActive:
|
||||
description: Audio is active (1 for yes, 0 for now)
|
||||
type: integer
|
||||
audioDecodeOK:
|
||||
description: Audio decode (1 for OK, 0 for KO)
|
||||
type: integer
|
||||
videoActive:
|
||||
description: Audio is active (1 for yes, 0 for now)
|
||||
type: integer
|
||||
videoDecodeOK:
|
||||
description: Video decode (1 for OK, 0 for KO)
|
||||
type: integer
|
||||
udpRunning:
|
||||
description: UDP thread (1 running, 0 idle)
|
||||
type: integer
|
||||
modcodModulation:
|
||||
type: integer
|
||||
description: >
|
||||
Modulation set by DVB-S2 MODCOD
|
||||
* -1: Unset
|
||||
* 0: BPSK
|
||||
* 1: QPSK
|
||||
* 2: PSK8
|
||||
* 3: APSK16
|
||||
* 4: APSK32
|
||||
* 5: APSK64E
|
||||
* 6: QAM16
|
||||
* 7: QAM64
|
||||
* 8: QAM256
|
||||
modcodCodeRate:
|
||||
type: integer
|
||||
description: >
|
||||
Code rate (FEC) set by DVB-S2 MODCOD
|
||||
* -1: Unset
|
||||
* 0: 1/2
|
||||
* 1: 2/3
|
||||
* 2: 4/6
|
||||
* 3: 3/4
|
||||
* 4: 5/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
|
||||
setByModcod:
|
||||
type: integer
|
||||
description: Modulation and code rate set by DVB-S2 MODCOD (1 for yes, 0 for no)
|
||||
mer:
|
||||
type: number
|
||||
format: float
|
||||
cnr:
|
||||
type: number
|
||||
format: float
|
||||
|
@ -8,12 +8,13 @@ NoiseFigureSettings:
|
||||
type: integer
|
||||
fftCount:
|
||||
type: integer
|
||||
frequencySpec:
|
||||
sweepSpec:
|
||||
description: "(0 - Range, 1 - Step, 2 - List)"
|
||||
type: integer
|
||||
startFrequency:
|
||||
startValue:
|
||||
type: number
|
||||
format: float
|
||||
stopFrequency:
|
||||
stopValue:
|
||||
type: number
|
||||
format: float
|
||||
steps:
|
||||
@ -21,7 +22,10 @@ NoiseFigureSettings:
|
||||
step:
|
||||
type: number
|
||||
format: float
|
||||
frequencies:
|
||||
list:
|
||||
type: string
|
||||
setting:
|
||||
description: "The device setting to sweep (E.g. centerFrequency or gain)"
|
||||
type: string
|
||||
visaDevice:
|
||||
type: string
|
||||
|
@ -37,6 +37,7 @@ set(sdrgui_SOURCES
|
||||
gui/featuresdock.cpp
|
||||
gui/featurepresetsdialog.cpp
|
||||
gui/featurewindow.cpp
|
||||
gui/fftwisdomdialog.cpp
|
||||
gui/glscope.cpp
|
||||
gui/glscopegui.cpp
|
||||
gui/glshadercolors.cpp
|
||||
@ -125,6 +126,7 @@ set(sdrgui_HEADERS
|
||||
gui/featuresdock.h
|
||||
gui/featurepresetsdialog.h
|
||||
gui/featurewindow.h
|
||||
gui/fftwisdomdialog.h
|
||||
gui/glscope.h
|
||||
gui/glscopegui.h
|
||||
gui/glshadercolors.h
|
||||
@ -199,6 +201,7 @@ set(sdrgui_FORMS
|
||||
gui/fmpreemphasisdialog.ui
|
||||
gui/featureadddialog.ui
|
||||
gui/featurepresetsdialog.ui
|
||||
gui/fftwisdomdialog.ui
|
||||
gui/glscopegui.ui
|
||||
gui/glspectrumgui.ui
|
||||
gui/pluginsdialog.ui
|
||||
|
135
sdrgui/gui/fftwisdomdialog.cpp
Normal file
135
sdrgui/gui/fftwisdomdialog.cpp
Normal file
@ -0,0 +1,135 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QProcess>
|
||||
|
||||
#include "fftwisdomdialog.h"
|
||||
#include "ui_fftwisdomdialog.h"
|
||||
|
||||
FFTWisdomDialog::FFTWisdomDialog(QProcess *process, QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::FFTWisdomDialog),
|
||||
m_process(process)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QString pathVar = qgetenv("PATH");
|
||||
QStringList findPaths = pathVar.split(QDir::listSeparator());
|
||||
findPaths.append(QCoreApplication::applicationDirPath());
|
||||
QString exePath = QStandardPaths::findExecutable("fftwf-wisdom", findPaths);
|
||||
|
||||
if (exePath.length() != 0)
|
||||
{
|
||||
m_fftwExecPath = exePath;
|
||||
ui->executable->setText(exePath);
|
||||
}
|
||||
|
||||
updateArguments(3, false);
|
||||
}
|
||||
|
||||
FFTWisdomDialog::~FFTWisdomDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::on_showFileDialog_clicked()
|
||||
{
|
||||
QFileDialog fileDialog(this, "Select FFTW Wisdom file generator");
|
||||
fileDialog.setOptions(QFileDialog::DontUseNativeDialog);
|
||||
fileDialog.selectFile(m_fftwExecPath);
|
||||
|
||||
if (fileDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
QStringList fileNames = fileDialog.selectedFiles();
|
||||
|
||||
if (fileNames.size() > 0) {
|
||||
m_fftwExecPath = fileNames.at(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::on_fftwMaxSize_currentIndexChanged(int index)
|
||||
{
|
||||
updateArguments(index, ui->fftwReverse->isChecked());
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::on_fftwReverse_toggled(bool checked)
|
||||
{
|
||||
updateArguments(ui->fftwMaxSize->currentIndex(), checked);
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::accept()
|
||||
{
|
||||
m_process->start(m_fftwExecPath, m_fftwArguments);
|
||||
qDebug("FFTWisdomDialog::accept: process started");
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::reject()
|
||||
{
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::processFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
qDebug("FFTWisdomDialog::processFinished: process finished rc=%d (%d)", exitCode, (int) exitStatus);
|
||||
|
||||
if ((exitCode != 0) || (exitStatus != QProcess::NormalExit))
|
||||
{
|
||||
QMessageBox::critical(this, "FFTW Wisdom", "fftwf-widdsom program failed");
|
||||
}
|
||||
else
|
||||
{
|
||||
QString log = m_process->readAllStandardOutput();
|
||||
QMessageBox::information(this, "FFTW Wisdom", QString("Success\n%1").arg(log));
|
||||
|
||||
}
|
||||
|
||||
delete m_process;
|
||||
}
|
||||
|
||||
void FFTWisdomDialog::updateArguments(int fftMaxLog2, bool includeReverse)
|
||||
{
|
||||
QString filePath = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
|
||||
filePath += QDir::separator();
|
||||
filePath += "fftw-wisdom";
|
||||
|
||||
m_fftwArguments.clear();
|
||||
m_fftwArguments.append("-v");
|
||||
m_fftwArguments.append("-n");
|
||||
m_fftwArguments.append("-o");
|
||||
m_fftwArguments.append(filePath);
|
||||
|
||||
for (int i = 7; i <= 7+fftMaxLog2; i++)
|
||||
{
|
||||
m_fftwArguments.append(QString("%1").arg(1<<i));
|
||||
|
||||
if (includeReverse) {
|
||||
m_fftwArguments.append(QString("b%1").arg(1<<i));
|
||||
}
|
||||
}
|
||||
|
||||
QString argStr = m_fftwArguments.join(' ');
|
||||
|
||||
qDebug("FFTWisdomDialog::updateArguments: %s %s", qPrintable(m_fftwExecPath), qPrintable(argStr));
|
||||
ui->fftwCommand->setText(m_fftwExecPath + " " + argStr);
|
||||
}
|
57
sdrgui/gui/fftwisdomdialog.h
Normal file
57
sdrgui/gui/fftwisdomdialog.h
Normal file
@ -0,0 +1,57 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2021 F4EXB //
|
||||
// written by Edouard Griffiths //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// (at your option) any later version. //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SDRGUI_GUI_FFTWISDOMDIALOG_H_
|
||||
#define SDRGUI_GUI_FFTWISDOMDIALOG_H_
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
namespace Ui {
|
||||
class FFTWisdomDialog;
|
||||
}
|
||||
|
||||
class QProcess;
|
||||
|
||||
class SDRGUI_API FFTWisdomDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FFTWisdomDialog(QProcess *process, QWidget* parent = nullptr);
|
||||
~FFTWisdomDialog();
|
||||
QProcess *getProcess() { return m_process; }
|
||||
|
||||
private slots:
|
||||
void on_showFileDialog_clicked();
|
||||
void on_fftwMaxSize_currentIndexChanged(int index);
|
||||
void on_fftwReverse_toggled(bool checked);
|
||||
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void accept();
|
||||
void reject();
|
||||
|
||||
private:
|
||||
void updateArguments(int fftMaxLog2, bool includeReverse);
|
||||
|
||||
Ui::FFTWisdomDialog *ui;
|
||||
QString m_fftwExecPath;
|
||||
QStringList m_fftwArguments;
|
||||
QProcess *m_process;
|
||||
};
|
||||
|
||||
|
||||
#endif // SDRGUI_GUI_FFTWISDOMDIALOG_H_
|
228
sdrgui/gui/fftwisdomdialog.ui
Normal file
228
sdrgui/gui/fftwisdomdialog.ui
Normal file
@ -0,0 +1,228 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FFTWisdomDialog</class>
|
||||
<widget class="QDialog" name="FFTWisdomDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>427</width>
|
||||
<height>158</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<family>Liberation Sans</family>
|
||||
<pointsize>9</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>FFTW Wisdom file generator</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="exeLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="executableLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Path to fftwf-wisdom executable</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Program</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="executable">
|
||||
<property name="toolTip">
|
||||
<string>Channel marker title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="showFileDialog">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Open file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/res.qrc">
|
||||
<normaloff>:/preset-load.png</normaloff>:/preset-load.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="argsLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="fftwMaxSizeLabel">
|
||||
<property name="text">
|
||||
<string>FFT max</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="fftwMaxSize">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>128</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>256</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>512</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>2k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>4k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>8k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>16k</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>32k</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="fftwReverse">
|
||||
<property name="toolTip">
|
||||
<string>Sychronize with reverse API </string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>reverse FFT</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="commandLayout">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="fftwCommand">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>FFTW Wisdom program invocation</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../resources/res.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>FFTWisdomDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>FFTWisdomDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@ -28,6 +28,7 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QResource>
|
||||
#include <QFontDatabase>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include "device/devicegui.h"
|
||||
#include "device/deviceapi.h"
|
||||
@ -56,6 +57,7 @@
|
||||
#include "gui/deviceuserargsdialog.h"
|
||||
#include "gui/sdrangelsplash.h"
|
||||
#include "gui/mypositiondialog.h"
|
||||
#include "gui/fftwisdomdialog.h"
|
||||
#include "gui/ambedevicesdialog.h"
|
||||
#include "dsp/dspengine.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
@ -100,7 +102,8 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||
m_inputGUI(0),
|
||||
m_sampleRate(0),
|
||||
m_centerFrequency(0),
|
||||
m_sampleFileName(std::string("./test.sdriq"))
|
||||
m_sampleFileName(std::string("./test.sdriq")),
|
||||
m_fftWisdomProcess(nullptr)
|
||||
{
|
||||
qDebug() << "MainWindow::MainWindow: start";
|
||||
|
||||
@ -180,7 +183,20 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse
|
||||
|
||||
splash->showStatusMessage("allocate FFTs...", Qt::white);
|
||||
splash->showStatusMessage("allocate FFTs...", Qt::white);
|
||||
m_dspEngine->createFFTFactory(parser.getFFTWFWisdomFileName());
|
||||
|
||||
if (parser.getFFTWFWisdomFileName().length() != 0)
|
||||
{
|
||||
m_dspEngine->createFFTFactory(parser.getFFTWFWisdomFileName());
|
||||
}
|
||||
else
|
||||
{
|
||||
QString defaultFFTWWisdomFile = QStandardPaths::locate(QStandardPaths::AppDataLocation, "fftw-wisdom");
|
||||
|
||||
if (defaultFFTWWisdomFile.length() != 0) {
|
||||
m_dspEngine->createFFTFactory(defaultFFTWWisdomFile);
|
||||
}
|
||||
}
|
||||
|
||||
m_dspEngine->preAllocateFFTs();
|
||||
|
||||
splash->showStatusMessage("load settings...", Qt::white);
|
||||
@ -1764,6 +1780,56 @@ void MainWindow::on_action_DeviceUserArguments_triggered()
|
||||
deviceUserArgsDialog.exec();
|
||||
}
|
||||
|
||||
void MainWindow::on_action_FFT_triggered()
|
||||
{
|
||||
qDebug("MainWindow::on_action_FFT_triggered");
|
||||
|
||||
if (m_fftWisdomProcess)
|
||||
{
|
||||
QMessageBox::information(this, "FFTW Wisdom", QString("Process %1 is already running").arg(m_fftWisdomProcess->processId()));
|
||||
return;
|
||||
}
|
||||
|
||||
m_fftWisdomProcess = new QProcess(this);
|
||||
connect(m_fftWisdomProcess,
|
||||
SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||
this,
|
||||
SLOT(fftWisdomProcessFinished(int, QProcess::ExitStatus)));
|
||||
FFTWisdomDialog fftWisdomDialog(m_fftWisdomProcess, this);
|
||||
|
||||
if (fftWisdomDialog.exec() == QDialog::Rejected)
|
||||
{
|
||||
disconnect(m_fftWisdomProcess,
|
||||
SIGNAL(finished(int, QProcess::ExitStatus)),
|
||||
this,
|
||||
SLOT(fftWisdomProcessFinished(int, QProcess::ExitStatus)));
|
||||
delete m_fftWisdomProcess;
|
||||
m_fftWisdomProcess = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, "FFTW Wisdom", QString("Process %1 started").arg(m_fftWisdomProcess->processId()));
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::fftWisdomProcessFinished(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
qDebug("MainWindow::fftWisdomProcessFinished: process finished rc=%d (%d)", exitCode, (int) exitStatus);
|
||||
|
||||
if ((exitCode != 0) || (exitStatus != QProcess::NormalExit))
|
||||
{
|
||||
QMessageBox::critical(this, "FFTW Wisdom", "fftwf-widdsom program failed");
|
||||
}
|
||||
else
|
||||
{
|
||||
QString log = m_fftWisdomProcess->readAllStandardOutput();
|
||||
QMessageBox::information(this, "FFTW Wisdom", QString("Success\n%1").arg(log));
|
||||
|
||||
}
|
||||
|
||||
delete m_fftWisdomProcess;
|
||||
}
|
||||
|
||||
void MainWindow::on_action_AMBE_triggered()
|
||||
{
|
||||
qDebug("MainWindow::on_action_AMBE_triggered");
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <QMainWindow>
|
||||
#include <QTimer>
|
||||
#include <QList>
|
||||
#include <QProcess>
|
||||
|
||||
#include "settings/mainsettings.h"
|
||||
#include "util/message.h"
|
||||
@ -119,6 +120,8 @@ private:
|
||||
|
||||
CommandKeyReceiver *m_commandKeyReceiver;
|
||||
|
||||
QProcess *m_fftWisdomProcess;
|
||||
|
||||
void loadSettings();
|
||||
void loadPresetSettings(const Preset* preset, int tabIndex);
|
||||
void savePresetSettings(Preset* preset, int tabIndex);
|
||||
@ -173,6 +176,7 @@ private slots:
|
||||
void on_commandKeyboardConnect_toggled(bool checked);
|
||||
void on_action_Audio_triggered();
|
||||
void on_action_Logging_triggered();
|
||||
void on_action_FFT_triggered();
|
||||
void on_action_AMBE_triggered();
|
||||
void on_action_LimeRFE_triggered();
|
||||
void on_action_My_Position_triggered();
|
||||
@ -192,6 +196,7 @@ private slots:
|
||||
void tabChannelsIndexChanged();
|
||||
void tabFeaturesIndexChanged();
|
||||
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
||||
void fftWisdomProcessFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_MAINWINDOW_H
|
||||
|
@ -126,6 +126,7 @@
|
||||
<addaction name="action_Audio"/>
|
||||
<addaction name="action_Logging"/>
|
||||
<addaction name="action_My_Position"/>
|
||||
<addaction name="action_FFT"/>
|
||||
<addaction name="action_AMBE"/>
|
||||
<addaction name="action_LimeRFE"/>
|
||||
<addaction name="menuDevices"/>
|
||||
@ -972,6 +973,11 @@
|
||||
</font>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_FFT">
|
||||
<property name="text">
|
||||
<string>FFT</string>
|
||||
</property>
|
||||
</action>
|
||||
<zorder>presetDock</zorder>
|
||||
<zorder>channelDock</zorder>
|
||||
<zorder>commandsDock</zorder>
|
||||
|
@ -29,6 +29,8 @@ ChannelReport:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/ChirpChatDemod.yaml#/ChirpChatDemodReport"
|
||||
ChirpChatModReport:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/ChirpChatMod.yaml#/ChirpChatModReport"
|
||||
DATVDemodReport:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/DATVDemod.yaml#/DATVDemodReport"
|
||||
DATVModReport:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/DATVMod.yaml#/DATVModReport"
|
||||
DSDDemodReport:
|
||||
|
@ -104,6 +104,9 @@ DATVDemodSettings:
|
||||
udpTS:
|
||||
description: boolean
|
||||
type: integer
|
||||
playerEnable:
|
||||
description: boolean
|
||||
type: integer
|
||||
streamIndex:
|
||||
description: MIMO channel. Not relevant when connected to SI (single Rx).
|
||||
type: integer
|
||||
@ -118,3 +121,67 @@ DATVDemodSettings:
|
||||
type: integer
|
||||
reverseAPIChannelIndex:
|
||||
type: integer
|
||||
|
||||
DATVDemodReport:
|
||||
description: DATVDemod
|
||||
properties:
|
||||
channelPowerDB:
|
||||
description: power received in channel (dB)
|
||||
type: number
|
||||
format: float
|
||||
audioActive:
|
||||
description: Audio is active (1 for yes, 0 for now)
|
||||
type: integer
|
||||
audioDecodeOK:
|
||||
description: Audio decode (1 for OK, 0 for KO)
|
||||
type: integer
|
||||
videoActive:
|
||||
description: Audio is active (1 for yes, 0 for now)
|
||||
type: integer
|
||||
videoDecodeOK:
|
||||
description: Video decode (1 for OK, 0 for KO)
|
||||
type: integer
|
||||
udpRunning:
|
||||
description: UDP thread (1 running, 0 idle)
|
||||
type: integer
|
||||
modcodModulation:
|
||||
type: integer
|
||||
description: >
|
||||
Modulation set by DVB-S2 MODCOD
|
||||
* -1: Unset
|
||||
* 0: BPSK
|
||||
* 1: QPSK
|
||||
* 2: PSK8
|
||||
* 3: APSK16
|
||||
* 4: APSK32
|
||||
* 5: APSK64E
|
||||
* 6: QAM16
|
||||
* 7: QAM64
|
||||
* 8: QAM256
|
||||
modcodCodeRate:
|
||||
type: integer
|
||||
description: >
|
||||
Code rate (FEC) set by DVB-S2 MODCOD
|
||||
* -1: Unset
|
||||
* 0: 1/2
|
||||
* 1: 2/3
|
||||
* 2: 4/6
|
||||
* 3: 3/4
|
||||
* 4: 5/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
|
||||
setByModcod:
|
||||
type: integer
|
||||
description: Modulation and code rate set by DVB-S2 MODCOD (1 for yes, 0 for no)
|
||||
mer:
|
||||
type: number
|
||||
format: float
|
||||
cnr:
|
||||
type: number
|
||||
format: float
|
||||
|
@ -748,6 +748,12 @@ margin-bottom: 20px;
|
||||
"beastPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"logFilename" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"logEnabled" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
@ -3047,6 +3053,9 @@ margin-bottom: 20px;
|
||||
"ChirpChatModReport" : {
|
||||
"$ref" : "#/definitions/ChirpChatModReport"
|
||||
},
|
||||
"DATVDemodReport" : {
|
||||
"$ref" : "#/definitions/DATVDemodReport"
|
||||
},
|
||||
"DATVModReport" : {
|
||||
"$ref" : "#/definitions/DATVModReport"
|
||||
},
|
||||
@ -3766,6 +3775,56 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "DABDemod"
|
||||
};
|
||||
defs.DATVDemodReport = {
|
||||
"properties" : {
|
||||
"channelPowerDB" : {
|
||||
"type" : "number",
|
||||
"format" : "float",
|
||||
"description" : "power received in channel (dB)"
|
||||
},
|
||||
"audioActive" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio is active (1 for yes, 0 for now)"
|
||||
},
|
||||
"audioDecodeOK" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio decode (1 for OK, 0 for KO)"
|
||||
},
|
||||
"videoActive" : {
|
||||
"type" : "integer",
|
||||
"description" : "Audio is active (1 for yes, 0 for now)"
|
||||
},
|
||||
"videoDecodeOK" : {
|
||||
"type" : "integer",
|
||||
"description" : "Video decode (1 for OK, 0 for KO)"
|
||||
},
|
||||
"udpRunning" : {
|
||||
"type" : "integer",
|
||||
"description" : "UDP thread (1 running, 0 idle)"
|
||||
},
|
||||
"modcodModulation" : {
|
||||
"type" : "integer",
|
||||
"description" : "Modulation set by DVB-S2 MODCOD\n * -1: Unset\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"
|
||||
},
|
||||
"modcodCodeRate" : {
|
||||
"type" : "integer",
|
||||
"description" : "Code rate (FEC) set by DVB-S2 MODCOD\n * -1: Unset\n * 0: 1/2\n * 1: 2/3\n * 2: 4/6\n * 3: 3/4\n * 4: 5/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"
|
||||
},
|
||||
"setByModcod" : {
|
||||
"type" : "integer",
|
||||
"description" : "Modulation and code rate set by DVB-S2 MODCOD (1 for yes, 0 for no)"
|
||||
},
|
||||
"mer" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"cnr" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
}
|
||||
},
|
||||
"description" : "DATVDemod"
|
||||
};
|
||||
defs.DATVDemodSettings = {
|
||||
"properties" : {
|
||||
@ -3868,6 +3927,10 @@ margin-bottom: 20px;
|
||||
"type" : "integer",
|
||||
"description" : "boolean"
|
||||
},
|
||||
"playerEnable" : {
|
||||
"type" : "integer",
|
||||
"description" : "boolean"
|
||||
},
|
||||
"streamIndex" : {
|
||||
"type" : "integer",
|
||||
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
|
||||
@ -7860,14 +7923,15 @@ margin-bottom: 20px;
|
||||
"fftCount" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"frequencySpec" : {
|
||||
"type" : "integer"
|
||||
"sweepSpec" : {
|
||||
"type" : "integer",
|
||||
"description" : "(0 - Range, 1 - Step, 2 - List)"
|
||||
},
|
||||
"startFrequency" : {
|
||||
"startValue" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"stopFrequency" : {
|
||||
"stopValue" : {
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
@ -7878,9 +7942,13 @@ margin-bottom: 20px;
|
||||
"type" : "number",
|
||||
"format" : "float"
|
||||
},
|
||||
"frequencies" : {
|
||||
"list" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"setting" : {
|
||||
"type" : "string",
|
||||
"description" : "The device setting to sweep (E.g. centerFrequency or gain)"
|
||||
},
|
||||
"visaDevice" : {
|
||||
"type" : "string"
|
||||
},
|
||||
@ -51162,7 +51230,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2021-10-23T19:53:41.859+02:00
|
||||
Generated 2021-11-03T19:37:30.169+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -50,6 +50,8 @@ SWGChannelReport::SWGChannelReport() {
|
||||
m_chirp_chat_demod_report_isSet = false;
|
||||
chirp_chat_mod_report = nullptr;
|
||||
m_chirp_chat_mod_report_isSet = false;
|
||||
datv_demod_report = nullptr;
|
||||
m_datv_demod_report_isSet = false;
|
||||
datv_mod_report = nullptr;
|
||||
m_datv_mod_report_isSet = false;
|
||||
dsd_demod_report = nullptr;
|
||||
@ -130,6 +132,8 @@ SWGChannelReport::init() {
|
||||
m_chirp_chat_demod_report_isSet = false;
|
||||
chirp_chat_mod_report = new SWGChirpChatModReport();
|
||||
m_chirp_chat_mod_report_isSet = false;
|
||||
datv_demod_report = new SWGDATVDemodReport();
|
||||
m_datv_demod_report_isSet = false;
|
||||
datv_mod_report = new SWGDATVModReport();
|
||||
m_datv_mod_report_isSet = false;
|
||||
dsd_demod_report = new SWGDSDDemodReport();
|
||||
@ -215,6 +219,9 @@ SWGChannelReport::cleanup() {
|
||||
if(chirp_chat_mod_report != nullptr) {
|
||||
delete chirp_chat_mod_report;
|
||||
}
|
||||
if(datv_demod_report != nullptr) {
|
||||
delete datv_demod_report;
|
||||
}
|
||||
if(datv_mod_report != nullptr) {
|
||||
delete datv_mod_report;
|
||||
}
|
||||
@ -325,6 +332,8 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&chirp_chat_mod_report, pJson["ChirpChatModReport"], "SWGChirpChatModReport", "SWGChirpChatModReport");
|
||||
|
||||
::SWGSDRangel::setValue(&datv_demod_report, pJson["DATVDemodReport"], "SWGDATVDemodReport", "SWGDATVDemodReport");
|
||||
|
||||
::SWGSDRangel::setValue(&datv_mod_report, pJson["DATVModReport"], "SWGDATVModReport", "SWGDATVModReport");
|
||||
|
||||
::SWGSDRangel::setValue(&dsd_demod_report, pJson["DSDDemodReport"], "SWGDSDDemodReport", "SWGDSDDemodReport");
|
||||
@ -424,6 +433,9 @@ SWGChannelReport::asJsonObject() {
|
||||
if((chirp_chat_mod_report != nullptr) && (chirp_chat_mod_report->isSet())){
|
||||
toJsonValue(QString("ChirpChatModReport"), chirp_chat_mod_report, obj, QString("SWGChirpChatModReport"));
|
||||
}
|
||||
if((datv_demod_report != nullptr) && (datv_demod_report->isSet())){
|
||||
toJsonValue(QString("DATVDemodReport"), datv_demod_report, obj, QString("SWGDATVDemodReport"));
|
||||
}
|
||||
if((datv_mod_report != nullptr) && (datv_mod_report->isSet())){
|
||||
toJsonValue(QString("DATVModReport"), datv_mod_report, obj, QString("SWGDATVModReport"));
|
||||
}
|
||||
@ -613,6 +625,16 @@ SWGChannelReport::setChirpChatModReport(SWGChirpChatModReport* chirp_chat_mod_re
|
||||
this->m_chirp_chat_mod_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGDATVDemodReport*
|
||||
SWGChannelReport::getDatvDemodReport() {
|
||||
return datv_demod_report;
|
||||
}
|
||||
void
|
||||
SWGChannelReport::setDatvDemodReport(SWGDATVDemodReport* datv_demod_report) {
|
||||
this->datv_demod_report = datv_demod_report;
|
||||
this->m_datv_demod_report_isSet = true;
|
||||
}
|
||||
|
||||
SWGDATVModReport*
|
||||
SWGChannelReport::getDatvModReport() {
|
||||
return datv_mod_report;
|
||||
@ -901,6 +923,9 @@ SWGChannelReport::isSet(){
|
||||
if(chirp_chat_mod_report && chirp_chat_mod_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(datv_demod_report && datv_demod_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(datv_mod_report && datv_mod_report->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include "SWGBFMDemodReport.h"
|
||||
#include "SWGChirpChatDemodReport.h"
|
||||
#include "SWGChirpChatModReport.h"
|
||||
#include "SWGDATVDemodReport.h"
|
||||
#include "SWGDATVModReport.h"
|
||||
#include "SWGDSDDemodReport.h"
|
||||
#include "SWGFileSinkReport.h"
|
||||
@ -109,6 +110,9 @@ public:
|
||||
SWGChirpChatModReport* getChirpChatModReport();
|
||||
void setChirpChatModReport(SWGChirpChatModReport* chirp_chat_mod_report);
|
||||
|
||||
SWGDATVDemodReport* getDatvDemodReport();
|
||||
void setDatvDemodReport(SWGDATVDemodReport* datv_demod_report);
|
||||
|
||||
SWGDATVModReport* getDatvModReport();
|
||||
void setDatvModReport(SWGDATVModReport* datv_mod_report);
|
||||
|
||||
@ -221,6 +225,9 @@ private:
|
||||
SWGChirpChatModReport* chirp_chat_mod_report;
|
||||
bool m_chirp_chat_mod_report_isSet;
|
||||
|
||||
SWGDATVDemodReport* datv_demod_report;
|
||||
bool m_datv_demod_report_isSet;
|
||||
|
||||
SWGDATVModReport* datv_mod_report;
|
||||
bool m_datv_mod_report_isSet;
|
||||
|
||||
|
338
swagger/sdrangel/code/qt5/client/SWGDATVDemodReport.cpp
Normal file
338
swagger/sdrangel/code/qt5/client/SWGDATVDemodReport.cpp
Normal file
@ -0,0 +1,338 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 6.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGDATVDemodReport.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonArray>
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGDATVDemodReport::SWGDATVDemodReport(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGDATVDemodReport::SWGDATVDemodReport() {
|
||||
channel_power_db = 0.0f;
|
||||
m_channel_power_db_isSet = false;
|
||||
audio_active = 0;
|
||||
m_audio_active_isSet = false;
|
||||
audio_decode_ok = 0;
|
||||
m_audio_decode_ok_isSet = false;
|
||||
video_active = 0;
|
||||
m_video_active_isSet = false;
|
||||
video_decode_ok = 0;
|
||||
m_video_decode_ok_isSet = false;
|
||||
udp_running = 0;
|
||||
m_udp_running_isSet = false;
|
||||
modcod_modulation = 0;
|
||||
m_modcod_modulation_isSet = false;
|
||||
modcod_code_rate = 0;
|
||||
m_modcod_code_rate_isSet = false;
|
||||
set_by_modcod = 0;
|
||||
m_set_by_modcod_isSet = false;
|
||||
mer = 0.0f;
|
||||
m_mer_isSet = false;
|
||||
cnr = 0.0f;
|
||||
m_cnr_isSet = false;
|
||||
}
|
||||
|
||||
SWGDATVDemodReport::~SWGDATVDemodReport() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGDATVDemodReport::init() {
|
||||
channel_power_db = 0.0f;
|
||||
m_channel_power_db_isSet = false;
|
||||
audio_active = 0;
|
||||
m_audio_active_isSet = false;
|
||||
audio_decode_ok = 0;
|
||||
m_audio_decode_ok_isSet = false;
|
||||
video_active = 0;
|
||||
m_video_active_isSet = false;
|
||||
video_decode_ok = 0;
|
||||
m_video_decode_ok_isSet = false;
|
||||
udp_running = 0;
|
||||
m_udp_running_isSet = false;
|
||||
modcod_modulation = 0;
|
||||
m_modcod_modulation_isSet = false;
|
||||
modcod_code_rate = 0;
|
||||
m_modcod_code_rate_isSet = false;
|
||||
set_by_modcod = 0;
|
||||
m_set_by_modcod_isSet = false;
|
||||
mer = 0.0f;
|
||||
m_mer_isSet = false;
|
||||
cnr = 0.0f;
|
||||
m_cnr_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
SWGDATVDemodReport::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGDATVDemodReport*
|
||||
SWGDATVDemodReport::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
this->fromJsonObject(jsonObject);
|
||||
return this;
|
||||
}
|
||||
|
||||
void
|
||||
SWGDATVDemodReport::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_active, pJson["audioActive"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&audio_decode_ok, pJson["audioDecodeOK"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&video_active, pJson["videoActive"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&video_decode_ok, pJson["videoDecodeOK"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&udp_running, pJson["udpRunning"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&modcod_modulation, pJson["modcodModulation"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&modcod_code_rate, pJson["modcodCodeRate"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&set_by_modcod, pJson["setByModcod"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&mer, pJson["mer"], "float", "");
|
||||
|
||||
::SWGSDRangel::setValue(&cnr, pJson["cnr"], "float", "");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
SWGDATVDemodReport::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
QJsonDocument doc(*obj);
|
||||
QByteArray bytes = doc.toJson();
|
||||
delete obj;
|
||||
return QString(bytes);
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGDATVDemodReport::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_channel_power_db_isSet){
|
||||
obj->insert("channelPowerDB", QJsonValue(channel_power_db));
|
||||
}
|
||||
if(m_audio_active_isSet){
|
||||
obj->insert("audioActive", QJsonValue(audio_active));
|
||||
}
|
||||
if(m_audio_decode_ok_isSet){
|
||||
obj->insert("audioDecodeOK", QJsonValue(audio_decode_ok));
|
||||
}
|
||||
if(m_video_active_isSet){
|
||||
obj->insert("videoActive", QJsonValue(video_active));
|
||||
}
|
||||
if(m_video_decode_ok_isSet){
|
||||
obj->insert("videoDecodeOK", QJsonValue(video_decode_ok));
|
||||
}
|
||||
if(m_udp_running_isSet){
|
||||
obj->insert("udpRunning", QJsonValue(udp_running));
|
||||
}
|
||||
if(m_modcod_modulation_isSet){
|
||||
obj->insert("modcodModulation", QJsonValue(modcod_modulation));
|
||||
}
|
||||
if(m_modcod_code_rate_isSet){
|
||||
obj->insert("modcodCodeRate", QJsonValue(modcod_code_rate));
|
||||
}
|
||||
if(m_set_by_modcod_isSet){
|
||||
obj->insert("setByModcod", QJsonValue(set_by_modcod));
|
||||
}
|
||||
if(m_mer_isSet){
|
||||
obj->insert("mer", QJsonValue(mer));
|
||||
}
|
||||
if(m_cnr_isSet){
|
||||
obj->insert("cnr", QJsonValue(cnr));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
float
|
||||
SWGDATVDemodReport::getChannelPowerDb() {
|
||||
return channel_power_db;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setChannelPowerDb(float channel_power_db) {
|
||||
this->channel_power_db = channel_power_db;
|
||||
this->m_channel_power_db_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getAudioActive() {
|
||||
return audio_active;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setAudioActive(qint32 audio_active) {
|
||||
this->audio_active = audio_active;
|
||||
this->m_audio_active_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getAudioDecodeOk() {
|
||||
return audio_decode_ok;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setAudioDecodeOk(qint32 audio_decode_ok) {
|
||||
this->audio_decode_ok = audio_decode_ok;
|
||||
this->m_audio_decode_ok_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getVideoActive() {
|
||||
return video_active;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setVideoActive(qint32 video_active) {
|
||||
this->video_active = video_active;
|
||||
this->m_video_active_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getVideoDecodeOk() {
|
||||
return video_decode_ok;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setVideoDecodeOk(qint32 video_decode_ok) {
|
||||
this->video_decode_ok = video_decode_ok;
|
||||
this->m_video_decode_ok_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getUdpRunning() {
|
||||
return udp_running;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setUdpRunning(qint32 udp_running) {
|
||||
this->udp_running = udp_running;
|
||||
this->m_udp_running_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getModcodModulation() {
|
||||
return modcod_modulation;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setModcodModulation(qint32 modcod_modulation) {
|
||||
this->modcod_modulation = modcod_modulation;
|
||||
this->m_modcod_modulation_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getModcodCodeRate() {
|
||||
return modcod_code_rate;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setModcodCodeRate(qint32 modcod_code_rate) {
|
||||
this->modcod_code_rate = modcod_code_rate;
|
||||
this->m_modcod_code_rate_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodReport::getSetByModcod() {
|
||||
return set_by_modcod;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setSetByModcod(qint32 set_by_modcod) {
|
||||
this->set_by_modcod = set_by_modcod;
|
||||
this->m_set_by_modcod_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGDATVDemodReport::getMer() {
|
||||
return mer;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setMer(float mer) {
|
||||
this->mer = mer;
|
||||
this->m_mer_isSet = true;
|
||||
}
|
||||
|
||||
float
|
||||
SWGDATVDemodReport::getCnr() {
|
||||
return cnr;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodReport::setCnr(float cnr) {
|
||||
this->cnr = cnr;
|
||||
this->m_cnr_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGDATVDemodReport::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_channel_power_db_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_audio_active_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_audio_decode_ok_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_video_active_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_video_decode_ok_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_udp_running_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_modcod_modulation_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_modcod_code_rate_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_set_by_modcod_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_mer_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_cnr_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
}
|
||||
|
118
swagger/sdrangel/code/qt5/client/SWGDATVDemodReport.h
Normal file
118
swagger/sdrangel/code/qt5/client/SWGDATVDemodReport.h
Normal file
@ -0,0 +1,118 @@
|
||||
/**
|
||||
* SDRangel
|
||||
* This is the web REST/JSON API of SDRangel SDR software. SDRangel is an Open Source Qt5/OpenGL 3.0+ (4.3+ in Windows) GUI and server Software Defined Radio and signal analyzer in software. It supports Airspy, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay RSP1 and FunCube --- Limitations and specifcities: * In SDRangel GUI the first Rx device set cannot be deleted. Conversely the server starts with no device sets and its number of device sets can be reduced to zero by as many calls as necessary to /sdrangel/deviceset with DELETE method. * Preset import and export from/to file is a server only feature. * Device set focus is a GUI only feature. * The following channels are not implemented (status 501 is returned): ATV and DATV demodulators, Channel Analyzer NG, LoRa demodulator * The device settings and report structures contains only the sub-structure corresponding to the device type. The DeviceSettings and DeviceReport structures documented here shows all of them but only one will be or should be present at a time * The channel settings and report structures contains only the sub-structure corresponding to the channel type. The ChannelSettings and ChannelReport structures documented here shows all of them but only one will be or should be present at a time ---
|
||||
*
|
||||
* OpenAPI spec version: 6.0.0
|
||||
* Contact: f4exb06@gmail.com
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGDATVDemodReport.h
|
||||
*
|
||||
* DATVDemod
|
||||
*/
|
||||
|
||||
#ifndef SWGDATVDemodReport_H_
|
||||
#define SWGDATVDemodReport_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
|
||||
|
||||
#include "SWGObject.h"
|
||||
#include "export.h"
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGDATVDemodReport: public SWGObject {
|
||||
public:
|
||||
SWGDATVDemodReport();
|
||||
SWGDATVDemodReport(QString* json);
|
||||
virtual ~SWGDATVDemodReport();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGDATVDemodReport* fromJson(QString &jsonString) override;
|
||||
|
||||
float getChannelPowerDb();
|
||||
void setChannelPowerDb(float channel_power_db);
|
||||
|
||||
qint32 getAudioActive();
|
||||
void setAudioActive(qint32 audio_active);
|
||||
|
||||
qint32 getAudioDecodeOk();
|
||||
void setAudioDecodeOk(qint32 audio_decode_ok);
|
||||
|
||||
qint32 getVideoActive();
|
||||
void setVideoActive(qint32 video_active);
|
||||
|
||||
qint32 getVideoDecodeOk();
|
||||
void setVideoDecodeOk(qint32 video_decode_ok);
|
||||
|
||||
qint32 getUdpRunning();
|
||||
void setUdpRunning(qint32 udp_running);
|
||||
|
||||
qint32 getModcodModulation();
|
||||
void setModcodModulation(qint32 modcod_modulation);
|
||||
|
||||
qint32 getModcodCodeRate();
|
||||
void setModcodCodeRate(qint32 modcod_code_rate);
|
||||
|
||||
qint32 getSetByModcod();
|
||||
void setSetByModcod(qint32 set_by_modcod);
|
||||
|
||||
float getMer();
|
||||
void setMer(float mer);
|
||||
|
||||
float getCnr();
|
||||
void setCnr(float cnr);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
private:
|
||||
float channel_power_db;
|
||||
bool m_channel_power_db_isSet;
|
||||
|
||||
qint32 audio_active;
|
||||
bool m_audio_active_isSet;
|
||||
|
||||
qint32 audio_decode_ok;
|
||||
bool m_audio_decode_ok_isSet;
|
||||
|
||||
qint32 video_active;
|
||||
bool m_video_active_isSet;
|
||||
|
||||
qint32 video_decode_ok;
|
||||
bool m_video_decode_ok_isSet;
|
||||
|
||||
qint32 udp_running;
|
||||
bool m_udp_running_isSet;
|
||||
|
||||
qint32 modcod_modulation;
|
||||
bool m_modcod_modulation_isSet;
|
||||
|
||||
qint32 modcod_code_rate;
|
||||
bool m_modcod_code_rate_isSet;
|
||||
|
||||
qint32 set_by_modcod;
|
||||
bool m_set_by_modcod_isSet;
|
||||
|
||||
float mer;
|
||||
bool m_mer_isSet;
|
||||
|
||||
float cnr;
|
||||
bool m_cnr_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGDATVDemodReport_H_ */
|
@ -82,6 +82,8 @@ SWGDATVDemodSettings::SWGDATVDemodSettings() {
|
||||
m_udp_ts_port_isSet = false;
|
||||
udp_ts = 0;
|
||||
m_udp_ts_isSet = false;
|
||||
player_enable = 0;
|
||||
m_player_enable_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -156,6 +158,8 @@ SWGDATVDemodSettings::init() {
|
||||
m_udp_ts_port_isSet = false;
|
||||
udp_ts = 0;
|
||||
m_udp_ts_isSet = false;
|
||||
player_enable = 0;
|
||||
m_player_enable_isSet = false;
|
||||
stream_index = 0;
|
||||
m_stream_index_isSet = false;
|
||||
use_reverse_api = 0;
|
||||
@ -209,6 +213,7 @@ SWGDATVDemodSettings::cleanup() {
|
||||
|
||||
|
||||
|
||||
|
||||
if(reverse_api_address != nullptr) {
|
||||
delete reverse_api_address;
|
||||
}
|
||||
@ -282,6 +287,8 @@ SWGDATVDemodSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&udp_ts, pJson["udpTS"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&player_enable, pJson["playerEnable"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
|
||||
@ -391,6 +398,9 @@ SWGDATVDemodSettings::asJsonObject() {
|
||||
if(m_udp_ts_isSet){
|
||||
obj->insert("udpTS", QJsonValue(udp_ts));
|
||||
}
|
||||
if(m_player_enable_isSet){
|
||||
obj->insert("playerEnable", QJsonValue(player_enable));
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
obj->insert("streamIndex", QJsonValue(stream_index));
|
||||
}
|
||||
@ -683,6 +693,16 @@ SWGDATVDemodSettings::setUdpTs(qint32 udp_ts) {
|
||||
this->m_udp_ts_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodSettings::getPlayerEnable() {
|
||||
return player_enable;
|
||||
}
|
||||
void
|
||||
SWGDATVDemodSettings::setPlayerEnable(qint32 player_enable) {
|
||||
this->player_enable = player_enable;
|
||||
this->m_player_enable_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDATVDemodSettings::getStreamIndex() {
|
||||
return stream_index;
|
||||
@ -829,6 +849,9 @@ SWGDATVDemodSettings::isSet(){
|
||||
if(m_udp_ts_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_player_enable_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_stream_index_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
|
@ -123,6 +123,9 @@ public:
|
||||
qint32 getUdpTs();
|
||||
void setUdpTs(qint32 udp_ts);
|
||||
|
||||
qint32 getPlayerEnable();
|
||||
void setPlayerEnable(qint32 player_enable);
|
||||
|
||||
qint32 getStreamIndex();
|
||||
void setStreamIndex(qint32 stream_index);
|
||||
|
||||
@ -226,6 +229,9 @@ private:
|
||||
qint32 udp_ts;
|
||||
bool m_udp_ts_isSet;
|
||||
|
||||
qint32 player_enable;
|
||||
bool m_player_enable_isSet;
|
||||
|
||||
qint32 stream_index;
|
||||
bool m_stream_index_isSet;
|
||||
|
||||
|
@ -81,6 +81,7 @@
|
||||
#include "SWGCommand.h"
|
||||
#include "SWGComplex.h"
|
||||
#include "SWGDABDemodSettings.h"
|
||||
#include "SWGDATVDemodReport.h"
|
||||
#include "SWGDATVDemodSettings.h"
|
||||
#include "SWGDATVModReport.h"
|
||||
#include "SWGDATVModSettings.h"
|
||||
@ -643,6 +644,11 @@ namespace SWGSDRangel {
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGDATVDemodReport").compare(type) == 0) {
|
||||
SWGDATVDemodReport *obj = new SWGDATVDemodReport();
|
||||
obj->init();
|
||||
return obj;
|
||||
}
|
||||
if(QString("SWGDATVDemodSettings").compare(type) == 0) {
|
||||
SWGDATVDemodSettings *obj = new SWGDATVDemodSettings();
|
||||
obj->init();
|
||||
|
Loading…
Reference in New Issue
Block a user