Aaronia RTSA Tx: initial copy from Local Output plugin

This commit is contained in:
f4exb 2023-04-11 11:38:28 +02:00
parent bce8ba7b3d
commit ef5f4c5d9f
31 changed files with 2830 additions and 8 deletions

View File

@ -4,6 +4,7 @@ add_subdirectory(testsink)
add_subdirectory(fileoutput)
add_subdirectory(localoutput)
add_subdirectory(audiooutput)
add_subdirectory(aaroniartsaoutput)
if (CM256CC_FOUND AND (HAS_SSE3 OR HAS_NEON))
add_subdirectory(remoteoutput)

View File

@ -0,0 +1,60 @@
project(aaroniartsaoutput)
set(aaroniartsaoutput_SOURCES
aaroniartsaoutput.cpp
aaroniartsaoutputplugin.cpp
aaroniartsaoutputsettings.cpp
aaroniartsaoutputwebapiadapter.cpp
)
set(aaroniartsaoutput_HEADERS
aaroniartsaoutput.h
aaroniartsaoutputplugin.h
aaroniartsaoutputsettings.h
aaroniartsaoutputwebapiadapter.h
)
include_directories(
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
)
if(NOT SERVER_MODE)
set(aaroniartsaoutput_SOURCES
${aaroniartsaoutput_SOURCES}
aaroniartsaoutputgui.cpp
aaroniartsaoutputgui.ui
)
set(aaroniartsaoutput_HEADERS
${aaroniartsaoutput_HEADERS}
aaroniartsaoutputgui.h
)
set(TARGET_NAME outputaaroniartsa)
set(TARGET_LIB "Qt::Widgets")
set(TARGET_LIB_GUI "sdrgui")
set(INSTALL_FOLDER ${INSTALL_PLUGINS_DIR})
else()
set(TARGET_NAME outputaaroniartsasrv)
set(TARGET_LIB "")
set(TARGET_LIB_GUI "")
set(INSTALL_FOLDER ${INSTALL_PLUGINSSRV_DIR})
endif()
add_library(${TARGET_NAME} SHARED
${aaroniartsaoutput_SOURCES}
)
target_link_libraries(${TARGET_NAME}
Qt::Core
${TARGET_LIB}
sdrbase
${TARGET_LIB_GUI}
swagger
)
install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER})
# Install debug symbols
if (WIN32)
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}> CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${INSTALL_FOLDER} )
endif()

View File

