Rename SDRDaemonSource device plugin to RemoteInput (1)
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.2 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 4.5 KiB |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 10 KiB |
@ -115,7 +115,7 @@ This is the detail of the ratio shown in the gauge. Each frame block is a block
|
||||
|
||||
<h3>9: Distant server API address and port</h3>
|
||||
|
||||
![SDR Remote input stream GUI](../../../doc/img/SDRdaemonSource_plugin_05.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_05.png)
|
||||
|
||||
<h4>9.1: API connection indicator</h4>
|
||||
|
||||
@ -135,7 +135,7 @@ When the return key is hit within the address (9.2) or port (9.3) the changes ar
|
||||
|
||||
<h3>10: Local data address and port</h3>
|
||||
|
||||
![SDR Remote input stream GUI](../../../doc/img/SDRdaemonSource_plugin_06.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_06.png)
|
||||
|
||||
<h4>10.1: Data IP address</h4>
|
||||
|
||||
|
@ -67,7 +67,7 @@ endif(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
|
||||
|
||||
find_package(CM256cc)
|
||||
if(CM256CC_FOUND)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
add_subdirectory(remoteinput)
|
||||
endif(CM256CC_FOUND)
|
||||
|
||||
find_package(LibMiriSDR)
|
||||
@ -96,7 +96,7 @@ if (BUILD_DEBIAN)
|
||||
add_subdirectory(perseus)
|
||||
add_subdirectory(plutosdrinput)
|
||||
add_subdirectory(rtlsdr)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
add_subdirectory(remoteinput)
|
||||
add_subdirectory(sdrplay)
|
||||
add_subdirectory(soapysdrinput)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
85
plugins/samplesource/remoteinput/CMakeLists.txt
Normal file
@ -0,0 +1,85 @@
|
||||
project(remoteinput)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "RemoteInput: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "RemoteInput: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "RemoteInput: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(remoteinput_SOURCES
|
||||
remoteinputbuffer.cpp
|
||||
remoteinputudphandler.cpp
|
||||
remoteinputgui.cpp
|
||||
remoteinput.cpp
|
||||
remoteinputsettings.cpp
|
||||
remoteinputplugin.cpp
|
||||
)
|
||||
|
||||
set(sremoteinput_HEADERS
|
||||
remoteinputbuffer.h
|
||||
remoteinputudphandler.h
|
||||
remoteinputgui.h
|
||||
remoteinput.h
|
||||
remoteinputsettings.h
|
||||
remoteinputplugin.h
|
||||
)
|
||||
|
||||
set(remoteinput_FORMS
|
||||
remoteinputgui.ui
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
qt5_wrap_ui(remoteinput_FORMS_HEADERS ${remoteinput_FORMS})
|
||||
|
||||
add_library(inputremote SHARED
|
||||
${remoteinput_SOURCES}
|
||||
${remoteinput_HEADERS_MOC}
|
||||
${remoteinput_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(inputremote PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(inputremote 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(inputremote
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputremote
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(inputremote Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS inputremote DESTINATION lib/plugins/samplesource)
|
@ -1,8 +1,8 @@
|
||||
<h1>SDRdaemon source plugin</h1>
|
||||
<h1>Remote input plugin</h1>
|
||||
|
||||
<h2>Introduction</h2>
|
||||
|
||||
This input sample source plugin gets its samples over tbe network from a SDRangel instance's Daemon channel sink using UDP connection.
|
||||
This input sample source plugin gets its samples over tbe network from a SDRangel instance's Remote channel sink using UDP connection.
|
||||
|
||||
Forward Error Correction with a Cauchy MDS block erasure codec is used to prevent block loss. This can make the UDP transmission more robust particularly over WiFi links.
|
||||
|
||||
@ -20,15 +20,15 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/
|
||||
|
||||
<h2>Interface</h2>
|
||||
|
||||
![SDR Daemon source input plugin GUI](../../../doc/img/SDRdaemonSource_plugin.png)
|
||||
![SDR Remote input plugin GUI](../../../doc/img/RemoteInput_plugin.png)
|
||||
|
||||
<h3>1: Common stream parameters</h3>
|
||||
|
||||
![SDR Daemon source input stream GUI](../../../doc/img/SDRdaemonSource_plugin_01.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_01.png)
|
||||
|
||||
<h4>1.1: Frequency</h4>
|
||||
|
||||
This is the center frequency in kHz sent in the meta data from the distant SDRdaemon instance and corresponds to the center frequency of reception.
|
||||
This is the center frequency in kHz sent in the meta data from the distant SDRangel instance and corresponds to the center frequency of reception.
|
||||
|
||||
<h4>1.2: Start/Stop</h4>
|
||||
|
||||
@ -47,7 +47,7 @@ Stream I/Q sample rate in kS/s
|
||||
|
||||
<h3>2: Auto correction options and stream status</h3>
|
||||
|
||||
![SDR Daemon source input stream GUI](../../../doc/img/SDRdaemonSource_plugin_02.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_02.png)
|
||||
|
||||
<h4>2.1: Auto correction options</h4>
|
||||
|
||||
@ -71,7 +71,7 @@ This corresponds to the value shown in the gauges above (9)
|
||||
|
||||
<h4>2.4: Date/time</h4>
|
||||
|
||||
This is the current timestamp of the block of data sent from the receiver. It is refreshed about every second. The plugin tries to take into account the buffer that is used between the data received from the network and the data effectively used by the system however this may not be extremely accurate. It is based on the timestamps sent from the SDRdaemon utility at the other hand that does not take into account its own buffers.
|
||||
This is the current timestamp of the block of data sent from the receiver. It is refreshed about every second. The plugin tries to take into account the buffer that is used between the data received from the network and the data effectively used by the system however this may not be extremely accurate. It is based on the timestamps sent from the Remote sink channel at the other hand that does not take into account its own buffers.
|
||||
|
||||
<h3>3: Main buffer R/W pointers gauge</h3>
|
||||
|
||||
@ -84,7 +84,7 @@ The system tries to compensate read / write unbalance however at start or when a
|
||||
|
||||
<h3>4: Data stream status</h3>
|
||||
|
||||
![SDR Daemon source input stream GUI](../../../doc/img/SDRdaemonSource_plugin_04.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_04.png)
|
||||
|
||||
<h4>4.1: Sample size</h4>
|
||||
|
||||
@ -134,7 +134,7 @@ This HH:mm:ss time display shows the time since the reset events counters button
|
||||
|
||||
<h3>5: Distant server API address and port</h3>
|
||||
|
||||
![SDR Daemon source input stream GUI](../../../doc/img/SDRdaemonSource_plugin_05.png)
|
||||
![SDR Remote input stream GUI](../../../doc/img/RemoteInput_plugin_05.png)
|
||||
|
||||
<h4>5.1: API connection indicator</h4>
|
||||
|
||||
@ -154,7 +154,7 @@ When the return key is hit within the address (5.2) or port (5.3) the changes ar
|
||||
|
||||
<h3>6: Local data address and port</h3>
|
||||
|
||||
![SDR Daemon source input stream GUI](../../../doc/img/SDRdaemonSource_plugin_06.png)
|
||||
![SDR Remote source input stream GUI](../../../doc/img/RemoteInput_plugin_06.png)
|
||||
|
||||
<h4>6.1: Data IP address</h4>
|
||||
|
@ -32,26 +32,26 @@
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "dsp/filerecord.h"
|
||||
|
||||
#include "sdrdaemonsourceinput.h"
|
||||
#include "sdrdaemonsourceudphandler.h"
|
||||
#include "remoteinput.h"
|
||||
#include "remoteinputudphandler.h"
|
||||
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgConfigureSDRdaemonSource, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgConfigureSDRdaemonStreamTiming, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonAcquisition, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgFileRecord, Message)
|
||||
MESSAGE_CLASS_DEFINITION(SDRdaemonSourceInput::MsgStartStop, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgConfigureRemoteInput, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgConfigureRemoteInputTiming, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgReportRemoteInputAcquisition, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgReportRemoteInputStreamData, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgReportRemoteInputStreamTiming, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgFileRecord, Message)
|
||||
MESSAGE_CLASS_DEFINITION(RemoteInput::MsgStartStop, Message)
|
||||
|
||||
SDRdaemonSourceInput::SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI) :
|
||||
RemoteInput::RemoteInput(DeviceSourceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_settings(),
|
||||
m_SDRdaemonUDPHandler(0),
|
||||
m_remoteInputUDPHandler(0),
|
||||
m_deviceDescription(),
|
||||
m_startingTimeStamp(0)
|
||||
{
|
||||
m_sampleFifo.setSize(96000 * 4);
|
||||
m_SDRdaemonUDPHandler = new SDRdaemonSourceUDPHandler(&m_sampleFifo, m_deviceAPI);
|
||||
m_remoteInputUDPHandler = new RemoteInputUDPHandler(&m_sampleFifo, m_deviceAPI);
|
||||
|
||||
m_fileSink = new FileRecord(QString("test_%1.sdriq").arg(m_deviceAPI->getDeviceUID()));
|
||||
m_deviceAPI->addSink(m_fileSink);
|
||||
@ -60,45 +60,45 @@ SDRdaemonSourceInput::SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI) :
|
||||
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
}
|
||||
|
||||
SDRdaemonSourceInput::~SDRdaemonSourceInput()
|
||||
RemoteInput::~RemoteInput()
|
||||
{
|
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
delete m_networkManager;
|
||||
stop();
|
||||
m_deviceAPI->removeSink(m_fileSink);
|
||||
delete m_fileSink;
|
||||
delete m_SDRdaemonUDPHandler;
|
||||
delete m_remoteInputUDPHandler;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::destroy()
|
||||
void RemoteInput::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::init()
|
||||
void RemoteInput::init()
|
||||
{
|
||||
applySettings(m_settings, true);
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceInput::start()
|
||||
bool RemoteInput::start()
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceInput::start";
|
||||
m_SDRdaemonUDPHandler->start();
|
||||
qDebug() << "RemoteInput::start";
|
||||
m_remoteInputUDPHandler->start();
|
||||
return true;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::stop()
|
||||
void RemoteInput::stop()
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceInput::stop";
|
||||
m_SDRdaemonUDPHandler->stop();
|
||||
qDebug() << "RemoteInput::stop";
|
||||
m_remoteInputUDPHandler->stop();
|
||||
}
|
||||
|
||||
QByteArray SDRdaemonSourceInput::serialize() const
|
||||
QByteArray RemoteInput::serialize() const
|
||||
{
|
||||
return m_settings.serialize();
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceInput::deserialize(const QByteArray& data)
|
||||
bool RemoteInput::deserialize(const QByteArray& data)
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
@ -108,55 +108,55 @@ bool SDRdaemonSourceInput::deserialize(const QByteArray& data)
|
||||
success = false;
|
||||
}
|
||||
|
||||
MsgConfigureSDRdaemonSource* message = MsgConfigureSDRdaemonSource::create(m_settings, true);
|
||||
MsgConfigureRemoteInput* message = MsgConfigureRemoteInput::create(m_settings, true);
|
||||
m_inputMessageQueue.push(message);
|
||||
|
||||
if (m_guiMessageQueue)
|
||||
{
|
||||
MsgConfigureSDRdaemonSource* messageToGUI = MsgConfigureSDRdaemonSource::create(m_settings, true);
|
||||
MsgConfigureRemoteInput* messageToGUI = MsgConfigureRemoteInput::create(m_settings, true);
|
||||
m_guiMessageQueue->push(messageToGUI);
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::setMessageQueueToGUI(MessageQueue *queue)
|
||||
void RemoteInput::setMessageQueueToGUI(MessageQueue *queue)
|
||||
{
|
||||
m_guiMessageQueue = queue;
|
||||
m_SDRdaemonUDPHandler->setMessageQueueToGUI(queue);
|
||||
m_remoteInputUDPHandler->setMessageQueueToGUI(queue);
|
||||
}
|
||||
|
||||
const QString& SDRdaemonSourceInput::getDeviceDescription() const
|
||||
const QString& RemoteInput::getDeviceDescription() const
|
||||
{
|
||||
return m_deviceDescription;
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::getSampleRate() const
|
||||
int RemoteInput::getSampleRate() const
|
||||
{
|
||||
return m_SDRdaemonUDPHandler->getSampleRate();
|
||||
return m_remoteInputUDPHandler->getSampleRate();
|
||||
}
|
||||
|
||||
quint64 SDRdaemonSourceInput::getCenterFrequency() const
|
||||
quint64 RemoteInput::getCenterFrequency() const
|
||||
{
|
||||
return m_SDRdaemonUDPHandler->getCenterFrequency();
|
||||
return m_remoteInputUDPHandler->getCenterFrequency();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::setCenterFrequency(qint64 centerFrequency)
|
||||
void RemoteInput::setCenterFrequency(qint64 centerFrequency)
|
||||
{
|
||||
(void) centerFrequency;
|
||||
}
|
||||
|
||||
std::time_t SDRdaemonSourceInput::getStartingTimeStamp() const
|
||||
std::time_t RemoteInput::getStartingTimeStamp() const
|
||||
{
|
||||
return m_startingTimeStamp;
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceInput::isStreaming() const
|
||||
bool RemoteInput::isStreaming() const
|
||||
{
|
||||
return m_SDRdaemonUDPHandler->isStreaming();
|
||||
return m_remoteInputUDPHandler->isStreaming();
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
bool RemoteInput::handleMessage(const Message& message)
|
||||
{
|
||||
if (DSPSignalNotification::match(message))
|
||||
{
|
||||
@ -166,7 +166,7 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
else if (MsgFileRecord::match(message))
|
||||
{
|
||||
MsgFileRecord& conf = (MsgFileRecord&) message;
|
||||
qDebug() << "SDRdaemonSourceInput::handleMessage: MsgFileRecord: " << conf.getStartStop();
|
||||
qDebug() << "RemoteInput::handleMessage: MsgFileRecord: " << conf.getStartStop();
|
||||
|
||||
if (conf.getStartStop())
|
||||
{
|
||||
@ -188,7 +188,7 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
else if (MsgStartStop::match(message))
|
||||
{
|
||||
MsgStartStop& cmd = (MsgStartStop&) message;
|
||||
qDebug() << "SDRdaemonSourceInput::handleMessage: MsgStartStop: " << (cmd.getStartStop() ? "start" : "stop");
|
||||
qDebug() << "RemoteInput::handleMessage: MsgStartStop: " << (cmd.getStartStop() ? "start" : "stop");
|
||||
|
||||
if (cmd.getStartStop())
|
||||
{
|
||||
@ -208,10 +208,10 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (MsgConfigureSDRdaemonSource::match(message))
|
||||
else if (MsgConfigureRemoteInput::match(message))
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceInput::handleMessage:" << message.getIdentifier();
|
||||
MsgConfigureSDRdaemonSource& conf = (MsgConfigureSDRdaemonSource&) message;
|
||||
qDebug() << "RemoteInput::handleMessage:" << message.getIdentifier();
|
||||
MsgConfigureRemoteInput& conf = (MsgConfigureRemoteInput&) message;
|
||||
applySettings(conf.getSettings(), conf.getForce());
|
||||
return true;
|
||||
}
|
||||
@ -221,12 +221,12 @@ bool SDRdaemonSourceInput::handleMessage(const Message& message)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::applySettings(const SDRdaemonSourceSettings& settings, bool force)
|
||||
void RemoteInput::applySettings(const RemoteInputSettings& settings, bool force)
|
||||
{
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
std::ostringstream os;
|
||||
QString remoteAddress;
|
||||
m_SDRdaemonUDPHandler->getRemoteAddress(remoteAddress);
|
||||
m_remoteInputUDPHandler->getRemoteAddress(remoteAddress);
|
||||
QList<QString> reverseAPIKeys;
|
||||
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || force) {
|
||||
@ -254,13 +254,13 @@ void SDRdaemonSourceInput::applySettings(const SDRdaemonSourceSettings& settings
|
||||
if ((m_settings.m_dcBlock != settings.m_dcBlock) || (m_settings.m_iqCorrection != settings.m_iqCorrection) || force)
|
||||
{
|
||||
m_deviceAPI->configureCorrections(settings.m_dcBlock, settings.m_iqCorrection);
|
||||
qDebug("SDRdaemonSourceInput::applySettings: corrections: DC block: %s IQ imbalance: %s",
|
||||
qDebug("RemoteInput::applySettings: corrections: DC block: %s IQ imbalance: %s",
|
||||
settings.m_dcBlock ? "true" : "false",
|
||||
settings.m_iqCorrection ? "true" : "false");
|
||||
}
|
||||
|
||||
m_SDRdaemonUDPHandler->configureUDPLink(settings.m_dataAddress, settings.m_dataPort);
|
||||
m_SDRdaemonUDPHandler->getRemoteAddress(remoteAddress);
|
||||
m_remoteInputUDPHandler->configureUDPLink(settings.m_dataAddress, settings.m_dataPort);
|
||||
m_remoteInputUDPHandler->getRemoteAddress(remoteAddress);
|
||||
|
||||
mutexLocker.unlock();
|
||||
|
||||
@ -276,7 +276,7 @@ void SDRdaemonSourceInput::applySettings(const SDRdaemonSourceSettings& settings
|
||||
m_settings = settings;
|
||||
m_remoteAddress = remoteAddress;
|
||||
|
||||
qDebug() << "SDRdaemonSourceInput::applySettings: "
|
||||
qDebug() << "RemoteInput::applySettings: "
|
||||
<< " m_dataAddress: " << m_settings.m_dataAddress
|
||||
<< " m_dataPort: " << m_settings.m_dataPort
|
||||
<< " m_apiAddress: " << m_settings.m_apiAddress
|
||||
@ -284,7 +284,7 @@ void SDRdaemonSourceInput::applySettings(const SDRdaemonSourceSettings& settings
|
||||
<< " m_remoteAddress: " << m_remoteAddress;
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::webapiRunGet(
|
||||
int RemoteInput::webapiRunGet(
|
||||
SWGSDRangel::SWGDeviceState& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
@ -293,7 +293,7 @@ int SDRdaemonSourceInput::webapiRunGet(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::webapiRun(
|
||||
int RemoteInput::webapiRun(
|
||||
bool run,
|
||||
SWGSDRangel::SWGDeviceState& response,
|
||||
QString& errorMessage)
|
||||
@ -312,7 +312,7 @@ int SDRdaemonSourceInput::webapiRun(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::webapiSettingsGet(
|
||||
int RemoteInput::webapiSettingsGet(
|
||||
SWGSDRangel::SWGDeviceSettings& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
@ -323,14 +323,14 @@ int SDRdaemonSourceInput::webapiSettingsGet(
|
||||
return 200;
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::webapiSettingsPutPatch(
|
||||
int RemoteInput::webapiSettingsPutPatch(
|
||||
bool force,
|
||||
const QStringList& deviceSettingsKeys,
|
||||
SWGSDRangel::SWGDeviceSettings& response, // query + response
|
||||
QString& errorMessage)
|
||||
{
|
||||
(void) errorMessage;
|
||||
SDRdaemonSourceSettings settings = m_settings;
|
||||
RemoteInputSettings settings = m_settings;
|
||||
|
||||
if (deviceSettingsKeys.contains("apiAddress")) {
|
||||
settings.m_apiAddress = *response.getSdrDaemonSourceSettings()->getApiAddress();
|
||||
@ -366,12 +366,12 @@ int SDRdaemonSourceInput::webapiSettingsPutPatch(
|
||||
settings.m_reverseAPIDeviceIndex = response.getSdrDaemonSourceSettings()->getReverseApiDeviceIndex();
|
||||
}
|
||||
|
||||
MsgConfigureSDRdaemonSource *msg = MsgConfigureSDRdaemonSource::create(settings, force);
|
||||
MsgConfigureRemoteInput *msg = MsgConfigureRemoteInput::create(settings, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureSDRdaemonSource *msgToGUI = MsgConfigureSDRdaemonSource::create(settings, force);
|
||||
MsgConfigureRemoteInput *msgToGUI = MsgConfigureRemoteInput::create(settings, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ int SDRdaemonSourceInput::webapiSettingsPutPatch(
|
||||
return 200;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const SDRdaemonSourceSettings& settings)
|
||||
void RemoteInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RemoteInputSettings& settings)
|
||||
{
|
||||
response.getSdrDaemonSourceSettings()->setApiAddress(new QString(settings.m_apiAddress));
|
||||
response.getSdrDaemonSourceSettings()->setApiPort(settings.m_apiPort);
|
||||
@ -406,7 +406,7 @@ void SDRdaemonSourceInput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSett
|
||||
response.getSdrDaemonSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex);
|
||||
}
|
||||
|
||||
int SDRdaemonSourceInput::webapiReportGet(
|
||||
int RemoteInput::webapiReportGet(
|
||||
SWGSDRangel::SWGDeviceReport& response,
|
||||
QString& errorMessage)
|
||||
{
|
||||
@ -417,20 +417,20 @@ int SDRdaemonSourceInput::webapiReportGet(
|
||||
return 200;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
void RemoteInput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||
{
|
||||
response.getSdrDaemonSourceReport()->setCenterFrequency(m_SDRdaemonUDPHandler->getCenterFrequency());
|
||||
response.getSdrDaemonSourceReport()->setSampleRate(m_SDRdaemonUDPHandler->getSampleRate());
|
||||
response.getSdrDaemonSourceReport()->setBufferRwBalance(m_SDRdaemonUDPHandler->getBufferGauge());
|
||||
response.getSdrDaemonSourceReport()->setCenterFrequency(m_remoteInputUDPHandler->getCenterFrequency());
|
||||
response.getSdrDaemonSourceReport()->setSampleRate(m_remoteInputUDPHandler->getSampleRate());
|
||||
response.getSdrDaemonSourceReport()->setBufferRwBalance(m_remoteInputUDPHandler->getBufferGauge());
|
||||
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(m_SDRdaemonUDPHandler->getTVmSec());
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(m_remoteInputUDPHandler->getTVmSec());
|
||||
response.getSdrDaemonSourceReport()->setDaemonTimestamp(new QString(dt.toString("yyyy-MM-dd HH:mm:ss.zzz")));
|
||||
|
||||
response.getSdrDaemonSourceReport()->setMinNbBlocks(m_SDRdaemonUDPHandler->getMinNbBlocks());
|
||||
response.getSdrDaemonSourceReport()->setMaxNbRecovery(m_SDRdaemonUDPHandler->getMaxNbRecovery());
|
||||
response.getSdrDaemonSourceReport()->setMinNbBlocks(m_remoteInputUDPHandler->getMinNbBlocks());
|
||||
response.getSdrDaemonSourceReport()->setMaxNbRecovery(m_remoteInputUDPHandler->getMaxNbRecovery());
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const SDRdaemonSourceSettings& settings, bool force)
|
||||
void RemoteInput::webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const RemoteInputSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGDeviceSettings *swgDeviceSettings = new SWGSDRangel::SWGDeviceSettings();
|
||||
swgDeviceSettings->setTx(0);
|
||||
@ -480,7 +480,7 @@ void SDRdaemonSourceInput::webapiReverseSendSettings(QList<QString>& deviceSetti
|
||||
delete swgDeviceSettings;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::webapiReverseSendStartStop(bool start)
|
||||
void RemoteInput::webapiReverseSendStartStop(bool start)
|
||||
{
|
||||
QString deviceSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/device/run")
|
||||
.arg(m_settings.m_reverseAPIAddress)
|
||||
@ -495,13 +495,13 @@ void SDRdaemonSourceInput::webapiReverseSendStartStop(bool start)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceInput::networkManagerFinished(QNetworkReply *reply)
|
||||
void RemoteInput::networkManagerFinished(QNetworkReply *reply)
|
||||
{
|
||||
QNetworkReply::NetworkError replyError = reply->error();
|
||||
|
||||
if (replyError)
|
||||
{
|
||||
qWarning() << "SDRdaemonSourceInput::networkManagerFinished:"
|
||||
qWarning() << "RemoteInput::networkManagerFinished:"
|
||||
<< " error(" << (int) replyError
|
||||
<< "): " << replyError
|
||||
<< ": " << reply->errorString();
|
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_SDRDAEMONSOURCEINPUT_H
|
||||
#define INCLUDE_SDRDAEMONSOURCEINPUT_H
|
||||
#ifndef INCLUDE_REMOTEINPUT_H
|
||||
#define INCLUDE_REMOTEINPUT_H
|
||||
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
@ -26,79 +26,80 @@
|
||||
#include <QTimer>
|
||||
#include <QNetworkRequest>
|
||||
|
||||
#include <dsp/devicesamplesource.h>
|
||||
#include "sdrdaemonsourcesettings.h"
|
||||
#include "dsp/devicesamplesource.h"
|
||||
|
||||
#include "remoteinputsettings.h"
|
||||
|
||||
class QNetworkAccessManager;
|
||||
class QNetworkReply;
|
||||
class DeviceSourceAPI;
|
||||
class SDRdaemonSourceUDPHandler;
|
||||
class RemoteInputUDPHandler;
|
||||
class FileRecord;
|
||||
|
||||
class SDRdaemonSourceInput : public DeviceSampleSource {
|
||||
class RemoteInput : public DeviceSampleSource {
|
||||
Q_OBJECT
|
||||
public:
|
||||
class MsgConfigureSDRdaemonSource : public Message {
|
||||
class MsgConfigureRemoteInput : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
const SDRdaemonSourceSettings& getSettings() const { return m_settings; }
|
||||
const RemoteInputSettings& getSettings() const { return m_settings; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureSDRdaemonSource* create(const SDRdaemonSourceSettings& settings, bool force = false)
|
||||
static MsgConfigureRemoteInput* create(const RemoteInputSettings& settings, bool force = false)
|
||||
{
|
||||
return new MsgConfigureSDRdaemonSource(settings, force);
|
||||
return new MsgConfigureRemoteInput(settings, force);
|
||||
}
|
||||
|
||||
private:
|
||||
SDRdaemonSourceSettings m_settings;
|
||||
RemoteInputSettings m_settings;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureSDRdaemonSource(const SDRdaemonSourceSettings& settings, bool force) :
|
||||
MsgConfigureRemoteInput(const RemoteInputSettings& settings, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgConfigureSDRdaemonStreamTiming : public Message {
|
||||
class MsgConfigureRemoteInputTiming : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
|
||||
static MsgConfigureSDRdaemonStreamTiming* create()
|
||||
static MsgConfigureRemoteInputTiming* create()
|
||||
{
|
||||
return new MsgConfigureSDRdaemonStreamTiming();
|
||||
return new MsgConfigureRemoteInputTiming();
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
MsgConfigureSDRdaemonStreamTiming() :
|
||||
MsgConfigureRemoteInputTiming() :
|
||||
Message()
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportSDRdaemonAcquisition : public Message {
|
||||
class MsgReportRemoteInputAcquisition : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
bool getAcquisition() const { return m_acquisition; }
|
||||
|
||||
static MsgReportSDRdaemonAcquisition* create(bool acquisition)
|
||||
static MsgReportRemoteInputAcquisition* create(bool acquisition)
|
||||
{
|
||||
return new MsgReportSDRdaemonAcquisition(acquisition);
|
||||
return new MsgReportRemoteInputAcquisition(acquisition);
|
||||
}
|
||||
|
||||
protected:
|
||||
bool m_acquisition;
|
||||
|
||||
MsgReportSDRdaemonAcquisition(bool acquisition) :
|
||||
MsgReportRemoteInputAcquisition(bool acquisition) :
|
||||
Message(),
|
||||
m_acquisition(acquisition)
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportSDRdaemonSourceStreamData : public Message {
|
||||
class MsgReportRemoteInputStreamData : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
@ -106,9 +107,9 @@ public:
|
||||
quint64 getCenterFrequency() const { return m_centerFrequency; }
|
||||
uint32_t get_tv_msec() const { return m_tv_msec; }
|
||||
|
||||
static MsgReportSDRdaemonSourceStreamData* create(int sampleRate, quint64 centerFrequency, uint64_t tv_msec)
|
||||
static MsgReportRemoteInputStreamData* create(int sampleRate, quint64 centerFrequency, uint64_t tv_msec)
|
||||
{
|
||||
return new MsgReportSDRdaemonSourceStreamData(sampleRate, centerFrequency, tv_msec);
|
||||
return new MsgReportRemoteInputStreamData(sampleRate, centerFrequency, tv_msec);
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -116,7 +117,7 @@ public:
|
||||
quint64 m_centerFrequency;
|
||||
uint64_t m_tv_msec;
|
||||
|
||||
MsgReportSDRdaemonSourceStreamData(int sampleRate, quint64 centerFrequency, uint64_t tv_msec) :
|
||||
MsgReportRemoteInputStreamData(int sampleRate, quint64 centerFrequency, uint64_t tv_msec) :
|
||||
Message(),
|
||||
m_sampleRate(sampleRate),
|
||||
m_centerFrequency(centerFrequency),
|
||||
@ -124,7 +125,7 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
class MsgReportSDRdaemonSourceStreamTiming : public Message {
|
||||
class MsgReportRemoteInputStreamTiming : public Message {
|
||||
MESSAGE_CLASS_DECLARATION
|
||||
|
||||
public:
|
||||
@ -144,7 +145,7 @@ public:
|
||||
int getSampleBits() const { return m_sampleBits; }
|
||||
int getSampleBytes() const { return m_sampleBytes; }
|
||||
|
||||
static MsgReportSDRdaemonSourceStreamTiming* create(uint64_t tv_msec,
|
||||
static MsgReportRemoteInputStreamTiming* create(uint64_t tv_msec,
|
||||
float bufferLenSec,
|
||||
int32_t bufferGauge,
|
||||
int framesDecodingStatus,
|
||||
@ -160,7 +161,7 @@ public:
|
||||
int sampleBits,
|
||||
int sampleBytes)
|
||||
{
|
||||
return new MsgReportSDRdaemonSourceStreamTiming(tv_msec,
|
||||
return new MsgReportRemoteInputStreamTiming(tv_msec,
|
||||
bufferLenSec,
|
||||
bufferGauge,
|
||||
framesDecodingStatus,
|
||||
@ -194,7 +195,7 @@ public:
|
||||
int m_sampleBits;
|
||||
int m_sampleBytes;
|
||||
|
||||
MsgReportSDRdaemonSourceStreamTiming(uint64_t tv_msec,
|
||||
MsgReportRemoteInputStreamTiming(uint64_t tv_msec,
|
||||
float bufferLenSec,
|
||||
int32_t bufferGauge,
|
||||
int framesDecodingStatus,
|
||||
@ -266,8 +267,8 @@ public:
|
||||
{ }
|
||||
};
|
||||
|
||||
SDRdaemonSourceInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~SDRdaemonSourceInput();
|
||||
RemoteInput(DeviceSourceAPI *deviceAPI);
|
||||
virtual ~RemoteInput();
|
||||
virtual void destroy();
|
||||
|
||||
virtual void init();
|
||||
@ -313,8 +314,8 @@ public:
|
||||
private:
|
||||
DeviceSourceAPI *m_deviceAPI;
|
||||
QMutex m_mutex;
|
||||
SDRdaemonSourceSettings m_settings;
|
||||
SDRdaemonSourceUDPHandler* m_SDRdaemonUDPHandler;
|
||||
RemoteInputSettings m_settings;
|
||||
RemoteInputUDPHandler* m_remoteInputUDPHandler;
|
||||
QString m_remoteAddress;
|
||||
QString m_deviceDescription;
|
||||
std::time_t m_startingTimeStamp;
|
||||
@ -322,14 +323,14 @@ private:
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
QNetworkRequest m_networkRequest;
|
||||
|
||||
void applySettings(const SDRdaemonSourceSettings& settings, bool force = false);
|
||||
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const SDRdaemonSourceSettings& settings);
|
||||
void applySettings(const RemoteInputSettings& settings, bool force = false);
|
||||
void webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSettings& response, const RemoteInputSettings& settings);
|
||||
void webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response);
|
||||
void webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const SDRdaemonSourceSettings& settings, bool force);
|
||||
void webapiReverseSendSettings(QList<QString>& deviceSettingsKeys, const RemoteInputSettings& settings, bool force);
|
||||
void webapiReverseSendStartStop(bool start);
|
||||
|
||||
private slots:
|
||||
void networkManagerFinished(QNetworkReply *reply);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SDRDAEMONSOURCEINPUT_H
|
||||
#endif // INCLUDE_REMOTEINPUT_H
|
@ -9,7 +9,7 @@ CONFIG += plugin
|
||||
|
||||
QT += core gui widgets multimedia network opengl
|
||||
|
||||
TARGET = inputsdrdaemonsource
|
||||
TARGET = remoteinput
|
||||
|
||||
CONFIG(MINGW32):LIBCM256CCSRC = "C:\softs\cm256cc"
|
||||
CONFIG(MSVC):LIBCM256CCSRC = "C:\softs\cm256cc"
|
||||
@ -38,21 +38,21 @@ CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0"
|
||||
CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
|
||||
CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0"
|
||||
|
||||
SOURCES += sdrdaemonsourcebuffer.cpp\
|
||||
sdrdaemonsourcegui.cpp\
|
||||
sdrdaemonsourceinput.cpp\
|
||||
sdrdaemonsourcesettings.cpp\
|
||||
sdrdaemonsourceplugin.cpp\
|
||||
sdrdaemonsourceudphandler.cpp
|
||||
SOURCES += remoteinputbuffer.cpp\
|
||||
remoteinputgui.cpp\
|
||||
remoteinput.cpp\
|
||||
remoteinputsettings.cpp\
|
||||
remoteinputplugin.cpp\
|
||||
remoteinputeudphandler.cpp
|
||||
|
||||
HEADERS += sdrdaemonsourcebuffer.h\
|
||||
sdrdaemonsourcegui.h\
|
||||
sdrdaemonsourceinput.h\
|
||||
sdrdaemonsourcesettings.h\
|
||||
sdrdaemonsourceplugin.h\
|
||||
sdrdaemonsourceudphandler.h
|
||||
HEADERS += remoteinputbuffer.h\
|
||||
remoteinputgui.h\
|
||||
remoteinput.h\
|
||||
remoteinputsettings.h\
|
||||
remoteinputplugin.h\
|
||||
remoteinputeudphandler.h
|
||||
|
||||
FORMS += sdrdaemonsourcegui.ui
|
||||
FORMS += remoteinputgui.ui
|
||||
|
||||
LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase
|
||||
LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui
|
@ -21,11 +21,11 @@
|
||||
#include <algorithm>
|
||||
#include <boost/crc.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include "sdrdaemonsourcebuffer.h"
|
||||
#include "remoteinputbuffer.h"
|
||||
|
||||
|
||||
|
||||
SDRdaemonSourceBuffer::SDRdaemonSourceBuffer() :
|
||||
RemoteInputBuffer::RemoteInputBuffer() :
|
||||
m_decoderIndexHead(nbDecoderSlots/2),
|
||||
m_frameHead(0),
|
||||
m_curNbBlocks(0),
|
||||
@ -55,7 +55,7 @@ SDRdaemonSourceBuffer::SDRdaemonSourceBuffer() :
|
||||
|
||||
if (!m_cm256.isInitialized()) {
|
||||
m_cm256_OK = false;
|
||||
qDebug() << "SDRdaemonSourceBuffer::SDRdaemonSourceBuffer: cannot initialize CM256 library";
|
||||
qDebug() << "RemoteInputBuffer::RemoteInputBuffer: cannot initialize CM256 library";
|
||||
} else {
|
||||
m_cm256_OK = true;
|
||||
}
|
||||
@ -64,14 +64,14 @@ SDRdaemonSourceBuffer::SDRdaemonSourceBuffer() :
|
||||
std::fill(m_frames, m_frames + nbDecoderSlots, BufferFrame());
|
||||
}
|
||||
|
||||
SDRdaemonSourceBuffer::~SDRdaemonSourceBuffer()
|
||||
RemoteInputBuffer::~RemoteInputBuffer()
|
||||
{
|
||||
if (m_readBuffer) {
|
||||
delete[] m_readBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::initDecodeAllSlots()
|
||||
void RemoteInputBuffer::initDecodeAllSlots()
|
||||
{
|
||||
for (int i = 0; i < nbDecoderSlots; i++)
|
||||
{
|
||||
@ -85,7 +85,7 @@ void SDRdaemonSourceBuffer::initDecodeAllSlots()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::initDecodeSlot(int slotIndex)
|
||||
void RemoteInputBuffer::initDecodeSlot(int slotIndex)
|
||||
{
|
||||
// collect stats before voiding the slot
|
||||
|
||||
@ -121,7 +121,7 @@ void SDRdaemonSourceBuffer::initDecodeSlot(int slotIndex)
|
||||
memset((void *) m_decoderSlots[slotIndex].m_recoveryBlocks, 0, RemoteNbOrginalBlocks * sizeof(RemoteProtectedBlock));
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::initReadIndex()
|
||||
void RemoteInputBuffer::initReadIndex()
|
||||
{
|
||||
m_readIndex = ((m_decoderIndexHead + (nbDecoderSlots/2)) % nbDecoderSlots) * sizeof(BufferFrame);
|
||||
m_wrDeltaEstimate = m_framesNbBytes / 2;
|
||||
@ -129,7 +129,7 @@ void SDRdaemonSourceBuffer::initReadIndex()
|
||||
m_nbWrites = 0;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::rwCorrectionEstimate(int slotIndex)
|
||||
void RemoteInputBuffer::rwCorrectionEstimate(int slotIndex)
|
||||
{
|
||||
if (m_nbReads >= 40) // check every ~1s as tick is ~50ms
|
||||
{
|
||||
@ -162,7 +162,7 @@ void SDRdaemonSourceBuffer::rwCorrectionEstimate(int slotIndex)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::checkSlotData(int slotIndex)
|
||||
void RemoteInputBuffer::checkSlotData(int slotIndex)
|
||||
{
|
||||
int pseudoWriteIndex = slotIndex * sizeof(BufferFrame);
|
||||
m_wrDeltaEstimate = pseudoWriteIndex - m_readIndex;
|
||||
@ -181,14 +181,14 @@ void SDRdaemonSourceBuffer::checkSlotData(int slotIndex)
|
||||
|
||||
if (!m_decoderSlots[slotIndex].m_decoded)
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceBuffer::checkSlotData: incomplete frame:"
|
||||
qDebug() << "RemoteInputBuffer::checkSlotData: incomplete frame:"
|
||||
<< " slotIndex: " << slotIndex
|
||||
<< " m_blockCount: " << m_decoderSlots[slotIndex].m_blockCount
|
||||
<< " m_recoveryCount: " << m_decoderSlots[slotIndex].m_recoveryCount;
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
void RemoteInputBuffer::writeData(char *array)
|
||||
{
|
||||
RemoteSuperBlock *superBlock = (RemoteSuperBlock *) array;
|
||||
int frameIndex = superBlock->m_header.m_frameIndex;
|
||||
@ -258,7 +258,7 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
|
||||
if (m_cm256.cm256_decode(m_paramsCM256, m_decoderSlots[decoderIndex].m_cm256DescriptorBlocks)) // CM256 decode
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceBuffer::writeData: decode CM256 error:"
|
||||
qDebug() << "RemoteInputBuffer::writeData: decode CM256 error:"
|
||||
<< " decoderIndex: " << decoderIndex
|
||||
<< " m_blockCount: " << m_decoderSlots[decoderIndex].m_blockCount
|
||||
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
||||
@ -266,7 +266,7 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceBuffer::writeData: decode CM256 success:"
|
||||
qDebug() << "RemoteInputBuffer::writeData: decode CM256 success:"
|
||||
<< " decoderIndex: " << decoderIndex
|
||||
<< " m_blockCount: " << m_decoderSlots[decoderIndex].m_blockCount
|
||||
<< " m_originalCount: " << m_decoderSlots[decoderIndex].m_originalCount
|
||||
@ -288,17 +288,17 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
if (crc32.checksum() == metaData->m_crc32)
|
||||
{
|
||||
m_decoderSlots[decoderIndex].m_metaRetrieved = true;
|
||||
printMeta("SDRdaemonSourceBuffer::writeData: recovered meta", metaData);
|
||||
printMeta("RemoteInputBuffer::writeData: recovered meta", metaData);
|
||||
}
|
||||
else
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceBuffer::writeData: recovered meta: invalid CRC32";
|
||||
qDebug() << "RemoteInputBuffer::writeData: recovered meta: invalid CRC32";
|
||||
}
|
||||
}
|
||||
|
||||
storeOriginalBlock(decoderIndex, blockIndex, *recoveredBlock);
|
||||
|
||||
qDebug() << "SDRdaemonSourceBuffer::writeData: recovered block #" << blockIndex;
|
||||
qDebug() << "RemoteInputBuffer::writeData: recovered block #" << blockIndex;
|
||||
} // restore missing blocks
|
||||
} // CM256 decode
|
||||
} // recovery
|
||||
@ -318,7 +318,7 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
m_readNbBytes = (sampleRate * metaData->m_sampleBytes * 2) / 20;
|
||||
}
|
||||
|
||||
printMeta("SDRdaemonSourceBuffer::writeData: new meta", metaData); // print for change other than timestamp
|
||||
printMeta("RemoteInputBuffer::writeData: new meta", metaData); // print for change other than timestamp
|
||||
}
|
||||
|
||||
m_currentMeta = *metaData; // renew current meta
|
||||
@ -326,7 +326,7 @@ void SDRdaemonSourceBuffer::writeData(char *array)
|
||||
} // decode
|
||||
}
|
||||
|
||||
uint8_t *SDRdaemonSourceBuffer::readData(int32_t length)
|
||||
uint8_t *RemoteInputBuffer::readData(int32_t length)
|
||||
{
|
||||
uint8_t *buffer = (uint8_t *) m_frames;
|
||||
uint32_t readIndex = m_readIndex;
|
||||
@ -368,7 +368,7 @@ uint8_t *SDRdaemonSourceBuffer::readData(int32_t length)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceBuffer::printMeta(const QString& header, RemoteMetaDataFEC *metaData)
|
||||
void RemoteInputBuffer::printMeta(const QString& header, RemoteMetaDataFEC *metaData)
|
||||
{
|
||||
qDebug() << header << ": "
|
||||
<< "|" << metaData->m_centerFrequency
|
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEBUFFER_H_
|
||||
#define PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEBUFFER_H_
|
||||
#ifndef PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTBUFFER_H_
|
||||
#define PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTBUFFER_H_
|
||||
|
||||
#include <channel/remotedatablock.h>
|
||||
#include <QString>
|
||||
@ -25,15 +25,15 @@
|
||||
#include "util/movingaverage.h"
|
||||
|
||||
|
||||
#define SDRDAEMONSOURCE_UDPSIZE 512 // UDP payload size
|
||||
#define SDRDAEMONSOURCE_NBORIGINALBLOCKS 128 // number of sample blocks per frame excluding FEC blocks
|
||||
#define SDRDAEMONSOURCE_NBDECODERSLOTS 16 // power of two sub multiple of uint16_t size. A too large one is superfluous.
|
||||
#define REMOTEINPUT_UDPSIZE 512 // UDP payload size
|
||||
#define REMOTEINPUT_NBORIGINALBLOCKS 128 // number of sample blocks per frame excluding FEC blocks
|
||||
#define REMOTEINPUT_NBDECODERSLOTS 16 // power of two sub multiple of uint16_t size. A too large one is superfluous.
|
||||
|
||||
class SDRdaemonSourceBuffer
|
||||
class RemoteInputBuffer
|
||||
{
|
||||
public:
|
||||
SDRdaemonSourceBuffer();
|
||||
~SDRdaemonSourceBuffer();
|
||||
RemoteInputBuffer();
|
||||
~RemoteInputBuffer();
|
||||
|
||||
// R/W operations
|
||||
void writeData(char *array); //!< Write data into buffer.
|
||||
@ -105,10 +105,10 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
static const int framesSize = SDRDAEMONSOURCE_NBDECODERSLOTS * (RemoteNbOrginalBlocks - 1) * RemoteNbBytesPerBlock;
|
||||
static const int framesSize = REMOTEINPUT_NBDECODERSLOTS * (RemoteNbOrginalBlocks - 1) * RemoteNbBytesPerBlock;
|
||||
|
||||
private:
|
||||
static const int nbDecoderSlots = SDRDAEMONSOURCE_NBDECODERSLOTS;
|
||||
static const int nbDecoderSlots = REMOTEINPUT_NBDECODERSLOTS;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
struct BufferFrame
|
||||
@ -215,4 +215,4 @@ private:
|
||||
|
||||
|
||||
|
||||
#endif /* PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEBUFFER_H_ */
|
||||
#endif /* PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTBUFFER_H_ */
|
@ -29,7 +29,7 @@
|
||||
#include <QJsonParseError>
|
||||
#include <QJsonObject>
|
||||
|
||||
#include "ui_sdrdaemonsourcegui.h"
|
||||
#include "ui_remoteinputgui.h"
|
||||
#include "gui/colormapper.h"
|
||||
#include "gui/glspectrum.h"
|
||||
#include "gui/crightclickenabler.h"
|
||||
@ -40,12 +40,12 @@
|
||||
#include "util/simpleserializer.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/deviceuiset.h"
|
||||
#include "remoteinputgui.h"
|
||||
|
||||
#include "sdrdaemonsourcegui.h"
|
||||
|
||||
SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SDRdaemonSourceGui),
|
||||
ui(new Ui::RemoteInputGui),
|
||||
m_deviceUISet(deviceUISet),
|
||||
m_settings(),
|
||||
m_sampleSource(0),
|
||||
@ -88,7 +88,7 @@ SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceUISet *deviceUISet, QWidget* parent
|
||||
m_statusTimer.start(500);
|
||||
connect(&m_updateTimer, SIGNAL(timeout()), this, SLOT(updateHardware()));
|
||||
|
||||
m_sampleSource = (SDRdaemonSourceInput*) m_deviceUISet->m_deviceSourceAPI->getSampleSource();
|
||||
m_sampleSource = (RemoteInput*) m_deviceUISet->m_deviceSourceAPI->getSampleSource();
|
||||
|
||||
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
|
||||
m_sampleSource->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
@ -104,34 +104,34 @@ SDRdaemonSourceGui::SDRdaemonSourceGui(DeviceUISet *deviceUISet, QWidget* parent
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
SDRdaemonSourceGui::~SDRdaemonSourceGui()
|
||||
RemoteInputGui::~RemoteInputGui()
|
||||
{
|
||||
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
|
||||
delete m_networkManager;
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::blockApplySettings(bool block)
|
||||
void RemoteInputGui::blockApplySettings(bool block)
|
||||
{
|
||||
m_doApplySettings = !block;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::destroy()
|
||||
void RemoteInputGui::destroy()
|
||||
{
|
||||
delete this;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::setName(const QString& name)
|
||||
void RemoteInputGui::setName(const QString& name)
|
||||
{
|
||||
setObjectName(name);
|
||||
}
|
||||
|
||||
QString SDRdaemonSourceGui::getName() const
|
||||
QString RemoteInputGui::getName() const
|
||||
{
|
||||
return objectName();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::resetToDefaults()
|
||||
void RemoteInputGui::resetToDefaults()
|
||||
{
|
||||
m_settings.resetToDefaults();
|
||||
displaySettings();
|
||||
@ -139,14 +139,14 @@ void SDRdaemonSourceGui::resetToDefaults()
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
QByteArray SDRdaemonSourceGui::serialize() const
|
||||
QByteArray RemoteInputGui::serialize() const
|
||||
{
|
||||
return m_settings.serialize();
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceGui::deserialize(const QByteArray& data)
|
||||
bool RemoteInputGui::deserialize(const QByteArray& data)
|
||||
{
|
||||
qDebug("SDRdaemonSourceGui::deserialize");
|
||||
qDebug("RemoteInputGui::deserialize");
|
||||
|
||||
if (m_settings.deserialize(data))
|
||||
{
|
||||
@ -162,61 +162,61 @@ bool SDRdaemonSourceGui::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
qint64 SDRdaemonSourceGui::getCenterFrequency() const
|
||||
qint64 RemoteInputGui::getCenterFrequency() const
|
||||
{
|
||||
return m_streamCenterFrequency;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::setCenterFrequency(qint64 centerFrequency)
|
||||
void RemoteInputGui::setCenterFrequency(qint64 centerFrequency)
|
||||
{
|
||||
(void) centerFrequency;
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceGui::handleMessage(const Message& message)
|
||||
bool RemoteInputGui::handleMessage(const Message& message)
|
||||
{
|
||||
if (SDRdaemonSourceInput::MsgConfigureSDRdaemonSource::match(message))
|
||||
if (RemoteInput::MsgConfigureRemoteInput::match(message))
|
||||
{
|
||||
const SDRdaemonSourceInput::MsgConfigureSDRdaemonSource& cfg = (SDRdaemonSourceInput::MsgConfigureSDRdaemonSource&) message;
|
||||
const RemoteInput::MsgConfigureRemoteInput& cfg = (RemoteInput::MsgConfigureRemoteInput&) message;
|
||||
m_settings = cfg.getSettings();
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
blockApplySettings(false);
|
||||
return true;
|
||||
}
|
||||
else if (SDRdaemonSourceInput::MsgReportSDRdaemonAcquisition::match(message))
|
||||
else if (RemoteInput::MsgReportRemoteInputAcquisition::match(message))
|
||||
{
|
||||
m_acquisition = ((SDRdaemonSourceInput::MsgReportSDRdaemonAcquisition&)message).getAcquisition();
|
||||
m_acquisition = ((RemoteInput::MsgReportRemoteInputAcquisition&)message).getAcquisition();
|
||||
updateWithAcquisition();
|
||||
return true;
|
||||
}
|
||||
else if (SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData::match(message))
|
||||
else if (RemoteInput::MsgReportRemoteInputStreamData::match(message))
|
||||
{
|
||||
m_startingTimeStampms = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData&)message).get_tv_msec();
|
||||
m_startingTimeStampms = ((RemoteInput::MsgReportRemoteInputStreamData&)message).get_tv_msec();
|
||||
|
||||
qDebug() << "SDRdaemonSourceGui::handleMessage: SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData: "
|
||||
qDebug() << "RemoteInputGui::handleMessage: RemoteInput::MsgReportRemoteInputStreamData: "
|
||||
<< " : " << m_startingTimeStampms << " ms";
|
||||
|
||||
updateWithStreamTime();
|
||||
return true;
|
||||
}
|
||||
else if (SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming::match(message))
|
||||
else if (RemoteInput::MsgReportRemoteInputStreamTiming::match(message))
|
||||
{
|
||||
m_startingTimeStampms = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).get_tv_msec();
|
||||
m_framesDecodingStatus = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getFramesDecodingStatus();
|
||||
m_allBlocksReceived = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).allBlocksReceived();
|
||||
m_bufferLengthInSecs = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getBufferLengthInSecs();
|
||||
m_bufferGauge = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getBufferGauge();
|
||||
m_minNbBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getMinNbBlocks();
|
||||
m_minNbOriginalBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getMinNbOriginalBlocks();
|
||||
m_maxNbRecovery = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getMaxNbRecovery();
|
||||
m_avgNbBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getAvgNbBlocks();
|
||||
m_avgNbOriginalBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getAvgNbOriginalBlocks();
|
||||
m_avgNbRecovery = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getAvgNbRecovery();
|
||||
m_nbOriginalBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getNbOriginalBlocksPerFrame();
|
||||
m_sampleBits = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getSampleBits();
|
||||
m_sampleBytes = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getSampleBytes();
|
||||
m_startingTimeStampms = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).get_tv_msec();
|
||||
m_framesDecodingStatus = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getFramesDecodingStatus();
|
||||
m_allBlocksReceived = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).allBlocksReceived();
|
||||
m_bufferLengthInSecs = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getBufferLengthInSecs();
|
||||
m_bufferGauge = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getBufferGauge();
|
||||
m_minNbBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getMinNbBlocks();
|
||||
m_minNbOriginalBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getMinNbOriginalBlocks();
|
||||
m_maxNbRecovery = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getMaxNbRecovery();
|
||||
m_avgNbBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getAvgNbBlocks();
|
||||
m_avgNbOriginalBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getAvgNbOriginalBlocks();
|
||||
m_avgNbRecovery = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getAvgNbRecovery();
|
||||
m_nbOriginalBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getNbOriginalBlocksPerFrame();
|
||||
m_sampleBits = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getSampleBits();
|
||||
m_sampleBytes = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getSampleBytes();
|
||||
|
||||
int nbFECBlocks = ((SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming&)message).getNbFECBlocksPerFrame();
|
||||
int nbFECBlocks = ((RemoteInput::MsgReportRemoteInputStreamTiming&)message).getNbFECBlocksPerFrame();
|
||||
|
||||
if (m_nbFECBlocks != nbFECBlocks) {
|
||||
m_nbFECBlocks = nbFECBlocks;
|
||||
@ -225,9 +225,9 @@ bool SDRdaemonSourceGui::handleMessage(const Message& message)
|
||||
updateWithStreamTime();
|
||||
return true;
|
||||
}
|
||||
else if (SDRdaemonSourceInput::MsgStartStop::match(message))
|
||||
else if (RemoteInput::MsgStartStop::match(message))
|
||||
{
|
||||
SDRdaemonSourceInput::MsgStartStop& notif = (SDRdaemonSourceInput::MsgStartStop&) message;
|
||||
RemoteInput::MsgStartStop& notif = (RemoteInput::MsgStartStop&) message;
|
||||
blockApplySettings(true);
|
||||
ui->startStop->setChecked(notif.getStartStop());
|
||||
blockApplySettings(false);
|
||||
@ -240,13 +240,13 @@ bool SDRdaemonSourceGui::handleMessage(const Message& message)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::handleInputMessages()
|
||||
void RemoteInputGui::handleInputMessages()
|
||||
{
|
||||
Message* message;
|
||||
|
||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||
{
|
||||
//qDebug("SDRdaemonGui::handleInputMessages: message: %s", message->getIdentifier());
|
||||
//qDebug("RemoteInputGui::handleInputMessages: message: %s", message->getIdentifier());
|
||||
|
||||
if (DSPSignalNotification::match(*message))
|
||||
{
|
||||
@ -258,7 +258,7 @@ void SDRdaemonSourceGui::handleInputMessages()
|
||||
|
||||
m_streamCenterFrequency = notif->getCenterFrequency();
|
||||
|
||||
qDebug("SDRdaemonGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
|
||||
qDebug("RemoteInputGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->getSampleRate(), notif->getCenterFrequency());
|
||||
|
||||
updateSampleRateAndFrequency();
|
||||
DSPSignalNotification *fwd = new DSPSignalNotification(*notif);
|
||||
@ -276,7 +276,7 @@ void SDRdaemonSourceGui::handleInputMessages()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::updateSampleRateAndFrequency()
|
||||
void RemoteInputGui::updateSampleRateAndFrequency()
|
||||
{
|
||||
m_deviceUISet->getSpectrum()->setSampleRate(m_streamSampleRate);
|
||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_streamCenterFrequency);
|
||||
@ -286,7 +286,7 @@ void SDRdaemonSourceGui::updateSampleRateAndFrequency()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::displaySettings()
|
||||
void RemoteInputGui::displaySettings()
|
||||
{
|
||||
blockApplySettings(true);
|
||||
|
||||
@ -304,13 +304,13 @@ void SDRdaemonSourceGui::displaySettings()
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::sendSettings()
|
||||
void RemoteInputGui::sendSettings()
|
||||
{
|
||||
if(!m_updateTimer.isActive())
|
||||
m_updateTimer.start(100);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_apiApplyButton_clicked(bool checked)
|
||||
void RemoteInputGui::on_apiApplyButton_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
m_settings.m_apiAddress = ui->apiAddress->text();
|
||||
@ -329,7 +329,7 @@ void SDRdaemonSourceGui::on_apiApplyButton_clicked(bool checked)
|
||||
m_networkManager->get(m_networkRequest);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_dataApplyButton_clicked(bool checked)
|
||||
void RemoteInputGui::on_dataApplyButton_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||
@ -344,7 +344,7 @@ void SDRdaemonSourceGui::on_dataApplyButton_clicked(bool checked)
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_apiAddress_returnPressed()
|
||||
void RemoteInputGui::on_apiAddress_returnPressed()
|
||||
{
|
||||
m_settings.m_apiAddress = ui->apiAddress->text();
|
||||
|
||||
@ -355,13 +355,13 @@ void SDRdaemonSourceGui::on_apiAddress_returnPressed()
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_dataAddress_returnPressed()
|
||||
void RemoteInputGui::on_dataAddress_returnPressed()
|
||||
{
|
||||
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_dataPort_returnPressed()
|
||||
void RemoteInputGui::on_dataPort_returnPressed()
|
||||
{
|
||||
bool dataOk;
|
||||
int udpDataPort = ui->dataPort->text().toInt(&dataOk);
|
||||
@ -377,7 +377,7 @@ void SDRdaemonSourceGui::on_dataPort_returnPressed()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_apiPort_returnPressed()
|
||||
void RemoteInputGui::on_apiPort_returnPressed()
|
||||
{
|
||||
bool ctlOk;
|
||||
int udpApiPort = ui->apiPort->text().toInt(&ctlOk);
|
||||
@ -398,28 +398,28 @@ void SDRdaemonSourceGui::on_apiPort_returnPressed()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_dcOffset_toggled(bool checked)
|
||||
void RemoteInputGui::on_dcOffset_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_dcBlock = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_iqImbalance_toggled(bool checked)
|
||||
void RemoteInputGui::on_iqImbalance_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_iqCorrection = checked;
|
||||
sendSettings();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_startStop_toggled(bool checked)
|
||||
void RemoteInputGui::on_startStop_toggled(bool checked)
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
SDRdaemonSourceInput::MsgStartStop *message = SDRdaemonSourceInput::MsgStartStop::create(checked);
|
||||
RemoteInput::MsgStartStop *message = RemoteInput::MsgStartStop::create(checked);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_record_toggled(bool checked)
|
||||
void RemoteInputGui::on_record_toggled(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
ui->record->setStyleSheet("QToolButton { background-color : red; }");
|
||||
@ -427,11 +427,11 @@ void SDRdaemonSourceGui::on_record_toggled(bool checked)
|
||||
ui->record->setStyleSheet("QToolButton { background:rgb(79,79,79); }");
|
||||
}
|
||||
|
||||
SDRdaemonSourceInput::MsgFileRecord* message = SDRdaemonSourceInput::MsgFileRecord::create(checked);
|
||||
RemoteInput::MsgFileRecord* message = RemoteInput::MsgFileRecord::create(checked);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::on_eventCountsReset_clicked(bool checked)
|
||||
void RemoteInputGui::on_eventCountsReset_clicked(bool checked)
|
||||
{
|
||||
(void) checked;
|
||||
m_countUnrecoverable = 0;
|
||||
@ -441,7 +441,7 @@ void SDRdaemonSourceGui::on_eventCountsReset_clicked(bool checked)
|
||||
displayEventTimer();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::displayEventCounts()
|
||||
void RemoteInputGui::displayEventCounts()
|
||||
{
|
||||
QString nstr = QString("%1").arg(m_countUnrecoverable, 3, 10, QChar('0'));
|
||||
ui->eventUnrecText->setText(nstr);
|
||||
@ -449,7 +449,7 @@ void SDRdaemonSourceGui::displayEventCounts()
|
||||
ui->eventRecText->setText(nstr);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::displayEventTimer()
|
||||
void RemoteInputGui::displayEventTimer()
|
||||
{
|
||||
int elapsedTimeMillis = m_eventsTime.elapsed();
|
||||
QTime recordLength(0, 0, 0, 0);
|
||||
@ -458,11 +458,11 @@ void SDRdaemonSourceGui::displayEventTimer()
|
||||
ui->eventCountsTimeText->setText(s_time);
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::updateWithAcquisition()
|
||||
void RemoteInputGui::updateWithAcquisition()
|
||||
{
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::updateWithStreamTime()
|
||||
void RemoteInputGui::updateWithStreamTime()
|
||||
{
|
||||
bool updateEventCounts = false;
|
||||
QDateTime dt = QDateTime::fromMSecsSinceEpoch(m_startingTimeStampms);
|
||||
@ -515,20 +515,20 @@ void SDRdaemonSourceGui::updateWithStreamTime()
|
||||
displayEventTimer();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::updateHardware()
|
||||
void RemoteInputGui::updateHardware()
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
qDebug() << "SDRdaemonSinkGui::updateHardware";
|
||||
SDRdaemonSourceInput::MsgConfigureSDRdaemonSource* message =
|
||||
SDRdaemonSourceInput::MsgConfigureSDRdaemonSource::create(m_settings, m_forceSettings);
|
||||
qDebug() << "RemoteInputGui::updateHardware";
|
||||
RemoteInput::MsgConfigureRemoteInput* message =
|
||||
RemoteInput::MsgConfigureRemoteInput::create(m_settings, m_forceSettings);
|
||||
m_sampleSource->getInputMessageQueue()->push(message);
|
||||
m_forceSettings = false;
|
||||
m_updateTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::updateStatus()
|
||||
void RemoteInputGui::updateStatus()
|
||||
{
|
||||
if (m_sampleSource->isStreaming())
|
||||
{
|
||||
@ -568,7 +568,7 @@ void SDRdaemonSourceGui::updateStatus()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::networkManagerFinished(QNetworkReply *reply)
|
||||
void RemoteInputGui::networkManagerFinished(QNetworkReply *reply)
|
||||
{
|
||||
if (reply->error())
|
||||
{
|
||||
@ -596,7 +596,7 @@ void SDRdaemonSourceGui::networkManagerFinished(QNetworkReply *reply)
|
||||
ui->apiAddressLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
QString errorMsg = QString("Reply JSON error: ") + error.errorString() + QString(" at offset ") + QString::number(error.offset);
|
||||
ui->statusText->setText(QString("JSON error. See log"));
|
||||
qInfo().noquote() << "SDRdaemonSinkGui::networkManagerFinished" << errorMsg;
|
||||
qInfo().noquote() << "RemoteInputGui::networkManagerFinished" << errorMsg;
|
||||
}
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
@ -604,11 +604,11 @@ void SDRdaemonSourceGui::networkManagerFinished(QNetworkReply *reply)
|
||||
ui->apiAddressLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
|
||||
QString errorMsg = QString("Error parsing request: ") + ex.what();
|
||||
ui->statusText->setText("Error parsing request. See log for details");
|
||||
qInfo().noquote() << "SDRdaemonSinkGui::networkManagerFinished" << errorMsg;
|
||||
qInfo().noquote() << "RemoteInputGui::networkManagerFinished" << errorMsg;
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::analyzeApiReply(const QJsonObject& jsonObject)
|
||||
void RemoteInputGui::analyzeApiReply(const QJsonObject& jsonObject)
|
||||
{
|
||||
QString infoLine;
|
||||
|
||||
@ -637,7 +637,7 @@ void SDRdaemonSourceGui::analyzeApiReply(const QJsonObject& jsonObject)
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
void RemoteInputGui::openDeviceSettingsDialog(const QPoint& p)
|
||||
{
|
||||
BasicDeviceSettingsDialog dialog(this);
|
||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_SDRDAEMONSOURCEGUI_H
|
||||
#define INCLUDE_SDRDAEMONSOURCEGUI_H
|
||||
#ifndef INCLUDE_REMOTEINPUTGUI_H
|
||||
#define INCLUDE_REMOTEINPUTGUI_H
|
||||
|
||||
#include <QTimer>
|
||||
#include <QWidget>
|
||||
@ -24,7 +24,7 @@
|
||||
#include "plugin/plugininstancegui.h"
|
||||
#include "util/messagequeue.h"
|
||||
|
||||
#include "sdrdaemonsourceinput.h"
|
||||
#include "remoteinput.h"
|
||||
|
||||
class DeviceUISet;
|
||||
class QNetworkAccessManager;
|
||||
@ -32,15 +32,15 @@ class QNetworkReply;
|
||||
class QJsonObject;
|
||||
|
||||
namespace Ui {
|
||||
class SDRdaemonSourceGui;
|
||||
class RemoteInputGui;
|
||||
}
|
||||
|
||||
class SDRdaemonSourceGui : public QWidget, public PluginInstanceGUI {
|
||||
class RemoteInputGui : public QWidget, public PluginInstanceGUI {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SDRdaemonSourceGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~SDRdaemonSourceGui();
|
||||
explicit RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent = 0);
|
||||
virtual ~RemoteInputGui();
|
||||
virtual void destroy();
|
||||
|
||||
void setName(const QString& name);
|
||||
@ -55,11 +55,11 @@ public:
|
||||
virtual bool handleMessage(const Message& message);
|
||||
|
||||
private:
|
||||
Ui::SDRdaemonSourceGui* ui;
|
||||
Ui::RemoteInputGui* ui;
|
||||
|
||||
DeviceUISet* m_deviceUISet;
|
||||
SDRdaemonSourceSettings m_settings; //!< current settings
|
||||
SDRdaemonSourceInput* m_sampleSource;
|
||||
RemoteInputSettings m_settings; //!< current settings
|
||||
RemoteInput* m_sampleSource;
|
||||
bool m_acquisition;
|
||||
int m_streamSampleRate; //!< Sample rate of received stream
|
||||
quint64 m_streamCenterFrequency; //!< Center frequency of received stream
|
||||
@ -136,4 +136,4 @@ private slots:
|
||||
void openDeviceSettingsDialog(const QPoint& p);
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SDRDAEMONSOURCEGUI_H
|
||||
#endif // INCLUDE_REMOTEINPUTGUI_H
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SDRdaemonSourceGui</class>
|
||||
<widget class="QWidget" name="SDRdaemonSourceGui">
|
||||
<class>RemoteInputGui</class>
|
||||
<widget class="QWidget" name="RemoteInputGui">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -23,7 +23,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>SDRdaemon Source</string>
|
||||
<string>Remote Input</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
@ -21,45 +21,45 @@
|
||||
#include "device/devicesourceapi.h"
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
#include "sdrdaemonsourceinput.h"
|
||||
#include "remoteinput.h"
|
||||
#else
|
||||
#include "sdrdaemonsourcegui.h"
|
||||
#include "remoteinputgui.h"
|
||||
#endif
|
||||
#include "sdrdaemonsourceplugin.h"
|
||||
#include "remoteinputplugin.h"
|
||||
|
||||
const PluginDescriptor SDRdaemonSourcePlugin::m_pluginDescriptor = {
|
||||
QString("SDRdaemon source input"),
|
||||
QString("4.4.1"),
|
||||
const PluginDescriptor RemoteInputPlugin::m_pluginDescriptor = {
|
||||
QString("Remote input"),
|
||||
QString("4.4.3"),
|
||||
QString("(c) Edouard Griffiths, F4EXB"),
|
||||
QString("https://github.com/f4exb/sdrangel"),
|
||||
true,
|
||||
QString("https://github.com/f4exb/sdrangel")
|
||||
};
|
||||
|
||||
const QString SDRdaemonSourcePlugin::m_hardwareID = "SDRdaemonSource";
|
||||
const QString SDRdaemonSourcePlugin::m_deviceTypeID = SDRDAEMONSOURCE_DEVICE_TYPE_ID;
|
||||
const QString RemoteInputPlugin::m_hardwareID = "RemoteInput";
|
||||
const QString RemoteInputPlugin::m_deviceTypeID = REMOTEINPUT_DEVICE_TYPE_ID;
|
||||
|
||||
SDRdaemonSourcePlugin::SDRdaemonSourcePlugin(QObject* parent) :
|
||||
RemoteInputPlugin::RemoteInputPlugin(QObject* parent) :
|
||||
QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
const PluginDescriptor& SDRdaemonSourcePlugin::getPluginDescriptor() const
|
||||
const PluginDescriptor& RemoteInputPlugin::getPluginDescriptor() const
|
||||
{
|
||||
return m_pluginDescriptor;
|
||||
}
|
||||
|
||||
void SDRdaemonSourcePlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
void RemoteInputPlugin::initPlugin(PluginAPI* pluginAPI)
|
||||
{
|
||||
pluginAPI->registerSampleSource(m_deviceTypeID, this);
|
||||
}
|
||||
|
||||
PluginInterface::SamplingDevices SDRdaemonSourcePlugin::enumSampleSources()
|
||||
PluginInterface::SamplingDevices RemoteInputPlugin::enumSampleSources()
|
||||
{
|
||||
SamplingDevices result;
|
||||
|
||||
result.append(SamplingDevice(
|
||||
"SDRdaemonSource",
|
||||
"RemoteInput",
|
||||
m_hardwareID,
|
||||
m_deviceTypeID,
|
||||
QString::null,
|
||||
@ -73,7 +73,7 @@ PluginInterface::SamplingDevices SDRdaemonSourcePlugin::enumSampleSources()
|
||||
}
|
||||
|
||||
#ifdef SERVER_MODE
|
||||
PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
PluginInstanceGUI* RemoteInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId __attribute((unused)),
|
||||
QWidget **widget __attribute((unused)),
|
||||
DeviceUISet *deviceUISet __attribute((unused)))
|
||||
@ -81,14 +81,14 @@ PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
PluginInstanceGUI* RemoteInputPlugin::createSampleSourcePluginInstanceGUI(
|
||||
const QString& sourceId,
|
||||
QWidget **widget,
|
||||
DeviceUISet *deviceUISet)
|
||||
{
|
||||
if(sourceId == m_deviceTypeID)
|
||||
{
|
||||
SDRdaemonSourceGui* gui = new SDRdaemonSourceGui(deviceUISet);
|
||||
RemoteInputGui* gui = new RemoteInputGui(deviceUISet);
|
||||
*widget = gui;
|
||||
return gui;
|
||||
}
|
||||
@ -99,11 +99,11 @@ PluginInstanceGUI* SDRdaemonSourcePlugin::createSampleSourcePluginInstanceGUI(
|
||||
}
|
||||
#endif
|
||||
|
||||
DeviceSampleSource *SDRdaemonSourcePlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||
DeviceSampleSource *RemoteInputPlugin::createSampleSourcePluginInstanceInput(const QString& sourceId, DeviceSourceAPI *deviceAPI)
|
||||
{
|
||||
if (sourceId == m_deviceTypeID)
|
||||
{
|
||||
SDRdaemonSourceInput* input = new SDRdaemonSourceInput(deviceAPI);
|
||||
RemoteInput* input = new RemoteInput(deviceAPI);
|
||||
return input;
|
||||
}
|
||||
else
|
@ -14,23 +14,23 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef INCLUDE_SDRDAEMONSOURCEPLUGIN_H
|
||||
#define INCLUDE_SDRDAEMONSOURCEPLUGIN_H
|
||||
#ifndef INCLUDE_REMOTEINPUTPLUGIN_H
|
||||
#define INCLUDE_REMOTEINPUTPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#include "plugin/plugininterface.h"
|
||||
|
||||
#define SDRDAEMONSOURCE_DEVICE_TYPE_ID "sdrangel.samplesource.sdrdaemonsource"
|
||||
#define REMOTEINPUT_DEVICE_TYPE_ID "sdrangel.samplesource.remoteinput"
|
||||
|
||||
class PluginAPI;
|
||||
|
||||
class SDRdaemonSourcePlugin : public QObject, public PluginInterface {
|
||||
class RemoteInputPlugin : public QObject, public PluginInterface {
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(PluginInterface)
|
||||
Q_PLUGIN_METADATA(IID SDRDAEMONSOURCE_DEVICE_TYPE_ID)
|
||||
Q_PLUGIN_METADATA(IID REMOTEINPUT_DEVICE_TYPE_ID)
|
||||
|
||||
public:
|
||||
explicit SDRdaemonSourcePlugin(QObject* parent = NULL);
|
||||
explicit RemoteInputPlugin(QObject* parent = NULL);
|
||||
|
||||
const PluginDescriptor& getPluginDescriptor() const;
|
||||
void initPlugin(PluginAPI* pluginAPI);
|
||||
@ -49,4 +49,4 @@ private:
|
||||
static const PluginDescriptor m_pluginDescriptor;
|
||||
};
|
||||
|
||||
#endif // INCLUDE_SDRDAEMONSOURCEPLUGIN_H
|
||||
#endif // INCLUDE_REMOTEINPUTPLUGIN_H
|
@ -15,14 +15,14 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "util/simpleserializer.h"
|
||||
#include "sdrdaemonsourcesettings.h"
|
||||
#include "remoteinputsettings.h"
|
||||
|
||||
SDRdaemonSourceSettings::SDRdaemonSourceSettings()
|
||||
RemoteInputSettings::RemoteInputSettings()
|
||||
{
|
||||
resetToDefaults();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceSettings::resetToDefaults()
|
||||
void RemoteInputSettings::resetToDefaults()
|
||||
{
|
||||
m_apiAddress = "127.0.0.1";
|
||||
m_apiPort = 9091;
|
||||
@ -37,7 +37,7 @@ void SDRdaemonSourceSettings::resetToDefaults()
|
||||
m_reverseAPIDeviceIndex = 0;
|
||||
}
|
||||
|
||||
QByteArray SDRdaemonSourceSettings::serialize() const
|
||||
QByteArray RemoteInputSettings::serialize() const
|
||||
{
|
||||
SimpleSerializer s(1);
|
||||
|
||||
@ -55,7 +55,7 @@ QByteArray SDRdaemonSourceSettings::serialize() const
|
||||
return s.final();
|
||||
}
|
||||
|
||||
bool SDRdaemonSourceSettings::deserialize(const QByteArray& data)
|
||||
bool RemoteInputSettings::deserialize(const QByteArray& data)
|
||||
{
|
||||
SimpleDeserializer d(data);
|
||||
|
@ -14,13 +14,13 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCESETTINGS_H_
|
||||
#define PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCESETTINGS_H_
|
||||
#ifndef PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTSETTINGS_H_
|
||||
#define PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTSETTINGS_H_
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
|
||||
struct SDRdaemonSourceSettings {
|
||||
struct RemoteInputSettings {
|
||||
QString m_apiAddress;
|
||||
quint16 m_apiPort;
|
||||
QString m_dataAddress;
|
||||
@ -33,10 +33,10 @@ struct SDRdaemonSourceSettings {
|
||||
uint16_t m_reverseAPIPort;
|
||||
uint16_t m_reverseAPIDeviceIndex;
|
||||
|
||||
SDRdaemonSourceSettings();
|
||||
RemoteInputSettings();
|
||||
void resetToDefaults();
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
};
|
||||
|
||||
#endif /* PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCESETTINGS_H_ */
|
||||
#endif /* PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTSETTINGS_H_ */
|
@ -22,15 +22,15 @@
|
||||
#include "dsp/dspengine.h"
|
||||
#include <device/devicesourceapi.h>
|
||||
|
||||
#include "sdrdaemonsourceinput.h"
|
||||
#include "sdrdaemonsourceudphandler.h"
|
||||
#include "remoteinputudphandler.h"
|
||||
#include "remoteinput.h"
|
||||
|
||||
SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo, DeviceSourceAPI *deviceAPI) :
|
||||
RemoteInputUDPHandler::RemoteInputUDPHandler(SampleSinkFifo *sampleFifo, DeviceSourceAPI *deviceAPI) :
|
||||
m_deviceAPI(deviceAPI),
|
||||
m_masterTimer(deviceAPI->getMasterTimer()),
|
||||
m_masterTimerConnected(false),
|
||||
m_running(false),
|
||||
m_rateDivider(1000/SDRDAEMONSOURCE_THROTTLE_MS),
|
||||
m_rateDivider(1000/REMOTEINPUT_THROTTLE_MS),
|
||||
m_dataSocket(0),
|
||||
m_dataAddress(QHostAddress::LocalHost),
|
||||
m_remoteAddress(QHostAddress::LocalHost),
|
||||
@ -46,7 +46,7 @@ SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo,
|
||||
m_tickCount(0),
|
||||
m_samplesCount(0),
|
||||
m_timer(0),
|
||||
m_throttlems(SDRDAEMONSOURCE_THROTTLE_MS),
|
||||
m_throttlems(REMOTEINPUT_THROTTLE_MS),
|
||||
m_readLengthSamples(0),
|
||||
m_readLength(0),
|
||||
m_converterBuffer(0),
|
||||
@ -67,7 +67,7 @@ SDRdaemonSourceUDPHandler::SDRdaemonSourceUDPHandler(SampleSinkFifo *sampleFifo,
|
||||
m_rateDivider = 1000 / m_throttlems;
|
||||
}
|
||||
|
||||
SDRdaemonSourceUDPHandler::~SDRdaemonSourceUDPHandler()
|
||||
RemoteInputUDPHandler::~RemoteInputUDPHandler()
|
||||
{
|
||||
stop();
|
||||
delete[] m_udpBuf;
|
||||
@ -79,9 +79,9 @@ SDRdaemonSourceUDPHandler::~SDRdaemonSourceUDPHandler()
|
||||
#endif
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::start()
|
||||
void RemoteInputUDPHandler::start()
|
||||
{
|
||||
qDebug("SDRdaemonSourceUDPHandler::start");
|
||||
qDebug("RemoteInputUDPHandler::start");
|
||||
|
||||
if (m_running) {
|
||||
return;
|
||||
@ -98,12 +98,12 @@ void SDRdaemonSourceUDPHandler::start()
|
||||
|
||||
if (m_dataSocket->bind(m_dataAddress, m_dataPort))
|
||||
{
|
||||
qDebug("SDRdaemonSourceUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort);
|
||||
qDebug("RemoteInputUDPHandler::start: bind data socket to %s:%d", m_dataAddress.toString().toStdString().c_str(), m_dataPort);
|
||||
m_dataConnected = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
qWarning("SDRdaemonSourceUDPHandler::start: cannot bind data port %d", m_dataPort);
|
||||
qWarning("RemoteInputUDPHandler::start: cannot bind data port %d", m_dataPort);
|
||||
disconnect(m_dataSocket, SIGNAL(readyRead()), this, SLOT(dataReadyRead()));
|
||||
m_dataConnected = false;
|
||||
}
|
||||
@ -113,9 +113,9 @@ void SDRdaemonSourceUDPHandler::start()
|
||||
m_running = true;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::stop()
|
||||
void RemoteInputUDPHandler::stop()
|
||||
{
|
||||
qDebug("SDRdaemonSourceUDPHandler::stop");
|
||||
qDebug("RemoteInputUDPHandler::stop");
|
||||
|
||||
if (!m_running) {
|
||||
return;
|
||||
@ -140,14 +140,14 @@ void SDRdaemonSourceUDPHandler::stop()
|
||||
m_running = false;
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::configureUDPLink(const QString& address, quint16 port)
|
||||
void RemoteInputUDPHandler::configureUDPLink(const QString& address, quint16 port)
|
||||
{
|
||||
qDebug("SDRdaemonSourceUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port);
|
||||
qDebug("RemoteInputUDPHandler::configureUDPLink: %s:%d", address.toStdString().c_str(), port);
|
||||
bool addressOK = m_dataAddress.setAddress(address);
|
||||
|
||||
if (!addressOK)
|
||||
{
|
||||
qWarning("SDRdaemonSourceUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str());
|
||||
qWarning("RemoteInputUDPHandler::configureUDPLink: invalid address %s. Set to localhost.", address.toStdString().c_str());
|
||||
m_dataAddress = QHostAddress::LocalHost;
|
||||
}
|
||||
|
||||
@ -156,7 +156,7 @@ void SDRdaemonSourceUDPHandler::configureUDPLink(const QString& address, quint16
|
||||
start();
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::dataReadyRead()
|
||||
void RemoteInputUDPHandler::dataReadyRead()
|
||||
{
|
||||
m_udpReadBytes = 0;
|
||||
|
||||
@ -172,13 +172,13 @@ void SDRdaemonSourceUDPHandler::dataReadyRead()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::processData()
|
||||
void RemoteInputUDPHandler::processData()
|
||||
{
|
||||
m_sdrDaemonBuffer.writeData(m_udpBuf);
|
||||
const RemoteMetaDataFEC& metaData = m_sdrDaemonBuffer.getCurrentMeta();
|
||||
m_remoteInputBuffer.writeData(m_udpBuf);
|
||||
const RemoteMetaDataFEC& metaData = m_remoteInputBuffer.getCurrentMeta();
|
||||
bool change = false;
|
||||
|
||||
m_tv_msec = m_sdrDaemonBuffer.getTVOutMSec();
|
||||
m_tv_msec = m_remoteInputBuffer.getTVOutMSec();
|
||||
|
||||
if (m_centerFrequency != metaData.m_centerFrequency)
|
||||
{
|
||||
@ -194,14 +194,14 @@ void SDRdaemonSourceUDPHandler::processData()
|
||||
|
||||
if (change && (m_samplerate != 0))
|
||||
{
|
||||
qDebug("SDRdaemonSourceUDPHandler::processData: m_samplerate: %u m_centerFrequency: %u kHz", m_samplerate, m_centerFrequency);
|
||||
qDebug("RemoteInputUDPHandler::processData: m_samplerate: %u m_centerFrequency: %u kHz", m_samplerate, m_centerFrequency);
|
||||
|
||||
DSPSignalNotification *notif = new DSPSignalNotification(m_samplerate, m_centerFrequency * 1000); // Frequency in Hz for the DSP engine
|
||||
m_deviceAPI->getDeviceEngineInputMessageQueue()->push(notif);
|
||||
|
||||
if (m_outputMessageQueueToGUI)
|
||||
{
|
||||
SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData *report = SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamData::create(
|
||||
RemoteInput::MsgReportRemoteInputStreamData *report = RemoteInput::MsgReportRemoteInputStreamData::create(
|
||||
m_samplerate,
|
||||
m_centerFrequency * 1000, // Frequency in Hz for the GUI
|
||||
m_tv_msec);
|
||||
@ -213,11 +213,11 @@ void SDRdaemonSourceUDPHandler::processData()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::connectTimer()
|
||||
void RemoteInputUDPHandler::connectTimer()
|
||||
{
|
||||
if (!m_masterTimerConnected)
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceUDPHandler::connectTimer";
|
||||
qDebug() << "RemoteInputUDPHandler::connectTimer";
|
||||
#ifdef USE_INTERNAL_TIMER
|
||||
#warning "Uses internal timer"
|
||||
connect(m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -228,11 +228,11 @@ void SDRdaemonSourceUDPHandler::connectTimer()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::disconnectTimer()
|
||||
void RemoteInputUDPHandler::disconnectTimer()
|
||||
{
|
||||
if (m_masterTimerConnected)
|
||||
{
|
||||
qDebug() << "SDRdaemonSourceUDPHandler::disconnectTimer";
|
||||
qDebug() << "RemoteInputUDPHandler::disconnectTimer";
|
||||
#ifdef USE_INTERNAL_TIMER
|
||||
#warning "Uses internal timer"
|
||||
disconnect(m_timer, SIGNAL(timeout()), this, SLOT(tick()));
|
||||
@ -243,7 +243,7 @@ void SDRdaemonSourceUDPHandler::disconnectTimer()
|
||||
}
|
||||
}
|
||||
|
||||
void SDRdaemonSourceUDPHandler::tick()
|
||||
void RemoteInputUDPHandler::tick()
|
||||
{
|
||||
// auto throttling
|
||||
int throttlems = m_elapsedTimer.restart();
|
||||
@ -251,15 +251,15 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
if (throttlems != m_throttlems)
|
||||
{
|
||||
m_throttlems = throttlems;
|
||||
m_readLengthSamples = (m_sdrDaemonBuffer.getCurrentMeta().m_sampleRate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000;
|
||||
m_readLengthSamples = (m_remoteInputBuffer.getCurrentMeta().m_sampleRate * (m_throttlems+(m_throttleToggle ? 1 : 0))) / 1000;
|
||||
m_throttleToggle = !m_throttleToggle;
|
||||
}
|
||||
|
||||
if (m_autoCorrBuffer) {
|
||||
m_readLengthSamples += m_sdrDaemonBuffer.getRWBalanceCorrection();
|
||||
m_readLengthSamples += m_remoteInputBuffer.getRWBalanceCorrection();
|
||||
}
|
||||
|
||||
const RemoteMetaDataFEC& metaData = m_sdrDaemonBuffer.getCurrentMeta();
|
||||
const RemoteMetaDataFEC& metaData = m_remoteInputBuffer.getCurrentMeta();
|
||||
m_readLength = m_readLengthSamples * (metaData.m_sampleBytes & 0xF) * 2;
|
||||
|
||||
if ((metaData.m_sampleBits == 16) && (SDR_RX_SAMP_SZ == 24)) // 16 -> 24 bits
|
||||
@ -270,7 +270,7 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
m_converterBuffer = new int32_t[m_readLengthSamples*2];
|
||||
}
|
||||
|
||||
uint8_t *buf = m_sdrDaemonBuffer.readData(m_readLength);
|
||||
uint8_t *buf = m_remoteInputBuffer.readData(m_readLength);
|
||||
|
||||
for (unsigned int is = 0; is < m_readLengthSamples; is++)
|
||||
{
|
||||
@ -290,7 +290,7 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
m_converterBuffer = new int32_t[m_readLengthSamples];
|
||||
}
|
||||
|
||||
uint8_t *buf = m_sdrDaemonBuffer.readData(m_readLength);
|
||||
uint8_t *buf = m_remoteInputBuffer.readData(m_readLength);
|
||||
|
||||
for (unsigned int is = 0; is < m_readLengthSamples; is++)
|
||||
{
|
||||
@ -304,12 +304,12 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
else if ((metaData.m_sampleBits == 16) || (metaData.m_sampleBits == 24)) // same sample size and valid size
|
||||
{
|
||||
// read samples directly feeding the SampleFifo (no callback)
|
||||
m_sampleFifo->write(reinterpret_cast<quint8*>(m_sdrDaemonBuffer.readData(m_readLength)), m_readLength);
|
||||
m_sampleFifo->write(reinterpret_cast<quint8*>(m_remoteInputBuffer.readData(m_readLength)), m_readLength);
|
||||
m_samplesCount += m_readLengthSamples;
|
||||
}
|
||||
else // invalid size
|
||||
{
|
||||
qWarning("SDRdaemonSourceUDPHandler::tick: unexpected sample size in stream: %d bits", (int) metaData.m_sampleBits);
|
||||
qWarning("RemoteInputUDPHandler::tick: unexpected sample size in stream: %d bits", (int) metaData.m_sampleBits);
|
||||
}
|
||||
|
||||
if (m_tickCount < m_rateDivider)
|
||||
@ -323,12 +323,12 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
if (m_outputMessageQueueToGUI)
|
||||
{
|
||||
int framesDecodingStatus;
|
||||
int minNbBlocks = m_sdrDaemonBuffer.getMinNbBlocks();
|
||||
int minNbOriginalBlocks = m_sdrDaemonBuffer.getMinOriginalBlocks();
|
||||
int nbOriginalBlocks = m_sdrDaemonBuffer.getCurrentMeta().m_nbOriginalBlocks;
|
||||
int nbFECblocks = m_sdrDaemonBuffer.getCurrentMeta().m_nbFECBlocks;
|
||||
int sampleBits = m_sdrDaemonBuffer.getCurrentMeta().m_sampleBits;
|
||||
int sampleBytes = m_sdrDaemonBuffer.getCurrentMeta().m_sampleBytes;
|
||||
int minNbBlocks = m_remoteInputBuffer.getMinNbBlocks();
|
||||
int minNbOriginalBlocks = m_remoteInputBuffer.getMinOriginalBlocks();
|
||||
int nbOriginalBlocks = m_remoteInputBuffer.getCurrentMeta().m_nbOriginalBlocks;
|
||||
int nbFECblocks = m_remoteInputBuffer.getCurrentMeta().m_nbFECBlocks;
|
||||
int sampleBits = m_remoteInputBuffer.getCurrentMeta().m_sampleBits;
|
||||
int sampleBytes = m_remoteInputBuffer.getCurrentMeta().m_sampleBytes;
|
||||
|
||||
//framesDecodingStatus = (minNbOriginalBlocks == nbOriginalBlocks ? 2 : (minNbOriginalBlocks < nbOriginalBlocks - nbFECblocks ? 0 : 1));
|
||||
if (minNbBlocks < nbOriginalBlocks) {
|
||||
@ -339,18 +339,18 @@ void SDRdaemonSourceUDPHandler::tick()
|
||||
framesDecodingStatus = 2;
|
||||
}
|
||||
|
||||
SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming *report = SDRdaemonSourceInput::MsgReportSDRdaemonSourceStreamTiming::create(
|
||||
RemoteInput::MsgReportRemoteInputStreamTiming *report = RemoteInput::MsgReportRemoteInputStreamTiming::create(
|
||||
m_tv_msec,
|
||||
m_sdrDaemonBuffer.getBufferLengthInSecs(),
|
||||
m_sdrDaemonBuffer.getBufferGauge(),
|
||||
m_remoteInputBuffer.getBufferLengthInSecs(),
|
||||
m_remoteInputBuffer.getBufferGauge(),
|
||||
framesDecodingStatus,
|
||||
minNbBlocks == nbOriginalBlocks + nbFECblocks,
|
||||
minNbBlocks,
|
||||
minNbOriginalBlocks,
|
||||
m_sdrDaemonBuffer.getMaxNbRecovery(),
|
||||
m_sdrDaemonBuffer.getAvgNbBlocks(),
|
||||
m_sdrDaemonBuffer.getAvgOriginalBlocks(),
|
||||
m_sdrDaemonBuffer.getAvgNbRecovery(),
|
||||
m_remoteInputBuffer.getMaxNbRecovery(),
|
||||
m_remoteInputBuffer.getAvgNbBlocks(),
|
||||
m_remoteInputBuffer.getAvgOriginalBlocks(),
|
||||
m_remoteInputBuffer.getAvgNbRecovery(),
|
||||
nbOriginalBlocks,
|
||||
nbFECblocks,
|
||||
sampleBits,
|
@ -14,8 +14,8 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEUDPHANDLER_H_
|
||||
#define PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEUDPHANDLER_H_
|
||||
#ifndef PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTUDPHANDLER_H_
|
||||
#define PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTUDPHANDLER_H_
|
||||
|
||||
#include <QObject>
|
||||
#include <QUdpSocket>
|
||||
@ -23,21 +23,21 @@
|
||||
#include <QMutex>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
#include "sdrdaemonsourcebuffer.h"
|
||||
#include "remoteinputbuffer.h"
|
||||
|
||||
#define SDRDAEMONSOURCE_THROTTLE_MS 50
|
||||
#define REMOTEINPUT_THROTTLE_MS 50
|
||||
|
||||
class SampleSinkFifo;
|
||||
class MessageQueue;
|
||||
class QTimer;
|
||||
class DeviceSourceAPI;
|
||||
|
||||
class SDRdaemonSourceUDPHandler : public QObject
|
||||
class RemoteInputUDPHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SDRdaemonSourceUDPHandler(SampleSinkFifo* sampleFifo, DeviceSourceAPI *deviceAPI);
|
||||
~SDRdaemonSourceUDPHandler();
|
||||
RemoteInputUDPHandler(SampleSinkFifo* sampleFifo, DeviceSourceAPI *deviceAPI);
|
||||
~RemoteInputUDPHandler();
|
||||
void setMessageQueueToGUI(MessageQueue *queue) { m_outputMessageQueueToGUI = queue; }
|
||||
void start();
|
||||
void stop();
|
||||
@ -47,10 +47,10 @@ public:
|
||||
bool isStreaming() const { return m_masterTimerConnected; }
|
||||
int getSampleRate() const { return m_samplerate; }
|
||||
int getCenterFrequency() const { return m_centerFrequency * 1000; }
|
||||
int getBufferGauge() const { return m_sdrDaemonBuffer.getBufferGauge(); }
|
||||
int getBufferGauge() const { return m_remoteInputBuffer.getBufferGauge(); }
|
||||
uint64_t getTVmSec() const { return m_tv_msec; }
|
||||
int getMinNbBlocks() { return m_sdrDaemonBuffer.getMinNbBlocks(); }
|
||||
int getMaxNbRecovery() { return m_sdrDaemonBuffer.getMaxNbRecovery(); }
|
||||
int getMinNbBlocks() { return m_remoteInputBuffer.getMinNbBlocks(); }
|
||||
int getMaxNbRecovery() { return m_remoteInputBuffer.getMaxNbRecovery(); }
|
||||
public slots:
|
||||
void dataReadyRead();
|
||||
|
||||
@ -60,7 +60,7 @@ private:
|
||||
bool m_masterTimerConnected;
|
||||
bool m_running;
|
||||
uint32_t m_rateDivider;
|
||||
SDRdaemonSourceBuffer m_sdrDaemonBuffer;
|
||||
RemoteInputBuffer m_remoteInputBuffer;
|
||||
QUdpSocket *m_dataSocket;
|
||||
QHostAddress m_dataAddress;
|
||||
QHostAddress m_remoteAddress;
|
||||
@ -96,4 +96,4 @@ private slots:
|
||||
|
||||
|
||||
|
||||
#endif /* PLUGINS_SAMPLESOURCE_SDRDAEMONSOURCE_SDRDAEMONSOURCEUDPHANDLER_H_ */
|
||||
#endif /* PLUGINS_SAMPLESOURCE_REMOTEINPUT_REMOTEINPUTUDPHANDLER_H_ */
|
@ -1,86 +0,0 @@
|
||||
project(sdrdaemonsource)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "SDRdaemonSource: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "SDRdaemonSource: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "SDRdaemonSource: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(sdrdaemonsource_SOURCES
|
||||
sdrdaemonsourcebuffer.cpp
|
||||
sdrdaemonsourcegui.cpp
|
||||
sdrdaemonsourceinput.cpp
|
||||
sdrdaemonsourcesettings.cpp
|
||||
sdrdaemonsourceplugin.cpp
|
||||
sdrdaemonsourceudphandler.cpp
|
||||
)
|
||||
|
||||
set(sdrdaemonsource_HEADERS
|
||||
sdrdaemonsourcebuffer.h
|
||||
sdrdaemonsourcegui.h
|
||||
sdrdaemonsourceinput.h
|
||||
sdrdaemonsourcesettings.h
|
||||
sdrdaemonsourceplugin.h
|
||||
sdrdaemonsourceudphandler.h
|
||||
)
|
||||
|
||||
set(sdrdaemonsource_FORMS
|
||||
sdrdaemonsourcegui.ui
|
||||
)
|
||||
|
||||
#include(${QT_USE_FILE})
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
#qt4_wrap_cpp(sdrdaemonsource_HEADERS_MOC ${sdrdaemonsource_HEADERS})
|
||||
qt5_wrap_ui(sdrdaemonsource_FORMS_HEADERS ${sdrdaemonsource_FORMS})
|
||||
|
||||
add_library(inputsdrdaemonsource SHARED
|
||||
${sdrdaemonsource_SOURCES}
|
||||
${sdrdaemonsource_HEADERS_MOC}
|
||||
${sdrdaemonsource_FORMS_HEADERS}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(inputsdrdaemonsource PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(inputsdrdaemonsource 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(inputsdrdaemonsource
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrdaemonsource
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrgui
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(inputsdrdaemonsource Qt5::Core Qt5::Widgets)
|
||||
|
||||
install(TARGETS inputsdrdaemonsource DESTINATION lib/plugins/samplesource)
|
@ -71,7 +71,7 @@ endif(LIBUSB_FOUND AND LIBRTLSDR_FOUND)
|
||||
|
||||
find_package(CM256cc)
|
||||
if(CM256CC_FOUND)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
add_subdirectory(remoteinput)
|
||||
endif(CM256CC_FOUND)
|
||||
|
||||
find_package(LibMiriSDR)
|
||||
@ -100,7 +100,7 @@ if (BUILD_DEBIAN)
|
||||
add_subdirectory(perseus)
|
||||
add_subdirectory(plutosdrinput)
|
||||
add_subdirectory(rtlsdr)
|
||||
add_subdirectory(sdrdaemonsource)
|
||||
add_subdirectory(remoteinput)
|
||||
add_subdirectory(sdrplay)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
|
75
pluginssrv/samplesource/remoteinput/CMakeLists.txt
Normal file
@ -0,0 +1,75 @@
|
||||
project(remoteinput)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/samplesource/remoteinput")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "RemoteInput: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "RemoteInput: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "RemoteInput: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(remoteinput_SOURCES
|
||||
${PLUGIN_PREFIX}/remoteinputbuffer.cpp
|
||||
${PLUGIN_PREFIX}/remoteinputudphandler.cpp
|
||||
${PLUGIN_PREFIX}/remoteinput.cpp
|
||||
${PLUGIN_PREFIX}/remoteinputsettings.cpp
|
||||
${PLUGIN_PREFIX}/remoteinputplugin.cpp
|
||||
)
|
||||
|
||||
set(remoteinput_HEADERS
|
||||
${PLUGIN_PREFIX}/remoteinputbuffer.h
|
||||
${PLUGIN_PREFIX}/remoteinputudphandler.h
|
||||
${PLUGIN_PREFIX}/remoteinput.h
|
||||
${PLUGIN_PREFIX}/remoteinputsettings.h
|
||||
${PLUGIN_PREFIX}/remoteinputplugin.h
|
||||
)
|
||||
|
||||
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
add_library(inputremotesrv SHARED
|
||||
${remoteinput_SOURCES}
|
||||
${remoteinput_HEADERS_MOC}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(inputremotesrv PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(inputremotesrv 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(inputremotesrv
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputremotesrv
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(inputremotesrv Qt5::Core)
|
||||
|
||||
install(TARGETS inputremotesrv DESTINATION lib/pluginssrv/samplesource)
|
@ -1,75 +0,0 @@
|
||||
project(sdrdaemonsource)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/samplesource/sdrdaemonsource")
|
||||
|
||||
if (HAS_SSSE3)
|
||||
message(STATUS "SDRdaemonSource: use SSSE3 SIMD" )
|
||||
elseif (HAS_NEON)
|
||||
message(STATUS "SDRdaemonSource: use Neon SIMD" )
|
||||
else()
|
||||
message(STATUS "SDRdaemonSource: Unsupported architecture")
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(sdrdaemonsource_SOURCES
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourcebuffer.cpp
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceinput.cpp
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourcesettings.cpp
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceplugin.cpp
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceudphandler.cpp
|
||||
)
|
||||
|
||||
set(sdrdaemonsource_HEADERS
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourcebuffer.h
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceinput.h
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourcesettings.h
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceplugin.h
|
||||
${PLUGIN_PREFIX}/sdrdaemonsourceudphandler.h
|
||||
)
|
||||
|
||||
|
||||
add_definitions(${QT_DEFINITIONS})
|
||||
add_definitions(-DQT_PLUGIN)
|
||||
add_definitions(-DQT_SHARED)
|
||||
|
||||
add_library(inputsdrdaemonsourcesrv SHARED
|
||||
${sdrdaemonsource_SOURCES}
|
||||
${sdrdaemonsource_HEADERS_MOC}
|
||||
)
|
||||
|
||||
if (BUILD_DEBIAN)
|
||||
target_include_directories(inputsdrdaemonsourcesrv PUBLIC
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||
${LIBCM256CCSRC}
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_include_directories(inputsdrdaemonsourcesrv 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(inputsdrdaemonsourcesrv
|
||||
${QT_LIBRARIES}
|
||||
cm256cc
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
else (BUILD_DEBIAN)
|
||||
target_link_libraries(inputsdrdaemonsourcesrv
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
swagger
|
||||
)
|
||||
endif (BUILD_DEBIAN)
|
||||
|
||||
target_link_libraries(inputsdrdaemonsourcesrv Qt5::Core)
|
||||
|
||||
install(TARGETS inputsdrdaemonsourcesrv DESTINATION lib/pluginssrv/samplesource)
|