mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-28 21:12:26 -04:00
Migration of DaemonSink channel to RemoteSink
This commit is contained in:
parent
e5b23e9864
commit
5b04cf4b5a
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
@ -27,10 +27,10 @@ endif()
|
||||
|
||||
find_package(CM256cc)
|
||||
if(CM256CC_FOUND)
|
||||
add_subdirectory(daemonsink)
|
||||
add_subdirectory(remotesink)
|
||||
endif(CM256CC_FOUND)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
add_subdirectory(demoddsd)
|
||||
add_subdirectory(daemonsink)
|
||||
add_subdirectory(remotesink)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
@ -1,83 +0,0 @@
|
||||
project(daemonsink)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "DaemonSink: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "DaemonSink: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "DaemonSink: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(daemonsink_SOURCES
|
||||
daemonsink.cpp
|
||||
daemonsinkgui.cpp
|
||||
daemonsinksettings.cpp
|
||||
daemonsinkthread.cpp
|
||||
daemonsinkplugin.cpp
|
||||
)
|
||||
|
||||
set(daemonsink_HEADERS
|
||||
daemonsink.h
|
||||
daemonsinkgui.h
|
||||
daemonsinksettings.h
|
||||
daemonsinkthread.h
|
||||
daemonsinkplugin.h
|
||||
)
|
||||
|
||||
set(daemonsink_FORMS
|
||||
daemonsinkgui.ui
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
qt5_wrap_ui(daemonsink_FORMS_HEADERS ${daemonsink_FORMS})
|
||||
|
||||
add_library(daemonsink SHARED
|
||||
${daemonsink_SOURCES}
|
||||
${daemonsink_HEADERS_MOC}
|
||||
${daemonsink_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(daemonsink PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(daemonsink PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(daemonsink
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(daemonsink
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(daemonsink Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS daemonsink DESTINATION lib/plugins/channelrx)
|
83
plugins/channelrx/remotesink/CMakeLists.txt
Normal file
83
plugins/channelrx/remotesink/CMakeLists.txt
Normal file
@ -0,0 +1,83 @@
|
||||
project(remotesink)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "RemoteSink: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "RemoteSink: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "RemoteSink: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(remotesink_SOURCES
|
||||
remotesink.cpp
|
||||
remotesinkgui.cpp
|
||||
remotesinksettings.cpp
|
||||
remotesinkthread.cpp
|
||||
remotesinkplugin.cpp
|
||||
)
|
||||
|
||||
set(remotesink_HEADERS
|
||||
remotesink.h
|
||||
remotesinkgui.h
|
||||
remotesinksettings.h
|
||||
remotesinkthread.h
|
||||
remotesinkplugin.h
|
||||
)
|
||||
|
||||
set(remotesink_FORMS
|
||||
remotesinkgui.ui
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
qt5_wrap_ui(remotesink_FORMS_HEADERS ${remotesink_FORMS})
|
||||
|
||||
add_library(remotesink SHARED
|
||||
${remotesink_SOURCES}
|
||||
${remotesink_HEADERS_MOC}
|
||||
${remotesink_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(remotesink PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(remotesink PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_link_libraries(remotesink
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(remotesink
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(remotesink Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS remotesink DESTINATION lib/plugins/channelrx)
|
@ -1,4 +1,4 @@
|
||||
<h1>Daemon sink channel plugin</h1>
|
||||
<h1>Remote sink channel plugin</h1>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
@ -12,7 +12,7 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/
|
||||
|
||||
<h2>Interface</h2>
|
||||
|
||||

|
||||

|
||||
|
||||
<h3>1: Distant address</h2>
|
||||
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,6 +20,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "remotesink.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#include <boost/crc.hpp>
|
||||
@ -36,16 +38,16 @@
|
||||
#include "dsp/downchannelizer.h"
|
||||
#include "dsp/dspcommands.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "daemonsinkthread.h"
|
||||
#include "daemonsink.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(DaemonSink::MsgConfigureDaemonSink, Message)
|
||||
MESSAGE_CLASS_DEFINITION(DaemonSink::MsgSampleRateNotification, Message)
|
||||
#include "../remotesink/remotesinkthread.h"
|
||||
|
||||
const QString DaemonSink::m_channelIdURI = "sdrangel.channel.daemonsink";
|
||||
const QString DaemonSink::m_channelId = "DaemonSink";
|
||||
MESSAGE_CLASS_DEFINITION(RemoteSink::MsgConfigureRemoteSink, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteSink::MsgSampleRateNotification, Message)
|
||||
|
||||
DaemonSink::DaemonSink(DeviceSourceAPI *deviceAPI) :
|
||||
const QString RemoteSink::m_channelIdURI = "sdrangel.channel.remotesink";
|
||||
const QString RemoteSink::m_channelId = "RemoteSink";
|
||||
|
||||
RemoteSink::RemoteSink(DeviceSourceAPI *deviceAPI) :
|
||||
ChannelSinkAPI(m_channelIdURI),
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_running(false),
|
||||
@ -72,7 +74,7 @@ DaemonSink::DaemonSink(DeviceSourceAPI *deviceAPI) :
|
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
}
|
||||
|
||||
DaemonSink::~DaemonSink()
|
||||
RemoteSink::~RemoteSink()
|
||||
{
|
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
delete m_networkManager;
|
||||
@ -89,26 +91,26 @@ DaemonSink::~DaemonSink()
|
||||
delete m_channelizer;
|
||||
}
|
||||
|
||||
void DaemonSink::setTxDelay(int txDelay, int nbBlocksFEC)
|
||||
void RemoteSink::setTxDelay(int txDelay, int nbBlocksFEC)
|
||||
{
|
||||
double txDelayRatio = txDelay / 100.0;
|
||||
int samplesPerBlock = SDRDaemonNbBytesPerBlock / sizeof(Sample);
|
||||
double delay = m_sampleRate == 0 ? 1.0 : (127*samplesPerBlock*txDelayRatio) / m_sampleRate;
|
||||
delay /= 128 + nbBlocksFEC;
|
||||
m_txDelay = roundf(delay*1e6); // microseconds
|
||||
qDebug() << "DaemonSink::setTxDelay:"
|
||||
qDebug() << "RemoteSink::setTxDelay:"
|
||||
<< " " << txDelay
|
||||
<< "% m_txDelay: " << m_txDelay << "us"
|
||||
<< " m_sampleRate: " << m_sampleRate << "S/s";
|
||||
}
|
||||
|
||||
void DaemonSink::setNbBlocksFEC(int nbBlocksFEC)
|
||||
void RemoteSink::setNbBlocksFEC(int nbBlocksFEC)
|
||||
{
|
||||
qDebug() << "DaemonSink::setNbBlocksFEC: nbBlocksFEC: " << nbBlocksFEC;
|
||||
qDebug() << "RemoteSink::setNbBlocksFEC: nbBlocksFEC: " << nbBlocksFEC;
|
||||
m_nbBlocksFEC = nbBlocksFEC;
|
||||
}
|
||||
|
||||
void DaemonSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst)
|
||||
void RemoteSink::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool firstOfBurst)
|
||||
{
|
||||
(void) firstOfBurst;
|
||||
SampleVector::const_iterator it = begin;
|
||||
@ -153,7 +155,7 @@ void DaemonSink::feed(const SampleVector::const_iterator& begin, const SampleVec
|
||||
|
||||
if (!(metaData == m_currentMetaFEC))
|
||||
{
|
||||
qDebug() << "SDRDaemonChannelSink::feed: meta: "
|
||||
qDebug() << "RemoteSink::feed: meta: "
|
||||
<< "|" << metaData.m_centerFrequency
|
||||
<< ":" << metaData.m_sampleRate
|
||||
<< ":" << (int) (metaData.m_sampleBytes & 0xF)
|
||||
@ -219,9 +221,9 @@ void DaemonSink::feed(const SampleVector::const_iterator& begin, const SampleVec
|
||||
}
|
||||
}
|
||||
|
||||
void DaemonSink::start()
|
||||
void RemoteSink::start()
|
||||
{
|
||||
qDebug("DaemonSink::start");
|
||||
qDebug("RemoteSink::start");
|
||||
|
||||
memset((void *) &m_currentMetaFEC, 0, sizeof(SDRDaemonMetaDataFEC));
|
||||
|
||||
@ -229,7 +231,7 @@ void DaemonSink::start()
|
||||
stop();
|
||||
}
|
||||
|
||||
m_sinkThread = new DaemonSinkThread();
|
||||
m_sinkThread = new RemoteSinkThread();
|
||||
connect(this,
|
||||
SIGNAL(dataBlockAvailable(SDRDaemonDataBlock *)),
|
||||
m_sinkThread,
|
||||
@ -239,9 +241,9 @@ void DaemonSink::start()
|
||||
m_running = true;
|
||||
}
|
||||
|
||||
void DaemonSink::stop()
|
||||
void RemoteSink::stop()
|
||||
{
|
||||
qDebug("DaemonSink::stop");
|
||||
qDebug("RemoteSink::stop");
|
||||
|
||||
if (m_sinkThread != 0)
|
||||
{
|
||||
@ -253,14 +255,14 @@ void DaemonSink::stop()
|
||||
m_running = false;
|
||||
}
|
||||
|
||||
bool DaemonSink::handleMessage(const Message& cmd)
|
||||
bool RemoteSink::handleMessage(const Message& cmd)
|
||||
{
|
||||
(void) cmd;
|
||||
if (DownChannelizer::MsgChannelizerNotification::match(cmd))
|
||||
{
|
||||
DownChannelizer::MsgChannelizerNotification& notif = (DownChannelizer::MsgChannelizerNotification&) cmd;
|
||||
|
||||
qDebug() << "DaemonSink::handleMessage: MsgChannelizerNotification:"
|
||||
qDebug() << "RemoteSink::handleMessage: MsgChannelizerNotification:"
|
||||
<< " channelSampleRate: " << notif.getSampleRate()
|
||||
<< " offsetFrequency: " << notif.getFrequencyOffset();
|
||||
|
||||
@ -282,7 +284,7 @@ bool DaemonSink::handleMessage(const Message& cmd)
|
||||
{
|
||||
DSPSignalNotification& notif = (DSPSignalNotification&) cmd;
|
||||
|
||||
qDebug() << "DaemonSink::handleMessage: DSPSignalNotification:"
|
||||
qDebug() << "RemoteSink::handleMessage: DSPSignalNotification:"
|
||||
<< " inputSampleRate: " << notif.getSampleRate()
|
||||
<< " centerFrequency: " << notif.getCenterFrequency();
|
||||
|
||||
@ -290,10 +292,10 @@ bool DaemonSink::handleMessage(const Message& cmd)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureDaemonSink::match(cmd))
|
||||
else if (MsgConfigureRemoteSink::match(cmd))
|
||||
{
|
||||
MsgConfigureDaemonSink& cfg = (MsgConfigureDaemonSink&) cmd;
|
||||
qDebug() << "DaemonSink::handleMessage: MsgConfigureDaemonSink";
|
||||
MsgConfigureRemoteSink& cfg = (MsgConfigureRemoteSink&) cmd;
|
||||
qDebug() << "RemoteSink::handleMessage: MsgConfigureRemoteSink";
|
||||
applySettings(cfg.getSettings(), cfg.getForce());
|
||||
|
||||
return true;
|
||||
@ -304,32 +306,32 @@ bool DaemonSink::handleMessage(const Message& cmd)
|
||||
}
|
||||
}
|
||||
|
||||
QByteArray DaemonSink::serialize() const
|
||||
QByteArray RemoteSink::serialize() const
|
||||
{
|
||||
return m_settings.serialize();
|
||||
}
|
||||
|
||||
bool DaemonSink::deserialize(const QByteArray& data)
|
||||
bool RemoteSink::deserialize(const QByteArray& data)
|
||||
{
|
||||
(void) data;
|
||||
if (m_settings.deserialize(data))
|
||||
{
|
||||
MsgConfigureDaemonSink *msg = MsgConfigureDaemonSink::create(m_settings, true);
|
||||
MsgConfigureRemoteSink *msg = MsgConfigureRemoteSink::create(m_settings, true);
|
||||
m_inputMessageQueue.push(msg);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings.resetToDefaults();
|
||||
MsgConfigureDaemonSink *msg = MsgConfigureDaemonSink::create(m_settings, true);
|
||||
MsgConfigureRemoteSink *msg = MsgConfigureRemoteSink::create(m_settings, true);
|
||||
m_inputMessageQueue.push(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void DaemonSink::applySettings(const DaemonSinkSettings& settings, bool force)
|
||||
void RemoteSink::applySettings(const RemoteSinkSettings& settings, bool force)
|
||||
{
|
||||
qDebug() << "DaemonSink::applySettings:"
|
||||
qDebug() << "RemoteSink::applySettings:"
|
||||
<< " m_nbFECBlocks: " << settings.m_nbFECBlocks
|
||||
<< " m_txDelay: " << settings.m_txDelay
|
||||
<< " m_dataAddress: " << settings.m_dataAddress
|
||||
@ -376,40 +378,40 @@ void DaemonSink::applySettings(const DaemonSinkSettings& settings, bool force)
|
||||
m_settings = settings;
|
||||
}
|
||||
|
||||
int DaemonSink::webapiSettingsGet(
|
||||
int RemoteSink::webapiSettingsGet(
|
||||
SWGSDRangel::SWGChannelSettings& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
response.setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings());
|
||||
response.getDaemonSinkSettings()->init();
|
||||
response.setRemoteSinkSettings(new SWGSDRangel::SWGRemoteSinkSettings());
|
||||
response.getRemoteSinkSettings()->init();
|
||||
webapiFormatChannelSettings(response, m_settings);
|
||||
return 200;
|
||||
}
|
||||
|
||||
int DaemonSink::webapiSettingsPutPatch(
|
||||
int RemoteSink::webapiSettingsPutPatch(
|
||||
bool force,
|
||||
const QStringList& channelSettingsKeys,
|
||||
SWGSDRangel::SWGChannelSettings& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
DaemonSinkSettings settings = m_settings;
|
||||
RemoteSinkSettings settings = m_settings;
|
||||
|
||||
if (channelSettingsKeys.contains("nbFECBlocks"))
|
||||
{
|
||||
int nbFECBlocks = response.getDaemonSinkSettings()->getNbFecBlocks();
|
||||
int nbFECBlocks = response.getRemoteSinkSettings()->getNbFecBlocks();
|
||||
|
||||
if ((nbFECBlocks < 0) || (nbFECBlocks > 127)) {
|
||||
settings.m_nbFECBlocks = 8;
|
||||
} else {
|
||||
settings.m_nbFECBlocks = response.getDaemonSinkSettings()->getNbFecBlocks();
|
||||
settings.m_nbFECBlocks = response.getRemoteSinkSettings()->getNbFecBlocks();
|
||||
}
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("txDelay"))
|
||||
{
|
||||
int txDelay = response.getDaemonSinkSettings()->getTxDelay();
|
||||
int txDelay = response.getRemoteSinkSettings()->getTxDelay();
|
||||
|
||||
if (txDelay < 0) {
|
||||
settings.m_txDelay = 35;
|
||||
@ -419,12 +421,12 @@ int DaemonSink::webapiSettingsPutPatch(
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("dataAddress")) {
|
||||
settings.m_dataAddress = *response.getDaemonSinkSettings()->getDataAddress();
|
||||
settings.m_dataAddress = *response.getRemoteSinkSettings()->getDataAddress();
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("dataPort"))
|
||||
{
|
||||
int dataPort = response.getDaemonSinkSettings()->getDataPort();
|
||||
int dataPort = response.getRemoteSinkSettings()->getDataPort();
|
||||
|
||||
if ((dataPort < 1024) || (dataPort > 65535)) {
|
||||
settings.m_dataPort = 9090;
|
||||
@ -434,34 +436,34 @@ int DaemonSink::webapiSettingsPutPatch(
|
||||
}
|
||||
|
||||
if (channelSettingsKeys.contains("rgbColor")) {
|
||||
settings.m_rgbColor = response.getDaemonSinkSettings()->getRgbColor();
|
||||
settings.m_rgbColor = response.getRemoteSinkSettings()->getRgbColor();
|
||||
}
|
||||
if (channelSettingsKeys.contains("title")) {
|
||||
settings.m_title = *response.getDaemonSinkSettings()->getTitle();
|
||||
settings.m_title = *response.getRemoteSinkSettings()->getTitle();
|
||||
}
|
||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||
settings.m_useReverseAPI = response.getDaemonSinkSettings()->getUseReverseApi() != 0;
|
||||
settings.m_useReverseAPI = response.getRemoteSinkSettings()->getUseReverseApi() != 0;
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIAddress")) {
|
||||
settings.m_reverseAPIAddress = *response.getDaemonSinkSettings()->getReverseApiAddress();
|
||||
settings.m_reverseAPIAddress = *response.getRemoteSinkSettings()->getReverseApiAddress();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||
settings.m_reverseAPIPort = response.getDaemonSinkSettings()->getReverseApiPort();
|
||||
settings.m_reverseAPIPort = response.getRemoteSinkSettings()->getReverseApiPort();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||
settings.m_reverseAPIDeviceIndex = response.getDaemonSinkSettings()->getReverseApiDeviceIndex();
|
||||
settings.m_reverseAPIDeviceIndex = response.getRemoteSinkSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
||||
settings.m_reverseAPIChannelIndex = response.getDaemonSinkSettings()->getReverseApiChannelIndex();
|
||||
settings.m_reverseAPIChannelIndex = response.getRemoteSinkSettings()->getReverseApiChannelIndex();
|
||||
}
|
||||
|
||||
MsgConfigureDaemonSink *msg = MsgConfigureDaemonSink::create(settings, force);
|
||||
MsgConfigureRemoteSink *msg = MsgConfigureRemoteSink::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
qDebug("DaemonSink::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
||||
qDebug("RemoteSink::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureDaemonSink *msgToGUI = MsgConfigureDaemonSink::create(settings, force);
|
||||
MsgConfigureRemoteSink *msgToGUI = MsgConfigureRemoteSink::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
@ -470,67 +472,67 @@ int DaemonSink::webapiSettingsPutPatch(
|
||||
return 200;
|
||||
}
|
||||
|
||||
void DaemonSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSinkSettings& settings)
|
||||
void RemoteSink::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSinkSettings& settings)
|
||||
{
|
||||
response.getDaemonSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||
response.getDaemonSinkSettings()->setTxDelay(settings.m_txDelay);
|
||||
response.getRemoteSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||
response.getRemoteSinkSettings()->setTxDelay(settings.m_txDelay);
|
||||
|
||||
if (response.getDaemonSinkSettings()->getDataAddress()) {
|
||||
*response.getDaemonSinkSettings()->getDataAddress() = settings.m_dataAddress;
|
||||
if (response.getRemoteSinkSettings()->getDataAddress()) {
|
||||
*response.getRemoteSinkSettings()->getDataAddress() = settings.m_dataAddress;
|
||||
} else {
|
||||
response.getDaemonSinkSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||
response.getRemoteSinkSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||
}
|
||||
|
||||
response.getDaemonSinkSettings()->setDataPort(settings.m_dataPort);
|
||||
response.getDaemonSinkSettings()->setRgbColor(settings.m_rgbColor);
|
||||
response.getRemoteSinkSettings()->setDataPort(settings.m_dataPort);
|
||||
response.getRemoteSinkSettings()->setRgbColor(settings.m_rgbColor);
|
||||
|
||||
if (response.getDaemonSinkSettings()->getTitle()) {
|
||||
*response.getDaemonSinkSettings()->getTitle() = settings.m_title;
|
||||
if (response.getRemoteSinkSettings()->getTitle()) {
|
||||
*response.getRemoteSinkSettings()->getTitle() = settings.m_title;
|
||||
} else {
|
||||
response.getDaemonSinkSettings()->setTitle(new QString(settings.m_title));
|
||||
response.getRemoteSinkSettings()->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
|
||||
response.getDaemonSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
response.getRemoteSinkSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||
|
||||
if (response.getDaemonSinkSettings()->getReverseApiAddress()) {
|
||||
*response.getDaemonSinkSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
if (response.getRemoteSinkSettings()->getReverseApiAddress()) {
|
||||
*response.getRemoteSinkSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||
} else {
|
||||
response.getDaemonSinkSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
response.getRemoteSinkSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||
}
|
||||
|
||||
response.getDaemonSinkSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getDaemonSinkSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getDaemonSinkSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
response.getRemoteSinkSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||
response.getRemoteSinkSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
response.getRemoteSinkSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||
}
|
||||
|
||||
void DaemonSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSinkSettings& settings, bool force)
|
||||
void RemoteSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||
swgChannelSettings->setTx(0);
|
||||
swgChannelSettings->setChannelType(new QString("DaemonSink"));
|
||||
swgChannelSettings->setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings());
|
||||
SWGSDRangel::SWGDaemonSinkSettings *swgDaemonSinkSettings = swgChannelSettings->getDaemonSinkSettings();
|
||||
swgChannelSettings->setChannelType(new QString("RemoteSink"));
|
||||
swgChannelSettings->setRemoteSinkSettings(new SWGSDRangel::SWGRemoteSinkSettings());
|
||||
SWGSDRangel::SWGRemoteSinkSettings *swgRemoteSinkSettings = swgChannelSettings->getRemoteSinkSettings();
|
||||
|
||||
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
||||
|
||||
if (channelSettingsKeys.contains("nbFECBlocks") || force) {
|
||||
swgDaemonSinkSettings->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||
swgRemoteSinkSettings->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||
}
|
||||
if (channelSettingsKeys.contains("txDelay") || force)
|
||||
{
|
||||
swgDaemonSinkSettings->setTxDelay(settings.m_txDelay);
|
||||
swgRemoteSinkSettings->setTxDelay(settings.m_txDelay);
|
||||
}
|
||||
if (channelSettingsKeys.contains("dataAddress") || force) {
|
||||
swgDaemonSinkSettings->setDataAddress(new QString(settings.m_dataAddress));
|
||||
swgRemoteSinkSettings->setDataAddress(new QString(settings.m_dataAddress));
|
||||
}
|
||||
if (channelSettingsKeys.contains("dataPort") || force) {
|
||||
swgDaemonSinkSettings->setDataPort(settings.m_dataPort);
|
||||
swgRemoteSinkSettings->setDataPort(settings.m_dataPort);
|
||||
}
|
||||
if (channelSettingsKeys.contains("rgbColor") || force) {
|
||||
swgDaemonSinkSettings->setRgbColor(settings.m_rgbColor);
|
||||
swgRemoteSinkSettings->setRgbColor(settings.m_rgbColor);
|
||||
}
|
||||
if (channelSettingsKeys.contains("title") || force) {
|
||||
swgDaemonSinkSettings->setTitle(new QString(settings.m_title));
|
||||
swgRemoteSinkSettings->setTitle(new QString(settings.m_title));
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||
@ -552,13 +554,13 @@ void DaemonSink::webapiReverseSendSettings(QList<QString>& channelSettingsKeys,
|
||||
delete swgChannelSettings;
|
||||
}
|
||||
|
||||
void DaemonSink::networkManagerFinished(QNetworkReply *reply)
|
||||
void RemoteSink::networkManagerFinished(QNetworkReply *reply)
|
||||
{
|
||||
QNetworkReply::NetworkError replyError = reply->error();
|
||||
|
||||
if (replyError)
|
||||
{
|
||||
qWarning() << "DaemonSink::networkManagerFinished:"
|
||||
qWarning() << "RemoteSink::networkManagerFinished:"
|
||||
<< " error(" << (int) replyError
|
||||
<< "): " << replyError
|
||||
<< ": " << reply->errorString();
|
||||
@ -567,5 +569,5 @@ void DaemonSink::networkManagerFinished(QNetworkReply *reply)
|
||||
|
||||
QString answer = reply->readAll();
|
||||
answer.chop(1); // remove last \n
|
||||
qDebug("DaemonSink::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
||||
qDebug("RemoteSink::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,8 +20,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_DAEMONSINK_H_
|
||||
#define INCLUDE_DAEMONSINK_H_
|
||||
#ifndef INCLUDE_REMOTESINK_H_
|
||||
#define INCLUDE_REMOTESINK_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QMutex>
|
||||
@ -30,35 +30,36 @@
|
||||
#include "dsp/basebandsamplesink.h"
|
||||
#include "channel/channelsinkapi.h"
|
||||
#include "channel/sdrdaemondatablock.h"
|
||||
#include "daemonsinksettings.h"
|
||||
|
||||
#include "../remotesink/remotesinksettings.h"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class DeviceSourceAPI;
|
||||
class ThreadedBasebandSampleSink;
|
||||
class DownChannelizer;
|
||||
class DaemonSinkThread;
|
||||
class RemoteSinkThread;
|
||||
|
||||
class DaemonSink : public BasebandSampleSink, public ChannelSinkAPI {
|
||||
class RemoteSink : public BasebandSampleSink, public ChannelSinkAPI {
|
||||
Q_OBJECT
|
||||
public:
|
||||
class MsgConfigureDaemonSink : public Message {
|
||||
class MsgConfigureRemoteSink : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const DaemonSinkSettings& getSettings() const { return m_settings; }
|
||||
const RemoteSinkSettings& getSettings() const { return m_settings; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureDaemonSink* create(const DaemonSinkSettings& settings, bool force)
|
||||
static MsgConfigureRemoteSink* create(const RemoteSinkSettings& settings, bool force)
|
||||
{
|
||||
return new MsgConfigureDaemonSink(settings, force);
|
||||
return new MsgConfigureRemoteSink(settings, force);
|
||||
}
|
||||
|
||||
private:
|
||||
DaemonSinkSettings m_settings;
|
||||
RemoteSinkSettings m_settings;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureDaemonSink(const DaemonSinkSettings& settings, bool force) :
|
||||
MsgConfigureRemoteSink(const RemoteSinkSettings& settings, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_force(force)
|
||||
@ -85,8 +86,8 @@ public:
|
||||
int m_sampleRate;
|
||||
};
|
||||
|
||||
DaemonSink(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~DaemonSink();
|
||||
RemoteSink(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~RemoteSink();
|
||||
virtual void destroy() { delete this; }
|
||||
|
||||
virtual void feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool po);
|
||||
@ -95,7 +96,7 @@ public:
|
||||
virtual bool handleMessage(const Message& cmd);
|
||||
|
||||
virtual void getIdentifier(QString& id) { id = objectName(); }
|
||||
virtual void getTitle(QString& title) { title = "SDRDaemon Sink"; }
|
||||
virtual void getTitle(QString& title) { title = "Remote Sink"; }
|
||||
virtual qint64 getCenterFrequency() const { return 0; }
|
||||
|
||||
virtual QByteArray serialize() const;
|
||||
@ -134,8 +135,8 @@ private:
|
||||
DownChannelizer* m_channelizer;
|
||||
bool m_running;
|
||||
|
||||
DaemonSinkSettings m_settings;
|
||||
DaemonSinkThread *m_sinkThread;
|
||||
RemoteSinkSettings m_settings;
|
||||
RemoteSinkThread *m_sinkThread;
|
||||
|
||||
int m_txBlockIndex; //!< Current index in blocks to transmit in the Tx row
|
||||
uint16_t m_frameCount; //!< transmission frame count
|
||||
@ -154,12 +155,12 @@ private:
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkRequest m_networkRequest;
|
||||
|
||||
void applySettings(const DaemonSinkSettings& settings, bool force = false);
|
||||
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSinkSettings& settings);
|
||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSinkSettings& settings, bool force);
|
||||
void applySettings(const RemoteSinkSettings& settings, bool force = false);
|
||||
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSinkSettings& settings);
|
||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSinkSettings& settings, bool force);
|
||||
|
||||
private slots:
|
||||
void networkManagerFinished(QNetworkReply *reply);
|
||||
};
|
||||
|
||||
#endif /* INCLUDE_DAEMONSINK_H_ */
|
||||
#endif /* INCLUDE_REMOTESINK_H_ */
|
@ -9,7 +9,7 @@ CONFIG += plugin
|
||||
|
||||
QT += core gui widgets multimedia network opengl
|
||||
|
||||
TARGET = daemonsink
|
||||
TARGET = remotesink
|
||||
|
||||
CONFIG(MINGW32):LIBCM256CCSRC = "C:\softs\cm256cc"
|
||||
CONFIG(MSVC):LIBCM256CCSRC = "C:\softs\cm256cc"
|
||||
@ -38,19 +38,19 @@ CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0"
|
||||
CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
|
||||
CONFIG(macx):INCLUDEPATH += "../../../boost_1_69_0"
|
||||
|
||||
SOURCES += daemonsink.cpp\
|
||||
daemonsinkgui.cpp\
|
||||
daemonsinksettings.cpp\
|
||||
daemonsinkplugin.cpp\
|
||||
daemonsinkthread.cpp
|
||||
SOURCES += remotesink.cpp\
|
||||
remotesinkgui.cpp\
|
||||
remotesinksettings.cpp\
|
||||
remotesinkplugin.cpp\
|
||||
remotesinkthread.cpp
|
||||
|
||||
HEADERS += daemonsink.h\
|
||||
daemonsinkgui.h\
|
||||
daemonsinksettings.h\
|
||||
daemonsinkplugin.h\
|
||||
daemonsinkthread.h
|
||||
HEADERS += remotesink.h\
|
||||
remotesinkgui.h\
|
||||
remotesinksettings.h\
|
||||
remotesinkplugin.h\
|
||||
remotesinkthread.h
|
||||
|
||||
FORMS += daemonsinkgui.ui
|
||||
FORMS += remotesinkgui.ui
|
||||
|
||||
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
|
||||
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
|
@ -14,58 +14,59 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "remotesinkgui.h"
|
||||
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "gui/basicchannelsettingsdialog.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include "daemonsink.h"
|
||||
#include "ui_daemonsinkgui.h"
|
||||
#include "daemonsinkgui.h"
|
||||
#include "remotesink.h"
|
||||
#include "ui_remotesinkgui.h"
|
||||
|
||||
DaemonSinkGUI* DaemonSinkGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *channelRx)
|
||||
RemoteSinkGUI* RemoteSinkGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *channelRx)
|
||||
{
|
||||
DaemonSinkGUI* gui = new DaemonSinkGUI(pluginAPI, deviceUISet, channelRx);
|
||||
RemoteSinkGUI* gui = new RemoteSinkGUI(pluginAPI, deviceUISet, channelRx);
|
||||
return gui;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::destroy()
|
||||
void RemoteSinkGUI::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::setName(const QString& name)
|
||||
void RemoteSinkGUI::setName(const QString& name)
|
||||
{
|
||||
setObjectName(name);
|
||||
}
|
||||
|
||||
QString DaemonSinkGUI::getName() const
|
||||
QString RemoteSinkGUI::getName() const
|
||||
{
|
||||
return objectName();
|
||||
}
|
||||
|
||||
qint64 DaemonSinkGUI::getCenterFrequency() const {
|
||||
qint64 RemoteSinkGUI::getCenterFrequency() const {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::setCenterFrequency(qint64 centerFrequency)
|
||||
void RemoteSinkGUI::setCenterFrequency(qint64 centerFrequency)
|
||||
{
|
||||
(void) centerFrequency;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::resetToDefaults()
|
||||
void RemoteSinkGUI::resetToDefaults()
|
||||
{
|
||||
m_settings.resetToDefaults();
|
||||
displaySettings();
|
||||
applySettings(true);
|
||||
}
|
||||
|
||||
QByteArray DaemonSinkGUI::serialize() const
|
||||
QByteArray RemoteSinkGUI::serialize() const
|
||||
{
|
||||
return m_settings.serialize();
|
||||
}
|
||||
|
||||
bool DaemonSinkGUI::deserialize(const QByteArray& data)
|
||||
bool RemoteSinkGUI::deserialize(const QByteArray& data)
|
||||
{
|
||||
if(m_settings.deserialize(data)) {
|
||||
displaySettings();
|
||||
@ -77,19 +78,19 @@ bool DaemonSinkGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
bool DaemonSinkGUI::handleMessage(const Message& message)
|
||||
bool RemoteSinkGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (DaemonSink::MsgSampleRateNotification::match(message))
|
||||
if (RemoteSink::MsgSampleRateNotification::match(message))
|
||||
{
|
||||
DaemonSink::MsgSampleRateNotification& notif = (DaemonSink::MsgSampleRateNotification&) message;
|
||||
RemoteSink::MsgSampleRateNotification& notif = (RemoteSink::MsgSampleRateNotification&) message;
|
||||
m_channelMarker.setBandwidth(notif.getSampleRate());
|
||||
m_sampleRate = notif.getSampleRate();
|
||||
updateTxDelayTime();
|
||||
return true;
|
||||
}
|
||||
else if (DaemonSink::MsgConfigureDaemonSink::match(message))
|
||||
else if (RemoteSink::MsgConfigureRemoteSink::match(message))
|
||||
{
|
||||
const DaemonSink::MsgConfigureDaemonSink& cfg = (DaemonSink::MsgConfigureDaemonSink&) message;
|
||||
const RemoteSink::MsgConfigureRemoteSink& cfg = (RemoteSink::MsgConfigureRemoteSink&) message;
|
||||
m_settings = cfg.getSettings();
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
@ -102,9 +103,9 @@ bool DaemonSinkGUI::handleMessage(const Message& message)
|
||||
}
|
||||
}
|
||||
|
||||
DaemonSinkGUI::DaemonSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *channelrx, QWidget* parent) :
|
||||
RemoteSinkGUI::RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *channelrx, QWidget* parent) :
|
||||
RollupWidget(parent),
|
||||
ui(new Ui::DaemonSinkGUI),
|
||||
ui(new Ui::RemoteSinkGUI),
|
||||
m_pluginAPI(pluginAPI),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_sampleRate(0),
|
||||
@ -115,19 +116,19 @@ DaemonSinkGUI::DaemonSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||
|
||||
m_daemonSink = (DaemonSink*) channelrx;
|
||||
m_daemonSink->setMessageQueueToGUI(getInputMessageQueue());
|
||||
m_remoteSink = (RemoteSink*) channelrx;
|
||||
m_remoteSink->setMessageQueueToGUI(getInputMessageQueue());
|
||||
|
||||
m_channelMarker.blockSignals(true);
|
||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||
m_channelMarker.setCenterFrequency(0);
|
||||
m_channelMarker.setTitle("Daemon source");
|
||||
m_channelMarker.setTitle("Remote source");
|
||||
m_channelMarker.blockSignals(false);
|
||||
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||
|
||||
m_settings.setChannelMarker(&m_channelMarker);
|
||||
|
||||
m_deviceUISet->registerRxChannelInstance(DaemonSink::m_channelIdURI, this);
|
||||
m_deviceUISet->registerRxChannelInstance(RemoteSink::m_channelIdURI, this);
|
||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||
m_deviceUISet->addRollupWidget(this);
|
||||
|
||||
@ -140,29 +141,29 @@ DaemonSinkGUI::DaemonSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
|
||||
applySettings(true);
|
||||
}
|
||||
|
||||
DaemonSinkGUI::~DaemonSinkGUI()
|
||||
RemoteSinkGUI::~RemoteSinkGUI()
|
||||
{
|
||||
m_deviceUISet->removeRxChannelInstance(this);
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::blockApplySettings(bool block)
|
||||
void RemoteSinkGUI::blockApplySettings(bool block)
|
||||
{
|
||||
m_doApplySettings = !block;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::applySettings(bool force)
|
||||
void RemoteSinkGUI::applySettings(bool force)
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
setTitleColor(m_channelMarker.getColor());
|
||||
|
||||
DaemonSink::MsgConfigureDaemonSink* message = DaemonSink::MsgConfigureDaemonSink::create(m_settings, force);
|
||||
m_daemonSink->getInputMessageQueue()->push(message);
|
||||
RemoteSink::MsgConfigureRemoteSink* message = RemoteSink::MsgConfigureRemoteSink::create(m_settings, force);
|
||||
m_remoteSink->getInputMessageQueue()->push(message);
|
||||
}
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::displaySettings()
|
||||
void RemoteSinkGUI::displaySettings()
|
||||
{
|
||||
m_channelMarker.blockSignals(true);
|
||||
m_channelMarker.setCenterFrequency(0);
|
||||
@ -186,17 +187,17 @@ void DaemonSinkGUI::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::leaveEvent(QEvent*)
|
||||
void RemoteSinkGUI::leaveEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(false);
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::enterEvent(QEvent*)
|
||||
void RemoteSinkGUI::enterEvent(QEvent*)
|
||||
{
|
||||
m_channelMarker.setHighlighted(true);
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::handleSourceMessages()
|
||||
void RemoteSinkGUI::handleSourceMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
@ -209,13 +210,13 @@ void DaemonSinkGUI::handleSourceMessages()
|
||||
}
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
void RemoteSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
{
|
||||
(void) widget;
|
||||
(void) rollDown;
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||
void RemoteSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||
{
|
||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||
@ -241,13 +242,13 @@ void DaemonSinkGUI::onMenuDialogCalled(const QPoint &p)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::on_dataAddress_returnPressed()
|
||||
void RemoteSinkGUI::on_dataAddress_returnPressed()
|
||||
{
|
||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::on_dataPort_returnPressed()
|
||||
void RemoteSinkGUI::on_dataPort_returnPressed()
|
||||
{
|
||||
bool dataOk;
|
||||
int dataPort = ui->dataPort->text().toInt(&dataOk);
|
||||
@ -264,7 +265,7 @@ void DaemonSinkGUI::on_dataPort_returnPressed()
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::on_dataApplyButton_clicked(bool checked)
|
||||
void RemoteSinkGUI::on_dataApplyButton_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||
@ -280,7 +281,7 @@ void DaemonSinkGUI::on_dataApplyButton_clicked(bool checked)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::on_txDelay_valueChanged(int value)
|
||||
void RemoteSinkGUI::on_txDelay_valueChanged(int value)
|
||||
{
|
||||
m_settings.m_txDelay = value; // percentage
|
||||
ui->txDelayText->setText(tr("%1%").arg(value));
|
||||
@ -288,7 +289,7 @@ void DaemonSinkGUI::on_txDelay_valueChanged(int value)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::on_nbFECBlocks_valueChanged(int value)
|
||||
void RemoteSinkGUI::on_nbFECBlocks_valueChanged(int value)
|
||||
{
|
||||
m_settings.m_nbFECBlocks = value;
|
||||
int nbOriginalBlocks = 128;
|
||||
@ -300,7 +301,7 @@ void DaemonSinkGUI::on_nbFECBlocks_valueChanged(int value)
|
||||
applySettings();
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::updateTxDelayTime()
|
||||
void RemoteSinkGUI::updateTxDelayTime()
|
||||
{
|
||||
double txDelayRatio = m_settings.m_txDelay / 100.0;
|
||||
int samplesPerBlock = SDRDaemonNbBytesPerBlock / sizeof(Sample);
|
||||
@ -309,7 +310,7 @@ void DaemonSinkGUI::updateTxDelayTime()
|
||||
ui->txDelayTime->setText(tr("%1µs").arg(QString::number(delay*1e6, 'f', 0)));
|
||||
}
|
||||
|
||||
void DaemonSinkGUI::tick()
|
||||
void RemoteSinkGUI::tick()
|
||||
{
|
||||
if (++m_tickCount == 20) { // once per second
|
||||
m_tickCount = 0;
|
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKGUI_H_
|
||||
#define PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKGUI_H_
|
||||
#ifndef PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_
|
||||
#define PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@ -27,21 +27,21 @@
|
||||
#include "gui/rollupwidget.h"
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
#include "daemonsinksettings.h"
|
||||
#include "remotesinksettings.h"
|
||||
|
||||
class PluginAPI;
|
||||
class DeviceUISet;
|
||||
class DaemonSink;
|
||||
class RemoteSink;
|
||||
class BasebandSampleSink;
|
||||
|
||||
namespace Ui {
|
||||
class DaemonSinkGUI;
|
||||
class RemoteSinkGUI;
|
||||
}
|
||||
|
||||
class DaemonSinkGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
class RemoteSinkGUI : public RollupWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
public:
|
||||
static DaemonSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
static RemoteSinkGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel);
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -56,23 +56,23 @@ public:
|
||||
virtual bool handleMessage(const Message& message);
|
||||
|
||||
private:
|
||||
Ui::DaemonSinkGUI* ui;
|
||||
Ui::RemoteSinkGUI* ui;
|
||||
PluginAPI* m_pluginAPI;
|
||||
DeviceUISet* m_deviceUISet;
|
||||
ChannelMarker m_channelMarker;
|
||||
DaemonSinkSettings m_settings;
|
||||
RemoteSinkSettings m_settings;
|
||||
int m_sampleRate;
|
||||
quint64 m_deviceCenterFrequency; //!< Center frequency in device
|
||||
bool m_doApplySettings;
|
||||
|
||||
DaemonSink* m_daemonSink;
|
||||
RemoteSink* m_remoteSink;
|
||||
MessageQueue m_inputMessageQueue;
|
||||
|
||||
QTime m_time;
|
||||
uint32_t m_tickCount;
|
||||
|
||||
explicit DaemonSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~DaemonSinkGUI();
|
||||
explicit RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget* parent = 0);
|
||||
virtual ~RemoteSinkGUI();
|
||||
|
||||
void blockApplySettings(bool block);
|
||||
void applySettings(bool force = false);
|
||||
@ -96,4 +96,4 @@ private slots:
|
||||
|
||||
|
||||
|
||||
#endif /* PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKGUI_H_ */
|
||||
#endif /* PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKGUI_H_ */
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>DaemonSinkGUI</class>
|
||||
<widget class="RollupWidget" name="DaemonSinkGUI">
|
||||
<class>RemoteSinkGUI</class>
|
||||
<widget class="RollupWidget" name="RemoteSinkGUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -35,7 +35,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Daemon sink</string>
|
||||
<string>Remote sink</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="settingsContainer" native="true">
|
||||
<property name="geometry">
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
||||
// Copyright (C) 2016-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 //
|
||||
@ -14,66 +14,66 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "daemonsinkplugin.h"
|
||||
#include "remotesinkplugin.h"
|
||||
|
||||
#include <QtPlugin>
|
||||
#include "plugin/pluginapi.h"
|
||||
|
||||
#ifndef SERVER_MODE
|
||||
#include "daemonsinkgui.h"
|
||||
#include "remotesinkgui.h"
|
||||
#endif
|
||||
#include "daemonsink.h"
|
||||
#include "remotesink.h"
|
||||
|
||||
const PluginDescriptor DaemonSinkPlugin::m_pluginDescriptor = {
|
||||
QString("Daemon channel Sink"),
|
||||
QString("4.3.2"),
|
||||
const PluginDescriptor RemoteSinkPlugin::m_pluginDescriptor = {
|
||||
QString("Remote channel Sink"),
|
||||
QString("4.4.2"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
QString("https://github.com/f4exb/sdrangel")
|
||||
};
|
||||
|
||||
DaemonSinkPlugin::DaemonSinkPlugin(QObject* parent) :
|
||||
RemoteSinkPlugin::RemoteSinkPlugin(QObject* parent) :
|
||||
QObject(parent),
|
||||
m_pluginAPI(0)
|
||||
{
|
||||
}
|
||||
|
||||
const PluginDescriptor& DaemonSinkPlugin::getPluginDescriptor() const
|
||||
const PluginDescriptor& RemoteSinkPlugin::getPluginDescriptor() const
|
||||
{
|
||||
return m_pluginDescriptor;
|
||||
}
|
||||
|
||||
void DaemonSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
void RemoteSinkPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
{
|
||||
m_pluginAPI = pluginAPI;
|
||||
|
||||
// register channel Source
|
||||
m_pluginAPI->registerRxChannel(DaemonSink::m_channelIdURI, DaemonSink::m_channelId, this);
|
||||
m_pluginAPI->registerRxChannel(RemoteSink::m_channelIdURI, RemoteSink::m_channelId, this);
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* DaemonSinkPlugin::createRxChannelGUI(
|
||||
PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(
|
||||
DeviceUISet *deviceUISet __attribute__((unused)),
|
||||
BasebandSampleSink *rxChannel __attribute__((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PluginInstanceGUI* DaemonSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
PluginInstanceGUI* RemoteSinkPlugin::createRxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
|
||||
{
|
||||
return DaemonSinkGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
return RemoteSinkGUI::create(m_pluginAPI, deviceUISet, rxChannel);
|
||||
}
|
||||
#endif
|
||||
|
||||
BasebandSampleSink* DaemonSinkPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||
BasebandSampleSink* RemoteSinkPlugin::createRxChannelBS(DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
return new DaemonSink(deviceAPI);
|
||||
return new RemoteSink(deviceAPI);
|
||||
}
|
||||
|
||||
ChannelSinkAPI* DaemonSinkPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI)
|
||||
ChannelSinkAPI* RemoteSinkPlugin::createRxChannelCS(DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
return new DaemonSink(deviceAPI);
|
||||
return new RemoteSink(deviceAPI);
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
||||
// Copyright (C) 2016-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 //
|
||||
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKPLUGIN_H_
|
||||
#define PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKPLUGIN_H_
|
||||
#ifndef PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKPLUGIN_H_
|
||||
#define PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKPLUGIN_H_
|
||||
|
||||
|
||||
#include <QObject>
|
||||
@ -24,13 +24,13 @@
|
||||
class DeviceUISet;
|
||||
class BasebandSampleSink;
|
||||
|
||||
class DaemonSinkPlugin : public QObject, PluginInterface {
|
||||
class RemoteSinkPlugin : public QObject, PluginInterface {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.demod.daemonsink")
|
||||
Q_PLUGIN_METADATA(IID "sdrangel.demod.remotesink")
|
||||
|
||||
public:
|
||||
explicit DaemonSinkPlugin(QObject* parent = 0);
|
||||
explicit RemoteSinkPlugin(QObject* parent = 0);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
@ -45,4 +45,4 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
};
|
||||
|
||||
#endif /* PLUGINS_CHANNELRX_DAEMONSINK_DAEMONSINKPLUGIN_H_ */
|
||||
#endif /* PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKPLUGIN_H_ */
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) main settings //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,25 +20,27 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "remotesinksettings.h"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
#include "util/simpleserializer.h"
|
||||
#include "settings/serializable.h"
|
||||
#include "daemonsinksettings.h"
|
||||
|
||||
DaemonSinkSettings::DaemonSinkSettings()
|
||||
|
||||
RemoteSinkSettings::RemoteSinkSettings()
|
||||
{
|
||||
resetToDefaults();
|
||||
}
|
||||
|
||||
void DaemonSinkSettings::resetToDefaults()
|
||||
void RemoteSinkSettings::resetToDefaults()
|
||||
{
|
||||
m_nbFECBlocks = 0;
|
||||
m_txDelay = 35;
|
||||
m_dataAddress = "127.0.0.1";
|
||||
m_dataPort = 9090;
|
||||
m_rgbColor = QColor(140, 4, 4).rgb();
|
||||
m_title = "Daemon sink";
|
||||
m_title = "Remote sink";
|
||||
m_channelMarker = nullptr;
|
||||
m_useReverseAPI = false;
|
||||
m_reverseAPIAddress = "127.0.0.1";
|
||||
@ -47,7 +49,7 @@ void DaemonSinkSettings::resetToDefaults()
|
||||
m_reverseAPIChannelIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray DaemonSinkSettings::serialize() const
|
||||
QByteArray RemoteSinkSettings::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
s.writeU32(1, m_nbFECBlocks);
|
||||
@ -65,7 +67,7 @@ QByteArray DaemonSinkSettings::serialize() const
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool DaemonSinkSettings::deserialize(const QByteArray& data)
|
||||
bool RemoteSinkSettings::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
|
||||
@ -99,7 +101,7 @@ bool DaemonSinkSettings::deserialize(const QByteArray& data)
|
||||
}
|
||||
|
||||
d.readU32(5, &m_rgbColor, QColor(0, 255, 255).rgb());
|
||||
d.readString(6, &m_title, "Daemon sink");
|
||||
d.readString(6, &m_title, "Remote sink");
|
||||
d.readBool(7, &m_useReverseAPI, false);
|
||||
d.readString(8, &m_reverseAPIAddress, "127.0.0.1");
|
||||
d.readU32(9, &tmp, 0);
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) main settings //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,14 +20,15 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_SDRDAEMONCHANNELSINKSETTINGS_H_
|
||||
#define INCLUDE_SDRDAEMONCHANNELSINKSETTINGS_H_
|
||||
#ifndef INCLUDE_REMOTECHANNELSINKSETTINGS_H_
|
||||
#define INCLUDE_REMOTECHANNELSINKSETTINGS_H_
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
class Serializable;
|
||||
|
||||
struct DaemonSinkSettings
|
||||
struct RemoteSinkSettings
|
||||
{
|
||||
uint16_t m_nbFECBlocks;
|
||||
uint32_t m_txDelay;
|
||||
@ -43,11 +44,11 @@ struct DaemonSinkSettings
|
||||
|
||||
Serializable *m_channelMarker;
|
||||
|
||||
DaemonSinkSettings();
|
||||
RemoteSinkSettings();
|
||||
void resetToDefaults();
|
||||
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
};
|
||||
|
||||
#endif /* INCLUDE_SDRDAEMONCHANNELSINKSETTINGS_H_ */
|
||||
#endif /* INCLUDE_REMOTECHANNELSINKSETTINGS_H_ */
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) UDP sender thread //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,16 +20,16 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "remotesinkthread.h"
|
||||
|
||||
#include <QUdpSocket>
|
||||
|
||||
#include "channel/sdrdaemondatablock.h"
|
||||
#include "daemonsinkthread.h"
|
||||
|
||||
#include "cm256.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(DaemonSinkThread::MsgStartStop, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteSinkThread::MsgStartStop, Message)
|
||||
|
||||
DaemonSinkThread::DaemonSinkThread(QObject* parent) :
|
||||
RemoteSinkThread::RemoteSinkThread(QObject* parent) :
|
||||
QThread(parent),
|
||||
m_running(false),
|
||||
m_address(QHostAddress::LocalHost),
|
||||
@ -40,20 +40,20 @@ DaemonSinkThread::DaemonSinkThread(QObject* parent) :
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
DaemonSinkThread::~DaemonSinkThread()
|
||||
RemoteSinkThread::~RemoteSinkThread()
|
||||
{
|
||||
qDebug("DaemonSinkThread::~DaemonSinkThread");
|
||||
qDebug("RemoteSinkThread::~RemoteSinkThread");
|
||||
}
|
||||
|
||||
void DaemonSinkThread::startStop(bool start)
|
||||
void RemoteSinkThread::startStop(bool start)
|
||||
{
|
||||
MsgStartStop *msg = MsgStartStop::create(start);
|
||||
m_inputMessageQueue.push(msg);
|
||||
}
|
||||
|
||||
void DaemonSinkThread::startWork()
|
||||
void RemoteSinkThread::startWork()
|
||||
{
|
||||
qDebug("DaemonSinkThread::startWork");
|
||||
qDebug("RemoteSinkThread::startWork");
|
||||
m_startWaitMutex.lock();
|
||||
m_socket = new QUdpSocket(this);
|
||||
start();
|
||||
@ -62,18 +62,18 @@ void DaemonSinkThread::startWork()
|
||||
m_startWaitMutex.unlock();
|
||||
}
|
||||
|
||||
void DaemonSinkThread::stopWork()
|
||||
void RemoteSinkThread::stopWork()
|
||||
{
|
||||
qDebug("DaemonSinkThread::stopWork");
|
||||
qDebug("RemoteSinkThread::stopWork");
|
||||
delete m_socket;
|
||||
m_socket = 0;
|
||||
m_running = false;
|
||||
wait();
|
||||
}
|
||||
|
||||
void DaemonSinkThread::run()
|
||||
void RemoteSinkThread::run()
|
||||
{
|
||||
qDebug("DaemonSinkThread::run: begin");
|
||||
qDebug("RemoteSinkThread::run: begin");
|
||||
m_running = true;
|
||||
m_startWaiter.wakeAll();
|
||||
|
||||
@ -83,16 +83,16 @@ void DaemonSinkThread::run()
|
||||
}
|
||||
|
||||
m_running = false;
|
||||
qDebug("DaemonSinkThread::run: end");
|
||||
qDebug("RemoteSinkThread::run: end");
|
||||
}
|
||||
|
||||
void DaemonSinkThread::processDataBlock(SDRDaemonDataBlock *dataBlock)
|
||||
void RemoteSinkThread::processDataBlock(SDRDaemonDataBlock *dataBlock)
|
||||
{
|
||||
handleDataBlock(*dataBlock);
|
||||
delete dataBlock;
|
||||
}
|
||||
|
||||
void DaemonSinkThread::handleDataBlock(SDRDaemonDataBlock& dataBlock)
|
||||
void RemoteSinkThread::handleDataBlock(SDRDaemonDataBlock& dataBlock)
|
||||
{
|
||||
CM256::cm256_encoder_params cm256Params; //!< Main interface with CM256 encoder
|
||||
CM256::cm256_block descriptorBlocks[256]; //!< Pointers to data for CM256 encoder
|
||||
@ -141,7 +141,7 @@ void DaemonSinkThread::handleDataBlock(SDRDaemonDataBlock& dataBlock)
|
||||
// Encode FEC blocks
|
||||
if (m_cm256p->cm256_encode(cm256Params, descriptorBlocks, fecBlocks))
|
||||
{
|
||||
qWarning("SDRDaemonChannelSinkThread::handleDataBlock: CM256 encode failed. No transmission.");
|
||||
qWarning("RemoteSinkThread::handleDataBlock: CM256 encode failed. No transmission.");
|
||||
// TODO: send without FEC changing meta data to set indication of no FEC
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ void DaemonSinkThread::handleDataBlock(SDRDaemonDataBlock& dataBlock)
|
||||
dataBlock.m_txControlBlock.m_processed = true;
|
||||
}
|
||||
|
||||
void DaemonSinkThread::handleInputMessages()
|
||||
void RemoteSinkThread::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
@ -175,7 +175,7 @@ void DaemonSinkThread::handleInputMessages()
|
||||
if (MsgStartStop::match(*message))
|
||||
{
|
||||
MsgStartStop* notif = (MsgStartStop*) message;
|
||||
qDebug("DaemonSinkThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop");
|
||||
qDebug("RemoteSinkThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop");
|
||||
|
||||
if (notif->getStartStop()) {
|
||||
startWork();
|
@ -1,11 +1,11 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB. //
|
||||
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB. //
|
||||
// //
|
||||
// SDRdaemon sink channel (Rx) UDP sender thread //
|
||||
// Remote sink channel (Rx) UDP sender thread //
|
||||
// //
|
||||
// SDRdaemon is a detached SDR front end that handles the interface with a //
|
||||
// physical device and sends or receives the I/Q samples stream to or from a //
|
||||
// SDRangel instance via UDP. It is controlled via a Web REST API. //
|
||||
// SDRangel can work as a detached SDR front end. With this plugin it can //
|
||||
// sends the I/Q samples stream to another SDRangel instance via UDP. //
|
||||
// It is controlled via a Web REST API. //
|
||||
// //
|
||||
// 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 //
|
||||
@ -20,6 +20,9 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKTHREAD_H_
|
||||
#define PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKTHREAD_H_
|
||||
|
||||
#include <QThread>
|
||||
#include <QMutex>
|
||||
#include <QWaitCondition>
|
||||
@ -34,7 +37,7 @@ class SDRDaemonDataBlock;
|
||||
class CM256;
|
||||
class QUdpSocket;
|
||||
|
||||
class DaemonSinkThread : public QThread {
|
||||
class RemoteSinkThread : public QThread {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@ -57,8 +60,8 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
DaemonSinkThread(QObject* parent = 0);
|
||||
~DaemonSinkThread();
|
||||
RemoteSinkThread(QObject* parent = 0);
|
||||
~RemoteSinkThread();
|
||||
|
||||
void startStop(bool start);
|
||||
|
||||
@ -87,3 +90,6 @@ private:
|
||||
private slots:
|
||||
void handleInputMessages();
|
||||
};
|
||||
|
||||
#endif // PLUGINS_CHANNELRX_REMOTESINK_REMOTESINKTHREAD_H_
|
||||
|
@ -9,7 +9,7 @@ endif()
|
||||
|
||||
find_package(CM256cc)
|
||||
if(CM256CC_FOUND)
|
||||
add_subdirectory(daemonsink)
|
||||
add_subdirectory(remotesink)
|
||||
endif(CM256CC_FOUND)
|
||||
|
||||
add_subdirectory(demodnfm)
|
||||
|
@ -1,46 +0,0 @@
|
||||
project(daemonsink)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/channelrx/daemonsink")
|
||||
|
||||
set(daemonsink_SOURCES
|
||||
${PLUGIN_PREFIX}/daemonsink.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinksettings.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinkthread.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinkplugin.cpp
|
||||
)
|
||||
|
||||
set(daemonsink_HEADERS
|
||||
${PLUGIN_PREFIX}/daemonsink.h
|
||||
${PLUGIN_PREFIX}/daemonsinksettings.h
|
||||
${PLUGIN_PREFIX}/daemonsinkthread.h
|
||||
${PLUGIN_PREFIX}/daemonsinkplugin.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
add_library(daemonsinksrv SHARED
|
||||
${daemonsink_SOURCES}
|
||||
${daemonsink_HEADERS_MOC}
|
||||
)
|
||||
|
||||
target_link_libraries(daemonsinksrv
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
|
||||
target_link_libraries(daemonsinksrv Qt5::Core)
|
||||
|
||||
install(TARGETS daemonsinksrv DESTINATION lib/pluginssrv/channelrx)
|
46
pluginssrv/channelrx/remotesink/CMakeLists.txt
Normal file
46
pluginssrv/channelrx/remotesink/CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
||||
project(remotesink)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/channelrx/remotesink")
|
||||
|
||||
set(remotesink_SOURCES
|
||||
${PLUGIN_PREFIX}/remotesink.cpp
|
||||
${PLUGIN_PREFIX}/remotesinksettings.cpp
|
||||
${PLUGIN_PREFIX}/remotesinkthread.cpp
|
||||
${PLUGIN_PREFIX}/remotesinkplugin.cpp
|
||||
)
|
||||
|
||||
set(remotesink_HEADERS
|
||||
${PLUGIN_PREFIX}/remotesink.h
|
||||
${PLUGIN_PREFIX}/remotesinksettings.h
|
||||
${PLUGIN_PREFIX}/remotesinkthread.h
|
||||
${PLUGIN_PREFIX}/remotesinkplugin.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CM256CC_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
add_library(remotesinksrv SHARED
|
||||
${remotesink_SOURCES}
|
||||
${remotesink_HEADERS_MOC}
|
||||
)
|
||||
|
||||
target_link_libraries(remotesinksrv
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
|
||||
target_link_libraries(remotesinksrv Qt5::Core)
|
||||
|
||||
install(TARGETS remotesinksrv DESTINATION lib/pluginssrv/channelrx)
|
@ -22,7 +22,7 @@
|
||||
<file>webapi/doc/swagger/include/Perseus.yaml</file>
|
||||
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
||||
<file>webapi/doc/swagger/include/DaemonSink.yaml</file>
|
||||
<file>webapi/doc/swagger/include/RemoteSink.yaml</file>
|
||||
<file>webapi/doc/swagger/include/DaemonSource.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file>
|
||||
<file>webapi/doc/swagger/include/SDRDaemonSink.yaml</file>
|
||||
|
@ -1813,8 +1813,8 @@ margin-bottom: 20px;
|
||||
"NFMModSettings" : {
|
||||
"$ref" : "#/definitions/NFMModSettings"
|
||||
},
|
||||
"DaemonSinkSettings" : {
|
||||
"$ref" : "#/definitions/DaemonSinkSettings"
|
||||
"RemoteSinkSettings" : {
|
||||
"$ref" : "#/definitions/RemoteSinkSettings"
|
||||
},
|
||||
"DaemonSourceSettings" : {
|
||||
"$ref" : "#/definitions/DaemonSourceSettings"
|
||||
@ -2047,49 +2047,6 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "DV serial device details"
|
||||
};
|
||||
defs.DaemonSinkSettings = {
|
||||
"properties" : {
|
||||
"nbFECBlocks" : {
|
||||
"type" : "integer",
|
||||
"description" : "Number of FEC blocks per frame"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string",
|
||||
"description" : "Receiving USB data address"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving USB data port"
|
||||
},
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "Daemon channel sink settings"
|
||||
};
|
||||
defs.DaemonSourceReport = {
|
||||
"properties" : {
|
||||
@ -3844,6 +3801,49 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "An arbitrary range of floating point values"
|
||||
};
|
||||
defs.RemoteSinkSettings = {
|
||||
"properties" : {
|
||||
"nbFECBlocks" : {
|
||||
"type" : "integer",
|
||||
"description" : "Number of FEC blocks per frame"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string",
|
||||
"description" : "Receiving USB data address"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving USB data port"
|
||||
},
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "Remote channel sink settings"
|
||||
};
|
||||
defs.RtlSdrReport = {
|
||||
"properties" : {
|
||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-01-14T08:33:10.665+01:00
|
||||
Generated 2019-01-22T23:24:38.456+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,5 +1,5 @@
|
||||
DaemonSinkSettings:
|
||||
description: "Daemon channel sink settings"
|
||||
RemoteSinkSettings:
|
||||
description: "Remote channel sink settings"
|
||||
properties:
|
||||
nbFECBlocks:
|
||||
description: "Number of FEC blocks per frame"
|
@ -1888,8 +1888,8 @@ definitions:
|
||||
$ref: "/doc/swagger/include/NFMDemod.yaml#/NFMDemodSettings"
|
||||
NFMModSettings:
|
||||
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings"
|
||||
DaemonSinkSettings:
|
||||
$ref: "/doc/swagger/include/DaemonSink.yaml#/DaemonSinkSettings"
|
||||
RemoteSinkSettings:
|
||||
$ref: "/doc/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
||||
DaemonSourceSettings:
|
||||
$ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceSettings"
|
||||
SSBModSettings:
|
||||
|
@ -2252,14 +2252,14 @@ bool WebAPIRequestMapper::validateChannelSettings(
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (*channelType == "DaemonSink")
|
||||
else if (*channelType == "RemoteSink")
|
||||
{
|
||||
if (channelSettings.getTx() == 0)
|
||||
{
|
||||
QJsonObject daemonChannelSinkSettingsJsonObject = jsonObject["DaemonSinkSettings"].toObject();
|
||||
channelSettingsKeys = daemonChannelSinkSettingsJsonObject.keys();
|
||||
channelSettings.setDaemonSinkSettings(new SWGSDRangel::SWGDaemonSinkSettings());
|
||||
channelSettings.getDaemonSinkSettings()->fromJsonObject(daemonChannelSinkSettingsJsonObject);
|
||||
QJsonObject remoteChannelSinkSettingsJsonObject = jsonObject["RemoteSinkSettings"].toObject();
|
||||
channelSettingsKeys = remoteChannelSinkSettingsJsonObject.keys();
|
||||
channelSettings.setRemoteSinkSettings(new SWGSDRangel::SWGRemoteSinkSettings());
|
||||
channelSettings.getRemoteSinkSettings()->fromJsonObject(remoteChannelSinkSettingsJsonObject);
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
@ -2518,7 +2518,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings&
|
||||
channelSettings.setDsdDemodSettings(0);
|
||||
channelSettings.setNfmDemodSettings(0);
|
||||
channelSettings.setNfmModSettings(0);
|
||||
channelSettings.setDaemonSinkSettings(0);
|
||||
channelSettings.setRemoteSinkSettings(0);
|
||||
channelSettings.setDaemonSourceSettings(0);
|
||||
channelSettings.setSsbDemodSettings(0);
|
||||
channelSettings.setSsbModSettings(0);
|
||||
|
@ -1,5 +1,5 @@
|
||||
DaemonSinkSettings:
|
||||
description: "Daemon channel sink settings"
|
||||
RemoteSinkSettings:
|
||||
description: "Remote channel sink settings"
|
||||
properties:
|
||||
nbFECBlocks:
|
||||
description: "Number of FEC blocks per frame"
|
@ -1888,8 +1888,8 @@ definitions:
|
||||
$ref: "http://localhost:8081/api/swagger/include/NFMDemod.yaml#/NFMDemodSettings"
|
||||
NFMModSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings"
|
||||
DaemonSinkSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/DaemonSink.yaml#/DaemonSinkSettings"
|
||||
RemoteSinkSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
||||
DaemonSourceSettings:
|
||||
$ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceSettings"
|
||||
SSBModSettings:
|
||||
|
@ -1813,8 +1813,8 @@ margin-bottom: 20px;
|
||||
"NFMModSettings" : {
|
||||
"$ref" : "#/definitions/NFMModSettings"
|
||||
},
|
||||
"DaemonSinkSettings" : {
|
||||
"$ref" : "#/definitions/DaemonSinkSettings"
|
||||
"RemoteSinkSettings" : {
|
||||
"$ref" : "#/definitions/RemoteSinkSettings"
|
||||
},
|
||||
"DaemonSourceSettings" : {
|
||||
"$ref" : "#/definitions/DaemonSourceSettings"
|
||||
@ -2047,49 +2047,6 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "DV serial device details"
|
||||
};
|
||||
defs.DaemonSinkSettings = {
|
||||
"properties" : {
|
||||
"nbFECBlocks" : {
|
||||
"type" : "integer",
|
||||
"description" : "Number of FEC blocks per frame"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string",
|
||||
"description" : "Receiving USB data address"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving USB data port"
|
||||
},
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "Daemon channel sink settings"
|
||||
};
|
||||
defs.DaemonSourceReport = {
|
||||
"properties" : {
|
||||
@ -3844,6 +3801,49 @@ margin-bottom: 20px;
|
||||
}
|
||||
},
|
||||
"description" : "An arbitrary range of floating point values"
|
||||
};
|
||||
defs.RemoteSinkSettings = {
|
||||
"properties" : {
|
||||
"nbFECBlocks" : {
|
||||
"type" : "integer",
|
||||
"description" : "Number of FEC blocks per frame"
|
||||
},
|
||||
"dataAddress" : {
|
||||
"type" : "string",
|
||||
"description" : "Receiving USB data address"
|
||||
},
|
||||
"dataPort" : {
|
||||
"type" : "integer",
|
||||
"description" : "Receiving USB data port"
|
||||
},
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"useReverseAPI" : {
|
||||
"type" : "integer",
|
||||
"description" : "Synchronize with reverse API (1 for yes, 0 for no)"
|
||||
},
|
||||
"reverseAPIAddress" : {
|
||||
"type" : "string"
|
||||
},
|
||||
"reverseAPIPort" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIDeviceIndex" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"reverseAPIChannelIndex" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"description" : "Remote channel sink settings"
|
||||
};
|
||||
defs.RtlSdrReport = {
|
||||
"properties" : {
|
||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2019-01-14T08:33:10.665+01:00
|
||||
Generated 2019-01-22T23:24:38.456+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -46,8 +46,8 @@ SWGChannelSettings::SWGChannelSettings() {
|
||||
m_nfm_demod_settings_isSet = false;
|
||||
nfm_mod_settings = nullptr;
|
||||
m_nfm_mod_settings_isSet = false;
|
||||
daemon_sink_settings = nullptr;
|
||||
m_daemon_sink_settings_isSet = false;
|
||||
remote_sink_settings = nullptr;
|
||||
m_remote_sink_settings_isSet = false;
|
||||
daemon_source_settings = nullptr;
|
||||
m_daemon_source_settings_isSet = false;
|
||||
ssb_mod_settings = nullptr;
|
||||
@ -88,8 +88,8 @@ SWGChannelSettings::init() {
|
||||
m_nfm_demod_settings_isSet = false;
|
||||
nfm_mod_settings = new SWGNFMModSettings();
|
||||
m_nfm_mod_settings_isSet = false;
|
||||
daemon_sink_settings = new SWGDaemonSinkSettings();
|
||||
m_daemon_sink_settings_isSet = false;
|
||||
remote_sink_settings = new SWGRemoteSinkSettings();
|
||||
m_remote_sink_settings_isSet = false;
|
||||
daemon_source_settings = new SWGDaemonSourceSettings();
|
||||
m_daemon_source_settings_isSet = false;
|
||||
ssb_mod_settings = new SWGSSBModSettings();
|
||||
@ -133,8 +133,8 @@ SWGChannelSettings::cleanup() {
|
||||
if(nfm_mod_settings != nullptr) {
|
||||
delete nfm_mod_settings;
|
||||
}
|
||||
if(daemon_sink_settings != nullptr) {
|
||||
delete daemon_sink_settings;
|
||||
if(remote_sink_settings != nullptr) {
|
||||
delete remote_sink_settings;
|
||||
}
|
||||
if(daemon_source_settings != nullptr) {
|
||||
delete daemon_source_settings;
|
||||
@ -188,7 +188,7 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&nfm_mod_settings, pJson["NFMModSettings"], "SWGNFMModSettings", "SWGNFMModSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&daemon_sink_settings, pJson["DaemonSinkSettings"], "SWGDaemonSinkSettings", "SWGDaemonSinkSettings");
|
||||
::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings");
|
||||
|
||||
::SWGSDRangel::setValue(&daemon_source_settings, pJson["DaemonSourceSettings"], "SWGDaemonSourceSettings", "SWGDaemonSourceSettings");
|
||||
|
||||
@ -247,8 +247,8 @@ SWGChannelSettings::asJsonObject() {
|
||||
if((nfm_mod_settings != nullptr) && (nfm_mod_settings->isSet())){
|
||||
toJsonValue(QString("NFMModSettings"), nfm_mod_settings, obj, QString("SWGNFMModSettings"));
|
||||
}
|
||||
if((daemon_sink_settings != nullptr) && (daemon_sink_settings->isSet())){
|
||||
toJsonValue(QString("DaemonSinkSettings"), daemon_sink_settings, obj, QString("SWGDaemonSinkSettings"));
|
||||
if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){
|
||||
toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings"));
|
||||
}
|
||||
if((daemon_source_settings != nullptr) && (daemon_source_settings->isSet())){
|
||||
toJsonValue(QString("DaemonSourceSettings"), daemon_source_settings, obj, QString("SWGDaemonSourceSettings"));
|
||||
@ -365,14 +365,14 @@ SWGChannelSettings::setNfmModSettings(SWGNFMModSettings* nfm_mod_settings) {
|
||||
this->m_nfm_mod_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings*
|
||||
SWGChannelSettings::getDaemonSinkSettings() {
|
||||
return daemon_sink_settings;
|
||||
SWGRemoteSinkSettings*
|
||||
SWGChannelSettings::getRemoteSinkSettings() {
|
||||
return remote_sink_settings;
|
||||
}
|
||||
void
|
||||
SWGChannelSettings::setDaemonSinkSettings(SWGDaemonSinkSettings* daemon_sink_settings) {
|
||||
this->daemon_sink_settings = daemon_sink_settings;
|
||||
this->m_daemon_sink_settings_isSet = true;
|
||||
SWGChannelSettings::setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings) {
|
||||
this->remote_sink_settings = remote_sink_settings;
|
||||
this->m_remote_sink_settings_isSet = true;
|
||||
}
|
||||
|
||||
SWGDaemonSourceSettings*
|
||||
@ -459,7 +459,7 @@ SWGChannelSettings::isSet(){
|
||||
if(dsd_demod_settings != nullptr && dsd_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(nfm_demod_settings != nullptr && nfm_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(nfm_mod_settings != nullptr && nfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(daemon_sink_settings != nullptr && daemon_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(remote_sink_settings != nullptr && remote_sink_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(daemon_source_settings != nullptr && daemon_source_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||
|
@ -27,10 +27,10 @@
|
||||
#include "SWGATVModSettings.h"
|
||||
#include "SWGBFMDemodSettings.h"
|
||||
#include "SWGDSDDemodSettings.h"
|
||||
#include "SWGDaemonSinkSettings.h"
|
||||
#include "SWGDaemonSourceSettings.h"
|
||||
#include "SWGNFMDemodSettings.h"
|
||||
#include "SWGNFMModSettings.h"
|
||||
#include "SWGRemoteSinkSettings.h"
|
||||
#include "SWGSSBDemodSettings.h"
|
||||
#include "SWGSSBModSettings.h"
|
||||
#include "SWGUDPSinkSettings.h"
|
||||
@ -84,8 +84,8 @@ public:
|
||||
SWGNFMModSettings* getNfmModSettings();
|
||||
void setNfmModSettings(SWGNFMModSettings* nfm_mod_settings);
|
||||
|
||||
SWGDaemonSinkSettings* getDaemonSinkSettings();
|
||||
void setDaemonSinkSettings(SWGDaemonSinkSettings* daemon_sink_settings);
|
||||
SWGRemoteSinkSettings* getRemoteSinkSettings();
|
||||
void setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings);
|
||||
|
||||
SWGDaemonSourceSettings* getDaemonSourceSettings();
|
||||
void setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings);
|
||||
@ -139,8 +139,8 @@ private:
|
||||
SWGNFMModSettings* nfm_mod_settings;
|
||||
bool m_nfm_mod_settings_isSet;
|
||||
|
||||
SWGDaemonSinkSettings* daemon_sink_settings;
|
||||
bool m_daemon_sink_settings_isSet;
|
||||
SWGRemoteSinkSettings* remote_sink_settings;
|
||||
bool m_remote_sink_settings_isSet;
|
||||
|
||||
SWGDaemonSourceSettings* daemon_source_settings;
|
||||
bool m_daemon_source_settings_isSet;
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "SWGDSDDemodSettings.h"
|
||||
#include "SWGDVSeralDevices.h"
|
||||
#include "SWGDVSerialDevice.h"
|
||||
#include "SWGDaemonSinkSettings.h"
|
||||
#include "SWGDaemonSourceReport.h"
|
||||
#include "SWGDaemonSourceSettings.h"
|
||||
#include "SWGDeviceListItem.h"
|
||||
@ -100,6 +99,7 @@
|
||||
#include "SWGRDSReport_altFrequencies.h"
|
||||
#include "SWGRange.h"
|
||||
#include "SWGRangeFloat.h"
|
||||
#include "SWGRemoteSinkSettings.h"
|
||||
#include "SWGRtlSdrReport.h"
|
||||
#include "SWGRtlSdrSettings.h"
|
||||
#include "SWGSDRPlayReport.h"
|
||||
@ -242,9 +242,6 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGDVSerialDevice").compare(type) == 0) {
|
||||
return new SWGDVSerialDevice();
|
||||
}
|
||||
if(QString("SWGDaemonSinkSettings").compare(type) == 0) {
|
||||
return new SWGDaemonSinkSettings();
|
||||
}
|
||||
if(QString("SWGDaemonSourceReport").compare(type) == 0) {
|
||||
return new SWGDaemonSourceReport();
|
||||
}
|
||||
@ -395,6 +392,9 @@ namespace SWGSDRangel {
|
||||
if(QString("SWGRangeFloat").compare(type) == 0) {
|
||||
return new SWGRangeFloat();
|
||||
}
|
||||
if(QString("SWGRemoteSinkSettings").compare(type) == 0) {
|
||||
return new SWGRemoteSinkSettings();
|
||||
}
|
||||
if(QString("SWGRtlSdrReport").compare(type) == 0) {
|
||||
return new SWGRtlSdrReport();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "SWGDaemonSinkSettings.h"
|
||||
#include "SWGRemoteSinkSettings.h"
|
||||
|
||||
#include "SWGHelpers.h"
|
||||
|
||||
@ -22,12 +22,12 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
SWGDaemonSinkSettings::SWGDaemonSinkSettings(QString* json) {
|
||||
SWGRemoteSinkSettings::SWGRemoteSinkSettings(QString* json) {
|
||||
init();
|
||||
this->fromJson(*json);
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings::SWGDaemonSinkSettings() {
|
||||
SWGRemoteSinkSettings::SWGRemoteSinkSettings() {
|
||||
nb_fec_blocks = 0;
|
||||
m_nb_fec_blocks_isSet = false;
|
||||
data_address = nullptr;
|
||||
@ -52,12 +52,12 @@ SWGDaemonSinkSettings::SWGDaemonSinkSettings() {
|
||||
m_reverse_api_channel_index_isSet = false;
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings::~SWGDaemonSinkSettings() {
|
||||
SWGRemoteSinkSettings::~SWGRemoteSinkSettings() {
|
||||
this->cleanup();
|
||||
}
|
||||
|
||||
void
|
||||
SWGDaemonSinkSettings::init() {
|
||||
SWGRemoteSinkSettings::init() {
|
||||
nb_fec_blocks = 0;
|
||||
m_nb_fec_blocks_isSet = false;
|
||||
data_address = new QString("");
|
||||
@ -83,7 +83,7 @@ SWGDaemonSinkSettings::init() {
|
||||
}
|
||||
|
||||
void
|
||||
SWGDaemonSinkSettings::cleanup() {
|
||||
SWGRemoteSinkSettings::cleanup() {
|
||||
|
||||
if(data_address != nullptr) {
|
||||
delete data_address;
|
||||
@ -103,8 +103,8 @@ SWGDaemonSinkSettings::cleanup() {
|
||||
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings*
|
||||
SWGDaemonSinkSettings::fromJson(QString &json) {
|
||||
SWGRemoteSinkSettings*
|
||||
SWGRemoteSinkSettings::fromJson(QString &json) {
|
||||
QByteArray array (json.toStdString().c_str());
|
||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||
QJsonObject jsonObject = doc.object();
|
||||
@ -113,7 +113,7 @@ SWGDaemonSinkSettings::fromJson(QString &json) {
|
||||
}
|
||||
|
||||
void
|
||||
SWGDaemonSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
SWGRemoteSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString");
|
||||
@ -139,7 +139,7 @@ SWGDaemonSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
}
|
||||
|
||||
QString
|
||||
SWGDaemonSinkSettings::asJson ()
|
||||
SWGRemoteSinkSettings::asJson ()
|
||||
{
|
||||
QJsonObject* obj = this->asJsonObject();
|
||||
|
||||
@ -150,7 +150,7 @@ SWGDaemonSinkSettings::asJson ()
|
||||
}
|
||||
|
||||
QJsonObject*
|
||||
SWGDaemonSinkSettings::asJsonObject() {
|
||||
SWGRemoteSinkSettings::asJsonObject() {
|
||||
QJsonObject* obj = new QJsonObject();
|
||||
if(m_nb_fec_blocks_isSet){
|
||||
obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks));
|
||||
@ -190,118 +190,118 @@ SWGDaemonSinkSettings::asJsonObject() {
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getNbFecBlocks() {
|
||||
SWGRemoteSinkSettings::getNbFecBlocks() {
|
||||
return nb_fec_blocks;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setNbFecBlocks(qint32 nb_fec_blocks) {
|
||||
SWGRemoteSinkSettings::setNbFecBlocks(qint32 nb_fec_blocks) {
|
||||
this->nb_fec_blocks = nb_fec_blocks;
|
||||
this->m_nb_fec_blocks_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGDaemonSinkSettings::getDataAddress() {
|
||||
SWGRemoteSinkSettings::getDataAddress() {
|
||||
return data_address;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setDataAddress(QString* data_address) {
|
||||
SWGRemoteSinkSettings::setDataAddress(QString* data_address) {
|
||||
this->data_address = data_address;
|
||||
this->m_data_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getDataPort() {
|
||||
SWGRemoteSinkSettings::getDataPort() {
|
||||
return data_port;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setDataPort(qint32 data_port) {
|
||||
SWGRemoteSinkSettings::setDataPort(qint32 data_port) {
|
||||
this->data_port = data_port;
|
||||
this->m_data_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getTxDelay() {
|
||||
SWGRemoteSinkSettings::getTxDelay() {
|
||||
return tx_delay;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setTxDelay(qint32 tx_delay) {
|
||||
SWGRemoteSinkSettings::setTxDelay(qint32 tx_delay) {
|
||||
this->tx_delay = tx_delay;
|
||||
this->m_tx_delay_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getRgbColor() {
|
||||
SWGRemoteSinkSettings::getRgbColor() {
|
||||
return rgb_color;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setRgbColor(qint32 rgb_color) {
|
||||
SWGRemoteSinkSettings::setRgbColor(qint32 rgb_color) {
|
||||
this->rgb_color = rgb_color;
|
||||
this->m_rgb_color_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGDaemonSinkSettings::getTitle() {
|
||||
SWGRemoteSinkSettings::getTitle() {
|
||||
return title;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setTitle(QString* title) {
|
||||
SWGRemoteSinkSettings::setTitle(QString* title) {
|
||||
this->title = title;
|
||||
this->m_title_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getUseReverseApi() {
|
||||
SWGRemoteSinkSettings::getUseReverseApi() {
|
||||
return use_reverse_api;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||
SWGRemoteSinkSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||
this->use_reverse_api = use_reverse_api;
|
||||
this->m_use_reverse_api_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGDaemonSinkSettings::getReverseApiAddress() {
|
||||
SWGRemoteSinkSettings::getReverseApiAddress() {
|
||||
return reverse_api_address;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||
SWGRemoteSinkSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||
this->reverse_api_address = reverse_api_address;
|
||||
this->m_reverse_api_address_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getReverseApiPort() {
|
||||
SWGRemoteSinkSettings::getReverseApiPort() {
|
||||
return reverse_api_port;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||
SWGRemoteSinkSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||
this->reverse_api_port = reverse_api_port;
|
||||
this->m_reverse_api_port_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getReverseApiDeviceIndex() {
|
||||
SWGRemoteSinkSettings::getReverseApiDeviceIndex() {
|
||||
return reverse_api_device_index;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||
SWGRemoteSinkSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||
this->reverse_api_device_index = reverse_api_device_index;
|
||||
this->m_reverse_api_device_index_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getReverseApiChannelIndex() {
|
||||
SWGRemoteSinkSettings::getReverseApiChannelIndex() {
|
||||
return reverse_api_channel_index;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
||||
SWGRemoteSinkSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
||||
this->reverse_api_channel_index = reverse_api_channel_index;
|
||||
this->m_reverse_api_channel_index_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGDaemonSinkSettings::isSet(){
|
||||
SWGRemoteSinkSettings::isSet(){
|
||||
bool isObjectUpdated = false;
|
||||
do{
|
||||
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
@ -11,13 +11,13 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* SWGDaemonSinkSettings.h
|
||||
* SWGRemoteSinkSettings.h
|
||||
*
|
||||
* Daemon channel sink settings
|
||||
* Remote channel sink settings
|
||||
*/
|
||||
|
||||
#ifndef SWGDaemonSinkSettings_H_
|
||||
#define SWGDaemonSinkSettings_H_
|
||||
#ifndef SWGRemoteSinkSettings_H_
|
||||
#define SWGRemoteSinkSettings_H_
|
||||
|
||||
#include <QJsonObject>
|
||||
|
||||
@ -29,18 +29,18 @@
|
||||
|
||||
namespace SWGSDRangel {
|
||||
|
||||
class SWG_API SWGDaemonSinkSettings: public SWGObject {
|
||||
class SWG_API SWGRemoteSinkSettings: public SWGObject {
|
||||
public:
|
||||
SWGDaemonSinkSettings();
|
||||
SWGDaemonSinkSettings(QString* json);
|
||||
virtual ~SWGDaemonSinkSettings();
|
||||
SWGRemoteSinkSettings();
|
||||
SWGRemoteSinkSettings(QString* json);
|
||||
virtual ~SWGRemoteSinkSettings();
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
virtual QString asJson () override;
|
||||
virtual QJsonObject* asJsonObject() override;
|
||||
virtual void fromJsonObject(QJsonObject &json) override;
|
||||
virtual SWGDaemonSinkSettings* fromJson(QString &jsonString) override;
|
||||
virtual SWGRemoteSinkSettings* fromJson(QString &jsonString) override;
|
||||
|
||||
qint32 getNbFecBlocks();
|
||||
void setNbFecBlocks(qint32 nb_fec_blocks);
|
||||
@ -116,4 +116,4 @@ private:
|
||||
|
||||
}
|
||||
|
||||
#endif /* SWGDaemonSinkSettings_H_ */
|
||||
#endif /* SWGRemoteSinkSettings_H_ */
|
Loading…
x
Reference in New Issue
Block a user