@ -0,0 +1,427 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
// //
// 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 <string.h>
#include <errno.h>
#include <QDebug>
#include <QNetworkReply>
#include <QBuffer>
#include "SWGDeviceSettings.h"
#include "SWGDeviceState.h"
#include "SWGDeviceReport.h"
#include "SWGAaroniaRTSAOutputReport.h"
#include "util/simpleserializer.h"
#include "dsp/dspcommands.h"
#include "dsp/dspengine.h"
#include "device/deviceapi.h"
#include "aaroniartsaoutput.h"
MESSAGE_CLASS_DEFINITION(AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput, Message)
MESSAGE_CLASS_DEFINITION(AaroniaRTSAOutput::MsgStartStop, Message)
MESSAGE_CLASS_DEFINITION(AaroniaRTSAOutput::MsgReportSampleRateAndFrequency, Message)
AaroniaRTSAOutput::AaroniaRTSAOutput(DeviceAPI *deviceAPI) :
m_deviceAPI(deviceAPI),
m_settings(),
m_centerFrequency(0),
m_sampleRate(48000),
m_deviceDescription("AaroniaRTSAOutput")
{
m_sampleSourceFifo.resize(SampleSourceFifo::getSizePolicy(m_sampleRate));
m_deviceAPI->setNbSinkStreams(1);
m_networkManager = new QNetworkAccessManager();
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AaroniaRTSAOutput::networkManagerFinished
);
}
AaroniaRTSAOutput::~AaroniaRTSAOutput()
{
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AaroniaRTSAOutput::networkManagerFinished
);
delete m_networkManager;
stop();
}
void AaroniaRTSAOutput::destroy()
{
delete this;
}
void AaroniaRTSAOutput::init()
{
applySettings(m_settings, QList<QString>(), true);
}
bool AaroniaRTSAOutput::start()
{
qDebug() << "AaroniaRTSAOutput::start";
return true;
}
void AaroniaRTSAOutput::stop()
{
qDebug() << "AaroniaRTSAOutput::stop";
}
QByteArray AaroniaRTSAOutput::serialize() const
{
return m_settings.serialize();
}
bool AaroniaRTSAOutput::deserialize(const QByteArray& data)
{
bool success = true;
if (!m_settings.deserialize(data))
{
m_settings.resetToDefaults();
success = false;
}
MsgConfigureAaroniaRTSAOutput* message = MsgConfigureAaroniaRTSAOutput::create(m_settings, QList<QString>(), true);
m_inputMessageQueue.push(message);
if (m_guiMessageQueue)
{
MsgConfigureAaroniaRTSAOutput* messageToGUI = MsgConfigureAaroniaRTSAOutput::create(m_settings, QList<QString>(), true);
m_guiMessageQueue->push(messageToGUI);
}
return success;
}
void AaroniaRTSAOutput::setMessageQueueToGUI(MessageQueue *queue)
{
m_guiMessageQueue = queue;
}
const QString& AaroniaRTSAOutput::getDeviceDescription() const
{
return m_deviceDescription;
}
int AaroniaRTSAOutput::getSampleRate() const
{
return m_sampleRate;
}
void AaroniaRTSAOutput::setSampleRate(int sampleRate)
{
m_sampleRate = sampleRate;
m_sampleSourceFifo.resize(SampleSourceFifo::getSizePolicy(m_sampleRate));
DSPSignalNotification *notif = new DSPSignalNotification(m_sampleRate, m_centerFrequency); // Frequency in Hz for the DSP engine
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
if (getMessageQueueToGUI())
{
MsgReportSampleRateAndFrequency *msg = MsgReportSampleRateAndFrequency::create(m_sampleRate, m_centerFrequency);
getMessageQueueToGUI()->push(msg);
}
}
quint64 AaroniaRTSAOutput::getCenterFrequency() const
{
return m_centerFrequency;
}
void AaroniaRTSAOutput::setCenterFrequency(qint64 centerFrequency)
{
m_centerFrequency = centerFrequency;
DSPSignalNotification *notif = new DSPSignalNotification(m_sampleRate, m_centerFrequency); // Frequency in Hz for the DSP engine
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
if (getMessageQueueToGUI())
{
MsgReportSampleRateAndFrequency *msg = MsgReportSampleRateAndFrequency::create(m_sampleRate, m_centerFrequency);
getMessageQueueToGUI()->push(msg);
}
}
bool AaroniaRTSAOutput::handleMessage(const Message& message)
{
if (DSPSignalNotification::match(message))
{
return false;
}
else if (MsgStartStop::match(message))
{
MsgStartStop& cmd = (MsgStartStop&) message;
qDebug() << "AaroniaRTSAOutput::handleMessage: MsgStartStop: " << (cmd.getStartStop() ? "start" : "stop");
if (cmd.getStartStop())
{
if (m_deviceAPI->initDeviceEngine()) {
m_deviceAPI->startDeviceEngine();
}
}
else
{
m_deviceAPI->stopDeviceEngine();
}
if (m_settings.m_useReverseAPI) {
webapiReverseSendStartStop(cmd.getStartStop());
}
return true;
}
else if (MsgConfigureAaroniaRTSAOutput::match(message))
{
qDebug() << "AaroniaRTSAOutput::handleMessage:" << message.getIdentifier();
MsgConfigureAaroniaRTSAOutput& conf = (MsgConfigureAaroniaRTSAOutput&) message;
applySettings(conf.getSettings(), conf.getSettingsKeys(), conf.getForce());
return true;
}
else
{
return false;
}
}
void AaroniaRTSAOutput::applySettings(const AaroniaRTSAOutputSettings& settings, const QList<QString>& settingsKeys, bool force)
{
qDebug() << "AaroniaRTSAOutput::applySettings: force:" << force << settings.getDebugString(settingsKeys, force);
QMutexLocker mutexLocker(&m_mutex);
std::ostringstream os;
QString remoteAddress;
QList<QString> reverseAPIKeys;
if (settingsKeys.contains("useReverseAPI"))
{
bool fullUpdate = (settingsKeys.contains("useReverseAPI") && settings.m_useReverseAPI) ||
settingsKeys.contains("reverseAPIAddress") ||
settingsKeys.contains("reverseAPIPort") ||
settingsKeys.contains("reverseAPIDeviceIndex");
webapiReverseSendSettings(settingsKeys, settings, fullUpdate || force);
}
if (force) {
m_settings = settings;
} else {
m_settings.applySettings(settingsKeys, settings);
}
m_remoteAddress = remoteAddress;
}
int AaroniaRTSAOutput::webapiRunGet(
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage)
{
(void) errorMessage;
m_deviceAPI->getDeviceEngineStateStr(*response.getState());
return 200;
}
int AaroniaRTSAOutput::webapiRun(
bool run,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage)
{
(void) errorMessage;
m_deviceAPI->getDeviceEngineStateStr(*response.getState());
MsgStartStop *message = MsgStartStop::create(run);
m_inputMessageQueue.push(message);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgStartStop *msgToGUI = MsgStartStop::create(run);
m_guiMessageQueue->push(msgToGUI);
}
return 200;
}
int AaroniaRTSAOutput::webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage)
{
(void) errorMessage;
response.setAaroniaRtsaOutputSettings(new SWGSDRangel::SWGAaroniaRTSAOutputSettings());
response.getAaroniaRtsaOutputSettings()->init();
webapiFormatDeviceSettings(response, m_settings);
return 200;
}
int AaroniaRTSAOutput::webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage)
{
(void) errorMessage;
AaroniaRTSAOutputSettings settings = m_settings;
webapiUpdateDeviceSettings(settings, deviceSettingsKeys, response);
MsgConfigureAaroniaRTSAOutput *msg = MsgConfigureAaroniaRTSAOutput::create(settings, deviceSettingsKeys, force);
m_inputMessageQueue.push(msg);
if (m_guiMessageQueue) // forward to GUI if any
{
MsgConfigureAaroniaRTSAOutput *msgToGUI = MsgConfigureAaroniaRTSAOutput::create(settings, deviceSettingsKeys, force);
m_guiMessageQueue->push(msgToGUI);
}
webapiFormatDeviceSettings(response, settings);
return 200;
}
void AaroniaRTSAOutput::webapiUpdateDeviceSettings(
AaroniaRTSAOutputSettings& settings,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response)
{
if (deviceSettingsKeys.contains("useReverseAPI")) {
settings.m_useReverseAPI = response.getAaroniaRtsaOutputSettings()->getUseReverseApi() != 0;
}
if (deviceSettingsKeys.contains("reverseAPIAddress")) {
settings.m_reverseAPIAddress = *response.getAaroniaRtsaOutputSettings()->getReverseApiAddress();
}
if (deviceSettingsKeys.contains("reverseAPIPort")) {
settings.m_reverseAPIPort = response.getAaroniaRtsaOutputSettings()->getReverseApiPort();
}
if (deviceSettingsKeys.contains("reverseAPIDeviceIndex")) {
settings.m_reverseAPIDeviceIndex = response.getAaroniaRtsaOutputSettings()->getReverseApiDeviceIndex();
}
}
void AaroniaRTSAOutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const AaroniaRTSAOutputSettings& settings)
{
response.getAaroniaRtsaOutputSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
if (response.getAaroniaRtsaOutputSettings()->getReverseApiAddress()) {
*response.getAaroniaRtsaOutputSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
} else {
response.getAaroniaRtsaOutputSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
}
response.getAaroniaRtsaOutputSettings()->setReverseApiPort(settings.m_reverseAPIPort);
response.getAaroniaRtsaOutputSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
}
int AaroniaRTSAOutput::webapiReportGet(
SWGSDRangel::SWGDeviceReport& response,
QString& errorMessage)
{
(void) errorMessage;
response.setAaroniaRtsaOutputReport(new SWGSDRangel::SWGAaroniaRTSAOutputReport());
response.getAaroniaRtsaOutputReport()->init();
webapiFormatDeviceReport(response);
return 200;
}
void AaroniaRTSAOutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
{
response.getAaroniaRtsaOutputReport()->setCenterFrequency(m_centerFrequency);
response.getAaroniaRtsaOutputReport()->setSampleRate(m_sampleRate);
}
void AaroniaRTSAOutput::webapiReverseSendSettings(const QList<QString>& deviceSettingsKeys, const AaroniaRTSAOutputSettings& settings, bool force)
{
(void) deviceSettingsKeys;
(void) force;
SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings();
swgDeviceSettings->setDirection(1); // single Tx
swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex());
swgDeviceSettings->setDeviceHwType(new QString("AaroniaRTSAOutput"));
swgDeviceSettings->setAaroniaRtsaOutputSettings(new SWGSDRangel::SWGAaroniaRTSAOutputSettings());
// transfer data that has been modified. When force is on transfer all data except reverse API data
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/settings")
.arg(settings.m_reverseAPIAddress)
.arg(settings.m_reverseAPIPort)
.arg(settings.m_reverseAPIDeviceIndex);
m_networkRequest.setUrl(QUrl(deviceSettingsURL));
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QBuffer *buffer = new QBuffer();
buffer->open((QBuffer::ReadWrite));
buffer->write(swgDeviceSettings->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 swgDeviceSettings;
}
void AaroniaRTSAOutput::webapiReverseSendStartStop(bool start)
{
SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings();
swgDeviceSettings->setDirection(0); // single Rx
swgDeviceSettings->setOriginatorIndex(m_deviceAPI->getDeviceSetIndex());
swgDeviceSettings->setDeviceHwType(new QString("LocalInput"));
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/run")
.arg(m_settings.m_reverseAPIAddress)
.arg(m_settings.m_reverseAPIPort)
.arg(m_settings.m_reverseAPIDeviceIndex);
m_networkRequest.setUrl(QUrl(deviceSettingsURL));
m_networkRequest.setHeader(QNetworkRequest::ContentTypeHeader, "application/json");
QBuffer *buffer = new QBuffer();
buffer->open((QBuffer::ReadWrite));
buffer->write(swgDeviceSettings->asJson().toUtf8());
buffer->seek(0);
QNetworkReply *reply;
if (start) {
reply = m_networkManager->sendCustomRequest(m_networkRequest, "POST", buffer);
} else {
reply = m_networkManager->sendCustomRequest(m_networkRequest, "DELETE", buffer);
}
buffer->setParent(reply);
delete swgDeviceSettings;
}
void AaroniaRTSAOutput::networkManagerFinished(QNetworkReply *reply)
{
QNetworkReply::NetworkError replyError = reply->error();
if (replyError)
{
qWarning() << "AaroniaRTSAOutput::networkManagerFinished:"
<< " error(" << (int) replyError
<< "): " << replyError
<< ": " << reply->errorString();
}
else
{
QString answer = reply->readAll();
answer.chop(1); // remove last \n
qDebug("AaroniaRTSAOutput::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
}
reply->deleteLater();
}

View File

@ -0,0 +1,180 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2023 Edouard Griffiths, F4EXB //
// //
// 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 INCLUDE_LOCALOUTPUT_H
#define INCLUDE_LOCALOUTPUT_H
#include <ctime>
#include <iostream>
#include <stdint.h>
#include <QString>
#include <QByteArray>
#include <QTimer>
#include <QNetworkRequest>
#include "dsp/devicesamplesink.h"
#include "aaroniartsaoutputsettings.h"
class QNetworkAccessManager;
class QNetworkReply;
class DeviceAPI;
class AaroniaRTSAOutput : public DeviceSampleSink {
Q_OBJECT
public:
class MsgConfigureAaroniaRTSAOutput : public Message {
MESSAGE_CLASS_DECLARATION
public:
const AaroniaRTSAOutputSettings& getSettings() const { return m_settings; }
const QList<QString>& getSettingsKeys() const { return m_settingsKeys; }
bool getForce() const { return m_force; }
static MsgConfigureAaroniaRTSAOutput* create(const AaroniaRTSAOutputSettings& settings, const QList<QString>& settingsKeys, bool force = false) {
return new MsgConfigureAaroniaRTSAOutput(settings, settingsKeys, force);
}
private:
AaroniaRTSAOutputSettings m_settings;
QList<QString> m_settingsKeys;
bool m_force;
MsgConfigureAaroniaRTSAOutput(const AaroniaRTSAOutputSettings& settings, const QList<QString>& settingsKeys, bool force) :
Message(),
m_settings(settings),
m_settingsKeys(settingsKeys),
m_force(force)
{ }
};
class MsgStartStop : public Message {
MESSAGE_CLASS_DECLARATION
public:
bool getStartStop() const { return m_startStop; }
static MsgStartStop* create(bool startStop) {
return new MsgStartStop(startStop);
}
protected:
bool m_startStop;
MsgStartStop(bool startStop) :
Message(),
m_startStop(startStop)
{ }
};
class MsgReportSampleRateAndFrequency : public Message {
MESSAGE_CLASS_DECLARATION
public:
int getSampleRate() const { return m_sampleRate; }
int getCenterFrequency() const { return m_centerFrequency; }
static MsgReportSampleRateAndFrequency* create(int sampleRate, qint64 centerFrequency) {
return new MsgReportSampleRateAndFrequency(sampleRate, centerFrequency);
}
protected:
int m_sampleRate;
qint64 m_centerFrequency;
MsgReportSampleRateAndFrequency(int sampleRate, qint64 centerFrequency) :
Message(),
m_sampleRate(sampleRate),
m_centerFrequency(centerFrequency)
{ }
};
AaroniaRTSAOutput(DeviceAPI *deviceAPI);
virtual ~AaroniaRTSAOutput();
virtual void destroy();
virtual void init();
virtual bool start();
virtual void stop();
virtual QByteArray serialize() const;
virtual bool deserialize(const QByteArray& data);
virtual void setMessageQueueToGUI(MessageQueue *queue);
virtual const QString& getDeviceDescription() const;
virtual int getSampleRate() const;
virtual void setSampleRate(int sampleRate);
virtual quint64 getCenterFrequency() const;
virtual void setCenterFrequency(qint64 centerFrequency);
std::time_t getStartingTimeStamp() const;
virtual bool handleMessage(const Message& message);
virtual int webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage);
virtual int webapiReportGet(
SWGSDRangel::SWGDeviceReport& response,
QString& errorMessage);
virtual int webapiRunGet(
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage);
virtual int webapiRun(
bool run,
SWGSDRangel::SWGDeviceState& response,
QString& errorMessage);
static void webapiFormatDeviceSettings(
SWGSDRangel::SWGDeviceSettings& response,
const AaroniaRTSAOutputSettings& settings);
static void webapiUpdateDeviceSettings(
AaroniaRTSAOutputSettings& settings,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response);
private:
DeviceAPI *m_deviceAPI;
QMutex m_mutex;
AaroniaRTSAOutputSettings m_settings;
qint64 m_centerFrequency;
int m_sampleRate;
QString m_remoteAddress;
QString m_deviceDescription;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
void applySettings(const AaroniaRTSAOutputSettings& settings, const QList<QString>& settingsKeys, bool force = false);
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
void webapiReverseSendSettings(const QList<QString>& deviceSettingsKeys, const AaroniaRTSAOutputSettings& settings, bool force);
void webapiReverseSendStartStop(bool start);
private slots:
void networkManagerFinished(QNetworkReply *reply);
};
#endif // INCLUDE_LOCALOUTPUT_H

View File

