mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04:00
Migration of DaemonSource channel to RemoteSource
This commit is contained in:
parent
5b04cf4b5a
commit
c294f0a017
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
@ -8,7 +8,7 @@ add_subdirectory(udpsource)
|
|||||||
|
|
||||||
find_package(CM256cc)
|
find_package(CM256cc)
|
||||||
if(CM256CC_FOUND)
|
if(CM256CC_FOUND)
|
||||||
add_subdirectory(daemonsource)
|
add_subdirectory(remotesource)
|
||||||
endif(CM256CC_FOUND)
|
endif(CM256CC_FOUND)
|
||||||
|
|
||||||
find_package(OpenCV)
|
find_package(OpenCV)
|
||||||
@ -17,6 +17,6 @@ if (OpenCV_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (BUILD_DEBIAN)
|
if (BUILD_DEBIAN)
|
||||||
add_subdirectory(daemonsource)
|
add_subdirectory(remotesource)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
project(daemonsource)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
|
|
||||||
if (HAS_SSSE3)
|
|
||||||
message(STATUS "DaemonSource: use SSSE3 SIMD" )
|
|
||||||
elseif (HAS_NEON)
|
|
||||||
message(STATUS "DaemonSource: use Neon SIMD" )
|
|
||||||
else()
|
|
||||||
message(STATUS "DaemonSource: Unsupported architecture")
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(daemonsource_SOURCES
|
|
||||||
daemonsource.cpp
|
|
||||||
daemonsourcethread.cpp
|
|
||||||
daemonsourcegui.cpp
|
|
||||||
daemonsourceplugin.cpp
|
|
||||||
daemonsourcesettings.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(daemonsource_HEADERS
|
|
||||||
daemonsource.h
|
|
||||||
daemonsourcethread.h
|
|
||||||
daemonsourcegui.h
|
|
||||||
daemonsourceplugin.h
|
|
||||||
daemonsourcesettings.h
|
|
||||||
)
|
|
||||||
|
|
||||||
set(daemonsource_FORMS
|
|
||||||
daemonsourcegui.ui
|
|
||||||
)
|
|
||||||
|
|
||||||
#include(${QT_USE_FILE})
|
|
||||||
add_definitions(${QT_DEFINITIONS})
|
|
||||||
add_definitions(-DQT_PLUGIN)
|
|
||||||
add_definitions(-DQT_SHARED)
|
|
||||||
|
|
||||||
qt5_wrap_ui(daemonsource_FORMS_HEADERS ${daemonsource_FORMS})
|
|
||||||
|
|
||||||
add_library(daemonsource SHARED
|
|
||||||
${daemonsource_SOURCES}
|
|
||||||
${daemonsource_HEADERS_MOC}
|
|
||||||
${daemonsource_FORMS_HEADERS}
|
|
||||||
)
|
|
||||||
|
|
||||||
if (BUILD_DEBIAN)
|
|
||||||
target_include_directories(daemonsource PUBLIC
|
|
||||||
.
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
|
||||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
|
||||||
${LIBCM256CCSRC}
|
|
||||||
)
|
|
||||||
else (BUILD_DEBIAN)
|
|
||||||
target_include_directories(daemonsource 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(daemonsource
|
|
||||||
${QT_LIBRARIES}
|
|
||||||
cm256cc
|
|
||||||
sdrbase
|
|
||||||
sdrgui
|
|
||||||
swagger
|
|
||||||
)
|
|
||||||
else (BUILD_DEBIAN)
|
|
||||||
target_link_libraries(daemonsource
|
|
||||||
${QT_LIBRARIES}
|
|
||||||
${CM256CC_LIBRARIES}
|
|
||||||
sdrbase
|
|
||||||
sdrgui
|
|
||||||
swagger
|
|
||||||
)
|
|
||||||
endif (BUILD_DEBIAN)
|
|
||||||
|
|
||||||
target_link_libraries(daemonsource Qt5::Core Qt5::Widgets Qt5::Network)
|
|
||||||
|
|
||||||
install(TARGETS daemonsource DESTINATION lib/plugins/channeltx)
|
|
83
plugins/channeltx/remotesource/CMakeLists.txt
Normal file
83
plugins/channeltx/remotesource/CMakeLists.txt
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
project(remotesource)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
|
||||||
|
if (HAS_SSSE3)
|
||||||
|
message(STATUS "RemoteSource: use SSSE3 SIMD" )
|
||||||
|
elseif (HAS_NEON)
|
||||||
|
message(STATUS "RemoteSource: use Neon SIMD" )
|
||||||
|
else()
|
||||||
|
message(STATUS "RemoteSource: Unsupported architecture")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(remotesource_SOURCES
|
||||||
|
remotesource.cpp
|
||||||
|
remotesourcethread.cpp
|
||||||
|
remotesourcegui.cpp
|
||||||
|
remotesourceplugin.cpp
|
||||||
|
remotesourcesettings.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(remotesource_HEADERS
|
||||||
|
remotesource.h
|
||||||
|
remotesourcethread.h
|
||||||
|
remotesourcegui.h
|
||||||
|
remotesourceplugin.h
|
||||||
|
remotesourcesettings.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(remotesource_FORMS
|
||||||
|
remotesourcegui.ui
|
||||||
|
)
|
||||||
|
|
||||||
|
#include(${QT_USE_FILE})
|
||||||
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
add_definitions(-DQT_PLUGIN)
|
||||||
|
add_definitions(-DQT_SHARED)
|
||||||
|
|
||||||
|
qt5_wrap_ui(remotesource_FORMS_HEADERS ${remotesource_FORMS})
|
||||||
|
|
||||||
|
add_library(remotesource SHARED
|
||||||
|
${remotesource_SOURCES}
|
||||||
|
${remotesource_HEADERS_MOC}
|
||||||
|
${remotesource_FORMS_HEADERS}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (BUILD_DEBIAN)
|
||||||
|
target_include_directories(remotesource PUBLIC
|
||||||
|
.
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
|
${LIBCM256CCSRC}
|
||||||
|
)
|
||||||
|
else (BUILD_DEBIAN)
|
||||||
|
target_include_directories(remotesource 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(remotesource
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
cm256cc
|
||||||
|
sdrbase
|
||||||
|
sdrgui
|
||||||
|
swagger
|
||||||
|
)
|
||||||
|
else (BUILD_DEBIAN)
|
||||||
|
target_link_libraries(remotesource
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
${CM256CC_LIBRARIES}
|
||||||
|
sdrbase
|
||||||
|
sdrgui
|
||||||
|
swagger
|
||||||
|
)
|
||||||
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
target_link_libraries(remotesource Qt5::Core Qt5::Widgets Qt5::Network)
|
||||||
|
|
||||||
|
install(TARGETS remotesource DESTINATION lib/plugins/channeltx)
|
@ -1,8 +1,8 @@
|
|||||||
<h1>Daemon source channel plugin</h1>
|
<h1>Remote source channel plugin</h1>
|
||||||
|
|
||||||
<h2>Introduction</h2>
|
<h2>Introduction</h2>
|
||||||
|
|
||||||
This plugin receives I/Q samples from UDP and copies them to the baseband to be transmitted by the sink output device. It uses SDRDaemon format and possible FEC protection.
|
This plugin receives I/Q samples from UDP and copies them to the baseband to be transmitted by the sink output device. It uses SDRangel remote format and possible FEC protection.
|
||||||
|
|
||||||
It is present only in Linux binary releases.
|
It is present only in Linux binary releases.
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/
|
|||||||
|
|
||||||
<h2>Interface</h2>
|
<h2>Interface</h2>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<h3>1: Data local address</h2>
|
<h3>1: Data local address</h2>
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ Stream sample rate as specified in the stream meta data
|
|||||||
|
|
||||||
<h3>5: Stream status</h3>
|
<h3>5: Stream status</h3>
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
<h4>5.1: Total number of frames and number of FEC blocks</h4>
|
<h4>5.1: Total number of frames and number of FEC blocks</h4>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -14,6 +14,8 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "remotesource.h"
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <boost/crc.hpp>
|
#include <boost/crc.hpp>
|
||||||
@ -26,25 +28,24 @@
|
|||||||
|
|
||||||
#include "SWGChannelSettings.h"
|
#include "SWGChannelSettings.h"
|
||||||
#include "SWGChannelReport.h"
|
#include "SWGChannelReport.h"
|
||||||
#include "SWGDaemonSourceReport.h"
|
#include "SWGRemoteSourceReport.h"
|
||||||
|
|
||||||
#include "dsp/devicesamplesink.h"
|
#include "dsp/devicesamplesink.h"
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
#include "dsp/upchannelizer.h"
|
#include "dsp/upchannelizer.h"
|
||||||
#include "dsp/threadedbasebandsamplesource.h"
|
#include "dsp/threadedbasebandsamplesource.h"
|
||||||
|
|
||||||
#include "daemonsourcethread.h"
|
#include "remotesourcethread.h"
|
||||||
#include "daemonsource.h"
|
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSource::MsgSampleRateNotification, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSource::MsgSampleRateNotification, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSource::MsgConfigureDaemonSource, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSource::MsgConfigureRemoteSource, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSource::MsgQueryStreamData, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSource::MsgQueryStreamData, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSource::MsgReportStreamData, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSource::MsgReportStreamData, Message)
|
||||||
|
|
||||||
const QString DaemonSource::m_channelIdURI = "sdrangel.channeltx.daemonsource";
|
const QString RemoteSource::m_channelIdURI = "sdrangel.channeltx.remotesource";
|
||||||
const QString DaemonSource::m_channelId ="DaemonSource";
|
const QString RemoteSource::m_channelId ="RemoteSource";
|
||||||
|
|
||||||
DaemonSource::DaemonSource(DeviceSinkAPI *deviceAPI) :
|
RemoteSource::RemoteSource(DeviceSinkAPI *deviceAPI) :
|
||||||
ChannelSourceAPI(m_channelIdURI),
|
ChannelSourceAPI(m_channelIdURI),
|
||||||
m_deviceAPI(deviceAPI),
|
m_deviceAPI(deviceAPI),
|
||||||
m_sourceThread(0),
|
m_sourceThread(0),
|
||||||
@ -67,7 +68,7 @@ DaemonSource::DaemonSource(DeviceSinkAPI *deviceAPI) :
|
|||||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DaemonSource::~DaemonSource()
|
RemoteSource::~RemoteSource()
|
||||||
{
|
{
|
||||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||||
delete m_networkManager;
|
delete m_networkManager;
|
||||||
@ -77,33 +78,33 @@ DaemonSource::~DaemonSource()
|
|||||||
delete m_channelizer;
|
delete m_channelizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::pull(Sample& sample)
|
void RemoteSource::pull(Sample& sample)
|
||||||
{
|
{
|
||||||
m_dataReadQueue.readSample(sample, true); // true is scale for Tx
|
m_dataReadQueue.readSample(sample, true); // true is scale for Tx
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::pullAudio(int nbSamples)
|
void RemoteSource::pullAudio(int nbSamples)
|
||||||
{
|
{
|
||||||
(void) nbSamples;
|
(void) nbSamples;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::start()
|
void RemoteSource::start()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSource::start");
|
qDebug("RemoteSource::start");
|
||||||
|
|
||||||
if (m_running) {
|
if (m_running) {
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sourceThread = new DaemonSourceThread(&m_dataQueue);
|
m_sourceThread = new RemoteSourceThread(&m_dataQueue);
|
||||||
m_sourceThread->startStop(true);
|
m_sourceThread->startStop(true);
|
||||||
m_sourceThread->dataBind(m_settings.m_dataAddress, m_settings.m_dataPort);
|
m_sourceThread->dataBind(m_settings.m_dataAddress, m_settings.m_dataPort);
|
||||||
m_running = true;
|
m_running = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::stop()
|
void RemoteSource::stop()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSource::stop");
|
qDebug("RemoteSource::stop");
|
||||||
|
|
||||||
if (m_sourceThread != 0)
|
if (m_sourceThread != 0)
|
||||||
{
|
{
|
||||||
@ -115,22 +116,22 @@ void DaemonSource::stop()
|
|||||||
m_running = false;
|
m_running = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::setDataLink(const QString& dataAddress, uint16_t dataPort)
|
void RemoteSource::setDataLink(const QString& dataAddress, uint16_t dataPort)
|
||||||
{
|
{
|
||||||
DaemonSourceSettings settings = m_settings;
|
RemoteSourceSettings settings = m_settings;
|
||||||
settings.m_dataAddress = dataAddress;
|
settings.m_dataAddress = dataAddress;
|
||||||
settings.m_dataPort = dataPort;
|
settings.m_dataPort = dataPort;
|
||||||
|
|
||||||
MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(settings, false);
|
MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(settings, false);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonSource::handleMessage(const Message& cmd)
|
bool RemoteSource::handleMessage(const Message& cmd)
|
||||||
{
|
{
|
||||||
if (UpChannelizer::MsgChannelizerNotification::match(cmd))
|
if (UpChannelizer::MsgChannelizerNotification::match(cmd))
|
||||||
{
|
{
|
||||||
UpChannelizer::MsgChannelizerNotification& notif = (UpChannelizer::MsgChannelizerNotification&) cmd;
|
UpChannelizer::MsgChannelizerNotification& notif = (UpChannelizer::MsgChannelizerNotification&) cmd;
|
||||||
qDebug() << "DaemonSource::handleMessage: MsgChannelizerNotification:"
|
qDebug() << "RemoteSource::handleMessage: MsgChannelizerNotification:"
|
||||||
<< " basebandSampleRate: " << notif.getBasebandSampleRate()
|
<< " basebandSampleRate: " << notif.getBasebandSampleRate()
|
||||||
<< " outputSampleRate: " << notif.getSampleRate()
|
<< " outputSampleRate: " << notif.getSampleRate()
|
||||||
<< " inputFrequencyOffset: " << notif.getFrequencyOffset();
|
<< " inputFrequencyOffset: " << notif.getFrequencyOffset();
|
||||||
@ -143,10 +144,10 @@ bool DaemonSource::handleMessage(const Message& cmd)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (MsgConfigureDaemonSource::match(cmd))
|
else if (MsgConfigureRemoteSource::match(cmd))
|
||||||
{
|
{
|
||||||
MsgConfigureDaemonSource& cfg = (MsgConfigureDaemonSource&) cmd;
|
MsgConfigureRemoteSource& cfg = (MsgConfigureRemoteSource&) cmd;
|
||||||
qDebug() << "MsgConfigureDaemonSource::handleMessage: MsgConfigureDaemonSource";
|
qDebug() << "MsgConfigureRemoteSource::handleMessage: MsgConfigureRemoteSource";
|
||||||
applySettings(cfg.getSettings(), cfg.getForce());
|
applySettings(cfg.getSettings(), cfg.getForce());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -178,32 +179,32 @@ bool DaemonSource::handleMessage(const Message& cmd)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DaemonSource::serialize() const
|
QByteArray RemoteSource::serialize() const
|
||||||
{
|
{
|
||||||
return m_settings.serialize();
|
return m_settings.serialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonSource::deserialize(const QByteArray& data)
|
bool RemoteSource::deserialize(const QByteArray& data)
|
||||||
{
|
{
|
||||||
(void) data;
|
(void) data;
|
||||||
if (m_settings.deserialize(data))
|
if (m_settings.deserialize(data))
|
||||||
{
|
{
|
||||||
MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(m_settings, true);
|
MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(m_settings, true);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(m_settings, true);
|
MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(m_settings, true);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::applySettings(const DaemonSourceSettings& settings, bool force)
|
void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
qDebug() << "DaemonSource::applySettings:"
|
qDebug() << "RemoteSource::applySettings:"
|
||||||
<< " m_dataAddress: " << settings.m_dataAddress
|
<< " m_dataAddress: " << settings.m_dataAddress
|
||||||
<< " m_dataPort: " << settings.m_dataPort
|
<< " m_dataPort: " << settings.m_dataPort
|
||||||
<< " force: " << force;
|
<< " force: " << force;
|
||||||
@ -242,12 +243,12 @@ void DaemonSource::applySettings(const DaemonSourceSettings& settings, bool forc
|
|||||||
m_settings = settings;
|
m_settings = settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
void RemoteSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
||||||
{
|
{
|
||||||
(void) dataBlock;
|
(void) dataBlock;
|
||||||
if (dataBlock->m_rxControlBlock.m_blockCount < SDRDaemonNbOrginalBlocks)
|
if (dataBlock->m_rxControlBlock.m_blockCount < SDRDaemonNbOrginalBlocks)
|
||||||
{
|
{
|
||||||
qWarning("DaemonSource::handleDataBlock: incomplete data block: not processing");
|
qWarning("RemoteSource::handleDataBlock: incomplete data block: not processing");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -274,7 +275,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
|||||||
// Need to use the CM256 recovery
|
// Need to use the CM256 recovery
|
||||||
if (m_cm256p &&(dataBlock->m_rxControlBlock.m_originalCount < SDRDaemonNbOrginalBlocks))
|
if (m_cm256p &&(dataBlock->m_rxControlBlock.m_originalCount < SDRDaemonNbOrginalBlocks))
|
||||||
{
|
{
|
||||||
qDebug("DaemonSource::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount);
|
qDebug("RemoteSource::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount);
|
||||||
CM256::cm256_encoder_params paramsCM256;
|
CM256::cm256_encoder_params paramsCM256;
|
||||||
paramsCM256.BlockBytes = sizeof(SDRDaemonProtectedBlock); // never changes
|
paramsCM256.BlockBytes = sizeof(SDRDaemonProtectedBlock); // never changes
|
||||||
paramsCM256.OriginalCount = SDRDaemonNbOrginalBlocks; // never changes
|
paramsCM256.OriginalCount = SDRDaemonNbOrginalBlocks; // never changes
|
||||||
@ -294,7 +295,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
|||||||
|
|
||||||
if (m_cm256.cm256_decode(paramsCM256, m_cm256DescriptorBlocks)) // CM256 decode
|
if (m_cm256.cm256_decode(paramsCM256, m_cm256DescriptorBlocks)) // CM256 decode
|
||||||
{
|
{
|
||||||
qWarning() << "DaemonSource::handleDataBlock: decode CM256 error:"
|
qWarning() << "RemoteSource::handleDataBlock: decode CM256 error:"
|
||||||
<< " m_originalCount: " << dataBlock->m_rxControlBlock.m_originalCount
|
<< " m_originalCount: " << dataBlock->m_rxControlBlock.m_originalCount
|
||||||
<< " m_recoveryCount: " << dataBlock->m_rxControlBlock.m_recoveryCount;
|
<< " m_recoveryCount: " << dataBlock->m_rxControlBlock.m_recoveryCount;
|
||||||
}
|
}
|
||||||
@ -325,7 +326,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
|||||||
{
|
{
|
||||||
if (!(m_currentMeta == *metaData))
|
if (!(m_currentMeta == *metaData))
|
||||||
{
|
{
|
||||||
printMeta("DaemonSource::handleDataBlock", metaData);
|
printMeta("RemoteSource::handleDataBlock", metaData);
|
||||||
|
|
||||||
if (m_currentMeta.m_sampleRate != metaData->m_sampleRate)
|
if (m_currentMeta.m_sampleRate != metaData->m_sampleRate)
|
||||||
{
|
{
|
||||||
@ -338,7 +339,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qWarning() << "DaemonSource::handleDataBlock: recovered meta: invalid CRC32";
|
qWarning() << "RemoteSource::handleDataBlock: recovered meta: invalid CRC32";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,7 +347,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::handleData()
|
void RemoteSource::handleData()
|
||||||
{
|
{
|
||||||
SDRDaemonDataBlock* dataBlock;
|
SDRDaemonDataBlock* dataBlock;
|
||||||
|
|
||||||
@ -355,7 +356,7 @@ void DaemonSource::handleData()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData)
|
void RemoteSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData)
|
||||||
{
|
{
|
||||||
qDebug().noquote() << header << ": "
|
qDebug().noquote() << header << ": "
|
||||||
<< "|" << metaData->m_centerFrequency
|
<< "|" << metaData->m_centerFrequency
|
||||||
@ -369,41 +370,41 @@ void DaemonSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaDa
|
|||||||
<< "|";
|
<< "|";
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t DaemonSource::calculateDataReadQueueSize(int sampleRate)
|
uint32_t RemoteSource::calculateDataReadQueueSize(int sampleRate)
|
||||||
{
|
{
|
||||||
// scale for 20 blocks at 48 kS/s. Take next even number.
|
// scale for 20 blocks at 48 kS/s. Take next even number.
|
||||||
uint32_t maxSize = sampleRate / 2400;
|
uint32_t maxSize = sampleRate / 2400;
|
||||||
maxSize = (maxSize % 2 == 0) ? maxSize : maxSize + 1;
|
maxSize = (maxSize % 2 == 0) ? maxSize : maxSize + 1;
|
||||||
qDebug("DaemonSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize);
|
qDebug("RemoteSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize);
|
||||||
return maxSize;
|
return maxSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DaemonSource::webapiSettingsGet(
|
int RemoteSource::webapiSettingsGet(
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage)
|
QString& errorMessage)
|
||||||
{
|
{
|
||||||
(void) errorMessage;
|
(void) errorMessage;
|
||||||
response.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings());
|
response.setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings());
|
||||||
response.getDaemonSourceSettings()->init();
|
response.getRemoteSourceSettings()->init();
|
||||||
webapiFormatChannelSettings(response, m_settings);
|
webapiFormatChannelSettings(response, m_settings);
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DaemonSource::webapiSettingsPutPatch(
|
int RemoteSource::webapiSettingsPutPatch(
|
||||||
bool force,
|
bool force,
|
||||||
const QStringList& channelSettingsKeys,
|
const QStringList& channelSettingsKeys,
|
||||||
SWGSDRangel::SWGChannelSettings& response,
|
SWGSDRangel::SWGChannelSettings& response,
|
||||||
QString& errorMessage)
|
QString& errorMessage)
|
||||||
{
|
{
|
||||||
(void) errorMessage;
|
(void) errorMessage;
|
||||||
DaemonSourceSettings settings = m_settings;
|
RemoteSourceSettings settings = m_settings;
|
||||||
|
|
||||||
if (channelSettingsKeys.contains("dataAddress")) {
|
if (channelSettingsKeys.contains("dataAddress")) {
|
||||||
settings.m_dataAddress = *response.getDaemonSourceSettings()->getDataAddress();
|
settings.m_dataAddress = *response.getRemoteSourceSettings()->getDataAddress();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("dataPort"))
|
if (channelSettingsKeys.contains("dataPort"))
|
||||||
{
|
{
|
||||||
int dataPort = response.getDaemonSourceSettings()->getDataPort();
|
int dataPort = response.getRemoteSourceSettings()->getDataPort();
|
||||||
|
|
||||||
if ((dataPort < 1024) || (dataPort > 65535)) {
|
if ((dataPort < 1024) || (dataPort > 65535)) {
|
||||||
settings.m_dataPort = 9090;
|
settings.m_dataPort = 9090;
|
||||||
@ -412,34 +413,34 @@ int DaemonSource::webapiSettingsPutPatch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("rgbColor")) {
|
if (channelSettingsKeys.contains("rgbColor")) {
|
||||||
settings.m_rgbColor = response.getDaemonSourceSettings()->getRgbColor();
|
settings.m_rgbColor = response.getRemoteSourceSettings()->getRgbColor();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("title")) {
|
if (channelSettingsKeys.contains("title")) {
|
||||||
settings.m_title = *response.getDaemonSourceSettings()->getTitle();
|
settings.m_title = *response.getRemoteSourceSettings()->getTitle();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("useReverseAPI")) {
|
if (channelSettingsKeys.contains("useReverseAPI")) {
|
||||||
settings.m_useReverseAPI = response.getDaemonSourceSettings()->getUseReverseApi() != 0;
|
settings.m_useReverseAPI = response.getRemoteSourceSettings()->getUseReverseApi() != 0;
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIAddress")) {
|
if (channelSettingsKeys.contains("reverseAPIAddress")) {
|
||||||
settings.m_reverseAPIAddress = *response.getDaemonSourceSettings()->getReverseApiAddress() != 0;
|
settings.m_reverseAPIAddress = *response.getRemoteSourceSettings()->getReverseApiAddress() != 0;
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
if (channelSettingsKeys.contains("reverseAPIPort")) {
|
||||||
settings.m_reverseAPIPort = response.getDaemonSourceSettings()->getReverseApiPort();
|
settings.m_reverseAPIPort = response.getRemoteSourceSettings()->getReverseApiPort();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) {
|
||||||
settings.m_reverseAPIDeviceIndex = response.getDaemonSourceSettings()->getReverseApiDeviceIndex();
|
settings.m_reverseAPIDeviceIndex = response.getRemoteSourceSettings()->getReverseApiDeviceIndex();
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
if (channelSettingsKeys.contains("reverseAPIChannelIndex")) {
|
||||||
settings.m_reverseAPIChannelIndex = response.getDaemonSourceSettings()->getReverseApiChannelIndex();
|
settings.m_reverseAPIChannelIndex = response.getRemoteSourceSettings()->getReverseApiChannelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(settings, force);
|
MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(settings, force);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
|
|
||||||
qDebug("DaemonSource::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
qDebug("RemoteSource::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
||||||
if (m_guiMessageQueue) // forward to GUI if any
|
if (m_guiMessageQueue) // forward to GUI if any
|
||||||
{
|
{
|
||||||
MsgConfigureDaemonSource *msgToGUI = MsgConfigureDaemonSource::create(settings, force);
|
MsgConfigureRemoteSource *msgToGUI = MsgConfigureRemoteSource::create(settings, force);
|
||||||
m_guiMessageQueue->push(msgToGUI);
|
m_guiMessageQueue->push(msgToGUI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,88 +449,88 @@ int DaemonSource::webapiSettingsPutPatch(
|
|||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
int DaemonSource::webapiReportGet(
|
int RemoteSource::webapiReportGet(
|
||||||
SWGSDRangel::SWGChannelReport& response,
|
SWGSDRangel::SWGChannelReport& response,
|
||||||
QString& errorMessage)
|
QString& errorMessage)
|
||||||
{
|
{
|
||||||
(void) errorMessage;
|
(void) errorMessage;
|
||||||
response.setDaemonSourceReport(new SWGSDRangel::SWGDaemonSourceReport());
|
response.setRemoteSourceReport(new SWGSDRangel::SWGRemoteSourceReport());
|
||||||
response.getDaemonSourceReport()->init();
|
response.getRemoteSourceReport()->init();
|
||||||
webapiFormatChannelReport(response);
|
webapiFormatChannelReport(response);
|
||||||
return 200;
|
return 200;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSourceSettings& settings)
|
void RemoteSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSourceSettings& settings)
|
||||||
{
|
{
|
||||||
if (response.getDaemonSourceSettings()->getDataAddress()) {
|
if (response.getRemoteSourceSettings()->getDataAddress()) {
|
||||||
*response.getDaemonSourceSettings()->getDataAddress() = settings.m_dataAddress;
|
*response.getRemoteSourceSettings()->getDataAddress() = settings.m_dataAddress;
|
||||||
} else {
|
} else {
|
||||||
response.getDaemonSourceSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
response.getRemoteSourceSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
response.getDaemonSourceSettings()->setDataPort(settings.m_dataPort);
|
response.getRemoteSourceSettings()->setDataPort(settings.m_dataPort);
|
||||||
response.getDaemonSourceSettings()->setRgbColor(settings.m_rgbColor);
|
response.getRemoteSourceSettings()->setRgbColor(settings.m_rgbColor);
|
||||||
|
|
||||||
if (response.getDaemonSourceSettings()->getTitle()) {
|
if (response.getRemoteSourceSettings()->getTitle()) {
|
||||||
*response.getDaemonSourceSettings()->getTitle() = settings.m_title;
|
*response.getRemoteSourceSettings()->getTitle() = settings.m_title;
|
||||||
} else {
|
} else {
|
||||||
response.getDaemonSourceSettings()->setTitle(new QString(settings.m_title));
|
response.getRemoteSourceSettings()->setTitle(new QString(settings.m_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
response.getDaemonSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
response.getRemoteSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0);
|
||||||
|
|
||||||
if (response.getDaemonSourceSettings()->getReverseApiAddress()) {
|
if (response.getRemoteSourceSettings()->getReverseApiAddress()) {
|
||||||
*response.getDaemonSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
*response.getRemoteSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress;
|
||||||
} else {
|
} else {
|
||||||
response.getDaemonSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
response.getRemoteSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress));
|
||||||
}
|
}
|
||||||
|
|
||||||
response.getDaemonSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
response.getRemoteSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort);
|
||||||
response.getDaemonSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
response.getRemoteSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||||
response.getDaemonSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
response.getRemoteSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
void RemoteSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
gettimeofday(&tv, 0);
|
gettimeofday(&tv, 0);
|
||||||
|
|
||||||
response.getDaemonSourceReport()->setTvSec(tv.tv_sec);
|
response.getRemoteSourceReport()->setTvSec(tv.tv_sec);
|
||||||
response.getDaemonSourceReport()->setTvUSec(tv.tv_usec);
|
response.getRemoteSourceReport()->setTvUSec(tv.tv_usec);
|
||||||
response.getDaemonSourceReport()->setQueueSize(m_dataReadQueue.size());
|
response.getRemoteSourceReport()->setQueueSize(m_dataReadQueue.size());
|
||||||
response.getDaemonSourceReport()->setQueueLength(m_dataReadQueue.length());
|
response.getRemoteSourceReport()->setQueueLength(m_dataReadQueue.length());
|
||||||
response.getDaemonSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount());
|
response.getRemoteSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount());
|
||||||
response.getDaemonSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors);
|
response.getRemoteSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors);
|
||||||
response.getDaemonSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors);
|
response.getRemoteSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors);
|
||||||
response.getDaemonSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks);
|
response.getRemoteSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks);
|
||||||
response.getDaemonSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks);
|
response.getRemoteSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks);
|
||||||
response.getDaemonSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency);
|
response.getRemoteSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency);
|
||||||
response.getDaemonSourceReport()->setSampleRate(m_currentMeta.m_sampleRate);
|
response.getRemoteSourceReport()->setSampleRate(m_currentMeta.m_sampleRate);
|
||||||
response.getDaemonSourceReport()->setDeviceCenterFreq(m_deviceAPI->getSampleSink()->getCenterFrequency()/1000);
|
response.getRemoteSourceReport()->setDeviceCenterFreq(m_deviceAPI->getSampleSink()->getCenterFrequency()/1000);
|
||||||
response.getDaemonSourceReport()->setDeviceSampleRate(m_deviceAPI->getSampleSink()->getSampleRate());
|
response.getRemoteSourceReport()->setDeviceSampleRate(m_deviceAPI->getSampleSink()->getSampleRate());
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSourceSettings& settings, bool force)
|
void RemoteSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings();
|
||||||
swgChannelSettings->setTx(1);
|
swgChannelSettings->setTx(1);
|
||||||
swgChannelSettings->setChannelType(new QString("DaemonSource"));
|
swgChannelSettings->setChannelType(new QString("RemoteSource"));
|
||||||
swgChannelSettings->setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings());
|
swgChannelSettings->setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings());
|
||||||
SWGSDRangel::SWGDaemonSourceSettings *swgDaemonSourceSettings = swgChannelSettings->getDaemonSourceSettings();
|
SWGSDRangel::SWGRemoteSourceSettings *swgRemoteSourceSettings = swgChannelSettings->getRemoteSourceSettings();
|
||||||
|
|
||||||
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
// transfer data that has been modified. When force is on transfer all data except reverse API data
|
||||||
|
|
||||||
if (channelSettingsKeys.contains("dataAddress") || force) {
|
if (channelSettingsKeys.contains("dataAddress") || force) {
|
||||||
swgDaemonSourceSettings->setDataAddress(new QString(settings.m_dataAddress));
|
swgRemoteSourceSettings->setDataAddress(new QString(settings.m_dataAddress));
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("dataPort") || force) {
|
if (channelSettingsKeys.contains("dataPort") || force) {
|
||||||
swgDaemonSourceSettings->setDataPort(settings.m_dataPort);
|
swgRemoteSourceSettings->setDataPort(settings.m_dataPort);
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("rgbColor") || force) {
|
if (channelSettingsKeys.contains("rgbColor") || force) {
|
||||||
swgDaemonSourceSettings->setRgbColor(settings.m_rgbColor);
|
swgRemoteSourceSettings->setRgbColor(settings.m_rgbColor);
|
||||||
}
|
}
|
||||||
if (channelSettingsKeys.contains("title") || force) {
|
if (channelSettingsKeys.contains("title") || force) {
|
||||||
swgDaemonSourceSettings->setTitle(new QString(settings.m_title));
|
swgRemoteSourceSettings->setTitle(new QString(settings.m_title));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings")
|
||||||
@ -551,13 +552,13 @@ void DaemonSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys
|
|||||||
delete swgChannelSettings;
|
delete swgChannelSettings;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSource::networkManagerFinished(QNetworkReply *reply)
|
void RemoteSource::networkManagerFinished(QNetworkReply *reply)
|
||||||
{
|
{
|
||||||
QNetworkReply::NetworkError replyError = reply->error();
|
QNetworkReply::NetworkError replyError = reply->error();
|
||||||
|
|
||||||
if (replyError)
|
if (replyError)
|
||||||
{
|
{
|
||||||
qWarning() << "DaemonSource::networkManagerFinished:"
|
qWarning() << "RemoteSource::networkManagerFinished:"
|
||||||
<< " error(" << (int) replyError
|
<< " error(" << (int) replyError
|
||||||
<< "): " << replyError
|
<< "): " << replyError
|
||||||
<< ": " << reply->errorString();
|
<< ": " << reply->errorString();
|
||||||
@ -566,5 +567,5 @@ void DaemonSource::networkManagerFinished(QNetworkReply *reply)
|
|||||||
|
|
||||||
QString answer = reply->readAll();
|
QString answer = reply->readAll();
|
||||||
answer.chop(1); // remove last \n
|
answer.chop(1); // remove last \n
|
||||||
qDebug("DaemonSource::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
qDebug("RemoteSource::networkManagerFinished: reply:\n%s", answer.toStdString().c_str());
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// 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/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_
|
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_
|
||||||
#define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_
|
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
@ -26,40 +26,41 @@
|
|||||||
#include "channel/channelsourceapi.h"
|
#include "channel/channelsourceapi.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
|
|
||||||
#include "daemonsourcesettings.h"
|
|
||||||
#include "channel/sdrdaemondataqueue.h"
|
#include "channel/sdrdaemondataqueue.h"
|
||||||
#include "channel/sdrdaemondatablock.h"
|
#include "channel/sdrdaemondatablock.h"
|
||||||
#include "channel/sdrdaemondatareadqueue.h"
|
#include "channel/sdrdaemondatareadqueue.h"
|
||||||
|
|
||||||
|
#include "../remotesource/remotesourcesettings.h"
|
||||||
|
|
||||||
class ThreadedBasebandSampleSource;
|
class ThreadedBasebandSampleSource;
|
||||||
class UpChannelizer;
|
class UpChannelizer;
|
||||||
class DeviceSinkAPI;
|
class DeviceSinkAPI;
|
||||||
class DaemonSourceThread;
|
class RemoteSourceThread;
|
||||||
class SDRDaemonDataBlock;
|
class SDRDaemonDataBlock;
|
||||||
class QNetworkAccessManager;
|
class QNetworkAccessManager;
|
||||||
class QNetworkReply;
|
class QNetworkReply;
|
||||||
|
|
||||||
class DaemonSource : public BasebandSampleSource, public ChannelSourceAPI {
|
class RemoteSource : public BasebandSampleSource, public ChannelSourceAPI {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
class MsgConfigureDaemonSource : public Message {
|
class MsgConfigureRemoteSource : public Message {
|
||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const DaemonSourceSettings& getSettings() const { return m_settings; }
|
const RemoteSourceSettings& getSettings() const { return m_settings; }
|
||||||
bool getForce() const { return m_force; }
|
bool getForce() const { return m_force; }
|
||||||
|
|
||||||
static MsgConfigureDaemonSource* create(const DaemonSourceSettings& settings, bool force)
|
static MsgConfigureRemoteSource* create(const RemoteSourceSettings& settings, bool force)
|
||||||
{
|
{
|
||||||
return new MsgConfigureDaemonSource(settings, force);
|
return new MsgConfigureRemoteSource(settings, force);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DaemonSourceSettings m_settings;
|
RemoteSourceSettings m_settings;
|
||||||
bool m_force;
|
bool m_force;
|
||||||
|
|
||||||
MsgConfigureDaemonSource(const DaemonSourceSettings& settings, bool force) :
|
MsgConfigureRemoteSource(const RemoteSourceSettings& settings, bool force) :
|
||||||
Message(),
|
Message(),
|
||||||
m_settings(settings),
|
m_settings(settings),
|
||||||
m_force(force)
|
m_force(force)
|
||||||
@ -179,8 +180,8 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
DaemonSource(DeviceSinkAPI *deviceAPI);
|
RemoteSource(DeviceSinkAPI *deviceAPI);
|
||||||
~DaemonSource();
|
~RemoteSource();
|
||||||
|
|
||||||
virtual void destroy() { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
|
|
||||||
@ -221,12 +222,12 @@ private:
|
|||||||
ThreadedBasebandSampleSource* m_threadedChannelizer;
|
ThreadedBasebandSampleSource* m_threadedChannelizer;
|
||||||
UpChannelizer* m_channelizer;
|
UpChannelizer* m_channelizer;
|
||||||
SDRDaemonDataQueue m_dataQueue;
|
SDRDaemonDataQueue m_dataQueue;
|
||||||
DaemonSourceThread *m_sourceThread;
|
RemoteSourceThread *m_sourceThread;
|
||||||
CM256 m_cm256;
|
CM256 m_cm256;
|
||||||
CM256 *m_cm256p;
|
CM256 *m_cm256p;
|
||||||
bool m_running;
|
bool m_running;
|
||||||
|
|
||||||
DaemonSourceSettings m_settings;
|
RemoteSourceSettings m_settings;
|
||||||
|
|
||||||
CM256::cm256_block m_cm256DescriptorBlocks[2*SDRDaemonNbOrginalBlocks]; //!< CM256 decoder descriptors (block addresses and block indexes)
|
CM256::cm256_block m_cm256DescriptorBlocks[2*SDRDaemonNbOrginalBlocks]; //!< CM256 decoder descriptors (block addresses and block indexes)
|
||||||
SDRDaemonMetaDataFEC m_currentMeta;
|
SDRDaemonMetaDataFEC m_currentMeta;
|
||||||
@ -239,17 +240,17 @@ private:
|
|||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
QNetworkRequest m_networkRequest;
|
QNetworkRequest m_networkRequest;
|
||||||
|
|
||||||
void applySettings(const DaemonSourceSettings& settings, bool force = false);
|
void applySettings(const RemoteSourceSettings& settings, bool force = false);
|
||||||
void handleDataBlock(SDRDaemonDataBlock *dataBlock);
|
void handleDataBlock(SDRDaemonDataBlock *dataBlock);
|
||||||
void printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData);
|
void printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData);
|
||||||
uint32_t calculateDataReadQueueSize(int sampleRate);
|
uint32_t calculateDataReadQueueSize(int sampleRate);
|
||||||
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSourceSettings& settings);
|
void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSourceSettings& settings);
|
||||||
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response);
|
||||||
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSourceSettings& settings, bool force);
|
void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply);
|
||||||
void handleData();
|
void handleData();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_
|
#endif // PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_
|
@ -9,7 +9,7 @@ CONFIG += plugin
|
|||||||
|
|
||||||
QT += core gui widgets multimedia network opengl
|
QT += core gui widgets multimedia network opengl
|
||||||
|
|
||||||
TARGET = daemonsource
|
TARGET = remotesource
|
||||||
|
|
||||||
CONFIG(MINGW32):LIBCM256CCSRC = "C:\softs\cm256cc"
|
CONFIG(MINGW32):LIBCM256CCSRC = "C:\softs\cm256cc"
|
||||||
CONFIG(MSVC):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(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
|
||||||
CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0"
|
CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0"
|
||||||
|
|
||||||
SOURCES += daemonsource.cpp\
|
SOURCES += remotesource.cpp\
|
||||||
daemonsourcegui.cpp\
|
remotesourcegui.cpp\
|
||||||
daemonsourcesettings.cpp\
|
remotesourcesettings.cpp\
|
||||||
daemonsourceplugin.cpp\
|
remotesourceplugin.cpp\
|
||||||
daemonsourcethread.cpp
|
remotesourcethread.cpp
|
||||||
|
|
||||||
HEADERS += daemonsource.h\
|
HEADERS += remotesource.h\
|
||||||
daemonsourcegui.h\
|
remotesourcegui.h\
|
||||||
daemonsourcesettings.h\
|
remotesourcesettings.h\
|
||||||
daemonsourceplugin.h\
|
remotesourceplugin.h\
|
||||||
daemonsourcethread.h
|
remotesourcethread.h
|
||||||
|
|
||||||
FORMS += daemonsourcegui.ui
|
FORMS += remotesourcegui.ui
|
||||||
|
|
||||||
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
|
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
|
||||||
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
|
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -14,58 +14,59 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "remotesourcegui.h"
|
||||||
|
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
#include "device/deviceuiset.h"
|
#include "device/deviceuiset.h"
|
||||||
#include "gui/basicchannelsettingsdialog.h"
|
#include "gui/basicchannelsettingsdialog.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#include "daemonsource.h"
|
#include "remotesource.h"
|
||||||
#include "ui_daemonsourcegui.h"
|
#include "ui_remotesourcegui.h"
|
||||||
#include "daemonsourcegui.h"
|
|
||||||
|
|
||||||
DaemonSourceGUI* DaemonSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
|
RemoteSourceGUI* RemoteSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
|
||||||
{
|
{
|
||||||
DaemonSourceGUI* gui = new DaemonSourceGUI(pluginAPI, deviceUISet, channelTx);
|
RemoteSourceGUI* gui = new RemoteSourceGUI(pluginAPI, deviceUISet, channelTx);
|
||||||
return gui;
|
return gui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::destroy()
|
void RemoteSourceGUI::destroy()
|
||||||
{
|
{
|
||||||
delete this;
|
delete this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::setName(const QString& name)
|
void RemoteSourceGUI::setName(const QString& name)
|
||||||
{
|
{
|
||||||
setObjectName(name);
|
setObjectName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString DaemonSourceGUI::getName() const
|
QString RemoteSourceGUI::getName() const
|
||||||
{
|
{
|
||||||
return objectName();
|
return objectName();
|
||||||
}
|
}
|
||||||
|
|
||||||
qint64 DaemonSourceGUI::getCenterFrequency() const {
|
qint64 RemoteSourceGUI::getCenterFrequency() const {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::setCenterFrequency(qint64 centerFrequency)
|
void RemoteSourceGUI::setCenterFrequency(qint64 centerFrequency)
|
||||||
{
|
{
|
||||||
(void) centerFrequency;
|
(void) centerFrequency;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::resetToDefaults()
|
void RemoteSourceGUI::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_settings.resetToDefaults();
|
m_settings.resetToDefaults();
|
||||||
displaySettings();
|
displaySettings();
|
||||||
applySettings(true);
|
applySettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DaemonSourceGUI::serialize() const
|
QByteArray RemoteSourceGUI::serialize() const
|
||||||
{
|
{
|
||||||
return m_settings.serialize();
|
return m_settings.serialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonSourceGUI::deserialize(const QByteArray& data)
|
bool RemoteSourceGUI::deserialize(const QByteArray& data)
|
||||||
{
|
{
|
||||||
if(m_settings.deserialize(data)) {
|
if(m_settings.deserialize(data)) {
|
||||||
displaySettings();
|
displaySettings();
|
||||||
@ -77,26 +78,26 @@ bool DaemonSourceGUI::deserialize(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonSourceGUI::handleMessage(const Message& message)
|
bool RemoteSourceGUI::handleMessage(const Message& message)
|
||||||
{
|
{
|
||||||
if (DaemonSource::MsgSampleRateNotification::match(message))
|
if (RemoteSource::MsgSampleRateNotification::match(message))
|
||||||
{
|
{
|
||||||
DaemonSource::MsgSampleRateNotification& notif = (DaemonSource::MsgSampleRateNotification&) message;
|
RemoteSource::MsgSampleRateNotification& notif = (RemoteSource::MsgSampleRateNotification&) message;
|
||||||
m_channelMarker.setBandwidth(notif.getSampleRate());
|
m_channelMarker.setBandwidth(notif.getSampleRate());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DaemonSource::MsgConfigureDaemonSource::match(message))
|
else if (RemoteSource::MsgConfigureRemoteSource::match(message))
|
||||||
{
|
{
|
||||||
const DaemonSource::MsgConfigureDaemonSource& cfg = (DaemonSource::MsgConfigureDaemonSource&) message;
|
const RemoteSource::MsgConfigureRemoteSource& cfg = (RemoteSource::MsgConfigureRemoteSource&) message;
|
||||||
m_settings = cfg.getSettings();
|
m_settings = cfg.getSettings();
|
||||||
blockApplySettings(true);
|
blockApplySettings(true);
|
||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (DaemonSource::MsgReportStreamData::match(message))
|
else if (RemoteSource::MsgReportStreamData::match(message))
|
||||||
{
|
{
|
||||||
const DaemonSource::MsgReportStreamData& report = (DaemonSource::MsgReportStreamData&) message;
|
const RemoteSource::MsgReportStreamData& report = (RemoteSource::MsgReportStreamData&) message;
|
||||||
ui->sampleRate->setText(QString("%1").arg(report.get_sampleRate()));
|
ui->sampleRate->setText(QString("%1").arg(report.get_sampleRate()));
|
||||||
QString nominalNbBlocksText = QString("%1/%2")
|
QString nominalNbBlocksText = QString("%1/%2")
|
||||||
.arg(report.get_nbOriginalBlocks() + report.get_nbFECBlocks())
|
.arg(report.get_nbOriginalBlocks() + report.get_nbFECBlocks())
|
||||||
@ -153,9 +154,9 @@ bool DaemonSourceGUI::handleMessage(const Message& message)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) :
|
RemoteSourceGUI::RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) :
|
||||||
RollupWidget(parent),
|
RollupWidget(parent),
|
||||||
ui(new Ui::DaemonSourceGUI),
|
ui(new Ui::RemoteSourceGUI),
|
||||||
m_pluginAPI(pluginAPI),
|
m_pluginAPI(pluginAPI),
|
||||||
m_deviceUISet(deviceUISet),
|
m_deviceUISet(deviceUISet),
|
||||||
m_countUnrecoverable(0),
|
m_countUnrecoverable(0),
|
||||||
@ -173,21 +174,21 @@ DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet,
|
|||||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
|
||||||
|
|
||||||
m_daemonSrc = (DaemonSource*) channelTx;
|
m_remoteSrc = (RemoteSource*) channelTx;
|
||||||
m_daemonSrc->setMessageQueueToGUI(getInputMessageQueue());
|
m_remoteSrc->setMessageQueueToGUI(getInputMessageQueue());
|
||||||
|
|
||||||
connect(&(m_deviceUISet->m_deviceSinkAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
connect(&(m_deviceUISet->m_deviceSinkAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
|
||||||
|
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setColor(m_settings.m_rgbColor);
|
m_channelMarker.setColor(m_settings.m_rgbColor);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
m_channelMarker.setTitle("Daemon source");
|
m_channelMarker.setTitle("Remote source");
|
||||||
m_channelMarker.blockSignals(false);
|
m_channelMarker.blockSignals(false);
|
||||||
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
m_channelMarker.setVisible(true); // activate signal on the last setting only
|
||||||
|
|
||||||
m_settings.setChannelMarker(&m_channelMarker);
|
m_settings.setChannelMarker(&m_channelMarker);
|
||||||
|
|
||||||
m_deviceUISet->registerTxChannelInstance(DaemonSource::m_channelIdURI, this);
|
m_deviceUISet->registerTxChannelInstance(RemoteSource::m_channelIdURI, this);
|
||||||
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
m_deviceUISet->addChannelMarker(&m_channelMarker);
|
||||||
m_deviceUISet->addRollupWidget(this);
|
m_deviceUISet->addRollupWidget(this);
|
||||||
|
|
||||||
@ -200,30 +201,30 @@ DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet,
|
|||||||
applySettings(true);
|
applySettings(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
DaemonSourceGUI::~DaemonSourceGUI()
|
RemoteSourceGUI::~RemoteSourceGUI()
|
||||||
{
|
{
|
||||||
m_deviceUISet->removeTxChannelInstance(this);
|
m_deviceUISet->removeTxChannelInstance(this);
|
||||||
delete m_daemonSrc;
|
delete m_remoteSrc;
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::blockApplySettings(bool block)
|
void RemoteSourceGUI::blockApplySettings(bool block)
|
||||||
{
|
{
|
||||||
m_doApplySettings = !block;
|
m_doApplySettings = !block;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::applySettings(bool force)
|
void RemoteSourceGUI::applySettings(bool force)
|
||||||
{
|
{
|
||||||
if (m_doApplySettings)
|
if (m_doApplySettings)
|
||||||
{
|
{
|
||||||
setTitleColor(m_channelMarker.getColor());
|
setTitleColor(m_channelMarker.getColor());
|
||||||
|
|
||||||
DaemonSource::MsgConfigureDaemonSource* message = DaemonSource::MsgConfigureDaemonSource::create(m_settings, force);
|
RemoteSource::MsgConfigureRemoteSource* message = RemoteSource::MsgConfigureRemoteSource::create(m_settings, force);
|
||||||
m_daemonSrc->getInputMessageQueue()->push(message);
|
m_remoteSrc->getInputMessageQueue()->push(message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::displaySettings()
|
void RemoteSourceGUI::displaySettings()
|
||||||
{
|
{
|
||||||
m_channelMarker.blockSignals(true);
|
m_channelMarker.blockSignals(true);
|
||||||
m_channelMarker.setCenterFrequency(0);
|
m_channelMarker.setCenterFrequency(0);
|
||||||
@ -241,17 +242,17 @@ void DaemonSourceGUI::displaySettings()
|
|||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::leaveEvent(QEvent*)
|
void RemoteSourceGUI::leaveEvent(QEvent*)
|
||||||
{
|
{
|
||||||
m_channelMarker.setHighlighted(false);
|
m_channelMarker.setHighlighted(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::enterEvent(QEvent*)
|
void RemoteSourceGUI::enterEvent(QEvent*)
|
||||||
{
|
{
|
||||||
m_channelMarker.setHighlighted(true);
|
m_channelMarker.setHighlighted(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::handleSourceMessages()
|
void RemoteSourceGUI::handleSourceMessages()
|
||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
@ -264,13 +265,13 @@ void DaemonSourceGUI::handleSourceMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
void RemoteSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||||
{
|
{
|
||||||
(void) widget;
|
(void) widget;
|
||||||
(void) rollDown;
|
(void) rollDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::onMenuDialogCalled(const QPoint &p)
|
void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p)
|
||||||
{
|
{
|
||||||
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
BasicChannelSettingsDialog dialog(&m_channelMarker, this);
|
||||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||||
@ -296,13 +297,13 @@ void DaemonSourceGUI::onMenuDialogCalled(const QPoint &p)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::on_dataAddress_returnPressed()
|
void RemoteSourceGUI::on_dataAddress_returnPressed()
|
||||||
{
|
{
|
||||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::on_dataPort_returnPressed()
|
void RemoteSourceGUI::on_dataPort_returnPressed()
|
||||||
{
|
{
|
||||||
bool dataOk;
|
bool dataOk;
|
||||||
int dataPort = ui->dataPort->text().toInt(&dataOk);
|
int dataPort = ui->dataPort->text().toInt(&dataOk);
|
||||||
@ -319,7 +320,7 @@ void DaemonSourceGUI::on_dataPort_returnPressed()
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::on_dataApplyButton_clicked(bool checked)
|
void RemoteSourceGUI::on_dataApplyButton_clicked(bool checked)
|
||||||
{
|
{
|
||||||
(void) checked;
|
(void) checked;
|
||||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||||
@ -335,7 +336,7 @@ void DaemonSourceGUI::on_dataApplyButton_clicked(bool checked)
|
|||||||
applySettings();
|
applySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::on_eventCountsReset_clicked(bool checked)
|
void RemoteSourceGUI::on_eventCountsReset_clicked(bool checked)
|
||||||
{
|
{
|
||||||
(void) checked;
|
(void) checked;
|
||||||
m_countUnrecoverable = 0;
|
m_countUnrecoverable = 0;
|
||||||
@ -345,7 +346,7 @@ void DaemonSourceGUI::on_eventCountsReset_clicked(bool checked)
|
|||||||
displayEventTimer();
|
displayEventTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::displayEventCounts()
|
void RemoteSourceGUI::displayEventCounts()
|
||||||
{
|
{
|
||||||
QString nstr = QString("%1").arg(m_countUnrecoverable, 3, 10, QChar('0'));
|
QString nstr = QString("%1").arg(m_countUnrecoverable, 3, 10, QChar('0'));
|
||||||
ui->eventUnrecText->setText(nstr);
|
ui->eventUnrecText->setText(nstr);
|
||||||
@ -353,7 +354,7 @@ void DaemonSourceGUI::displayEventCounts()
|
|||||||
ui->eventRecText->setText(nstr);
|
ui->eventRecText->setText(nstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::displayEventStatus(int recoverableCount, int unrecoverableCount)
|
void RemoteSourceGUI::displayEventStatus(int recoverableCount, int unrecoverableCount)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (unrecoverableCount == 0)
|
if (unrecoverableCount == 0)
|
||||||
@ -370,7 +371,7 @@ void DaemonSourceGUI::displayEventStatus(int recoverableCount, int unrecoverable
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::displayEventTimer()
|
void RemoteSourceGUI::displayEventTimer()
|
||||||
{
|
{
|
||||||
int elapsedTimeMillis = m_time.elapsed();
|
int elapsedTimeMillis = m_time.elapsed();
|
||||||
QTime recordLength(0, 0, 0, 0);
|
QTime recordLength(0, 0, 0, 0);
|
||||||
@ -379,12 +380,12 @@ void DaemonSourceGUI::displayEventTimer()
|
|||||||
ui->eventCountsTimeText->setText(s_time);
|
ui->eventCountsTimeText->setText(s_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::tick()
|
void RemoteSourceGUI::tick()
|
||||||
{
|
{
|
||||||
if (++m_tickCount == 20) // once per second
|
if (++m_tickCount == 20) // once per second
|
||||||
{
|
{
|
||||||
DaemonSource::MsgQueryStreamData *msg = DaemonSource::MsgQueryStreamData::create();
|
RemoteSource::MsgQueryStreamData *msg = RemoteSource::MsgQueryStreamData::create();
|
||||||
m_daemonSrc->getInputMessageQueue()->push(msg);
|
m_remoteSrc->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
displayEventTimer();
|
displayEventTimer();
|
||||||
|
|
||||||
@ -392,6 +393,6 @@ void DaemonSourceGUI::tick()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceGUI::channelMarkerChangedByCursor()
|
void RemoteSourceGUI::channelMarkerChangedByCursor()
|
||||||
{
|
{
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// 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/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_
|
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
|
||||||
#define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_
|
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_
|
||||||
|
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
|
|
||||||
@ -24,22 +24,22 @@
|
|||||||
#include "gui/rollupwidget.h"
|
#include "gui/rollupwidget.h"
|
||||||
#include "util/messagequeue.h"
|
#include "util/messagequeue.h"
|
||||||
|
|
||||||
#include "daemonsourcesettings.h"
|
#include "../remotesource/remotesourcesettings.h"
|
||||||
|
|
||||||
class PluginAPI;
|
class PluginAPI;
|
||||||
class DeviceUISet;
|
class DeviceUISet;
|
||||||
class BasebandSampleSource;
|
class BasebandSampleSource;
|
||||||
class DaemonSource;
|
class RemoteSource;
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class DaemonSourceGUI;
|
class RemoteSourceGUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
class DaemonSourceGUI : public RollupWidget, public PluginInstanceGUI {
|
class RemoteSourceGUI : public RollupWidget, public PluginInstanceGUI {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static DaemonSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
|
static RemoteSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx);
|
||||||
virtual void destroy();
|
virtual void destroy();
|
||||||
|
|
||||||
void setName(const QString& name);
|
void setName(const QString& name);
|
||||||
@ -57,14 +57,14 @@ public slots:
|
|||||||
void channelMarkerChangedByCursor();
|
void channelMarkerChangedByCursor();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::DaemonSourceGUI* ui;
|
Ui::RemoteSourceGUI* ui;
|
||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
DeviceUISet* m_deviceUISet;
|
DeviceUISet* m_deviceUISet;
|
||||||
ChannelMarker m_channelMarker;
|
ChannelMarker m_channelMarker;
|
||||||
DaemonSourceSettings m_settings;
|
RemoteSourceSettings m_settings;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
|
|
||||||
DaemonSource* m_daemonSrc;
|
RemoteSource* m_remoteSrc;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
|
|
||||||
uint32_t m_countUnrecoverable;
|
uint32_t m_countUnrecoverable;
|
||||||
@ -77,8 +77,8 @@ private:
|
|||||||
QTime m_time;
|
QTime m_time;
|
||||||
uint32_t m_tickCount;
|
uint32_t m_tickCount;
|
||||||
|
|
||||||
explicit DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
|
explicit RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0);
|
||||||
virtual ~DaemonSourceGUI();
|
virtual ~RemoteSourceGUI();
|
||||||
|
|
||||||
void blockApplySettings(bool block);
|
void blockApplySettings(bool block);
|
||||||
void applySettings(bool force = false);
|
void applySettings(bool force = false);
|
||||||
@ -103,4 +103,4 @@ private slots:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_ */
|
#endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ */
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>DaemonSourceGUI</class>
|
<class>RemoteSourceGUI</class>
|
||||||
<widget class="RollupWidget" name="DaemonSourceGUI">
|
<widget class="RollupWidget" name="RemoteSourceGUI">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Daemon source</string>
|
<string>Remote source</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="settingsContainer" native="true">
|
<widget class="QWidget" name="settingsContainer" native="true">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -18,61 +18,61 @@
|
|||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
|
|
||||||
#ifndef SERVER_MODE
|
#ifndef SERVER_MODE
|
||||||
#include "daemonsourcegui.h"
|
#include "remotesourcegui.h"
|
||||||
#endif
|
#endif
|
||||||
#include "daemonsource.h"
|
#include "remotesource.h"
|
||||||
#include "daemonsourceplugin.h"
|
#include "remotesourceplugin.h"
|
||||||
|
|
||||||
const PluginDescriptor DaemonSourcePlugin::m_pluginDescriptor = {
|
const PluginDescriptor RemoteSourcePlugin::m_pluginDescriptor = {
|
||||||
QString("Daemon channel source"),
|
QString("Remote channel source"),
|
||||||
QString("4.3.2"),
|
QString("4.4.2"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
QString("https://github.com/f4exb/sdrangel")
|
QString("https://github.com/f4exb/sdrangel")
|
||||||
};
|
};
|
||||||
|
|
||||||
DaemonSourcePlugin::DaemonSourcePlugin(QObject* parent) :
|
RemoteSourcePlugin::RemoteSourcePlugin(QObject* parent) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_pluginAPI(0)
|
m_pluginAPI(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const PluginDescriptor& DaemonSourcePlugin::getPluginDescriptor() const
|
const PluginDescriptor& RemoteSourcePlugin::getPluginDescriptor() const
|
||||||
{
|
{
|
||||||
return m_pluginDescriptor;
|
return m_pluginDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourcePlugin::initPlugin(PluginAPI* pluginAPI)
|
void RemoteSourcePlugin::initPlugin(PluginAPI* pluginAPI)
|
||||||
{
|
{
|
||||||
m_pluginAPI = pluginAPI;
|
m_pluginAPI = pluginAPI;
|
||||||
|
|
||||||
// register source
|
// register source
|
||||||
m_pluginAPI->registerTxChannel(DaemonSource::m_channelIdURI, DaemonSource::m_channelId, this);
|
m_pluginAPI->registerTxChannel(RemoteSource::m_channelIdURI, RemoteSource::m_channelId, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERVER_MODE
|
#ifdef SERVER_MODE
|
||||||
PluginInstanceGUI* DaemonSourcePlugin::createTxChannelGUI(
|
PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(
|
||||||
DeviceUISet *deviceUISet __attribute__((unused)),
|
DeviceUISet *deviceUISet __attribute__((unused)),
|
||||||
BasebandSampleSource *txChannel __attribute__((unused)))
|
BasebandSampleSource *txChannel __attribute__((unused)))
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
PluginInstanceGUI* DaemonSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel)
|
PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel)
|
||||||
{
|
{
|
||||||
return DaemonSourceGUI::create(m_pluginAPI, deviceUISet, txChannel);
|
return RemoteSourceGUI::create(m_pluginAPI, deviceUISet, txChannel);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
BasebandSampleSource* DaemonSourcePlugin::createTxChannelBS(DeviceSinkAPI *deviceAPI)
|
BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceSinkAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
return new DaemonSource(deviceAPI);
|
return new RemoteSource(deviceAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
ChannelSourceAPI* DaemonSourcePlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI)
|
ChannelSourceAPI* RemoteSourcePlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI)
|
||||||
{
|
{
|
||||||
return new DaemonSource(deviceAPI);
|
return new RemoteSource(deviceAPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// 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/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_
|
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_
|
||||||
#define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_
|
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "plugin/plugininterface.h"
|
#include "plugin/plugininterface.h"
|
||||||
@ -23,13 +23,13 @@
|
|||||||
class DeviceUISet;
|
class DeviceUISet;
|
||||||
class BasebandSampleSource;
|
class BasebandSampleSource;
|
||||||
|
|
||||||
class DaemonSourcePlugin : public QObject, PluginInterface {
|
class RemoteSourcePlugin : public QObject, PluginInterface {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(PluginInterface)
|
Q_INTERFACES(PluginInterface)
|
||||||
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.daemonsrc")
|
Q_PLUGIN_METADATA(IID "sdrangel.channeltx.remotesrc")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit DaemonSourcePlugin(QObject* parent = 0);
|
explicit RemoteSourcePlugin(QObject* parent = 0);
|
||||||
|
|
||||||
const PluginDescriptor& getPluginDescriptor() const;
|
const PluginDescriptor& getPluginDescriptor() const;
|
||||||
void initPlugin(PluginAPI* pluginAPI);
|
void initPlugin(PluginAPI* pluginAPI);
|
||||||
@ -44,4 +44,4 @@ private:
|
|||||||
PluginAPI* m_pluginAPI;
|
PluginAPI* m_pluginAPI;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_ */
|
#endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_ */
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -14,23 +14,25 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "remotesourcesettings.h"
|
||||||
|
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
#include "util/simpleserializer.h"
|
#include "util/simpleserializer.h"
|
||||||
#include "settings/serializable.h"
|
#include "settings/serializable.h"
|
||||||
#include "daemonsourcesettings.h"
|
|
||||||
|
|
||||||
DaemonSourceSettings::DaemonSourceSettings()
|
|
||||||
|
RemoteSourceSettings::RemoteSourceSettings()
|
||||||
{
|
{
|
||||||
resetToDefaults();
|
resetToDefaults();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceSettings::resetToDefaults()
|
void RemoteSourceSettings::resetToDefaults()
|
||||||
{
|
{
|
||||||
m_dataAddress = "127.0.0.1";
|
m_dataAddress = "127.0.0.1";
|
||||||
m_dataPort = 9090;
|
m_dataPort = 9090;
|
||||||
m_rgbColor = QColor(140, 4, 4).rgb();
|
m_rgbColor = QColor(140, 4, 4).rgb();
|
||||||
m_title = "Daemon source";
|
m_title = "Remote source";
|
||||||
m_channelMarker = nullptr;
|
m_channelMarker = nullptr;
|
||||||
m_useReverseAPI = false;
|
m_useReverseAPI = false;
|
||||||
m_reverseAPIAddress = "127.0.0.1";
|
m_reverseAPIAddress = "127.0.0.1";
|
||||||
@ -39,7 +41,7 @@ void DaemonSourceSettings::resetToDefaults()
|
|||||||
m_reverseAPIChannelIndex = 0;
|
m_reverseAPIChannelIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray DaemonSourceSettings::serialize() const
|
QByteArray RemoteSourceSettings::serialize() const
|
||||||
{
|
{
|
||||||
SimpleSerializer s(1);
|
SimpleSerializer s(1);
|
||||||
s.writeString(1, m_dataAddress);
|
s.writeString(1, m_dataAddress);
|
||||||
@ -55,7 +57,7 @@ QByteArray DaemonSourceSettings::serialize() const
|
|||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DaemonSourceSettings::deserialize(const QByteArray& data)
|
bool RemoteSourceSettings::deserialize(const QByteArray& data)
|
||||||
{
|
{
|
||||||
SimpleDeserializer d(data);
|
SimpleDeserializer d(data);
|
||||||
|
|
||||||
@ -80,7 +82,7 @@ bool DaemonSourceSettings::deserialize(const QByteArray& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
d.readU32(3, &m_rgbColor, QColor(0, 255, 255).rgb());
|
d.readU32(3, &m_rgbColor, QColor(0, 255, 255).rgb());
|
||||||
d.readString(4, &m_title, "Daemon source");
|
d.readString(4, &m_title, "Remote source");
|
||||||
d.readBool(5, &m_useReverseAPI, false);
|
d.readBool(5, &m_useReverseAPI, false);
|
||||||
d.readString(6, &m_reverseAPIAddress, "127.0.0.1");
|
d.readString(6, &m_reverseAPIAddress, "127.0.0.1");
|
||||||
d.readU32(7, &tmp, 0);
|
d.readU32(7, &tmp, 0);
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -14,15 +14,15 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_
|
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_
|
||||||
#define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_
|
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
|
|
||||||
class Serializable;
|
class Serializable;
|
||||||
|
|
||||||
struct DaemonSourceSettings
|
struct RemoteSourceSettings
|
||||||
{
|
{
|
||||||
QString m_dataAddress; //!< Listening (local) data address
|
QString m_dataAddress; //!< Listening (local) data address
|
||||||
uint16_t m_dataPort; //!< Listening data port
|
uint16_t m_dataPort; //!< Listening data port
|
||||||
@ -36,11 +36,11 @@ struct DaemonSourceSettings
|
|||||||
|
|
||||||
Serializable *m_channelMarker;
|
Serializable *m_channelMarker;
|
||||||
|
|
||||||
DaemonSourceSettings();
|
RemoteSourceSettings();
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; }
|
||||||
QByteArray serialize() const;
|
QByteArray serialize() const;
|
||||||
bool deserialize(const QByteArray& data);
|
bool deserialize(const QByteArray& data);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_ */
|
#endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_ */
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// it under the terms of the GNU General Public License as published by //
|
||||||
@ -14,6 +14,8 @@
|
|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "remotesourcethread.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <QUdpSocket>
|
#include <QUdpSocket>
|
||||||
@ -22,12 +24,11 @@
|
|||||||
#include "channel/sdrdaemondataqueue.h"
|
#include "channel/sdrdaemondataqueue.h"
|
||||||
#include "channel/sdrdaemondatablock.h"
|
#include "channel/sdrdaemondatablock.h"
|
||||||
|
|
||||||
#include "daemonsourcethread.h"
|
|
||||||
|
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSourceThread::MsgStartStop, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSourceThread::MsgStartStop, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(DaemonSourceThread::MsgDataBind, Message)
|
MESSAGE_CLASS_DEFINITION(RemoteSourceThread::MsgDataBind, Message)
|
||||||
|
|
||||||
DaemonSourceThread::DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent) :
|
RemoteSourceThread::RemoteSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent) :
|
||||||
QThread(parent),
|
QThread(parent),
|
||||||
m_running(false),
|
m_running(false),
|
||||||
m_dataQueue(dataQueue),
|
m_dataQueue(dataQueue),
|
||||||
@ -38,26 +39,26 @@ DaemonSourceThread::DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* p
|
|||||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
DaemonSourceThread::~DaemonSourceThread()
|
RemoteSourceThread::~RemoteSourceThread()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSourceThread::~DaemonSourceThread");
|
qDebug("RemoteSourceThread::~RemoteSourceThread");
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::startStop(bool start)
|
void RemoteSourceThread::startStop(bool start)
|
||||||
{
|
{
|
||||||
MsgStartStop *msg = MsgStartStop::create(start);
|
MsgStartStop *msg = MsgStartStop::create(start);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::dataBind(const QString& address, uint16_t port)
|
void RemoteSourceThread::dataBind(const QString& address, uint16_t port)
|
||||||
{
|
{
|
||||||
MsgDataBind *msg = MsgDataBind::create(address, port);
|
MsgDataBind *msg = MsgDataBind::create(address, port);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::startWork()
|
void RemoteSourceThread::startWork()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSourceThread::startWork");
|
qDebug("RemoteSourceThread::startWork");
|
||||||
m_startWaitMutex.lock();
|
m_startWaitMutex.lock();
|
||||||
m_socket = new QUdpSocket(this);
|
m_socket = new QUdpSocket(this);
|
||||||
start();
|
start();
|
||||||
@ -66,18 +67,18 @@ void DaemonSourceThread::startWork()
|
|||||||
m_startWaitMutex.unlock();
|
m_startWaitMutex.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::stopWork()
|
void RemoteSourceThread::stopWork()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSourceThread::stopWork");
|
qDebug("RemoteSourceThread::stopWork");
|
||||||
delete m_socket;
|
delete m_socket;
|
||||||
m_socket = 0;
|
m_socket = 0;
|
||||||
m_running = false;
|
m_running = false;
|
||||||
wait();
|
wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::run()
|
void RemoteSourceThread::run()
|
||||||
{
|
{
|
||||||
qDebug("DaemonSourceThread::run: begin");
|
qDebug("RemoteSourceThread::run: begin");
|
||||||
m_running = true;
|
m_running = true;
|
||||||
m_startWaiter.wakeAll();
|
m_startWaiter.wakeAll();
|
||||||
|
|
||||||
@ -87,11 +88,11 @@ void DaemonSourceThread::run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_running = false;
|
m_running = false;
|
||||||
qDebug("DaemonSourceThread::run: end");
|
qDebug("RemoteSourceThread::run: end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DaemonSourceThread::handleInputMessages()
|
void RemoteSourceThread::handleInputMessages()
|
||||||
{
|
{
|
||||||
Message* message;
|
Message* message;
|
||||||
|
|
||||||
@ -100,7 +101,7 @@ void DaemonSourceThread::handleInputMessages()
|
|||||||
if (MsgStartStop::match(*message))
|
if (MsgStartStop::match(*message))
|
||||||
{
|
{
|
||||||
MsgStartStop* notif = (MsgStartStop*) message;
|
MsgStartStop* notif = (MsgStartStop*) message;
|
||||||
qDebug("DaemonSourceThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop");
|
qDebug("RemoteSourceThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop");
|
||||||
|
|
||||||
if (notif->getStartStop()) {
|
if (notif->getStartStop()) {
|
||||||
startWork();
|
startWork();
|
||||||
@ -113,7 +114,7 @@ void DaemonSourceThread::handleInputMessages()
|
|||||||
else if (MsgDataBind::match(*message))
|
else if (MsgDataBind::match(*message))
|
||||||
{
|
{
|
||||||
MsgDataBind* notif = (MsgDataBind*) message;
|
MsgDataBind* notif = (MsgDataBind*) message;
|
||||||
qDebug("DaemonSourceThread::handleInputMessages: MsgDataBind: %s:%d", qPrintable(notif->getAddress().toString()), notif->getPort());
|
qDebug("RemoteSourceThread::handleInputMessages: MsgDataBind: %s:%d", qPrintable(notif->getAddress().toString()), notif->getPort());
|
||||||
|
|
||||||
if (m_socket)
|
if (m_socket)
|
||||||
{
|
{
|
||||||
@ -125,7 +126,7 @@ void DaemonSourceThread::handleInputMessages()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonSourceThread::readPendingDatagrams()
|
void RemoteSourceThread::readPendingDatagrams()
|
||||||
{
|
{
|
||||||
SDRDaemonSuperBlock superBlock;
|
SDRDaemonSuperBlock superBlock;
|
||||||
qint64 size;
|
qint64 size;
|
||||||
@ -181,7 +182,7 @@ void DaemonSourceThread::readPendingDatagrams()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qWarning("DaemonSourceThread::readPendingDatagrams: wrong super block size not processing");
|
qWarning("RemoteSourceThread::readPendingDatagrams: wrong super block size not processing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Copyright (C) 2018 Edouard Griffiths, F4EXB //
|
// Copyright (C) 2018-2019 Edouard Griffiths, F4EXB //
|
||||||
// //
|
// //
|
||||||
// This program is free software; you can redistribute it and/or modify //
|
// 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 //
|
// 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/>. //
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_
|
#ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_
|
||||||
#define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_
|
#define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_
|
||||||
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
@ -29,7 +29,7 @@ class SDRDaemonDataQueue;
|
|||||||
class SDRDaemonDataBlock;
|
class SDRDaemonDataBlock;
|
||||||
class QUdpSocket;
|
class QUdpSocket;
|
||||||
|
|
||||||
class DaemonSourceThread : public QThread {
|
class RemoteSourceThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
class MsgStartStop : public Message {
|
class MsgStartStop : public Message {
|
||||||
@ -74,8 +74,8 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent = 0);
|
RemoteSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent = 0);
|
||||||
~DaemonSourceThread();
|
~RemoteSourceThread();
|
||||||
|
|
||||||
void startStop(bool start);
|
void startStop(bool start);
|
||||||
void dataBind(const QString& address, uint16_t port);
|
void dataBind(const QString& address, uint16_t port);
|
||||||
@ -106,4 +106,4 @@ private slots:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_ */
|
#endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_ */
|
@ -8,7 +8,7 @@ add_subdirectory(udpsource)
|
|||||||
|
|
||||||
find_package(CM256cc)
|
find_package(CM256cc)
|
||||||
if(CM256CC_FOUND)
|
if(CM256CC_FOUND)
|
||||||
add_subdirectory(daemonsource)
|
add_subdirectory(remotesource)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(OpenCV)
|
find_package(OpenCV)
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
project(daemonsource)
|
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
||||||
set(PLUGIN_PREFIX "../../../plugins/channeltx/daemonsource")
|
|
||||||
|
|
||||||
set(daemonsource_SOURCES
|
|
||||||
${PLUGIN_PREFIX}/daemonsource.cpp
|
|
||||||
${PLUGIN_PREFIX}/daemonsourcethread.cpp
|
|
||||||
${PLUGIN_PREFIX}/daemonsourceplugin.cpp
|
|
||||||
${PLUGIN_PREFIX}/daemonsourcesettings.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(daemonsource_HEADERS
|
|
||||||
${PLUGIN_PREFIX}/daemonsource.h
|
|
||||||
${PLUGIN_PREFIX}/daemonsourcethread.h
|
|
||||||
${PLUGIN_PREFIX}/daemonsourceplugin.h
|
|
||||||
${PLUGIN_PREFIX}/daemonsourcesettings.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(daemonsourcesrv SHARED
|
|
||||||
${daemonsource_SOURCES}
|
|
||||||
${daemonsource_HEADERS_MOC}
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(daemonsourcesrv
|
|
||||||
${QT_LIBRARIES}
|
|
||||||
${CM256CC_LIBRARIES}
|
|
||||||
sdrbase
|
|
||||||
swagger
|
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(daemonsourcesrv Qt5::Core Qt5::Network)
|
|
||||||
|
|
||||||
install(TARGETS daemonsourcesrv DESTINATION lib/pluginssrv/channeltx)
|
|
46
pluginssrv/channeltx/remotesource/CMakeLists.txt
Normal file
46
pluginssrv/channeltx/remotesource/CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
project(remotesource)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
|
set(PLUGIN_PREFIX "../../../plugins/channeltx/remotesource")
|
||||||
|
|
||||||
|
set(remotesource_SOURCES
|
||||||
|
${PLUGIN_PREFIX}/remotesource.cpp
|
||||||
|
${PLUGIN_PREFIX}/remotesourcethread.cpp
|
||||||
|
${PLUGIN_PREFIX}/remotesourceplugin.cpp
|
||||||
|
${PLUGIN_PREFIX}/remotesourcesettings.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(remotesource_HEADERS
|
||||||
|
${PLUGIN_PREFIX}/remotesource.h
|
||||||
|
${PLUGIN_PREFIX}/remotesourcethread.h
|
||||||
|
${PLUGIN_PREFIX}/remotesourceplugin.h
|
||||||
|
${PLUGIN_PREFIX}/remotesourcesettings.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(remotesourcesrv SHARED
|
||||||
|
${remotesource_SOURCES}
|
||||||
|
${remotesource_HEADERS_MOC}
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(remotesourcesrv
|
||||||
|
${QT_LIBRARIES}
|
||||||
|
${CM256CC_LIBRARIES}
|
||||||
|
sdrbase
|
||||||
|
swagger
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(remotesourcesrv Qt5::Core Qt5::Network)
|
||||||
|
|
||||||
|
install(TARGETS remotesourcesrv DESTINATION lib/pluginssrv/channeltx)
|
@ -23,7 +23,7 @@
|
|||||||
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
|
<file>webapi/doc/swagger/include/PlutoSdr.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
<file>webapi/doc/swagger/include/RtlSdr.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/RemoteSink.yaml</file>
|
<file>webapi/doc/swagger/include/RemoteSink.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/DaemonSource.yaml</file>
|
<file>webapi/doc/swagger/include/RemoteSource.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file>
|
<file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/SDRDaemonSink.yaml</file>
|
<file>webapi/doc/swagger/include/SDRDaemonSink.yaml</file>
|
||||||
<file>webapi/doc/swagger/include/SDRPlay.yaml</file>
|
<file>webapi/doc/swagger/include/SDRPlay.yaml</file>
|
||||||
|
@ -1759,8 +1759,8 @@ margin-bottom: 20px;
|
|||||||
"SSBDemodReport" : {
|
"SSBDemodReport" : {
|
||||||
"$ref" : "#/definitions/SSBDemodReport"
|
"$ref" : "#/definitions/SSBDemodReport"
|
||||||
},
|
},
|
||||||
"DaemonSourceReport" : {
|
"RemoteSourceReport" : {
|
||||||
"$ref" : "#/definitions/DaemonSourceReport"
|
"$ref" : "#/definitions/RemoteSourceReport"
|
||||||
},
|
},
|
||||||
"SSBModReport" : {
|
"SSBModReport" : {
|
||||||
"$ref" : "#/definitions/SSBModReport"
|
"$ref" : "#/definitions/SSBModReport"
|
||||||
@ -1816,8 +1816,8 @@ margin-bottom: 20px;
|
|||||||
"RemoteSinkSettings" : {
|
"RemoteSinkSettings" : {
|
||||||
"$ref" : "#/definitions/RemoteSinkSettings"
|
"$ref" : "#/definitions/RemoteSinkSettings"
|
||||||
},
|
},
|
||||||
"DaemonSourceSettings" : {
|
"RemoteSourceSettings" : {
|
||||||
"$ref" : "#/definitions/DaemonSourceSettings"
|
"$ref" : "#/definitions/RemoteSourceSettings"
|
||||||
},
|
},
|
||||||
"SSBModSettings" : {
|
"SSBModSettings" : {
|
||||||
"$ref" : "#/definitions/SSBModSettings"
|
"$ref" : "#/definitions/SSBModSettings"
|
||||||
@ -2047,98 +2047,6 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "DV serial device details"
|
"description" : "DV serial device details"
|
||||||
};
|
|
||||||
defs.DaemonSourceReport = {
|
|
||||||
"properties" : {
|
|
||||||
"queueLength" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Data read/write queue length in number of data frames"
|
|
||||||
},
|
|
||||||
"queueSize" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Data read/write queue size in number of data frames"
|
|
||||||
},
|
|
||||||
"samplesCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute consumed samples count"
|
|
||||||
},
|
|
||||||
"correctableErrorsCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute number of correctable errors"
|
|
||||||
},
|
|
||||||
"uncorrectableErrorsCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute number of uncorrectable errors"
|
|
||||||
},
|
|
||||||
"tvSec" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Counts timestamp seconds"
|
|
||||||
},
|
|
||||||
"tvUSec" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Counts timestamp microseconds"
|
|
||||||
},
|
|
||||||
"nbOriginalBlocks" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Number of original blocks per frame"
|
|
||||||
},
|
|
||||||
"nbFECBlocks" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Number of FEC blocks per frame"
|
|
||||||
},
|
|
||||||
"centerFreq" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Stream center frequency setting in kHz"
|
|
||||||
},
|
|
||||||
"sampleRate" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Stream nominal sample rate in S/s"
|
|
||||||
},
|
|
||||||
"deviceCenterFreq" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Device center frequency in kHz"
|
|
||||||
},
|
|
||||||
"deviceSampleRate" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Device baseband sample rate in S/s"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description" : "Daemon channel source report"
|
|
||||||
};
|
|
||||||
defs.DaemonSourceSettings = {
|
|
||||||
"properties" : {
|
|
||||||
"dataAddress" : {
|
|
||||||
"type" : "string",
|
|
||||||
"description" : "Remote USB data address"
|
|
||||||
},
|
|
||||||
"dataPort" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Remote USB data port"
|
|
||||||
},
|
|
||||||
"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 source settings"
|
|
||||||
};
|
};
|
||||||
defs.DeviceListItem = {
|
defs.DeviceListItem = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -3844,6 +3752,98 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Remote channel sink settings"
|
"description" : "Remote channel sink settings"
|
||||||
|
};
|
||||||
|
defs.RemoteSourceReport = {
|
||||||
|
"properties" : {
|
||||||
|
"queueLength" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Data read/write queue length in number of data frames"
|
||||||
|
},
|
||||||
|
"queueSize" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Data read/write queue size in number of data frames"
|
||||||
|
},
|
||||||
|
"samplesCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute consumed samples count"
|
||||||
|
},
|
||||||
|
"correctableErrorsCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute number of correctable errors"
|
||||||
|
},
|
||||||
|
"uncorrectableErrorsCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute number of uncorrectable errors"
|
||||||
|
},
|
||||||
|
"tvSec" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Counts timestamp seconds"
|
||||||
|
},
|
||||||
|
"tvUSec" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Counts timestamp microseconds"
|
||||||
|
},
|
||||||
|
"nbOriginalBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Number of original blocks per frame"
|
||||||
|
},
|
||||||
|
"nbFECBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Number of FEC blocks per frame"
|
||||||
|
},
|
||||||
|
"centerFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Stream center frequency setting in kHz"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Stream nominal sample rate in S/s"
|
||||||
|
},
|
||||||
|
"deviceCenterFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device center frequency in kHz"
|
||||||
|
},
|
||||||
|
"deviceSampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device baseband sample rate in S/s"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "Remote channel source report"
|
||||||
|
};
|
||||||
|
defs.RemoteSourceSettings = {
|
||||||
|
"properties" : {
|
||||||
|
"dataAddress" : {
|
||||||
|
"type" : "string",
|
||||||
|
"description" : "Remote USB data address"
|
||||||
|
},
|
||||||
|
"dataPort" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Remote USB data port"
|
||||||
|
},
|
||||||
|
"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 source settings"
|
||||||
};
|
};
|
||||||
defs.RtlSdrReport = {
|
defs.RtlSdrReport = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2019-01-22T23:24:38.456+01:00
|
Generated 2019-01-23T00:24:46.985+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
DaemonSourceSettings:
|
RemoteSourceSettings:
|
||||||
description: "Daemon channel source settings"
|
description: "Remote channel source settings"
|
||||||
properties:
|
properties:
|
||||||
dataAddress:
|
dataAddress:
|
||||||
description: "Remote USB data address"
|
description: "Remote USB data address"
|
||||||
@ -23,8 +23,8 @@ DaemonSourceSettings:
|
|||||||
reverseAPIChannelIndex:
|
reverseAPIChannelIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
||||||
DaemonSourceReport:
|
RemoteSourceReport:
|
||||||
description: "Daemon channel source report"
|
description: "Remote channel source report"
|
||||||
properties:
|
properties:
|
||||||
queueLength:
|
queueLength:
|
||||||
description: "Data read/write queue length in number of data frames"
|
description: "Data read/write queue length in number of data frames"
|
@ -1890,8 +1890,8 @@ definitions:
|
|||||||
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings"
|
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings"
|
||||||
RemoteSinkSettings:
|
RemoteSinkSettings:
|
||||||
$ref: "/doc/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
$ref: "/doc/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
||||||
DaemonSourceSettings:
|
RemoteSourceSettings:
|
||||||
$ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceSettings"
|
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceSettings"
|
||||||
SSBModSettings:
|
SSBModSettings:
|
||||||
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings"
|
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings"
|
||||||
SSBDemodSettings:
|
SSBDemodSettings:
|
||||||
@ -1931,8 +1931,8 @@ definitions:
|
|||||||
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport"
|
$ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport"
|
||||||
SSBDemodReport:
|
SSBDemodReport:
|
||||||
$ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport"
|
$ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport"
|
||||||
DaemonSourceReport:
|
RemoteSourceReport:
|
||||||
$ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceReport"
|
$ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
||||||
SSBModReport:
|
SSBModReport:
|
||||||
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport"
|
$ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport"
|
||||||
UDPSourceReport:
|
UDPSourceReport:
|
||||||
|
@ -2266,14 +2266,14 @@ bool WebAPIRequestMapper::validateChannelSettings(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*channelType == "DaemonSource")
|
else if (*channelType == "RemoteSource")
|
||||||
{
|
{
|
||||||
if (channelSettings.getTx() != 0)
|
if (channelSettings.getTx() != 0)
|
||||||
{
|
{
|
||||||
QJsonObject daemonChannelSourceSettingsJsonObject = jsonObject["DaemonSourceSettings"].toObject();
|
QJsonObject remoteChannelSourceSettingsJsonObject = jsonObject["RemoteSourceSettings"].toObject();
|
||||||
channelSettingsKeys = daemonChannelSourceSettingsJsonObject.keys();
|
channelSettingsKeys = remoteChannelSourceSettingsJsonObject.keys();
|
||||||
channelSettings.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings());
|
channelSettings.setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings());
|
||||||
channelSettings.getDaemonSourceSettings()->fromJsonObject(daemonChannelSourceSettingsJsonObject);
|
channelSettings.getRemoteSourceSettings()->fromJsonObject(remoteChannelSourceSettingsJsonObject);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -2519,7 +2519,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings&
|
|||||||
channelSettings.setNfmDemodSettings(0);
|
channelSettings.setNfmDemodSettings(0);
|
||||||
channelSettings.setNfmModSettings(0);
|
channelSettings.setNfmModSettings(0);
|
||||||
channelSettings.setRemoteSinkSettings(0);
|
channelSettings.setRemoteSinkSettings(0);
|
||||||
channelSettings.setDaemonSourceSettings(0);
|
channelSettings.setRemoteSourceSettings(0);
|
||||||
channelSettings.setSsbDemodSettings(0);
|
channelSettings.setSsbDemodSettings(0);
|
||||||
channelSettings.setSsbModSettings(0);
|
channelSettings.setSsbModSettings(0);
|
||||||
channelSettings.setUdpSourceSettings(0);
|
channelSettings.setUdpSourceSettings(0);
|
||||||
@ -2539,7 +2539,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan
|
|||||||
channelReport.setDsdDemodReport(0);
|
channelReport.setDsdDemodReport(0);
|
||||||
channelReport.setNfmDemodReport(0);
|
channelReport.setNfmDemodReport(0);
|
||||||
channelReport.setNfmModReport(0);
|
channelReport.setNfmModReport(0);
|
||||||
channelReport.setDaemonSourceReport(0);
|
channelReport.setRemoteSourceReport(0);
|
||||||
channelReport.setSsbDemodReport(0);
|
channelReport.setSsbDemodReport(0);
|
||||||
channelReport.setSsbModReport(0);
|
channelReport.setSsbModReport(0);
|
||||||
channelReport.setUdpSourceReport(0);
|
channelReport.setUdpSourceReport(0);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
DaemonSourceSettings:
|
RemoteSourceSettings:
|
||||||
description: "Daemon channel source settings"
|
description: "Remote channel source settings"
|
||||||
properties:
|
properties:
|
||||||
dataAddress:
|
dataAddress:
|
||||||
description: "Remote USB data address"
|
description: "Remote USB data address"
|
||||||
@ -23,8 +23,8 @@ DaemonSourceSettings:
|
|||||||
reverseAPIChannelIndex:
|
reverseAPIChannelIndex:
|
||||||
type: integer
|
type: integer
|
||||||
|
|
||||||
DaemonSourceReport:
|
RemoteSourceReport:
|
||||||
description: "Daemon channel source report"
|
description: "Remote channel source report"
|
||||||
properties:
|
properties:
|
||||||
queueLength:
|
queueLength:
|
||||||
description: "Data read/write queue length in number of data frames"
|
description: "Data read/write queue length in number of data frames"
|
@ -1890,8 +1890,8 @@ definitions:
|
|||||||
$ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings"
|
$ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings"
|
||||||
RemoteSinkSettings:
|
RemoteSinkSettings:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
$ref: "http://localhost:8081/api/swagger/include/RemoteSink.yaml#/RemoteSinkSettings"
|
||||||
DaemonSourceSettings:
|
RemoteSourceSettings:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceSettings"
|
$ref: "http://localhost:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceSettings"
|
||||||
SSBModSettings:
|
SSBModSettings:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings"
|
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings"
|
||||||
SSBDemodSettings:
|
SSBDemodSettings:
|
||||||
@ -1931,8 +1931,8 @@ definitions:
|
|||||||
$ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModReport"
|
$ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModReport"
|
||||||
SSBDemodReport:
|
SSBDemodReport:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport"
|
$ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport"
|
||||||
DaemonSourceReport:
|
RemoteSourceReport:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceReport"
|
$ref: "http://localhost:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport"
|
||||||
SSBModReport:
|
SSBModReport:
|
||||||
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport"
|
$ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport"
|
||||||
UDPSourceReport:
|
UDPSourceReport:
|
||||||
|
@ -1759,8 +1759,8 @@ margin-bottom: 20px;
|
|||||||
"SSBDemodReport" : {
|
"SSBDemodReport" : {
|
||||||
"$ref" : "#/definitions/SSBDemodReport"
|
"$ref" : "#/definitions/SSBDemodReport"
|
||||||
},
|
},
|
||||||
"DaemonSourceReport" : {
|
"RemoteSourceReport" : {
|
||||||
"$ref" : "#/definitions/DaemonSourceReport"
|
"$ref" : "#/definitions/RemoteSourceReport"
|
||||||
},
|
},
|
||||||
"SSBModReport" : {
|
"SSBModReport" : {
|
||||||
"$ref" : "#/definitions/SSBModReport"
|
"$ref" : "#/definitions/SSBModReport"
|
||||||
@ -1816,8 +1816,8 @@ margin-bottom: 20px;
|
|||||||
"RemoteSinkSettings" : {
|
"RemoteSinkSettings" : {
|
||||||
"$ref" : "#/definitions/RemoteSinkSettings"
|
"$ref" : "#/definitions/RemoteSinkSettings"
|
||||||
},
|
},
|
||||||
"DaemonSourceSettings" : {
|
"RemoteSourceSettings" : {
|
||||||
"$ref" : "#/definitions/DaemonSourceSettings"
|
"$ref" : "#/definitions/RemoteSourceSettings"
|
||||||
},
|
},
|
||||||
"SSBModSettings" : {
|
"SSBModSettings" : {
|
||||||
"$ref" : "#/definitions/SSBModSettings"
|
"$ref" : "#/definitions/SSBModSettings"
|
||||||
@ -2047,98 +2047,6 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "DV serial device details"
|
"description" : "DV serial device details"
|
||||||
};
|
|
||||||
defs.DaemonSourceReport = {
|
|
||||||
"properties" : {
|
|
||||||
"queueLength" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Data read/write queue length in number of data frames"
|
|
||||||
},
|
|
||||||
"queueSize" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Data read/write queue size in number of data frames"
|
|
||||||
},
|
|
||||||
"samplesCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute consumed samples count"
|
|
||||||
},
|
|
||||||
"correctableErrorsCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute number of correctable errors"
|
|
||||||
},
|
|
||||||
"uncorrectableErrorsCount" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Absolute number of uncorrectable errors"
|
|
||||||
},
|
|
||||||
"tvSec" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Counts timestamp seconds"
|
|
||||||
},
|
|
||||||
"tvUSec" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Counts timestamp microseconds"
|
|
||||||
},
|
|
||||||
"nbOriginalBlocks" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Number of original blocks per frame"
|
|
||||||
},
|
|
||||||
"nbFECBlocks" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Number of FEC blocks per frame"
|
|
||||||
},
|
|
||||||
"centerFreq" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Stream center frequency setting in kHz"
|
|
||||||
},
|
|
||||||
"sampleRate" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Stream nominal sample rate in S/s"
|
|
||||||
},
|
|
||||||
"deviceCenterFreq" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Device center frequency in kHz"
|
|
||||||
},
|
|
||||||
"deviceSampleRate" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Device baseband sample rate in S/s"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"description" : "Daemon channel source report"
|
|
||||||
};
|
|
||||||
defs.DaemonSourceSettings = {
|
|
||||||
"properties" : {
|
|
||||||
"dataAddress" : {
|
|
||||||
"type" : "string",
|
|
||||||
"description" : "Remote USB data address"
|
|
||||||
},
|
|
||||||
"dataPort" : {
|
|
||||||
"type" : "integer",
|
|
||||||
"description" : "Remote USB data port"
|
|
||||||
},
|
|
||||||
"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 source settings"
|
|
||||||
};
|
};
|
||||||
defs.DeviceListItem = {
|
defs.DeviceListItem = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -3844,6 +3752,98 @@ margin-bottom: 20px;
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "Remote channel sink settings"
|
"description" : "Remote channel sink settings"
|
||||||
|
};
|
||||||
|
defs.RemoteSourceReport = {
|
||||||
|
"properties" : {
|
||||||
|
"queueLength" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Data read/write queue length in number of data frames"
|
||||||
|
},
|
||||||
|
"queueSize" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Data read/write queue size in number of data frames"
|
||||||
|
},
|
||||||
|
"samplesCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute consumed samples count"
|
||||||
|
},
|
||||||
|
"correctableErrorsCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute number of correctable errors"
|
||||||
|
},
|
||||||
|
"uncorrectableErrorsCount" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Absolute number of uncorrectable errors"
|
||||||
|
},
|
||||||
|
"tvSec" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Counts timestamp seconds"
|
||||||
|
},
|
||||||
|
"tvUSec" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Counts timestamp microseconds"
|
||||||
|
},
|
||||||
|
"nbOriginalBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Number of original blocks per frame"
|
||||||
|
},
|
||||||
|
"nbFECBlocks" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Number of FEC blocks per frame"
|
||||||
|
},
|
||||||
|
"centerFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Stream center frequency setting in kHz"
|
||||||
|
},
|
||||||
|
"sampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Stream nominal sample rate in S/s"
|
||||||
|
},
|
||||||
|
"deviceCenterFreq" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device center frequency in kHz"
|
||||||
|
},
|
||||||
|
"deviceSampleRate" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Device baseband sample rate in S/s"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"description" : "Remote channel source report"
|
||||||
|
};
|
||||||
|
defs.RemoteSourceSettings = {
|
||||||
|
"properties" : {
|
||||||
|
"dataAddress" : {
|
||||||
|
"type" : "string",
|
||||||
|
"description" : "Remote USB data address"
|
||||||
|
},
|
||||||
|
"dataPort" : {
|
||||||
|
"type" : "integer",
|
||||||
|
"description" : "Remote USB data port"
|
||||||
|
},
|
||||||
|
"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 source settings"
|
||||||
};
|
};
|
||||||
defs.RtlSdrReport = {
|
defs.RtlSdrReport = {
|
||||||
"properties" : {
|
"properties" : {
|
||||||
@ -24373,7 +24373,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2019-01-22T23:24:38.456+01:00
|
Generated 2019-01-23T00:24:46.985+01:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -48,8 +48,8 @@ SWGChannelReport::SWGChannelReport() {
|
|||||||
m_nfm_mod_report_isSet = false;
|
m_nfm_mod_report_isSet = false;
|
||||||
ssb_demod_report = nullptr;
|
ssb_demod_report = nullptr;
|
||||||
m_ssb_demod_report_isSet = false;
|
m_ssb_demod_report_isSet = false;
|
||||||
daemon_source_report = nullptr;
|
remote_source_report = nullptr;
|
||||||
m_daemon_source_report_isSet = false;
|
m_remote_source_report_isSet = false;
|
||||||
ssb_mod_report = nullptr;
|
ssb_mod_report = nullptr;
|
||||||
m_ssb_mod_report_isSet = false;
|
m_ssb_mod_report_isSet = false;
|
||||||
udp_source_report = nullptr;
|
udp_source_report = nullptr;
|
||||||
@ -88,8 +88,8 @@ SWGChannelReport::init() {
|
|||||||
m_nfm_mod_report_isSet = false;
|
m_nfm_mod_report_isSet = false;
|
||||||
ssb_demod_report = new SWGSSBDemodReport();
|
ssb_demod_report = new SWGSSBDemodReport();
|
||||||
m_ssb_demod_report_isSet = false;
|
m_ssb_demod_report_isSet = false;
|
||||||
daemon_source_report = new SWGDaemonSourceReport();
|
remote_source_report = new SWGRemoteSourceReport();
|
||||||
m_daemon_source_report_isSet = false;
|
m_remote_source_report_isSet = false;
|
||||||
ssb_mod_report = new SWGSSBModReport();
|
ssb_mod_report = new SWGSSBModReport();
|
||||||
m_ssb_mod_report_isSet = false;
|
m_ssb_mod_report_isSet = false;
|
||||||
udp_source_report = new SWGUDPSourceReport();
|
udp_source_report = new SWGUDPSourceReport();
|
||||||
@ -132,8 +132,8 @@ SWGChannelReport::cleanup() {
|
|||||||
if(ssb_demod_report != nullptr) {
|
if(ssb_demod_report != nullptr) {
|
||||||
delete ssb_demod_report;
|
delete ssb_demod_report;
|
||||||
}
|
}
|
||||||
if(daemon_source_report != nullptr) {
|
if(remote_source_report != nullptr) {
|
||||||
delete daemon_source_report;
|
delete remote_source_report;
|
||||||
}
|
}
|
||||||
if(ssb_mod_report != nullptr) {
|
if(ssb_mod_report != nullptr) {
|
||||||
delete ssb_mod_report;
|
delete ssb_mod_report;
|
||||||
@ -183,7 +183,7 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport");
|
::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&daemon_source_report, pJson["DaemonSourceReport"], "SWGDaemonSourceReport", "SWGDaemonSourceReport");
|
::SWGSDRangel::setValue(&remote_source_report, pJson["RemoteSourceReport"], "SWGRemoteSourceReport", "SWGRemoteSourceReport");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport");
|
::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport");
|
||||||
|
|
||||||
@ -241,8 +241,8 @@ SWGChannelReport::asJsonObject() {
|
|||||||
if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){
|
if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){
|
||||||
toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport"));
|
toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport"));
|
||||||
}
|
}
|
||||||
if((daemon_source_report != nullptr) && (daemon_source_report->isSet())){
|
if((remote_source_report != nullptr) && (remote_source_report->isSet())){
|
||||||
toJsonValue(QString("DaemonSourceReport"), daemon_source_report, obj, QString("SWGDaemonSourceReport"));
|
toJsonValue(QString("RemoteSourceReport"), remote_source_report, obj, QString("SWGRemoteSourceReport"));
|
||||||
}
|
}
|
||||||
if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){
|
if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){
|
||||||
toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport"));
|
toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport"));
|
||||||
@ -363,14 +363,14 @@ SWGChannelReport::setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report) {
|
|||||||
this->m_ssb_demod_report_isSet = true;
|
this->m_ssb_demod_report_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport*
|
SWGRemoteSourceReport*
|
||||||
SWGChannelReport::getDaemonSourceReport() {
|
SWGChannelReport::getRemoteSourceReport() {
|
||||||
return daemon_source_report;
|
return remote_source_report;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGChannelReport::setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report) {
|
SWGChannelReport::setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report) {
|
||||||
this->daemon_source_report = daemon_source_report;
|
this->remote_source_report = remote_source_report;
|
||||||
this->m_daemon_source_report_isSet = true;
|
this->m_remote_source_report_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGSSBModReport*
|
SWGSSBModReport*
|
||||||
@ -438,7 +438,7 @@ SWGChannelReport::isSet(){
|
|||||||
if(nfm_demod_report != nullptr && nfm_demod_report->isSet()){ isObjectUpdated = true; break;}
|
if(nfm_demod_report != nullptr && nfm_demod_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(nfm_mod_report != nullptr && nfm_mod_report->isSet()){ isObjectUpdated = true; break;}
|
if(nfm_mod_report != nullptr && nfm_mod_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(ssb_demod_report != nullptr && ssb_demod_report->isSet()){ isObjectUpdated = true; break;}
|
if(ssb_demod_report != nullptr && ssb_demod_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(daemon_source_report != nullptr && daemon_source_report->isSet()){ isObjectUpdated = true; break;}
|
if(remote_source_report != nullptr && remote_source_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(ssb_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;}
|
if(ssb_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(udp_source_report != nullptr && udp_source_report->isSet()){ isObjectUpdated = true; break;}
|
if(udp_source_report != nullptr && udp_source_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(udp_sink_report != nullptr && udp_sink_report->isSet()){ isObjectUpdated = true; break;}
|
if(udp_sink_report != nullptr && udp_sink_report->isSet()){ isObjectUpdated = true; break;}
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
#include "SWGATVModReport.h"
|
#include "SWGATVModReport.h"
|
||||||
#include "SWGBFMDemodReport.h"
|
#include "SWGBFMDemodReport.h"
|
||||||
#include "SWGDSDDemodReport.h"
|
#include "SWGDSDDemodReport.h"
|
||||||
#include "SWGDaemonSourceReport.h"
|
|
||||||
#include "SWGNFMDemodReport.h"
|
#include "SWGNFMDemodReport.h"
|
||||||
#include "SWGNFMModReport.h"
|
#include "SWGNFMModReport.h"
|
||||||
|
#include "SWGRemoteSourceReport.h"
|
||||||
#include "SWGSSBDemodReport.h"
|
#include "SWGSSBDemodReport.h"
|
||||||
#include "SWGSSBModReport.h"
|
#include "SWGSSBModReport.h"
|
||||||
#include "SWGUDPSinkReport.h"
|
#include "SWGUDPSinkReport.h"
|
||||||
@ -86,8 +86,8 @@ public:
|
|||||||
SWGSSBDemodReport* getSsbDemodReport();
|
SWGSSBDemodReport* getSsbDemodReport();
|
||||||
void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report);
|
void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report);
|
||||||
|
|
||||||
SWGDaemonSourceReport* getDaemonSourceReport();
|
SWGRemoteSourceReport* getRemoteSourceReport();
|
||||||
void setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report);
|
void setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report);
|
||||||
|
|
||||||
SWGSSBModReport* getSsbModReport();
|
SWGSSBModReport* getSsbModReport();
|
||||||
void setSsbModReport(SWGSSBModReport* ssb_mod_report);
|
void setSsbModReport(SWGSSBModReport* ssb_mod_report);
|
||||||
@ -138,8 +138,8 @@ private:
|
|||||||
SWGSSBDemodReport* ssb_demod_report;
|
SWGSSBDemodReport* ssb_demod_report;
|
||||||
bool m_ssb_demod_report_isSet;
|
bool m_ssb_demod_report_isSet;
|
||||||
|
|
||||||
SWGDaemonSourceReport* daemon_source_report;
|
SWGRemoteSourceReport* remote_source_report;
|
||||||
bool m_daemon_source_report_isSet;
|
bool m_remote_source_report_isSet;
|
||||||
|
|
||||||
SWGSSBModReport* ssb_mod_report;
|
SWGSSBModReport* ssb_mod_report;
|
||||||
bool m_ssb_mod_report_isSet;
|
bool m_ssb_mod_report_isSet;
|
||||||
|
@ -48,8 +48,8 @@ SWGChannelSettings::SWGChannelSettings() {
|
|||||||
m_nfm_mod_settings_isSet = false;
|
m_nfm_mod_settings_isSet = false;
|
||||||
remote_sink_settings = nullptr;
|
remote_sink_settings = nullptr;
|
||||||
m_remote_sink_settings_isSet = false;
|
m_remote_sink_settings_isSet = false;
|
||||||
daemon_source_settings = nullptr;
|
remote_source_settings = nullptr;
|
||||||
m_daemon_source_settings_isSet = false;
|
m_remote_source_settings_isSet = false;
|
||||||
ssb_mod_settings = nullptr;
|
ssb_mod_settings = nullptr;
|
||||||
m_ssb_mod_settings_isSet = false;
|
m_ssb_mod_settings_isSet = false;
|
||||||
ssb_demod_settings = nullptr;
|
ssb_demod_settings = nullptr;
|
||||||
@ -90,8 +90,8 @@ SWGChannelSettings::init() {
|
|||||||
m_nfm_mod_settings_isSet = false;
|
m_nfm_mod_settings_isSet = false;
|
||||||
remote_sink_settings = new SWGRemoteSinkSettings();
|
remote_sink_settings = new SWGRemoteSinkSettings();
|
||||||
m_remote_sink_settings_isSet = false;
|
m_remote_sink_settings_isSet = false;
|
||||||
daemon_source_settings = new SWGDaemonSourceSettings();
|
remote_source_settings = new SWGRemoteSourceSettings();
|
||||||
m_daemon_source_settings_isSet = false;
|
m_remote_source_settings_isSet = false;
|
||||||
ssb_mod_settings = new SWGSSBModSettings();
|
ssb_mod_settings = new SWGSSBModSettings();
|
||||||
m_ssb_mod_settings_isSet = false;
|
m_ssb_mod_settings_isSet = false;
|
||||||
ssb_demod_settings = new SWGSSBDemodSettings();
|
ssb_demod_settings = new SWGSSBDemodSettings();
|
||||||
@ -136,8 +136,8 @@ SWGChannelSettings::cleanup() {
|
|||||||
if(remote_sink_settings != nullptr) {
|
if(remote_sink_settings != nullptr) {
|
||||||
delete remote_sink_settings;
|
delete remote_sink_settings;
|
||||||
}
|
}
|
||||||
if(daemon_source_settings != nullptr) {
|
if(remote_source_settings != nullptr) {
|
||||||
delete daemon_source_settings;
|
delete remote_source_settings;
|
||||||
}
|
}
|
||||||
if(ssb_mod_settings != nullptr) {
|
if(ssb_mod_settings != nullptr) {
|
||||||
delete ssb_mod_settings;
|
delete ssb_mod_settings;
|
||||||
@ -190,7 +190,7 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings");
|
::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&daemon_source_settings, pJson["DaemonSourceSettings"], "SWGDaemonSourceSettings", "SWGDaemonSourceSettings");
|
::SWGSDRangel::setValue(&remote_source_settings, pJson["RemoteSourceSettings"], "SWGRemoteSourceSettings", "SWGRemoteSourceSettings");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings");
|
::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings");
|
||||||
|
|
||||||
@ -250,8 +250,8 @@ SWGChannelSettings::asJsonObject() {
|
|||||||
if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){
|
if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){
|
||||||
toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings"));
|
toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings"));
|
||||||
}
|
}
|
||||||
if((daemon_source_settings != nullptr) && (daemon_source_settings->isSet())){
|
if((remote_source_settings != nullptr) && (remote_source_settings->isSet())){
|
||||||
toJsonValue(QString("DaemonSourceSettings"), daemon_source_settings, obj, QString("SWGDaemonSourceSettings"));
|
toJsonValue(QString("RemoteSourceSettings"), remote_source_settings, obj, QString("SWGRemoteSourceSettings"));
|
||||||
}
|
}
|
||||||
if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){
|
if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){
|
||||||
toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings"));
|
toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings"));
|
||||||
@ -375,14 +375,14 @@ SWGChannelSettings::setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_set
|
|||||||
this->m_remote_sink_settings_isSet = true;
|
this->m_remote_sink_settings_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceSettings*
|
SWGRemoteSourceSettings*
|
||||||
SWGChannelSettings::getDaemonSourceSettings() {
|
SWGChannelSettings::getRemoteSourceSettings() {
|
||||||
return daemon_source_settings;
|
return remote_source_settings;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGChannelSettings::setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings) {
|
SWGChannelSettings::setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings) {
|
||||||
this->daemon_source_settings = daemon_source_settings;
|
this->remote_source_settings = remote_source_settings;
|
||||||
this->m_daemon_source_settings_isSet = true;
|
this->m_remote_source_settings_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGSSBModSettings*
|
SWGSSBModSettings*
|
||||||
@ -460,7 +460,7 @@ SWGChannelSettings::isSet(){
|
|||||||
if(nfm_demod_settings != nullptr && nfm_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(nfm_mod_settings != nullptr && nfm_mod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(remote_sink_settings != nullptr && remote_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(remote_source_settings != nullptr && remote_source_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(ssb_mod_settings != nullptr && ssb_mod_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;}
|
if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;}
|
if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;}
|
||||||
|
@ -27,10 +27,10 @@
|
|||||||
#include "SWGATVModSettings.h"
|
#include "SWGATVModSettings.h"
|
||||||
#include "SWGBFMDemodSettings.h"
|
#include "SWGBFMDemodSettings.h"
|
||||||
#include "SWGDSDDemodSettings.h"
|
#include "SWGDSDDemodSettings.h"
|
||||||
#include "SWGDaemonSourceSettings.h"
|
|
||||||
#include "SWGNFMDemodSettings.h"
|
#include "SWGNFMDemodSettings.h"
|
||||||
#include "SWGNFMModSettings.h"
|
#include "SWGNFMModSettings.h"
|
||||||
#include "SWGRemoteSinkSettings.h"
|
#include "SWGRemoteSinkSettings.h"
|
||||||
|
#include "SWGRemoteSourceSettings.h"
|
||||||
#include "SWGSSBDemodSettings.h"
|
#include "SWGSSBDemodSettings.h"
|
||||||
#include "SWGSSBModSettings.h"
|
#include "SWGSSBModSettings.h"
|
||||||
#include "SWGUDPSinkSettings.h"
|
#include "SWGUDPSinkSettings.h"
|
||||||
@ -87,8 +87,8 @@ public:
|
|||||||
SWGRemoteSinkSettings* getRemoteSinkSettings();
|
SWGRemoteSinkSettings* getRemoteSinkSettings();
|
||||||
void setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings);
|
void setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings);
|
||||||
|
|
||||||
SWGDaemonSourceSettings* getDaemonSourceSettings();
|
SWGRemoteSourceSettings* getRemoteSourceSettings();
|
||||||
void setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings);
|
void setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings);
|
||||||
|
|
||||||
SWGSSBModSettings* getSsbModSettings();
|
SWGSSBModSettings* getSsbModSettings();
|
||||||
void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings);
|
void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings);
|
||||||
@ -142,8 +142,8 @@ private:
|
|||||||
SWGRemoteSinkSettings* remote_sink_settings;
|
SWGRemoteSinkSettings* remote_sink_settings;
|
||||||
bool m_remote_sink_settings_isSet;
|
bool m_remote_sink_settings_isSet;
|
||||||
|
|
||||||
SWGDaemonSourceSettings* daemon_source_settings;
|
SWGRemoteSourceSettings* remote_source_settings;
|
||||||
bool m_daemon_source_settings_isSet;
|
bool m_remote_source_settings_isSet;
|
||||||
|
|
||||||
SWGSSBModSettings* ssb_mod_settings;
|
SWGSSBModSettings* ssb_mod_settings;
|
||||||
bool m_ssb_mod_settings_isSet;
|
bool m_ssb_mod_settings_isSet;
|
||||||
|
@ -49,8 +49,6 @@
|
|||||||
#include "SWGDSDDemodSettings.h"
|
#include "SWGDSDDemodSettings.h"
|
||||||
#include "SWGDVSeralDevices.h"
|
#include "SWGDVSeralDevices.h"
|
||||||
#include "SWGDVSerialDevice.h"
|
#include "SWGDVSerialDevice.h"
|
||||||
#include "SWGDaemonSourceReport.h"
|
|
||||||
#include "SWGDaemonSourceSettings.h"
|
|
||||||
#include "SWGDeviceListItem.h"
|
#include "SWGDeviceListItem.h"
|
||||||
#include "SWGDeviceReport.h"
|
#include "SWGDeviceReport.h"
|
||||||
#include "SWGDeviceSet.h"
|
#include "SWGDeviceSet.h"
|
||||||
@ -100,6 +98,8 @@
|
|||||||
#include "SWGRange.h"
|
#include "SWGRange.h"
|
||||||
#include "SWGRangeFloat.h"
|
#include "SWGRangeFloat.h"
|
||||||
#include "SWGRemoteSinkSettings.h"
|
#include "SWGRemoteSinkSettings.h"
|
||||||
|
#include "SWGRemoteSourceReport.h"
|
||||||
|
#include "SWGRemoteSourceSettings.h"
|
||||||
#include "SWGRtlSdrReport.h"
|
#include "SWGRtlSdrReport.h"
|
||||||
#include "SWGRtlSdrSettings.h"
|
#include "SWGRtlSdrSettings.h"
|
||||||
#include "SWGSDRPlayReport.h"
|
#include "SWGSDRPlayReport.h"
|
||||||
@ -242,12 +242,6 @@ namespace SWGSDRangel {
|
|||||||
if(QString("SWGDVSerialDevice").compare(type) == 0) {
|
if(QString("SWGDVSerialDevice").compare(type) == 0) {
|
||||||
return new SWGDVSerialDevice();
|
return new SWGDVSerialDevice();
|
||||||
}
|
}
|
||||||
if(QString("SWGDaemonSourceReport").compare(type) == 0) {
|
|
||||||
return new SWGDaemonSourceReport();
|
|
||||||
}
|
|
||||||
if(QString("SWGDaemonSourceSettings").compare(type) == 0) {
|
|
||||||
return new SWGDaemonSourceSettings();
|
|
||||||
}
|
|
||||||
if(QString("SWGDeviceListItem").compare(type) == 0) {
|
if(QString("SWGDeviceListItem").compare(type) == 0) {
|
||||||
return new SWGDeviceListItem();
|
return new SWGDeviceListItem();
|
||||||
}
|
}
|
||||||
@ -395,6 +389,12 @@ namespace SWGSDRangel {
|
|||||||
if(QString("SWGRemoteSinkSettings").compare(type) == 0) {
|
if(QString("SWGRemoteSinkSettings").compare(type) == 0) {
|
||||||
return new SWGRemoteSinkSettings();
|
return new SWGRemoteSinkSettings();
|
||||||
}
|
}
|
||||||
|
if(QString("SWGRemoteSourceReport").compare(type) == 0) {
|
||||||
|
return new SWGRemoteSourceReport();
|
||||||
|
}
|
||||||
|
if(QString("SWGRemoteSourceSettings").compare(type) == 0) {
|
||||||
|
return new SWGRemoteSourceSettings();
|
||||||
|
}
|
||||||
if(QString("SWGRtlSdrReport").compare(type) == 0) {
|
if(QString("SWGRtlSdrReport").compare(type) == 0) {
|
||||||
return new SWGRtlSdrReport();
|
return new SWGRtlSdrReport();
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SWGDaemonSourceReport.h"
|
#include "SWGRemoteSourceReport.h"
|
||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
@ -22,12 +22,12 @@
|
|||||||
|
|
||||||
namespace SWGSDRangel {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDaemonSourceReport::SWGDaemonSourceReport(QString* json) {
|
SWGRemoteSourceReport::SWGRemoteSourceReport(QString* json) {
|
||||||
init();
|
init();
|
||||||
this->fromJson(*json);
|
this->fromJson(*json);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport::SWGDaemonSourceReport() {
|
SWGRemoteSourceReport::SWGRemoteSourceReport() {
|
||||||
queue_length = 0;
|
queue_length = 0;
|
||||||
m_queue_length_isSet = false;
|
m_queue_length_isSet = false;
|
||||||
queue_size = 0;
|
queue_size = 0;
|
||||||
@ -56,12 +56,12 @@ SWGDaemonSourceReport::SWGDaemonSourceReport() {
|
|||||||
m_device_sample_rate_isSet = false;
|
m_device_sample_rate_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport::~SWGDaemonSourceReport() {
|
SWGRemoteSourceReport::~SWGRemoteSourceReport() {
|
||||||
this->cleanup();
|
this->cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::init() {
|
SWGRemoteSourceReport::init() {
|
||||||
queue_length = 0;
|
queue_length = 0;
|
||||||
m_queue_length_isSet = false;
|
m_queue_length_isSet = false;
|
||||||
queue_size = 0;
|
queue_size = 0;
|
||||||
@ -91,7 +91,7 @@ SWGDaemonSourceReport::init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::cleanup() {
|
SWGRemoteSourceReport::cleanup() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -107,8 +107,8 @@ SWGDaemonSourceReport::cleanup() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceReport*
|
SWGRemoteSourceReport*
|
||||||
SWGDaemonSourceReport::fromJson(QString &json) {
|
SWGRemoteSourceReport::fromJson(QString &json) {
|
||||||
QByteArray array (json.toStdString().c_str());
|
QByteArray array (json.toStdString().c_str());
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||||
QJsonObject jsonObject = doc.object();
|
QJsonObject jsonObject = doc.object();
|
||||||
@ -117,7 +117,7 @@ SWGDaemonSourceReport::fromJson(QString &json) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
SWGRemoteSourceReport::fromJsonObject(QJsonObject &pJson) {
|
||||||
::SWGSDRangel::setValue(&queue_length, pJson["queueLength"], "qint32", "");
|
::SWGSDRangel::setValue(&queue_length, pJson["queueLength"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&queue_size, pJson["queueSize"], "qint32", "");
|
::SWGSDRangel::setValue(&queue_size, pJson["queueSize"], "qint32", "");
|
||||||
@ -147,7 +147,7 @@ SWGDaemonSourceReport::fromJsonObject(QJsonObject &pJson) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
SWGDaemonSourceReport::asJson ()
|
SWGRemoteSourceReport::asJson ()
|
||||||
{
|
{
|
||||||
QJsonObject* obj = this->asJsonObject();
|
QJsonObject* obj = this->asJsonObject();
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ SWGDaemonSourceReport::asJson ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject*
|
QJsonObject*
|
||||||
SWGDaemonSourceReport::asJsonObject() {
|
SWGRemoteSourceReport::asJsonObject() {
|
||||||
QJsonObject* obj = new QJsonObject();
|
QJsonObject* obj = new QJsonObject();
|
||||||
if(m_queue_length_isSet){
|
if(m_queue_length_isSet){
|
||||||
obj->insert("queueLength", QJsonValue(queue_length));
|
obj->insert("queueLength", QJsonValue(queue_length));
|
||||||
@ -204,138 +204,138 @@ SWGDaemonSourceReport::asJsonObject() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getQueueLength() {
|
SWGRemoteSourceReport::getQueueLength() {
|
||||||
return queue_length;
|
return queue_length;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setQueueLength(qint32 queue_length) {
|
SWGRemoteSourceReport::setQueueLength(qint32 queue_length) {
|
||||||
this->queue_length = queue_length;
|
this->queue_length = queue_length;
|
||||||
this->m_queue_length_isSet = true;
|
this->m_queue_length_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getQueueSize() {
|
SWGRemoteSourceReport::getQueueSize() {
|
||||||
return queue_size;
|
return queue_size;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setQueueSize(qint32 queue_size) {
|
SWGRemoteSourceReport::setQueueSize(qint32 queue_size) {
|
||||||
this->queue_size = queue_size;
|
this->queue_size = queue_size;
|
||||||
this->m_queue_size_isSet = true;
|
this->m_queue_size_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getSamplesCount() {
|
SWGRemoteSourceReport::getSamplesCount() {
|
||||||
return samples_count;
|
return samples_count;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setSamplesCount(qint32 samples_count) {
|
SWGRemoteSourceReport::setSamplesCount(qint32 samples_count) {
|
||||||
this->samples_count = samples_count;
|
this->samples_count = samples_count;
|
||||||
this->m_samples_count_isSet = true;
|
this->m_samples_count_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getCorrectableErrorsCount() {
|
SWGRemoteSourceReport::getCorrectableErrorsCount() {
|
||||||
return correctable_errors_count;
|
return correctable_errors_count;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) {
|
SWGRemoteSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) {
|
||||||
this->correctable_errors_count = correctable_errors_count;
|
this->correctable_errors_count = correctable_errors_count;
|
||||||
this->m_correctable_errors_count_isSet = true;
|
this->m_correctable_errors_count_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getUncorrectableErrorsCount() {
|
SWGRemoteSourceReport::getUncorrectableErrorsCount() {
|
||||||
return uncorrectable_errors_count;
|
return uncorrectable_errors_count;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) {
|
SWGRemoteSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) {
|
||||||
this->uncorrectable_errors_count = uncorrectable_errors_count;
|
this->uncorrectable_errors_count = uncorrectable_errors_count;
|
||||||
this->m_uncorrectable_errors_count_isSet = true;
|
this->m_uncorrectable_errors_count_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getTvSec() {
|
SWGRemoteSourceReport::getTvSec() {
|
||||||
return tv_sec;
|
return tv_sec;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setTvSec(qint32 tv_sec) {
|
SWGRemoteSourceReport::setTvSec(qint32 tv_sec) {
|
||||||
this->tv_sec = tv_sec;
|
this->tv_sec = tv_sec;
|
||||||
this->m_tv_sec_isSet = true;
|
this->m_tv_sec_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getTvUSec() {
|
SWGRemoteSourceReport::getTvUSec() {
|
||||||
return tv_u_sec;
|
return tv_u_sec;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setTvUSec(qint32 tv_u_sec) {
|
SWGRemoteSourceReport::setTvUSec(qint32 tv_u_sec) {
|
||||||
this->tv_u_sec = tv_u_sec;
|
this->tv_u_sec = tv_u_sec;
|
||||||
this->m_tv_u_sec_isSet = true;
|
this->m_tv_u_sec_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getNbOriginalBlocks() {
|
SWGRemoteSourceReport::getNbOriginalBlocks() {
|
||||||
return nb_original_blocks;
|
return nb_original_blocks;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) {
|
SWGRemoteSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) {
|
||||||
this->nb_original_blocks = nb_original_blocks;
|
this->nb_original_blocks = nb_original_blocks;
|
||||||
this->m_nb_original_blocks_isSet = true;
|
this->m_nb_original_blocks_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getNbFecBlocks() {
|
SWGRemoteSourceReport::getNbFecBlocks() {
|
||||||
return nb_fec_blocks;
|
return nb_fec_blocks;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) {
|
SWGRemoteSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) {
|
||||||
this->nb_fec_blocks = nb_fec_blocks;
|
this->nb_fec_blocks = nb_fec_blocks;
|
||||||
this->m_nb_fec_blocks_isSet = true;
|
this->m_nb_fec_blocks_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getCenterFreq() {
|
SWGRemoteSourceReport::getCenterFreq() {
|
||||||
return center_freq;
|
return center_freq;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setCenterFreq(qint32 center_freq) {
|
SWGRemoteSourceReport::setCenterFreq(qint32 center_freq) {
|
||||||
this->center_freq = center_freq;
|
this->center_freq = center_freq;
|
||||||
this->m_center_freq_isSet = true;
|
this->m_center_freq_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getSampleRate() {
|
SWGRemoteSourceReport::getSampleRate() {
|
||||||
return sample_rate;
|
return sample_rate;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setSampleRate(qint32 sample_rate) {
|
SWGRemoteSourceReport::setSampleRate(qint32 sample_rate) {
|
||||||
this->sample_rate = sample_rate;
|
this->sample_rate = sample_rate;
|
||||||
this->m_sample_rate_isSet = true;
|
this->m_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getDeviceCenterFreq() {
|
SWGRemoteSourceReport::getDeviceCenterFreq() {
|
||||||
return device_center_freq;
|
return device_center_freq;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setDeviceCenterFreq(qint32 device_center_freq) {
|
SWGRemoteSourceReport::setDeviceCenterFreq(qint32 device_center_freq) {
|
||||||
this->device_center_freq = device_center_freq;
|
this->device_center_freq = device_center_freq;
|
||||||
this->m_device_center_freq_isSet = true;
|
this->m_device_center_freq_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceReport::getDeviceSampleRate() {
|
SWGRemoteSourceReport::getDeviceSampleRate() {
|
||||||
return device_sample_rate;
|
return device_sample_rate;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceReport::setDeviceSampleRate(qint32 device_sample_rate) {
|
SWGRemoteSourceReport::setDeviceSampleRate(qint32 device_sample_rate) {
|
||||||
this->device_sample_rate = device_sample_rate;
|
this->device_sample_rate = device_sample_rate;
|
||||||
this->m_device_sample_rate_isSet = true;
|
this->m_device_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGDaemonSourceReport::isSet(){
|
SWGRemoteSourceReport::isSet(){
|
||||||
bool isObjectUpdated = false;
|
bool isObjectUpdated = false;
|
||||||
do{
|
do{
|
||||||
if(m_queue_length_isSet){ isObjectUpdated = true; break;}
|
if(m_queue_length_isSet){ isObjectUpdated = true; break;}
|
@ -11,13 +11,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SWGDaemonSourceReport.h
|
* SWGRemoteSourceReport.h
|
||||||
*
|
*
|
||||||
* Daemon channel source report
|
* Remote channel source report
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SWGDaemonSourceReport_H_
|
#ifndef SWGRemoteSourceReport_H_
|
||||||
#define SWGDaemonSourceReport_H_
|
#define SWGRemoteSourceReport_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
@ -28,18 +28,18 @@
|
|||||||
|
|
||||||
namespace SWGSDRangel {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWG_API SWGDaemonSourceReport: public SWGObject {
|
class SWG_API SWGRemoteSourceReport: public SWGObject {
|
||||||
public:
|
public:
|
||||||
SWGDaemonSourceReport();
|
SWGRemoteSourceReport();
|
||||||
SWGDaemonSourceReport(QString* json);
|
SWGRemoteSourceReport(QString* json);
|
||||||
virtual ~SWGDaemonSourceReport();
|
virtual ~SWGRemoteSourceReport();
|
||||||
void init();
|
void init();
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
virtual QString asJson () override;
|
virtual QString asJson () override;
|
||||||
virtual QJsonObject* asJsonObject() override;
|
virtual QJsonObject* asJsonObject() override;
|
||||||
virtual void fromJsonObject(QJsonObject &json) override;
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
virtual SWGDaemonSourceReport* fromJson(QString &jsonString) override;
|
virtual SWGRemoteSourceReport* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
qint32 getQueueLength();
|
qint32 getQueueLength();
|
||||||
void setQueueLength(qint32 queue_length);
|
void setQueueLength(qint32 queue_length);
|
||||||
@ -127,4 +127,4 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SWGDaemonSourceReport_H_ */
|
#endif /* SWGRemoteSourceReport_H_ */
|
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "SWGDaemonSourceSettings.h"
|
#include "SWGRemoteSourceSettings.h"
|
||||||
|
|
||||||
#include "SWGHelpers.h"
|
#include "SWGHelpers.h"
|
||||||
|
|
||||||
@ -22,12 +22,12 @@
|
|||||||
|
|
||||||
namespace SWGSDRangel {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
SWGDaemonSourceSettings::SWGDaemonSourceSettings(QString* json) {
|
SWGRemoteSourceSettings::SWGRemoteSourceSettings(QString* json) {
|
||||||
init();
|
init();
|
||||||
this->fromJson(*json);
|
this->fromJson(*json);
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceSettings::SWGDaemonSourceSettings() {
|
SWGRemoteSourceSettings::SWGRemoteSourceSettings() {
|
||||||
data_address = nullptr;
|
data_address = nullptr;
|
||||||
m_data_address_isSet = false;
|
m_data_address_isSet = false;
|
||||||
data_port = 0;
|
data_port = 0;
|
||||||
@ -48,12 +48,12 @@ SWGDaemonSourceSettings::SWGDaemonSourceSettings() {
|
|||||||
m_reverse_api_channel_index_isSet = false;
|
m_reverse_api_channel_index_isSet = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceSettings::~SWGDaemonSourceSettings() {
|
SWGRemoteSourceSettings::~SWGRemoteSourceSettings() {
|
||||||
this->cleanup();
|
this->cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::init() {
|
SWGRemoteSourceSettings::init() {
|
||||||
data_address = new QString("");
|
data_address = new QString("");
|
||||||
m_data_address_isSet = false;
|
m_data_address_isSet = false;
|
||||||
data_port = 0;
|
data_port = 0;
|
||||||
@ -75,7 +75,7 @@ SWGDaemonSourceSettings::init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::cleanup() {
|
SWGRemoteSourceSettings::cleanup() {
|
||||||
if(data_address != nullptr) {
|
if(data_address != nullptr) {
|
||||||
delete data_address;
|
delete data_address;
|
||||||
}
|
}
|
||||||
@ -93,8 +93,8 @@ SWGDaemonSourceSettings::cleanup() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGDaemonSourceSettings*
|
SWGRemoteSourceSettings*
|
||||||
SWGDaemonSourceSettings::fromJson(QString &json) {
|
SWGRemoteSourceSettings::fromJson(QString &json) {
|
||||||
QByteArray array (json.toStdString().c_str());
|
QByteArray array (json.toStdString().c_str());
|
||||||
QJsonDocument doc = QJsonDocument::fromJson(array);
|
QJsonDocument doc = QJsonDocument::fromJson(array);
|
||||||
QJsonObject jsonObject = doc.object();
|
QJsonObject jsonObject = doc.object();
|
||||||
@ -103,7 +103,7 @@ SWGDaemonSourceSettings::fromJson(QString &json) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
SWGRemoteSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
||||||
::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString");
|
::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", "");
|
::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", "");
|
||||||
@ -125,7 +125,7 @@ SWGDaemonSourceSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
SWGDaemonSourceSettings::asJson ()
|
SWGRemoteSourceSettings::asJson ()
|
||||||
{
|
{
|
||||||
QJsonObject* obj = this->asJsonObject();
|
QJsonObject* obj = this->asJsonObject();
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ SWGDaemonSourceSettings::asJson ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject*
|
QJsonObject*
|
||||||
SWGDaemonSourceSettings::asJsonObject() {
|
SWGRemoteSourceSettings::asJsonObject() {
|
||||||
QJsonObject* obj = new QJsonObject();
|
QJsonObject* obj = new QJsonObject();
|
||||||
if(data_address != nullptr && *data_address != QString("")){
|
if(data_address != nullptr && *data_address != QString("")){
|
||||||
toJsonValue(QString("dataAddress"), data_address, obj, QString("QString"));
|
toJsonValue(QString("dataAddress"), data_address, obj, QString("QString"));
|
||||||
@ -170,98 +170,98 @@ SWGDaemonSourceSettings::asJsonObject() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGDaemonSourceSettings::getDataAddress() {
|
SWGRemoteSourceSettings::getDataAddress() {
|
||||||
return data_address;
|
return data_address;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setDataAddress(QString* data_address) {
|
SWGRemoteSourceSettings::setDataAddress(QString* data_address) {
|
||||||
this->data_address = data_address;
|
this->data_address = data_address;
|
||||||
this->m_data_address_isSet = true;
|
this->m_data_address_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getDataPort() {
|
SWGRemoteSourceSettings::getDataPort() {
|
||||||
return data_port;
|
return data_port;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setDataPort(qint32 data_port) {
|
SWGRemoteSourceSettings::setDataPort(qint32 data_port) {
|
||||||
this->data_port = data_port;
|
this->data_port = data_port;
|
||||||
this->m_data_port_isSet = true;
|
this->m_data_port_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getRgbColor() {
|
SWGRemoteSourceSettings::getRgbColor() {
|
||||||
return rgb_color;
|
return rgb_color;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setRgbColor(qint32 rgb_color) {
|
SWGRemoteSourceSettings::setRgbColor(qint32 rgb_color) {
|
||||||
this->rgb_color = rgb_color;
|
this->rgb_color = rgb_color;
|
||||||
this->m_rgb_color_isSet = true;
|
this->m_rgb_color_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGDaemonSourceSettings::getTitle() {
|
SWGRemoteSourceSettings::getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setTitle(QString* title) {
|
SWGRemoteSourceSettings::setTitle(QString* title) {
|
||||||
this->title = title;
|
this->title = title;
|
||||||
this->m_title_isSet = true;
|
this->m_title_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getUseReverseApi() {
|
SWGRemoteSourceSettings::getUseReverseApi() {
|
||||||
return use_reverse_api;
|
return use_reverse_api;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setUseReverseApi(qint32 use_reverse_api) {
|
SWGRemoteSourceSettings::setUseReverseApi(qint32 use_reverse_api) {
|
||||||
this->use_reverse_api = use_reverse_api;
|
this->use_reverse_api = use_reverse_api;
|
||||||
this->m_use_reverse_api_isSet = true;
|
this->m_use_reverse_api_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGDaemonSourceSettings::getReverseApiAddress() {
|
SWGRemoteSourceSettings::getReverseApiAddress() {
|
||||||
return reverse_api_address;
|
return reverse_api_address;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setReverseApiAddress(QString* reverse_api_address) {
|
SWGRemoteSourceSettings::setReverseApiAddress(QString* reverse_api_address) {
|
||||||
this->reverse_api_address = reverse_api_address;
|
this->reverse_api_address = reverse_api_address;
|
||||||
this->m_reverse_api_address_isSet = true;
|
this->m_reverse_api_address_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getReverseApiPort() {
|
SWGRemoteSourceSettings::getReverseApiPort() {
|
||||||
return reverse_api_port;
|
return reverse_api_port;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setReverseApiPort(qint32 reverse_api_port) {
|
SWGRemoteSourceSettings::setReverseApiPort(qint32 reverse_api_port) {
|
||||||
this->reverse_api_port = reverse_api_port;
|
this->reverse_api_port = reverse_api_port;
|
||||||
this->m_reverse_api_port_isSet = true;
|
this->m_reverse_api_port_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getReverseApiDeviceIndex() {
|
SWGRemoteSourceSettings::getReverseApiDeviceIndex() {
|
||||||
return reverse_api_device_index;
|
return reverse_api_device_index;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
SWGRemoteSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) {
|
||||||
this->reverse_api_device_index = reverse_api_device_index;
|
this->reverse_api_device_index = reverse_api_device_index;
|
||||||
this->m_reverse_api_device_index_isSet = true;
|
this->m_reverse_api_device_index_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
SWGDaemonSourceSettings::getReverseApiChannelIndex() {
|
SWGRemoteSourceSettings::getReverseApiChannelIndex() {
|
||||||
return reverse_api_channel_index;
|
return reverse_api_channel_index;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGDaemonSourceSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
SWGRemoteSourceSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) {
|
||||||
this->reverse_api_channel_index = reverse_api_channel_index;
|
this->reverse_api_channel_index = reverse_api_channel_index;
|
||||||
this->m_reverse_api_channel_index_isSet = true;
|
this->m_reverse_api_channel_index_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGDaemonSourceSettings::isSet(){
|
SWGRemoteSourceSettings::isSet(){
|
||||||
bool isObjectUpdated = false;
|
bool isObjectUpdated = false;
|
||||||
do{
|
do{
|
||||||
if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;}
|
if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;}
|
@ -11,13 +11,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SWGDaemonSourceSettings.h
|
* SWGRemoteSourceSettings.h
|
||||||
*
|
*
|
||||||
* Daemon channel source settings
|
* Remote channel source settings
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SWGDaemonSourceSettings_H_
|
#ifndef SWGRemoteSourceSettings_H_
|
||||||
#define SWGDaemonSourceSettings_H_
|
#define SWGRemoteSourceSettings_H_
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
|
|
||||||
@ -29,18 +29,18 @@
|
|||||||
|
|
||||||
namespace SWGSDRangel {
|
namespace SWGSDRangel {
|
||||||
|
|
||||||
class SWG_API SWGDaemonSourceSettings: public SWGObject {
|
class SWG_API SWGRemoteSourceSettings: public SWGObject {
|
||||||
public:
|
public:
|
||||||
SWGDaemonSourceSettings();
|
SWGRemoteSourceSettings();
|
||||||
SWGDaemonSourceSettings(QString* json);
|
SWGRemoteSourceSettings(QString* json);
|
||||||
virtual ~SWGDaemonSourceSettings();
|
virtual ~SWGRemoteSourceSettings();
|
||||||
void init();
|
void init();
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
|
||||||
virtual QString asJson () override;
|
virtual QString asJson () override;
|
||||||
virtual QJsonObject* asJsonObject() override;
|
virtual QJsonObject* asJsonObject() override;
|
||||||
virtual void fromJsonObject(QJsonObject &json) override;
|
virtual void fromJsonObject(QJsonObject &json) override;
|
||||||
virtual SWGDaemonSourceSettings* fromJson(QString &jsonString) override;
|
virtual SWGRemoteSourceSettings* fromJson(QString &jsonString) override;
|
||||||
|
|
||||||
QString* getDataAddress();
|
QString* getDataAddress();
|
||||||
void setDataAddress(QString* data_address);
|
void setDataAddress(QString* data_address);
|
||||||
@ -104,4 +104,4 @@ private:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* SWGDaemonSourceSettings_H_ */
|
#endif /* SWGRemoteSourceSettings_H_ */
|
Loading…
x
Reference in New Issue
Block a user