@ -0,0 +1,323 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 <stdint.h>
#include <sstream>
#include <iostream>
#include <QDebug>
#include <QMessageBox>
#include <QTime>
#include <QDateTime>
#include <QString>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonParseError>
#include <QJsonObject>
#include "ui_aaroniartsaoutputgui.h"
#include "gui/colormapper.h"
#include "gui/glspectrum.h"
#include "gui/basicdevicesettingsdialog.h"
#include "gui/dialogpositioner.h"
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
#include "mainwindow.h"
#include "util/simpleserializer.h"
#include "device/deviceapi.h"
#include "device/deviceuiset.h"
#include "aaroniartsaoutputgui.h"
AaroniaRTSAOutputGui::AaroniaRTSAOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
DeviceGUI(parent),
ui(new Ui::AaroniaRTSAOutputGui),
m_settings(),
m_sampleSink(0),
m_acquisition(false),
m_streamSampleRate(0),
m_streamCenterFrequency(0),
m_lastEngineState(DeviceAPI::StNotStarted),
m_samplesCount(0),
m_tickCount(0),
m_doApplySettings(true),
m_forceSettings(true)
{
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
m_paletteGreenText.setColor(QPalette::WindowText, Qt::green);
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents());
sizeToContents();
getContents()->setStyleSheet("#AaroniaRTSAOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/localoutput/readme.md";
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(openDeviceSettingsDialog(const QPoint &)));
displaySettings();
connect(&m_statusTimer, SIGNAL(timeout()), this, SLOT(updateStatus()));
m_statusTimer.start(500);
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
m_sampleSink = (AaroniaRTSAOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
m_sampleSink->setMessageQueueToGUI(&m_inputMessageQueue);
m_forceSettings = true;
sendSettings();
makeUIConnections();
}
AaroniaRTSAOutputGui::~AaroniaRTSAOutputGui()
{
m_statusTimer.stop();
m_updateTimer.stop();
delete ui;
}
void AaroniaRTSAOutputGui::blockApplySettings(bool block)
{
m_doApplySettings = !block;
}
void AaroniaRTSAOutputGui::destroy()
{
delete this;
}
void AaroniaRTSAOutputGui::resetToDefaults()
{
m_settings.resetToDefaults();
displaySettings();
m_forceSettings = true;
sendSettings();
}
QByteArray AaroniaRTSAOutputGui::serialize() const
{
return m_settings.serialize();
}
bool AaroniaRTSAOutputGui::deserialize(const QByteArray& data)
{
qDebug("AaroniaRTSAOutputGui::deserialize");
if (m_settings.deserialize(data))
{
displaySettings();
m_forceSettings = true;
sendSettings();
return true;
}
else
{
return false;
}
}
bool AaroniaRTSAOutputGui::handleMessage(const Message& message)
{
if (AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput::match(message))
{
const AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput& cfg = (AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput&) message;
if (cfg.getForce()) {
m_settings = cfg.getSettings();
} else {
m_settings.applySettings(cfg.getSettingsKeys(), cfg.getSettings());
}
blockApplySettings(true);
displaySettings();
blockApplySettings(false);
return true;
}
else if (AaroniaRTSAOutput::MsgStartStop::match(message))
{
AaroniaRTSAOutput::MsgStartStop& notif = (AaroniaRTSAOutput::MsgStartStop&) message;
blockApplySettings(true);
ui->startStop->setChecked(notif.getStartStop());
blockApplySettings(false);
return true;
}
else if (AaroniaRTSAOutput::MsgReportSampleRateAndFrequency::match(message))
{
AaroniaRTSAOutput::MsgReportSampleRateAndFrequency& notif = (AaroniaRTSAOutput::MsgReportSampleRateAndFrequency&) message;
m_streamSampleRate = notif.getSampleRate();
m_streamCenterFrequency = notif.getCenterFrequency();
updateSampleRateAndFrequency();
return true;
}
else
{
return false;
}
}
void AaroniaRTSAOutputGui::handleInputMessages()
{
Message* message;
while ((message = m_inputMessageQueue.pop()) != 0)
{
//qDebug("AaroniaRTSAOutputGui::handleInputMessages: message: %s", message->getIdentifier());
if (DSPSignalNotification::match(*message))
{
DSPSignalNotification* notif = (DSPSignalNotification*) message;
if (notif->getSampleRate() != m_streamSampleRate) {
m_streamSampleRate = notif->getSampleRate();
}
m_streamCenterFrequency = notif->getCenterFrequency();
qDebug("AaroniaRTSAOutputGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
updateSampleRateAndFrequency();
DSPSignalNotification *fwd = new DSPSignalNotification(*notif);
m_sampleSink->getInputMessageQueue()->push(fwd);
delete message;
}
else
{
if (handleMessage(*message)) {
delete message;
}
}
}
}
void AaroniaRTSAOutputGui::updateSampleRateAndFrequency()
{
m_deviceUISet->getSpectrum()->setSampleRate(m_streamSampleRate);
m_deviceUISet->getSpectrum()->setCenterFrequency(m_streamCenterFrequency);
ui->deviceRateText->setText(tr("%1k").arg((float)m_streamSampleRate / 1000));
blockApplySettings(true);
ui->centerFrequency->setText(QString("%L1").arg(m_streamCenterFrequency / 1000));
blockApplySettings(false);
}
void AaroniaRTSAOutputGui::displaySettings()
{
blockApplySettings(true);
ui->centerFrequency->setText(QString("%L1").arg(m_streamCenterFrequency / 1000));
ui->deviceRateText->setText(tr("%1k").arg(m_streamSampleRate / 1000.0));
blockApplySettings(false);
}
void AaroniaRTSAOutputGui::sendSettings()
{
if (!m_updateTimer.isActive()) {
m_updateTimer.start(100);
}
}
void AaroniaRTSAOutputGui::on_startStop_toggled(bool checked)
{
if (m_doApplySettings)
{
AaroniaRTSAOutput::MsgStartStop *message = AaroniaRTSAOutput::MsgStartStop::create(checked);
m_sampleSink->getInputMessageQueue()->push(message);
}
}
void AaroniaRTSAOutputGui::updateHardware()
{
if (m_doApplySettings)
{
qDebug() << "AaroniaRTSAOutputGui::updateHardware";
AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput* message =
AaroniaRTSAOutput::MsgConfigureAaroniaRTSAOutput::create(m_settings, m_settingsKeys, m_forceSettings);
m_sampleSink->getInputMessageQueue()->push(message);
m_forceSettings = false;
m_settingsKeys.clear();
m_updateTimer.stop();
}
}
void AaroniaRTSAOutputGui::updateStatus()
{
int state = m_deviceUISet->m_deviceAPI->state();
if(m_lastEngineState != state)
{
switch(state)
{
case DeviceAPI::StNotStarted:
ui->startStop->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
break;
case DeviceAPI::StIdle:
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
break;
case DeviceAPI::StRunning:
ui->startStop->setStyleSheet("QToolButton { background-color : green; }");
break;
case DeviceAPI::StError:
ui->startStop->setStyleSheet("QToolButton { background-color : red; }");
QMessageBox::information(this, tr("Message"), m_deviceUISet->m_deviceAPI->errorMessage());
break;
default:
break;
}
m_lastEngineState = state;
}
}
void AaroniaRTSAOutputGui::openDeviceSettingsDialog(const QPoint& p)
{
if (m_contextMenuType == ContextMenuDeviceSettings)
{
BasicDeviceSettingsDialog dialog(this);
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
dialog.move(p);
new DialogPositioner(&dialog, false);
dialog.exec();
m_settings.m_useReverseAPI = dialog.useReverseAPI();
m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
m_settingsKeys.append("useReverseAPI");
m_settingsKeys.append("reverseAPIAddress");
m_settingsKeys.append("reverseAPIPort");
m_settingsKeys.append("reverseAPIDeviceIndex");
sendSettings();
}
resetContextMenuType();
}
void AaroniaRTSAOutputGui::makeUIConnections()
{
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &AaroniaRTSAOutputGui::on_startStop_toggled);
}

View File

@ -0,0 +1,88 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 INCLUDE_LOCALOUTPUTGUI_H
#define INCLUDE_LOCALOUTPUTGUI_H
#include <QTimer>
#include <QWidget>
#include "device/devicegui.h"
#include "util/messagequeue.h"
#include "aaroniartsaoutput.h"
class DeviceUISet;
class QNetworkReply;
class QJsonObject;
namespace Ui {
class AaroniaRTSAOutputGui;
}
class AaroniaRTSAOutputGui : public DeviceGUI {
Q_OBJECT
public:
explicit AaroniaRTSAOutputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
virtual ~AaroniaRTSAOutputGui();
virtual void destroy();
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
private:
Ui::AaroniaRTSAOutputGui* ui;
AaroniaRTSAOutputSettings m_settings; //!< current settings
QList<QString> m_settingsKeys;
AaroniaRTSAOutput* m_sampleSink;
bool m_acquisition;
int m_streamSampleRate; //!< Sample rate of received stream
quint64 m_streamCenterFrequency; //!< Center frequency of received stream
QTimer m_updateTimer;
QTimer m_statusTimer;
int m_lastEngineState;
MessageQueue m_inputMessageQueue;
int m_samplesCount;
std::size_t m_tickCount;
bool m_doApplySettings;
bool m_forceSettings;
QPalette m_paletteGreenText;
QPalette m_paletteWhiteText;
void blockApplySettings(bool block);
void displaySettings();
void sendSettings();
void updateSampleRateAndFrequency();
bool handleMessage(const Message& message);
void makeUIConnections();
private slots:
void handleInputMessages();
void on_startStop_toggled(bool checked);
void updateHardware();
void updateStatus();
void openDeviceSettingsDialog(const QPoint& p);
};
#endif // INCLUDE_LOCALOUTPUTGUI_H

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AaroniaRTSAOutputGui</class>
<widget class="QWidget" name="AaroniaRTSAOutputGui">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>47</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>360</width>
<height>47</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>380</width>
<height>68</height>
</size>
</property>
<property name="font">
<font>
<family>Liberation Sans</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="windowTitle">
<string>AaroniaRTSA</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_freq">
<property name="topMargin">
<number>4</number>
</property>
<item>
<layout class="QVBoxLayout" name="deviceUILayout">
<item>
<layout class="QHBoxLayout" name="deviceButtonsLayout">
<item>
<widget class="ButtonSwitch" name="startStop">
<property name="toolTip">
<string>start/stop acquisition</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../../../sdrgui/resources/res.qrc">
<normaloff>:/play.png</normaloff>
<normalon>:/stop.png</normalon>:/play.png</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="deviceRateLayout">
<item>
<widget class="QLabel" name="deviceRateText">
<property name="toolTip">
<string>I/Q sample rate kS/s</string>
</property>
<property name="text">
<string>00000k</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="freqLeftSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="centerFrequency">
<property name="minimumSize">
<size>
<width>170</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<family>Liberation Sans</family>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string>10,000,000,000</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="freqUnits">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string> Hz</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<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>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../../../sdrgui/resources/res.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -0,0 +1,148 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 <QtPlugin>
#include "plugin/pluginapi.h"
#include "util/simpleserializer.h"
#ifdef SERVER_MODE
#include "aaroniartsaoutput.h"
#else
#include "aaroniartsaoutputgui.h"
#endif
#include "aaroniartsaoutputplugin.h"
#include "aaroniartsaoutputwebapiadapter.h"
const PluginDescriptor AaroniaRTSAOutputPlugin::m_pluginDescriptor = {
QStringLiteral("AaroniaRTSAOutput"),
QStringLiteral("Local device output"),
QStringLiteral("7.8.2"),
QStringLiteral("(c) Edouard Griffiths, F4EXB"),
QStringLiteral("https://github.com/f4exb/sdrangel"),
true,
QStringLiteral("https://github.com/f4exb/sdrangel")
};
static constexpr const char* const m_hardwareID = "AaroniaRTSAOutput";
static constexpr const char* const m_deviceTypeID = LOCALOUTPUT_DEVICE_TYPE_ID;
AaroniaRTSAOutputPlugin::AaroniaRTSAOutputPlugin(QObject* parent) :
QObject(parent)
{
}
const PluginDescriptor& AaroniaRTSAOutputPlugin::getPluginDescriptor() const
{
return m_pluginDescriptor;
}
void AaroniaRTSAOutputPlugin::initPlugin(PluginAPI* pluginAPI)
{
pluginAPI->registerSampleSink(m_deviceTypeID, this);
}
void AaroniaRTSAOutputPlugin::enumOriginDevices(QStringList& listedHwIds, OriginDevices& originDevices)
{
if (listedHwIds.contains(m_hardwareID)) { // check if it was done
return;
}
originDevices.append(OriginDevice(
"AaroniaRTSAOutput",
m_hardwareID,
QString(),
0, // Sequence
0, // nb Rx
1 // nb Tx
));
listedHwIds.append(m_hardwareID);
}
PluginInterface::SamplingDevices AaroniaRTSAOutputPlugin::enumSampleSinks(const OriginDevices& originDevices)
{
SamplingDevices result;
for (OriginDevices::const_iterator it = originDevices.begin(); it != originDevices.end(); ++it)
{
if (it->hardwareId == m_hardwareID)
{
result.append(SamplingDevice(
it->displayableName,
it->hardwareId,
m_deviceTypeID,
it->serial,
it->sequence,
PluginInterface::SamplingDevice::BuiltInDevice,
PluginInterface::SamplingDevice::StreamSingleTx,
1,
0
));
}
}
return result;
}
#ifdef SERVER_MODE
DeviceGUI* AaroniaRTSAOutputPlugin::createSampleSinkPluginInstanceGUI(
const QString& sinkId,
QWidget **widget,
DeviceUISet *deviceUISet)
{
(void) sinkId;
(void) widget;
(void) deviceUISet;
return 0;
}
#else
DeviceGUI* AaroniaRTSAOutputPlugin::createSampleSinkPluginInstanceGUI(
const QString& sinkId,
QWidget **widget,
DeviceUISet *deviceUISet)
{
if(sinkId == m_deviceTypeID)
{
AaroniaRTSAOutputGui* gui = new AaroniaRTSAOutputGui(deviceUISet);
*widget = gui;
return gui;
}
else
{
return 0;
}
}
#endif
DeviceSampleSink *AaroniaRTSAOutputPlugin::createSampleSinkPluginInstance(const QString& sinkId, DeviceAPI *deviceAPI)
{
if (sinkId == m_deviceTypeID)
{
AaroniaRTSAOutput* output = new AaroniaRTSAOutput(deviceAPI);
return output;
}
else
{
return 0;
}
}
DeviceWebAPIAdapter *AaroniaRTSAOutputPlugin::createDeviceWebAPIAdapter() const
{
return new AaroniaRTSAOutputWebAPIAdapter();
}

View File

@ -0,0 +1,52 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 INCLUDE_LOCALOUTPUTPLUGIN_H
#define INCLUDE_LOCALOUTPUTPLUGIN_H
#include <QObject>
#include "plugin/plugininterface.h"
#define LOCALOUTPUT_DEVICE_TYPE_ID "sdrangel.samplesink.localoutput"
class PluginAPI;
class AaroniaRTSAOutputPlugin : public QObject, public PluginInterface {
Q_OBJECT
Q_INTERFACES(PluginInterface)
Q_PLUGIN_METADATA(IID LOCALOUTPUT_DEVICE_TYPE_ID)
public:
explicit AaroniaRTSAOutputPlugin(QObject* parent = nullptr);
const PluginDescriptor& getPluginDescriptor() const;
void initPlugin(PluginAPI* pluginAPI);
virtual void enumOriginDevices(QStringList& listedHwIds, OriginDevices& originDevices);
virtual SamplingDevices enumSampleSinks(const OriginDevices& originDevices);
virtual DeviceGUI* createSampleSinkPluginInstanceGUI(
const QString& sinkId,
QWidget **widget,
DeviceUISet *deviceUISet);
virtual DeviceSampleSink* createSampleSinkPluginInstance(const QString& sinkId, DeviceAPI *deviceAPI);
virtual DeviceWebAPIAdapter* createDeviceWebAPIAdapter() const;
private:
static const PluginDescriptor m_pluginDescriptor;
};
#endif // INCLUDE_LOCALOUTPUTPLUGIN_H

View File

@ -0,0 +1,114 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 "util/simpleserializer.h"
#include "aaroniartsaoutputsettings.h"
AaroniaRTSAOutputSettings::AaroniaRTSAOutputSettings()
{
resetToDefaults();
}
void AaroniaRTSAOutputSettings::resetToDefaults()
{
m_useReverseAPI = false;
m_reverseAPIAddress = "127.0.0.1";
m_reverseAPIPort = 8888;
m_reverseAPIDeviceIndex = 0;
}
QByteArray AaroniaRTSAOutputSettings::serialize() const
{
SimpleSerializer s(1);
s.writeString(4, m_reverseAPIAddress);
s.writeU32(5, m_reverseAPIPort);
s.writeU32(6, m_reverseAPIDeviceIndex);
return s.final();
}
bool AaroniaRTSAOutputSettings::deserialize(const QByteArray& data)
{
SimpleDeserializer d(data);
if (!d.isValid())
{
resetToDefaults();
return false;
}
if (d.getVersion() == 1)
{
quint32 uintval;
d.readString(4, &m_reverseAPIAddress, "127.0.0.1");
d.readU32(5, &uintval, 0);
if ((uintval > 1023) && (uintval < 65535)) {
m_reverseAPIPort = uintval;
} else {
m_reverseAPIPort = 8888;
}
d.readU32(6, &uintval, 0);
m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
return true;
}
else
{
resetToDefaults();
return false;
}
}
void AaroniaRTSAOutputSettings::applySettings(const QStringList& settingsKeys, const AaroniaRTSAOutputSettings& settings)
{
if (settingsKeys.contains("useReverseAPI")) {
m_useReverseAPI = settings.m_useReverseAPI;
}
if (settingsKeys.contains("reverseAPIAddress")) {
m_reverseAPIAddress = settings.m_reverseAPIAddress;
}
if (settingsKeys.contains("reverseAPIPort")) {
m_reverseAPIPort = settings.m_reverseAPIPort;
}
if (settingsKeys.contains("reverseAPIDeviceIndex")) {
m_reverseAPIDeviceIndex = settings.m_reverseAPIDeviceIndex;
}
}
QString AaroniaRTSAOutputSettings::getDebugString(const QStringList& settingsKeys, bool force) const
{
std::ostringstream ostr;
if (settingsKeys.contains("useReverseAPI") || force) {
ostr << " m_useReverseAPI: " << m_useReverseAPI;
}
if (settingsKeys.contains("reverseAPIAddress") || force) {
ostr << " m_reverseAPIAddress: " << m_reverseAPIAddress.toStdString();
}
if (settingsKeys.contains("reverseAPIPort") || force) {
ostr << " m_reverseAPIPort: " << m_reverseAPIPort;
}
if (settingsKeys.contains("reverseAPIDeviceIndex") || force) {
ostr << " m_reverseAPIDeviceIndex: " << m_reverseAPIDeviceIndex;
}
return QString(ostr.str().c_str());
}

View File

@ -0,0 +1,38 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// 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 PLUGINS_SAMPLESINK_LOCALOUTPUT_LOCALOUTPUTSETTINGS_H_
#define PLUGINS_SAMPLESINK_LOCALOUTPUT_LOCALOUTPUTSETTINGS_H_
#include <QByteArray>
#include <QString>
struct AaroniaRTSAOutputSettings {
bool m_useReverseAPI;
QString m_reverseAPIAddress;
uint16_t m_reverseAPIPort;
uint16_t m_reverseAPIDeviceIndex;
AaroniaRTSAOutputSettings();
void resetToDefaults();
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
void applySettings(const QStringList& settingsKeys, const AaroniaRTSAOutputSettings& settings);
QString getDebugString(const QStringList& settingsKeys, bool force=false) const;
};
#endif /* PLUGINS_SAMPLESINK_LOCALOUTPUT_LOCALOUTPUTSETTINGS_H_ */

View File

@ -0,0 +1,52 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// Implementation of static web API adapters used for preset serialization and //
// deserialization //
// //
// 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 "SWGDeviceSettings.h"
#include "aaroniartsaoutput.h"
#include "aaroniartsaoutputwebapiadapter.h"
AaroniaRTSAOutputWebAPIAdapter::AaroniaRTSAOutputWebAPIAdapter()
{}
AaroniaRTSAOutputWebAPIAdapter::~AaroniaRTSAOutputWebAPIAdapter()
{}
int AaroniaRTSAOutputWebAPIAdapter::webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage)
{
(void) errorMessage;
response.setLocalOutputSettings(new SWGSDRangel::SWGLocalOutputSettings());
response.getLocalOutputSettings()->init();
AaroniaRTSAOutput::webapiFormatDeviceSettings(response, m_settings);
return 200;
}
int AaroniaRTSAOutputWebAPIAdapter::webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage)
{
(void) force; // no action
(void) errorMessage;
AaroniaRTSAOutput::webapiUpdateDeviceSettings(m_settings, deviceSettingsKeys, response);
return 200;
}

View File

@ -0,0 +1,44 @@
///////////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2019 Edouard Griffiths, F4EXB //
// //
// Implementation of static web API adapters used for preset serialization and //
// deserialization //
// //
// 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 "device/devicewebapiadapter.h"
#include "aaroniartsaoutputsettings.h"
class AaroniaRTSAOutputWebAPIAdapter : public DeviceWebAPIAdapter
{
public:
AaroniaRTSAOutputWebAPIAdapter();
virtual ~AaroniaRTSAOutputWebAPIAdapter();
virtual QByteArray serialize() { return m_settings.serialize(); }
virtual bool deserialize(const QByteArray& data) { return m_settings.deserialize(data); }
virtual int webapiSettingsGet(
SWGSDRangel::SWGDeviceSettings& response,
QString& errorMessage);
virtual int webapiSettingsPutPatch(
bool force,
const QStringList& deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings& response, // query + response
QString& errorMessage);
private:
AaroniaRTSAOutputSettings m_settings;
};

View File

@ -0,0 +1,26 @@
<h1>Local output plugin</h1>
<h2>Introduction</h2>
This output sample sink plugin sends its samples to a Local Source channel in another device set.
<h2>Interface</h2>
The top and bottom bars of the device window are described [here](../../../sdrgui/device/readme.md)
![SDR Local output plugin GUI](../../../doc/img/LocalOutput_plugin.png)
<h3>1: Start/Stop</h3>
Device start / stop button.
- Blue triangle icon: device is ready and can be started
- Green square icon: device is running and can be stopped
<h3>2: Frequency</h3>
This is the center frequency in Hz sent from the Local Source channel instance and corresponds to the center frequency of transmission.
<h3>3: Stream sample rate</h3>
Stream I/Q sample rate in kS/s

View File

@ -2097,6 +2097,36 @@ margin-bottom: 20px;
}
},
"description" : "ATVMod"
};
defs.AaroniaRTSAOutputReport = {
"properties" : {
"centerFrequency" : {
"type" : "integer",
"format" : "int64"
},
"sampleRate" : {
"type" : "integer"
}
},
"description" : "AaroniaRTSAOutput"
};
defs.AaroniaRTSAOutputSettings = {
"properties" : {
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
}
},
"description" : "AaroniaRTSAOutput"
};
defs.AaroniaRTSAReport = {
"properties" : {
@ -3578,6 +3608,9 @@ margin-bottom: 20px;
"HeatMapReport" : {
"$ref" : "#/definitions/HeatMapReport"
},
"ILSDemodReport" : {
"$ref" : "#/definitions/ILSDemodReport"
},
"M17DemodReport" : {
"$ref" : "#/definitions/M17DemodReport"
},
@ -3742,6 +3775,9 @@ margin-bottom: 20px;
"HeatMapSettings" : {
"$ref" : "#/definitions/HeatMapSettings"
},
"ILSDemodSettings" : {
"$ref" : "#/definitions/ILSDemodSettings"
},
"InterferometerSettings" : {
"$ref" : "#/definitions/InterferometerSettings"
},
@ -5242,6 +5278,9 @@ margin-bottom: 20px;
},
"aaroniaSDRReport" : {
"$ref" : "#/definitions/AaroniaRTSAReport"
},
"aaroniaRTSAOutputReport" : {
"$ref" : "#/definitions/AaroniaRTSAOutputReport"
}
},
"description" : "Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present."
@ -5433,6 +5472,9 @@ margin-bottom: 20px;
},
"aaroniaRTSASettings" : {
"$ref" : "#/definitions/AaroniaRTSASettings"
},
"aaroniaRTSAOutputSettings" : {
"$ref" : "#/definitions/AaroniaRTSAOutputSettings"
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
@ -7037,7 +7079,15 @@ margin-bottom: 20px;
},
"protocol" : {
"type" : "integer",
"description" : "(0 GS-232, 1 SPID rot2prog)"
"description" : "(0 GS-232, 1 SPID rot2prog, 2 rotcltd, 3 DFM)"
},
"precision" : {
"type" : "integer",
"description" : "Precision of azimuth and elevation values"
},
"coordinates" : {
"type" : "integer",
"description" : "(0 Az/El, 1 X/Y 85, 2 X/Y 30)"
},
"title" : {
"type" : "string"
@ -7453,6 +7503,143 @@ margin-bottom: 20px;
}
},
"description" : "IEEE_802_15_4_Mod"
};
defs.ILSDemodReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power received in channel (dB)"
},
"channelSampleRate" : {
"type" : "integer"
}
},
"description" : "ILSDemod"
};
defs.ILSDemodSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"mode" : {
"type" : "integer",
"description" : "(0 for LOC, 1 for G/S)"
},
"frequencyIndex" : {
"type" : "integer"
},
"squelch" : {
"type" : "integer"
},
"volume" : {
"type" : "number",
"format" : "float"
},
"audioMute" : {
"type" : "integer"
},
"average" : {
"type" : "integer"
},
"ddmUnits" : {
"type" : "integer"
},
"identThreshold" : {
"type" : "number",
"format" : "float"
},
"ident" : {
"type" : "string"
},
"runway" : {
"type" : "string"
},
"trueBearing" : {
"type" : "number",
"format" : "float"
},
"latitude" : {
"type" : "string"
},
"longitude" : {
"type" : "string"
},
"elevation" : {
"type" : "integer"
},
"glidePath" : {
"type" : "number",
"format" : "float"
},
"refHeight" : {
"type" : "number",
"format" : "float"
},
"courseWidth" : {
"type" : "number",
"format" : "float"
},
"udpEnabled" : {
"type" : "integer",
"description" : "Whether to forward DDM to specified UDP port"
},
"udpAddress" : {
"type" : "string",
"description" : "UDP address to forward DDM to"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to forward DDM to"
},
"logFilename" : {
"type" : "string"
},
"logEnabled" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
},
"scopeConfig" : {
"$ref" : "#/definitions/GLScope"
},
"channelMarker" : {
"$ref" : "#/definitions/ChannelMarker"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "ILSDemod"
};
defs.InstanceChannelsResponse = {
"required" : [ "channelcount" ],
@ -9112,7 +9299,7 @@ margin-bottom: 20px;
},
"altitudeReference" : {
"type" : "integer",
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
},
"animations" : {
"type" : "array",
@ -9161,6 +9348,14 @@ margin-bottom: 20px;
"availableUntil" : {
"type" : "string",
"description" : "Date and time until after which this item should no longer appear on 3D map"
},
"colorValid" : {
"type" : "integer",
"description" : "0 - Use default color, 1 - Use specified color"
},
"color" : {
"type" : "integer",
"description" : "RGBA for polygon and polyline"
}
},
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
@ -9263,7 +9458,7 @@ margin-bottom: 20px;
},
"altitudeReference" : {
"type" : "integer",
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
},
"animations" : {
"type" : "array",
@ -9312,6 +9507,14 @@ margin-bottom: 20px;
"availableUntil" : {
"type" : "string",
"description" : "Date and time until after which this item should no longer appear on 3D map"
},
"colorValid" : {
"type" : "integer",
"description" : "0 - Use default color, 1 - Use specified color"
},
"color" : {
"type" : "integer",
"description" : "RGBA for polygon and polyline"
}
},
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
@ -9331,6 +9534,10 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "Display object names on the map (1 for yes, 0 for no)"
},
"terrain" : {
"type" : "string",
"description" : "Terrain used for 3D map (E.g: 'Ellipsoid' or 'Cesium World Terrain')"
},
"title" : {
"type" : "string"
},
@ -13498,6 +13705,54 @@ margin-bottom: 20px;
"audioDeviceName" : {
"type" : "string"
},
"gpioControl" : {
"type" : "integer",
"description" : "GPIO control\n * 0 - No GPIO control\n * 1 - Rx side controls GPIO\n * 2 - Tx side controls GPIO\n"
},
"rx2txGPIOEnable" : {
"type" : "integer",
"description" : "Enable Rx to Tx GPIO control\n * 0 - disable\n * 1 - enable\n"
},
"rx2txGPIOMask" : {
"type" : "integer",
"format" : "int8",
"description" : "Rx to Tx change GPIO mask"
},
"rx2txGPIOValues" : {
"type" : "integer",
"format" : "int8",
"description" : "Rx to Tx change GPIO values"
},
"rx2txCommandEnable" : {
"type" : "integer",
"description" : "Enable Rx to Tx command\n * 0 - disable\n * 1 - enable\n"
},
"rx2txCommand" : {
"type" : "string",
"description" : "Command to be executed when Rx switches to Tx"
},
"tx2rxGPIOEnable" : {
"type" : "integer",
"description" : "Enable Tx to Rx GPIO control\n * 0 - disable\n * 1 - enable\n"
},
"tx2rxGPIOMask" : {
"type" : "integer",
"format" : "int8",
"description" : "Tx to Rx change GPIO mask"
},
"tx2rxGPIOValues" : {
"type" : "integer",
"format" : "int8",
"description" : "Tx to Rx change GPIO values"
},
"tx2rxCommandEnable" : {
"type" : "integer",
"description" : "Enable Tx to Rx command\n * 0 - disable\n * 1 - enable\n"
},
"tx2rxCommand" : {
"type" : "string",
"description" : "Command to be executed when Tx switches to Rx"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
@ -57306,7 +57561,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2023-03-23T18:22:37.731+01:00
Generated 2023-04-10T20:01:50.318+02:00
</div>
</div>
</div>

View File

@ -27,3 +27,25 @@ AaroniaRTSAReport:
status:
description: 0 for Idle, 1 for Connecting, 2 for Connected, 3 for Error, 4 for Disconnected
type: integer
AaroniaRTSAOutputSettings:
description: AaroniaRTSAOutput
properties:
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
AaroniaRTSAOutputReport:
description: AaroniaRTSAOutput
properties:
centerFrequency:
type: integer
format: int64
sampleRate:
type: integer

View File

@ -73,3 +73,5 @@ DeviceReport:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxMIMOReport"
aaroniaSDRReport:
$ref: "/doc/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAReport"
aaroniaRTSAOutputReport:
$ref: "/doc/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAOutputReport"

View File

@ -102,3 +102,5 @@ DeviceSettings:
$ref: "/doc/swagger/include/Xtrx.yaml#/XtrxMIMOSettings"
aaroniaRTSASettings:
$ref: "/doc/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSASettings"
aaroniaRTSAOutputSettings:
$ref: "/doc/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAOutputSettings"

View File

@ -27,3 +27,25 @@ AaroniaRTSAReport:
status:
description: 0 for Idle, 1 for Connecting, 2 for Connected, 3 for Error, 4 for Disconnected
type: integer
AaroniaRTSAOutputSettings:
description: AaroniaRTSAOutput
properties:
useReverseAPI:
description: Synchronize with reverse API (1 for yes, 0 for no)
type: integer
reverseAPIAddress:
type: string
reverseAPIPort:
type: integer
reverseAPIDeviceIndex:
type: integer
AaroniaRTSAOutputReport:
description: AaroniaRTSAOutput
properties:
centerFrequency:
type: integer
format: int64
sampleRate:
type: integer

View File

@ -73,3 +73,5 @@ DeviceReport:
$ref: "http://swgserver:8081/api/swagger/include/Xtrx.yaml#/XtrxMIMOReport"
aaroniaSDRReport:
$ref: "http://swgserver:8081/api/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAReport"
aaroniaRTSAOutputReport:
$ref: "http://swgserver:8081/api/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAOutputReport"

View File

@ -102,3 +102,5 @@ DeviceSettings:
$ref: "http://swgserver:8081/api/swagger/include/Xtrx.yaml#/XtrxMIMOSettings"
aaroniaRTSASettings:
$ref: "http://swgserver:8081/api/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSASettings"
aaroniaRTSAOutputSettings:
$ref: "http://swgserver:8081/api/swagger/include/AaroniaRTSA.yaml#/AaroniaRTSAOutputSettings"

View File

@ -2097,6 +2097,36 @@ margin-bottom: 20px;
}
},
"description" : "ATVMod"
};
defs.AaroniaRTSAOutputReport = {
"properties" : {
"centerFrequency" : {
"type" : "integer",
"format" : "int64"
},
"sampleRate" : {
"type" : "integer"
}
},
"description" : "AaroniaRTSAOutput"
};
defs.AaroniaRTSAOutputSettings = {
"properties" : {
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
}
},
"description" : "AaroniaRTSAOutput"
};
defs.AaroniaRTSAReport = {
"properties" : {
@ -3578,6 +3608,9 @@ margin-bottom: 20px;
"HeatMapReport" : {
"$ref" : "#/definitions/HeatMapReport"
},
"ILSDemodReport" : {
"$ref" : "#/definitions/ILSDemodReport"
},
"M17DemodReport" : {
"$ref" : "#/definitions/M17DemodReport"
},
@ -3742,6 +3775,9 @@ margin-bottom: 20px;
"HeatMapSettings" : {
"$ref" : "#/definitions/HeatMapSettings"
},
"ILSDemodSettings" : {
"$ref" : "#/definitions/ILSDemodSettings"
},
"InterferometerSettings" : {
"$ref" : "#/definitions/InterferometerSettings"
},
@ -5242,6 +5278,9 @@ margin-bottom: 20px;
},
"aaroniaSDRReport" : {
"$ref" : "#/definitions/AaroniaRTSAReport"
},
"aaroniaRTSAOutputReport" : {
"$ref" : "#/definitions/AaroniaRTSAOutputReport"
}
},
"description" : "Base device report. Only the device report corresponding to the device specified in the deviceHwType is or should be present."
@ -5433,6 +5472,9 @@ margin-bottom: 20px;
},
"aaroniaRTSASettings" : {
"$ref" : "#/definitions/AaroniaRTSASettings"
},
"aaroniaRTSAOutputSettings" : {
"$ref" : "#/definitions/AaroniaRTSAOutputSettings"
}
},
"description" : "Base device settings. Only the device settings corresponding to the device specified in the deviceHwType field is or should be present."
@ -7037,7 +7079,15 @@ margin-bottom: 20px;
},
"protocol" : {
"type" : "integer",
"description" : "(0 GS-232, 1 SPID rot2prog)"
"description" : "(0 GS-232, 1 SPID rot2prog, 2 rotcltd, 3 DFM)"
},
"precision" : {
"type" : "integer",
"description" : "Precision of azimuth and elevation values"
},
"coordinates" : {
"type" : "integer",
"description" : "(0 Az/El, 1 X/Y 85, 2 X/Y 30)"
},
"title" : {
"type" : "string"
@ -7453,6 +7503,143 @@ margin-bottom: 20px;
}
},
"description" : "IEEE_802_15_4_Mod"
};
defs.ILSDemodReport = {
"properties" : {
"channelPowerDB" : {
"type" : "number",
"format" : "float",
"description" : "power received in channel (dB)"
},
"channelSampleRate" : {
"type" : "integer"
}
},
"description" : "ILSDemod"
};
defs.ILSDemodSettings = {
"properties" : {
"inputFrequencyOffset" : {
"type" : "integer",
"format" : "int64"
},
"rfBandwidth" : {
"type" : "number",
"format" : "float"
},
"mode" : {
"type" : "integer",
"description" : "(0 for LOC, 1 for G/S)"
},
"frequencyIndex" : {
"type" : "integer"
},
"squelch" : {
"type" : "integer"
},
"volume" : {
"type" : "number",
"format" : "float"
},
"audioMute" : {
"type" : "integer"
},
"average" : {
"type" : "integer"
},
"ddmUnits" : {
"type" : "integer"
},
"identThreshold" : {
"type" : "number",
"format" : "float"
},
"ident" : {
"type" : "string"
},
"runway" : {
"type" : "string"
},
"trueBearing" : {
"type" : "number",
"format" : "float"
},
"latitude" : {
"type" : "string"
},
"longitude" : {
"type" : "string"
},
"elevation" : {
"type" : "integer"
},
"glidePath" : {
"type" : "number",
"format" : "float"
},
"refHeight" : {
"type" : "number",
"format" : "float"
},
"courseWidth" : {
"type" : "number",
"format" : "float"
},
"udpEnabled" : {
"type" : "integer",
"description" : "Whether to forward DDM to specified UDP port"
},
"udpAddress" : {
"type" : "string",
"description" : "UDP address to forward DDM to"
},
"udpPort" : {
"type" : "integer",
"description" : "UDP port to forward DDM to"
},
"logFilename" : {
"type" : "string"
},
"logEnabled" : {
"type" : "integer"
},
"rgbColor" : {
"type" : "integer"
},
"title" : {
"type" : "string"
},
"streamIndex" : {
"type" : "integer",
"description" : "MIMO channel. Not relevant when connected to SI (single Rx)."
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
},
"reverseAPIAddress" : {
"type" : "string"
},
"reverseAPIPort" : {
"type" : "integer"
},
"reverseAPIDeviceIndex" : {
"type" : "integer"
},
"reverseAPIChannelIndex" : {
"type" : "integer"
},
"scopeConfig" : {
"$ref" : "#/definitions/GLScope"
},
"channelMarker" : {
"$ref" : "#/definitions/ChannelMarker"
},
"rollupState" : {
"$ref" : "#/definitions/RollupState"
}
},
"description" : "ILSDemod"
};
defs.InstanceChannelsResponse = {
"required" : [ "channelcount" ],
@ -9112,7 +9299,7 @@ margin-bottom: 20px;
},
"altitudeReference" : {
"type" : "integer",
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
},
"animations" : {
"type" : "array",
@ -9161,6 +9348,14 @@ margin-bottom: 20px;
"availableUntil" : {
"type" : "string",
"description" : "Date and time until after which this item should no longer appear on 3D map"
},
"colorValid" : {
"type" : "integer",
"description" : "0 - Use default color, 1 - Use specified color"
},
"color" : {
"type" : "integer",
"description" : "RGBA for polygon and polyline"
}
},
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
@ -9263,7 +9458,7 @@ margin-bottom: 20px;
},
"altitudeReference" : {
"type" : "integer",
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND"
"description" : "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
},
"animations" : {
"type" : "array",
@ -9312,6 +9507,14 @@ margin-bottom: 20px;
"availableUntil" : {
"type" : "string",
"description" : "Date and time until after which this item should no longer appear on 3D map"
},
"colorValid" : {
"type" : "integer",
"description" : "0 - Use default color, 1 - Use specified color"
},
"color" : {
"type" : "integer",
"description" : "RGBA for polygon and polyline"
}
},
"description" : "An item to draw on the map. Set image to an empty string to remove item from the map."
@ -9331,6 +9534,10 @@ margin-bottom: 20px;
"type" : "integer",
"description" : "Display object names on the map (1 for yes, 0 for no)"
},
"terrain" : {
"type" : "string",
"description" : "Terrain used for 3D map (E.g: 'Ellipsoid' or 'Cesium World Terrain')"
},
"title" : {
"type" : "string"
},
@ -13498,6 +13705,54 @@ margin-bottom: 20px;
"audioDeviceName" : {
"type" : "string"
},
"gpioControl" : {
"type" : "integer",
"description" : "GPIO control\n * 0 - No GPIO control\n * 1 - Rx side controls GPIO\n * 2 - Tx side controls GPIO\n"
},
"rx2txGPIOEnable" : {
"type" : "integer",
"description" : "Enable Rx to Tx GPIO control\n * 0 - disable\n * 1 - enable\n"
},
"rx2txGPIOMask" : {
"type" : "integer",
"format" : "int8",
"description" : "Rx to Tx change GPIO mask"
},
"rx2txGPIOValues" : {
"type" : "integer",
"format" : "int8",
"description" : "Rx to Tx change GPIO values"
},
"rx2txCommandEnable" : {
"type" : "integer",
"description" : "Enable Rx to Tx command\n * 0 - disable\n * 1 - enable\n"
},
"rx2txCommand" : {
"type" : "string",
"description" : "Command to be executed when Rx switches to Tx"
},
"tx2rxGPIOEnable" : {
"type" : "integer",
"description" : "Enable Tx to Rx GPIO control\n * 0 - disable\n * 1 - enable\n"
},
"tx2rxGPIOMask" : {
"type" : "integer",
"format" : "int8",
"description" : "Tx to Rx change GPIO mask"
},
"tx2rxGPIOValues" : {
"type" : "integer",
"format" : "int8",
"description" : "Tx to Rx change GPIO values"
},
"tx2rxCommandEnable" : {
"type" : "integer",
"description" : "Enable Tx to Rx command\n * 0 - disable\n * 1 - enable\n"
},
"tx2rxCommand" : {
"type" : "string",
"description" : "Command to be executed when Tx switches to Rx"
},
"useReverseAPI" : {
"type" : "integer",
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
@ -57306,7 +57561,7 @@ except ApiException as e:
</div>
<div id="generator">
<div class="content">
Generated 2023-03-23T18:22:37.731+01:00
Generated 2023-04-10T20:01:50.318+02:00
</div>
</div>
</div>

View File

@ -0,0 +1,131 @@
/**
* 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: 7.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 "SWGAaroniaRTSAOutputReport.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGAaroniaRTSAOutputReport::SWGAaroniaRTSAOutputReport(QString* json) {
init();
this->fromJson(*json);
}
SWGAaroniaRTSAOutputReport::SWGAaroniaRTSAOutputReport() {
center_frequency = 0L;
m_center_frequency_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
}
SWGAaroniaRTSAOutputReport::~SWGAaroniaRTSAOutputReport() {
this->cleanup();
}
void
SWGAaroniaRTSAOutputReport::init() {
center_frequency = 0L;
m_center_frequency_isSet = false;
sample_rate = 0;
m_sample_rate_isSet = false;
}
void
SWGAaroniaRTSAOutputReport::cleanup() {
}
SWGAaroniaRTSAOutputReport*
SWGAaroniaRTSAOutputReport::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGAaroniaRTSAOutputReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&center_frequency, pJson["centerFrequency"], "qint64", "");
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
}
QString
SWGAaroniaRTSAOutputReport::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGAaroniaRTSAOutputReport::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_center_frequency_isSet){
obj->insert("centerFrequency", QJsonValue(center_frequency));
}
if(m_sample_rate_isSet){
obj->insert("sampleRate", QJsonValue(sample_rate));
}
return obj;
}
qint64
SWGAaroniaRTSAOutputReport::getCenterFrequency() {
return center_frequency;
}
void
SWGAaroniaRTSAOutputReport::setCenterFrequency(qint64 center_frequency) {
this->center_frequency = center_frequency;
this->m_center_frequency_isSet = true;
}
qint32
SWGAaroniaRTSAOutputReport::getSampleRate() {
return sample_rate;
}
void
SWGAaroniaRTSAOutputReport::setSampleRate(qint32 sample_rate) {
this->sample_rate = sample_rate;
this->m_sample_rate_isSet = true;
}
bool
SWGAaroniaRTSAOutputReport::isSet(){
bool isObjectUpdated = false;
do{
if(m_center_frequency_isSet){
isObjectUpdated = true; break;
}
if(m_sample_rate_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,64 @@
/**
* 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: 7.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.
*/
/*
* SWGAaroniaRTSAOutputReport.h
*
* AaroniaRTSAOutput
*/
#ifndef SWGAaroniaRTSAOutputReport_H_
#define SWGAaroniaRTSAOutputReport_H_
#include <QJsonObject>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGAaroniaRTSAOutputReport: public SWGObject {
public:
SWGAaroniaRTSAOutputReport();
SWGAaroniaRTSAOutputReport(QString* json);
virtual ~SWGAaroniaRTSAOutputReport();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGAaroniaRTSAOutputReport* fromJson(QString &jsonString) override;
qint64 getCenterFrequency();
void setCenterFrequency(qint64 center_frequency);
qint32 getSampleRate();
void setSampleRate(qint32 sample_rate);
virtual bool isSet() override;
private:
qint64 center_frequency;
bool m_center_frequency_isSet;
qint32 sample_rate;
bool m_sample_rate_isSet;
};
}
#endif /* SWGAaroniaRTSAOutputReport_H_ */

View File

@ -0,0 +1,179 @@
/**
* 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: 7.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 "SWGAaroniaRTSAOutputSettings.h"
#include "SWGHelpers.h"
#include <QJsonDocument>
#include <QJsonArray>
#include <QObject>
#include <QDebug>
namespace SWGSDRangel {
SWGAaroniaRTSAOutputSettings::SWGAaroniaRTSAOutputSettings(QString* json) {
init();
this->fromJson(*json);
}
SWGAaroniaRTSAOutputSettings::SWGAaroniaRTSAOutputSettings() {
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = nullptr;
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
}
SWGAaroniaRTSAOutputSettings::~SWGAaroniaRTSAOutputSettings() {
this->cleanup();
}
void
SWGAaroniaRTSAOutputSettings::init() {
use_reverse_api = 0;
m_use_reverse_api_isSet = false;
reverse_api_address = new QString("");
m_reverse_api_address_isSet = false;
reverse_api_port = 0;
m_reverse_api_port_isSet = false;
reverse_api_device_index = 0;
m_reverse_api_device_index_isSet = false;
}
void
SWGAaroniaRTSAOutputSettings::cleanup() {
if(reverse_api_address != nullptr) {
delete reverse_api_address;
}
}
SWGAaroniaRTSAOutputSettings*
SWGAaroniaRTSAOutputSettings::fromJson(QString &json) {
QByteArray array (json.toStdString().c_str());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
return this;
}
void
SWGAaroniaRTSAOutputSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
}
QString
SWGAaroniaRTSAOutputSettings::asJson ()
{
QJsonObject* obj = this->asJsonObject();
QJsonDocument doc(*obj);
QByteArray bytes = doc.toJson();
delete obj;
return QString(bytes);
}
QJsonObject*
SWGAaroniaRTSAOutputSettings::asJsonObject() {
QJsonObject* obj = new QJsonObject();
if(m_use_reverse_api_isSet){
obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
}
if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
}
if(m_reverse_api_port_isSet){
obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
}
if(m_reverse_api_device_index_isSet){
obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
}
return obj;
}
qint32
SWGAaroniaRTSAOutputSettings::getUseReverseApi() {
return use_reverse_api;
}
void
SWGAaroniaRTSAOutputSettings::setUseReverseApi(qint32 use_reverse_api) {
this->use_reverse_api = use_reverse_api;
this->m_use_reverse_api_isSet = true;
}
QString*
SWGAaroniaRTSAOutputSettings::getReverseApiAddress() {
return reverse_api_address;
}
void
SWGAaroniaRTSAOutputSettings::setReverseApiAddress(QString* reverse_api_address) {
this->reverse_api_address = reverse_api_address;
this->m_reverse_api_address_isSet = true;
}
qint32
SWGAaroniaRTSAOutputSettings::getReverseApiPort() {
return reverse_api_port;
}
void
SWGAaroniaRTSAOutputSettings::setReverseApiPort(qint32 reverse_api_port) {
this->reverse_api_port = reverse_api_port;
this->m_reverse_api_port_isSet = true;
}
qint32
SWGAaroniaRTSAOutputSettings::getReverseApiDeviceIndex() {
return reverse_api_device_index;
}
void
SWGAaroniaRTSAOutputSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
this->reverse_api_device_index = reverse_api_device_index;
this->m_reverse_api_device_index_isSet = true;
}
bool
SWGAaroniaRTSAOutputSettings::isSet(){
bool isObjectUpdated = false;
do{
if(m_use_reverse_api_isSet){
isObjectUpdated = true; break;
}
if(reverse_api_address && *reverse_api_address != QString("")){
isObjectUpdated = true; break;
}
if(m_reverse_api_port_isSet){
isObjectUpdated = true; break;
}
if(m_reverse_api_device_index_isSet){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}
}

View File

@ -0,0 +1,77 @@
/**
* 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: 7.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.
*/
/*
* SWGAaroniaRTSAOutputSettings.h
*
* AaroniaRTSAOutput
*/
#ifndef SWGAaroniaRTSAOutputSettings_H_
#define SWGAaroniaRTSAOutputSettings_H_
#include <QJsonObject>
#include <QString>
#include "SWGObject.h"
#include "export.h"
namespace SWGSDRangel {
class SWG_API SWGAaroniaRTSAOutputSettings: public SWGObject {
public:
SWGAaroniaRTSAOutputSettings();
SWGAaroniaRTSAOutputSettings(QString* json);
virtual ~SWGAaroniaRTSAOutputSettings();
void init();
void cleanup();
virtual QString asJson () override;
virtual QJsonObject* asJsonObject() override;
virtual void fromJsonObject(QJsonObject &json) override;
virtual SWGAaroniaRTSAOutputSettings* fromJson(QString &jsonString) override;
qint32 getUseReverseApi();
void setUseReverseApi(qint32 use_reverse_api);
QString* getReverseApiAddress();
void setReverseApiAddress(QString* reverse_api_address);
qint32 getReverseApiPort();
void setReverseApiPort(qint32 reverse_api_port);
qint32 getReverseApiDeviceIndex();
void setReverseApiDeviceIndex(qint32 reverse_api_device_index);
virtual bool isSet() override;
private:
qint32 use_reverse_api;
bool m_use_reverse_api_isSet;
QString* reverse_api_address;
bool m_reverse_api_address_isSet;
qint32 reverse_api_port;
bool m_reverse_api_port_isSet;
qint32 reverse_api_device_index;
bool m_reverse_api_device_index_isSet;
};
}
#endif /* SWGAaroniaRTSAOutputSettings_H_ */

View File

@ -94,6 +94,8 @@ SWGDeviceReport::SWGDeviceReport() {
m_xtrx_mimo_report_isSet = false;
aaronia_sdr_report = nullptr;
m_aaronia_sdr_report_isSet = false;
aaronia_rtsa_output_report = nullptr;
m_aaronia_rtsa_output_report_isSet = false;
}
SWGDeviceReport::~SWGDeviceReport() {
@ -168,6 +170,8 @@ SWGDeviceReport::init() {
m_xtrx_mimo_report_isSet = false;
aaronia_sdr_report = new SWGAaroniaRTSAReport();
m_aaronia_sdr_report_isSet = false;
aaronia_rtsa_output_report = new SWGAaroniaRTSAOutputReport();
m_aaronia_rtsa_output_report_isSet = false;
}
void
@ -269,6 +273,9 @@ SWGDeviceReport::cleanup() {
if(aaronia_sdr_report != nullptr) {
delete aaronia_sdr_report;
}
if(aaronia_rtsa_output_report != nullptr) {
delete aaronia_rtsa_output_report;
}
}
SWGDeviceReport*
@ -348,6 +355,8 @@ SWGDeviceReport::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&aaronia_sdr_report, pJson["aaroniaSDRReport"], "SWGAaroniaRTSAReport", "SWGAaroniaRTSAReport");
::SWGSDRangel::setValue(&aaronia_rtsa_output_report, pJson["aaroniaRTSAOutputReport"], "SWGAaroniaRTSAOutputReport", "SWGAaroniaRTSAOutputReport");
}
QString
@ -463,6 +472,9 @@ SWGDeviceReport::asJsonObject() {
if((aaronia_sdr_report != nullptr) && (aaronia_sdr_report->isSet())){
toJsonValue(QString("aaroniaSDRReport"), aaronia_sdr_report, obj, QString("SWGAaroniaRTSAReport"));
}
if((aaronia_rtsa_output_report != nullptr) && (aaronia_rtsa_output_report->isSet())){
toJsonValue(QString("aaroniaRTSAOutputReport"), aaronia_rtsa_output_report, obj, QString("SWGAaroniaRTSAOutputReport"));
}
return obj;
}
@ -797,6 +809,16 @@ SWGDeviceReport::setAaroniaSdrReport(SWGAaroniaRTSAReport* aaronia_sdr_report) {
this->m_aaronia_sdr_report_isSet = true;
}
SWGAaroniaRTSAOutputReport*
SWGDeviceReport::getAaroniaRtsaOutputReport() {
return aaronia_rtsa_output_report;
}
void
SWGDeviceReport::setAaroniaRtsaOutputReport(SWGAaroniaRTSAOutputReport* aaronia_rtsa_output_report) {
this->aaronia_rtsa_output_report = aaronia_rtsa_output_report;
this->m_aaronia_rtsa_output_report_isSet = true;
}
bool
SWGDeviceReport::isSet(){
@ -901,6 +923,9 @@ SWGDeviceReport::isSet(){
if(aaronia_sdr_report && aaronia_sdr_report->isSet()){
isObjectUpdated = true; break;
}
if(aaronia_rtsa_output_report && aaronia_rtsa_output_report->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGAaroniaRTSAOutputReport.h"
#include "SWGAaroniaRTSAReport.h"
#include "SWGAirspyHFReport.h"
#include "SWGAirspyReport.h"
@ -171,6 +172,9 @@ public:
SWGAaroniaRTSAReport* getAaroniaSdrReport();
void setAaroniaSdrReport(SWGAaroniaRTSAReport* aaronia_sdr_report);
SWGAaroniaRTSAOutputReport* getAaroniaRtsaOutputReport();
void setAaroniaRtsaOutputReport(SWGAaroniaRTSAOutputReport* aaronia_rtsa_output_report);
virtual bool isSet() override;
@ -274,6 +278,9 @@ private:
SWGAaroniaRTSAReport* aaronia_sdr_report;
bool m_aaronia_sdr_report_isSet;
SWGAaroniaRTSAOutputReport* aaronia_rtsa_output_report;
bool m_aaronia_rtsa_output_report_isSet;
};
}

View File

@ -122,6 +122,8 @@ SWGDeviceSettings::SWGDeviceSettings() {
m_xtrx_mimo_settings_isSet = false;
aaronia_rtsa_settings = nullptr;
m_aaronia_rtsa_settings_isSet = false;
aaronia_rtsa_output_settings = nullptr;
m_aaronia_rtsa_output_settings_isSet = false;
}
SWGDeviceSettings::~SWGDeviceSettings() {
@ -224,6 +226,8 @@ SWGDeviceSettings::init() {
m_xtrx_mimo_settings_isSet = false;
aaronia_rtsa_settings = new SWGAaroniaRTSASettings();
m_aaronia_rtsa_settings_isSet = false;
aaronia_rtsa_output_settings = new SWGAaroniaRTSAOutputSettings();
m_aaronia_rtsa_output_settings_isSet = false;
}
void
@ -365,6 +369,9 @@ SWGDeviceSettings::cleanup() {
if(aaronia_rtsa_settings != nullptr) {
delete aaronia_rtsa_settings;
}
if(aaronia_rtsa_output_settings != nullptr) {
delete aaronia_rtsa_output_settings;
}
}
SWGDeviceSettings*
@ -472,6 +479,8 @@ SWGDeviceSettings::fromJsonObject(QJsonObject &pJson) {
::SWGSDRangel::setValue(&aaronia_rtsa_settings, pJson["aaroniaRTSASettings"], "SWGAaroniaRTSASettings", "SWGAaroniaRTSASettings");
::SWGSDRangel::setValue(&aaronia_rtsa_output_settings, pJson["aaroniaRTSAOutputSettings"], "SWGAaroniaRTSAOutputSettings", "SWGAaroniaRTSAOutputSettings");
}
QString
@ -629,6 +638,9 @@ SWGDeviceSettings::asJsonObject() {
if((aaronia_rtsa_settings != nullptr) && (aaronia_rtsa_settings->isSet())){
toJsonValue(QString("aaroniaRTSASettings"), aaronia_rtsa_settings, obj, QString("SWGAaroniaRTSASettings"));
}
if((aaronia_rtsa_output_settings != nullptr) && (aaronia_rtsa_output_settings->isSet())){
toJsonValue(QString("aaroniaRTSAOutputSettings"), aaronia_rtsa_output_settings, obj, QString("SWGAaroniaRTSAOutputSettings"));
}
return obj;
}
@ -1103,6 +1115,16 @@ SWGDeviceSettings::setAaroniaRtsaSettings(SWGAaroniaRTSASettings* aaronia_rtsa_s
this->m_aaronia_rtsa_settings_isSet = true;
}
SWGAaroniaRTSAOutputSettings*
SWGDeviceSettings::getAaroniaRtsaOutputSettings() {
return aaronia_rtsa_output_settings;
}
void
SWGDeviceSettings::setAaroniaRtsaOutputSettings(SWGAaroniaRTSAOutputSettings* aaronia_rtsa_output_settings) {
this->aaronia_rtsa_output_settings = aaronia_rtsa_output_settings;
this->m_aaronia_rtsa_output_settings_isSet = true;
}
bool
SWGDeviceSettings::isSet(){
@ -1249,6 +1271,9 @@ SWGDeviceSettings::isSet(){
if(aaronia_rtsa_settings && aaronia_rtsa_settings->isSet()){
isObjectUpdated = true; break;
}
if(aaronia_rtsa_output_settings && aaronia_rtsa_output_settings->isSet()){
isObjectUpdated = true; break;
}
}while(false);
return isObjectUpdated;
}

View File

@ -22,6 +22,7 @@
#include <QJsonObject>
#include "SWGAaroniaRTSAOutputSettings.h"
#include "SWGAaroniaRTSASettings.h"
#include "SWGAirspyHFSettings.h"
#include "SWGAirspySettings.h"
@ -227,6 +228,9 @@ public:
SWGAaroniaRTSASettings* getAaroniaRtsaSettings();
void setAaroniaRtsaSettings(SWGAaroniaRTSASettings* aaronia_rtsa_settings);
SWGAaroniaRTSAOutputSettings* getAaroniaRtsaOutputSettings();
void setAaroniaRtsaOutputSettings(SWGAaroniaRTSAOutputSettings* aaronia_rtsa_output_settings);
virtual bool isSet() override;
@ -372,6 +376,9 @@ private:
SWGAaroniaRTSASettings* aaronia_rtsa_settings;
bool m_aaronia_rtsa_settings_isSet;
SWGAaroniaRTSAOutputSettings* aaronia_rtsa_output_settings;
bool m_aaronia_rtsa_output_settings_isSet;
};
}

View File

@ -43,6 +43,8 @@
#include "SWGATVDemodSettings.h"
#include "SWGATVModReport.h"
#include "SWGATVModSettings.h"
#include "SWGAaroniaRTSAOutputReport.h"
#include "SWGAaroniaRTSAOutputSettings.h"
#include "SWGAaroniaRTSAReport.h"
#include "SWGAaroniaRTSASettings.h"
#include "SWGAirspyHFReport.h"
@ -502,6 +504,16 @@ namespace SWGSDRangel {
obj->init();
return obj;
}
if(QString("SWGAaroniaRTSAOutputReport").compare(type) == 0) {
SWGAaroniaRTSAOutputReport *obj = new SWGAaroniaRTSAOutputReport();
obj->init();
return obj;
}
if(QString("SWGAaroniaRTSAOutputSettings").compare(type) == 0) {
SWGAaroniaRTSAOutputSettings *obj = new SWGAaroniaRTSAOutputSettings();
obj->init();
return obj;
}
if(QString("SWGAaroniaRTSAReport").compare(type) == 0) {
SWGAaroniaRTSAReport *obj = new SWGAaroniaRTSAReport();
obj->init();