mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-23 18:52:28 -04:00
SDRDaemonSink: refactoring (1)
This commit is contained in:
parent
c7bcfaead1
commit
133f9133bd
@ -23,19 +23,16 @@ if(LIBUSB_FOUND AND LIBIIO_FOUND)
|
|||||||
endif(LIBUSB_FOUND AND LIBIIO_FOUND)
|
endif(LIBUSB_FOUND AND LIBIIO_FOUND)
|
||||||
|
|
||||||
find_package(CM256cc)
|
find_package(CM256cc)
|
||||||
find_package(LibNANOMSG)
|
if(CM256CC_FOUND)
|
||||||
if(CM256CC_FOUND AND LIBNANOMSG_FOUND)
|
|
||||||
add_subdirectory(sdrdaemonsink)
|
add_subdirectory(sdrdaemonsink)
|
||||||
endif(CM256CC_FOUND AND LIBNANOMSG_FOUND)
|
endif(CM256CC_FOUND)
|
||||||
|
|
||||||
if (BUILD_DEBIAN)
|
if (BUILD_DEBIAN)
|
||||||
add_subdirectory(bladerfoutput)
|
add_subdirectory(bladerfoutput)
|
||||||
add_subdirectory(hackrfoutput)
|
add_subdirectory(hackrfoutput)
|
||||||
add_subdirectory(limesdroutput)
|
add_subdirectory(limesdroutput)
|
||||||
add_subdirectory(plutosdroutput)
|
add_subdirectory(plutosdroutput)
|
||||||
if (LIBNANOMSG_FOUND)
|
add_subdirectory(sdrdaemonsink)
|
||||||
add_subdirectory(sdrdaemonsink)
|
|
||||||
endif (LIBNANOMSG_FOUND)
|
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
add_subdirectory(filesink)
|
add_subdirectory(filesink)
|
||||||
|
@ -41,7 +41,6 @@ include_directories(
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
${LIBCM256CCSRC}
|
${LIBCM256CCSRC}
|
||||||
${LIBNANOMSG_INCLUDE_DIR}
|
|
||||||
)
|
)
|
||||||
else (BUILD_DEBIAN)
|
else (BUILD_DEBIAN)
|
||||||
include_directories(
|
include_directories(
|
||||||
@ -50,7 +49,6 @@ include_directories(
|
|||||||
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
|
||||||
${CMAKE_SOURCE_DIR}/devices
|
${CMAKE_SOURCE_DIR}/devices
|
||||||
${CM256CC_INCLUDE_DIR}
|
${CM256CC_INCLUDE_DIR}
|
||||||
${LIBNANOMSG_INCLUDE_DIR}
|
|
||||||
)
|
)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
@ -73,7 +71,6 @@ target_link_libraries(outputsdrdaemonsink
|
|||||||
sdrgui
|
sdrgui
|
||||||
swagger
|
swagger
|
||||||
cm256cc
|
cm256cc
|
||||||
${LIBNANOMSG_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
else (BUILD_DEBIAN)
|
else (BUILD_DEBIAN)
|
||||||
target_link_libraries(outputsdrdaemonsink
|
target_link_libraries(outputsdrdaemonsink
|
||||||
@ -82,7 +79,6 @@ target_link_libraries(outputsdrdaemonsink
|
|||||||
sdrgui
|
sdrgui
|
||||||
swagger
|
swagger
|
||||||
${CM256CC_LIBRARIES}
|
${CM256CC_LIBRARIES}
|
||||||
${LIBNANOMSG_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
endif (BUILD_DEBIAN)
|
endif (BUILD_DEBIAN)
|
||||||
|
|
||||||
|
@ -24,9 +24,6 @@
|
|||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
#include <nanomsg/nn.h>
|
|
||||||
#include <nanomsg/pair.h>
|
|
||||||
|
|
||||||
#include "ui_sdrdaemonsinkgui.h"
|
#include "ui_sdrdaemonsinkgui.h"
|
||||||
#include "plugin/pluginapi.h"
|
#include "plugin/pluginapi.h"
|
||||||
#include "gui/colormapper.h"
|
#include "gui/colormapper.h"
|
||||||
@ -54,15 +51,6 @@ SDRdaemonSinkGui::SDRdaemonSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
|||||||
m_doApplySettings(true),
|
m_doApplySettings(true),
|
||||||
m_forceSettings(true)
|
m_forceSettings(true)
|
||||||
{
|
{
|
||||||
m_nnSender = nn_socket(AF_SP, NN_PAIR);
|
|
||||||
assert(m_nnSender != -1);
|
|
||||||
int millis = 500;
|
|
||||||
int rc = nn_setsockopt(m_nnSender, NN_SOL_SOCKET, NN_SNDTIMEO, &millis, sizeof (millis));
|
|
||||||
|
|
||||||
if (rc != 0) {
|
|
||||||
qCritical("SDRdaemonSinkGui::SDRdaemonSinkGui: nn_setsockopt failed with rc %d", rc);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_countUnrecoverable = 0;
|
m_countUnrecoverable = 0;
|
||||||
m_countRecovered = 0;
|
m_countRecovered = 0;
|
||||||
|
|
||||||
@ -92,7 +80,6 @@ SDRdaemonSinkGui::SDRdaemonSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
|
|||||||
displayEventTimer();
|
displayEventTimer();
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
sendControl(true);
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +126,6 @@ void SDRdaemonSinkGui::setCenterFrequency(qint64 centerFrequency)
|
|||||||
{
|
{
|
||||||
m_settings.m_centerFrequency = centerFrequency;
|
m_settings.m_centerFrequency = centerFrequency;
|
||||||
displaySettings();
|
displaySettings();
|
||||||
sendControl();
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +142,6 @@ bool SDRdaemonSinkGui::deserialize(const QByteArray& data)
|
|||||||
{
|
{
|
||||||
displaySettings();
|
displaySettings();
|
||||||
blockApplySettings(false);
|
blockApplySettings(false);
|
||||||
sendControl(true);
|
|
||||||
m_forceSettings = true;
|
m_forceSettings = true;
|
||||||
sendSettings();
|
sendSettings();
|
||||||
return true;
|
return true;
|
||||||
@ -228,7 +213,7 @@ void SDRdaemonSinkGui::updateSampleRateAndFrequency()
|
|||||||
{
|
{
|
||||||
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
m_deviceUISet->getSpectrum()->setSampleRate(m_sampleRate);
|
||||||
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
m_deviceUISet->getSpectrum()->setCenterFrequency(m_deviceCenterFrequency);
|
||||||
ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate*(1<<m_settings.m_log2Interp)) / 1000));
|
ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate) / 1000));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::updateTxDelayTooltip()
|
void SDRdaemonSinkGui::updateTxDelayTooltip()
|
||||||
@ -241,8 +226,7 @@ void SDRdaemonSinkGui::displaySettings()
|
|||||||
{
|
{
|
||||||
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
|
ui->centerFrequency->setValue(m_settings.m_centerFrequency / 1000);
|
||||||
ui->sampleRate->setValue(m_settings.m_sampleRate);
|
ui->sampleRate->setValue(m_settings.m_sampleRate);
|
||||||
ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate*(1<<m_settings.m_log2Interp)) / 1000));
|
ui->deviceRateText->setText(tr("%1k").arg((float)(m_sampleRate) / 1000));
|
||||||
ui->interp->setCurrentIndex(m_settings.m_log2Interp);
|
|
||||||
ui->txDelay->setValue(m_settings.m_txDelay*100);
|
ui->txDelay->setValue(m_settings.m_txDelay*100);
|
||||||
ui->txDelayText->setText(tr("%1").arg(m_settings.m_txDelay*100));
|
ui->txDelayText->setText(tr("%1").arg(m_settings.m_txDelay*100));
|
||||||
ui->nbFECBlocks->setValue(m_settings.m_nbFECBlocks);
|
ui->nbFECBlocks->setValue(m_settings.m_nbFECBlocks);
|
||||||
@ -251,100 +235,10 @@ void SDRdaemonSinkGui::displaySettings()
|
|||||||
QString s1 = QString::number(m_settings.m_nbFECBlocks, 'f', 0);
|
QString s1 = QString::number(m_settings.m_nbFECBlocks, 'f', 0);
|
||||||
ui->nominalNbBlocksText->setText(tr("%1/%2").arg(s0).arg(s1));
|
ui->nominalNbBlocksText->setText(tr("%1/%2").arg(s0).arg(s1));
|
||||||
|
|
||||||
ui->address->setText(m_settings.m_address);
|
ui->apiAddress->setText(m_settings.m_apiAddress);
|
||||||
|
ui->apiPort->setText(tr("%1").arg(m_settings.m_apiPort));
|
||||||
|
ui->dataAddress->setText(m_settings.m_dataAddress);
|
||||||
ui->dataPort->setText(tr("%1").arg(m_settings.m_dataPort));
|
ui->dataPort->setText(tr("%1").arg(m_settings.m_dataPort));
|
||||||
ui->controlPort->setText(tr("%1").arg(m_settings.m_controlPort));
|
|
||||||
ui->specificParms->setText(m_settings.m_specificParameters);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDRdaemonSinkGui::sendControl(bool force)
|
|
||||||
{
|
|
||||||
if ((m_settings.m_address != m_controlSettings.m_address) ||
|
|
||||||
(m_settings.m_controlPort != m_controlSettings.m_controlPort) || force)
|
|
||||||
{
|
|
||||||
int rc = nn_shutdown(m_nnSender, 0);
|
|
||||||
|
|
||||||
if (rc < 0) {
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl: disconnection failed";
|
|
||||||
} else {
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl: disconnection successful";
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostringstream os;
|
|
||||||
os << "tcp://" << m_settings.m_address.toStdString() << ":" << m_settings.m_controlPort;
|
|
||||||
std::string addrstrng = os.str();
|
|
||||||
rc = nn_connect(m_nnSender, addrstrng.c_str());
|
|
||||||
|
|
||||||
if (rc < 0)
|
|
||||||
{
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl: connection to " << addrstrng.c_str() << " failed";
|
|
||||||
QMessageBox::information(this, tr("Message"), tr("Cannot connect to remote control port"));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl: connection to " << addrstrng.c_str() << " successful";
|
|
||||||
force = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostringstream os;
|
|
||||||
int nbArgs = 0;
|
|
||||||
|
|
||||||
if ((m_settings.m_centerFrequency != m_controlSettings.m_centerFrequency) || force)
|
|
||||||
{
|
|
||||||
os << "freq=" << m_settings.m_centerFrequency;
|
|
||||||
nbArgs++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m_settings.m_sampleRate != m_controlSettings.m_sampleRate) || (m_settings.m_log2Interp != m_controlSettings.m_log2Interp) || force)
|
|
||||||
{
|
|
||||||
if (nbArgs > 0) os << ",";
|
|
||||||
os << "srate=" << m_settings.m_sampleRate * (1<<m_settings.m_log2Interp);
|
|
||||||
nbArgs++;
|
|
||||||
|
|
||||||
if ((m_settings.m_log2Interp != m_controlSettings.m_log2Interp) || force)
|
|
||||||
{
|
|
||||||
os << ",interp=" << m_settings.m_log2Interp;
|
|
||||||
nbArgs++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((m_settings.m_specificParameters != m_controlSettings.m_specificParameters) || force)
|
|
||||||
{
|
|
||||||
if (nbArgs > 0) os << ",";
|
|
||||||
os << m_settings.m_specificParameters.toStdString();
|
|
||||||
nbArgs++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nbArgs > 0)
|
|
||||||
{
|
|
||||||
int config_size = os.str().size();
|
|
||||||
int rc = nn_send(m_nnSender, (void *) os.str().c_str(), config_size, 0);
|
|
||||||
|
|
||||||
if (rc != config_size)
|
|
||||||
{
|
|
||||||
//QMessageBox::information(this, tr("Message"), tr("Cannot send message to remote control port"));
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl: Cannot send message to remote control port."
|
|
||||||
<< " remoteAddress: " << m_settings.m_address
|
|
||||||
<< " remotePort: " << m_settings.m_controlPort
|
|
||||||
<< " message: " << os.str().c_str();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
qDebug() << "SDRdaemonSinkGui::sendControl:"
|
|
||||||
<< "remoteAddress:" << m_settings.m_address
|
|
||||||
<< "remotePort:" << m_settings.m_controlPort
|
|
||||||
<< "message:" << os.str().c_str();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
m_controlSettings.m_address = m_settings.m_address;
|
|
||||||
m_controlSettings.m_controlPort = m_settings.m_controlPort;
|
|
||||||
m_controlSettings.m_centerFrequency = m_settings.m_centerFrequency;
|
|
||||||
m_controlSettings.m_sampleRate = m_settings.m_sampleRate;
|
|
||||||
m_controlSettings.m_log2Interp = m_settings.m_log2Interp;
|
|
||||||
m_controlSettings.m_specificParameters = m_settings.m_specificParameters;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::sendSettings()
|
void SDRdaemonSinkGui::sendSettings()
|
||||||
@ -395,7 +289,6 @@ void SDRdaemonSinkGui::updateStatus()
|
|||||||
void SDRdaemonSinkGui::on_centerFrequency_changed(quint64 value)
|
void SDRdaemonSinkGui::on_centerFrequency_changed(quint64 value)
|
||||||
{
|
{
|
||||||
m_settings.m_centerFrequency = value * 1000;
|
m_settings.m_centerFrequency = value * 1000;
|
||||||
sendControl();
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,19 +296,6 @@ void SDRdaemonSinkGui::on_sampleRate_changed(quint64 value)
|
|||||||
{
|
{
|
||||||
m_settings.m_sampleRate = value;
|
m_settings.m_sampleRate = value;
|
||||||
updateTxDelayTooltip();
|
updateTxDelayTooltip();
|
||||||
sendControl();
|
|
||||||
sendSettings();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_interp_currentIndexChanged(int index)
|
|
||||||
{
|
|
||||||
if (index < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_settings.m_log2Interp = index;
|
|
||||||
updateSampleRateAndFrequency();
|
|
||||||
sendControl();
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -439,63 +319,63 @@ void SDRdaemonSinkGui::on_nbFECBlocks_valueChanged(int value)
|
|||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_address_returnPressed()
|
void SDRdaemonSinkGui::on_apiAddress_returnPressed()
|
||||||
{
|
{
|
||||||
m_settings.m_address = ui->address->text();
|
m_settings.m_apiAddress = ui->apiAddress->text();
|
||||||
sendControl();
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDRdaemonSinkGui::on_apiPort_returnPressed()
|
||||||
|
{
|
||||||
|
bool dataOk;
|
||||||
|
int apiPort = ui->apiPort->text().toInt(&dataOk);
|
||||||
|
|
||||||
|
if((!dataOk) || (apiPort < 1024) || (apiPort > 65535))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_settings.m_apiPort = apiPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
sendSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SDRdaemonSinkGui::on_dataAddress_returnPressed()
|
||||||
|
{
|
||||||
|
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_dataPort_returnPressed()
|
void SDRdaemonSinkGui::on_dataPort_returnPressed()
|
||||||
{
|
{
|
||||||
bool dataOk;
|
bool dataOk;
|
||||||
int udpDataPort = ui->dataPort->text().toInt(&dataOk);
|
int dataPort = ui->dataPort->text().toInt(&dataOk);
|
||||||
|
|
||||||
if((!dataOk) || (udpDataPort < 1024) || (udpDataPort > 65535))
|
if((!dataOk) || (dataPort < 1024) || (dataPort > 65535))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_settings.m_dataPort = udpDataPort;
|
m_settings.m_dataPort = dataPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_controlPort_returnPressed()
|
|
||||||
{
|
|
||||||
bool ctlOk;
|
|
||||||
int udpCtlPort = ui->controlPort->text().toInt(&ctlOk);
|
|
||||||
|
|
||||||
if((!ctlOk) || (udpCtlPort < 1024) || (udpCtlPort > 65535))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_settings.m_controlPort = udpCtlPort;
|
|
||||||
}
|
|
||||||
|
|
||||||
sendControl();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_specificParms_returnPressed()
|
|
||||||
{
|
|
||||||
m_settings.m_specificParameters = ui->specificParms->text();
|
|
||||||
sendControl();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_applyButton_clicked(bool checked __attribute__((unused)))
|
void SDRdaemonSinkGui::on_applyButton_clicked(bool checked __attribute__((unused)))
|
||||||
{
|
{
|
||||||
m_settings.m_address = ui->address->text();
|
m_settings.m_apiAddress = ui->apiAddress->text();
|
||||||
|
m_settings.m_dataAddress = ui->dataAddress->text();
|
||||||
|
|
||||||
bool ctlOk;
|
bool apiOk;
|
||||||
int udpCtlPort = ui->controlPort->text().toInt(&ctlOk);
|
int apiPort = ui->apiPort->text().toInt(&apiOk);
|
||||||
|
|
||||||
if((ctlOk) && (udpCtlPort >= 1024) && (udpCtlPort < 65535))
|
if((apiOk) && (apiPort >= 1024) && (apiPort < 65535))
|
||||||
{
|
{
|
||||||
m_settings.m_controlPort = udpCtlPort;
|
m_settings.m_apiPort = apiPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dataOk;
|
bool dataOk;
|
||||||
@ -509,11 +389,6 @@ void SDRdaemonSinkGui::on_applyButton_clicked(bool checked __attribute__((unused
|
|||||||
sendSettings();
|
sendSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_sendButton_clicked(bool checked __attribute__((unused)))
|
|
||||||
{
|
|
||||||
sendControl(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SDRdaemonSinkGui::on_startStop_toggled(bool checked)
|
void SDRdaemonSinkGui::on_startStop_toggled(bool checked)
|
||||||
{
|
{
|
||||||
if (m_doApplySettings)
|
if (m_doApplySettings)
|
||||||
@ -570,101 +445,9 @@ void SDRdaemonSinkGui::tick()
|
|||||||
{
|
{
|
||||||
if ((++m_tickCount & 0xf) == 0) // 16*50ms ~800ms
|
if ((++m_tickCount & 0xf) == 0) // 16*50ms ~800ms
|
||||||
{
|
{
|
||||||
void *msgBuf = 0;
|
|
||||||
|
|
||||||
SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkStreamTiming* message = SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkStreamTiming::create();
|
SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkStreamTiming* message = SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkStreamTiming::create();
|
||||||
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
||||||
|
|
||||||
int len = nn_recv(m_nnSender, &msgBuf, NN_MSG, NN_DONTWAIT);
|
|
||||||
|
|
||||||
if ((len > 0) && msgBuf)
|
|
||||||
{
|
|
||||||
std::string msg((char *) msgBuf, len);
|
|
||||||
std::vector<std::string> strs;
|
|
||||||
boost::split(strs, msg, boost::is_any_of(":"));
|
|
||||||
unsigned int nbTokens = strs.size();
|
|
||||||
unsigned int status = 0;
|
|
||||||
bool updateEventCounts = false;
|
|
||||||
|
|
||||||
if (nbTokens > 0) // at least the queue length is given
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
int queueLength = boost::lexical_cast<int>(strs[0]);
|
|
||||||
ui->queueLengthText->setText(QString::fromStdString(strs[0]));
|
|
||||||
m_nbSinceLastFlowCheck++;
|
|
||||||
int samplesCorr = 0;
|
|
||||||
bool quickStart = false;
|
|
||||||
|
|
||||||
if (queueLength < 2)
|
|
||||||
{
|
|
||||||
samplesCorr = 127*8;
|
|
||||||
quickStart = true;
|
|
||||||
}
|
|
||||||
else if (queueLength < 16)
|
|
||||||
{
|
|
||||||
samplesCorr = ((8 - queueLength)*16)/m_nbSinceLastFlowCheck;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
samplesCorr = -127*16;
|
|
||||||
quickStart = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (samplesCorr != 0)
|
|
||||||
{
|
|
||||||
samplesCorr = quickStart ? samplesCorr : samplesCorr <= -50 ? -50 : samplesCorr >= 50 ? 50 : samplesCorr;
|
|
||||||
SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkChunkCorrection* message = SDRdaemonSinkOutput::MsgConfigureSDRdaemonSinkChunkCorrection::create(samplesCorr);
|
|
||||||
m_deviceSampleSink->getInputMessageQueue()->push(message);
|
|
||||||
m_nbSinceLastFlowCheck = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch(const boost::bad_lexical_cast &)
|
|
||||||
{
|
|
||||||
qDebug("SDRdaemonSinkGui::tick: queue length invalid: %s", strs[0].c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nbTokens > 1) // the quality status is given also
|
|
||||||
{
|
|
||||||
if (strs[1] == "2")
|
|
||||||
{
|
|
||||||
status = 2;
|
|
||||||
}
|
|
||||||
else if (strs[1] == "1")
|
|
||||||
{
|
|
||||||
status = 1;
|
|
||||||
if (m_countUnrecoverable < 999) m_countUnrecoverable++;
|
|
||||||
updateEventCounts = true;
|
|
||||||
qDebug("SDRdaemonSinkGui::tick: %s", msg.c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (m_countRecovered < 999) m_countRecovered++;
|
|
||||||
updateEventCounts = true;
|
|
||||||
qDebug("SDRdaemonSinkGui::tick: %s", msg.c_str());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (nbTokens > 2) // the quality indicator message is given also
|
|
||||||
{
|
|
||||||
ui->qualityStatusText->setText(QString::fromStdString(strs[2]));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (status == 2) { // all OK
|
|
||||||
ui->allFramesDecoded->setStyleSheet("QToolButton { background-color : green; }");
|
|
||||||
} else if (status == 1) { // unrecoverable errors
|
|
||||||
ui->allFramesDecoded->setStyleSheet("QToolButton { background-color : red; }");
|
|
||||||
} else { // recoverable errors or unknown status
|
|
||||||
ui->allFramesDecoded->setStyleSheet("QToolButton { background:rgb(56,56,56); }");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (updateEventCounts)
|
|
||||||
{
|
|
||||||
displayEventCounts();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
displayEventTimer();
|
displayEventTimer();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,15 +99,13 @@ private slots:
|
|||||||
void handleInputMessages();
|
void handleInputMessages();
|
||||||
void on_centerFrequency_changed(quint64 value);
|
void on_centerFrequency_changed(quint64 value);
|
||||||
void on_sampleRate_changed(quint64 value);
|
void on_sampleRate_changed(quint64 value);
|
||||||
void on_interp_currentIndexChanged(int index);
|
|
||||||
void on_txDelay_valueChanged(int value);
|
void on_txDelay_valueChanged(int value);
|
||||||
void on_nbFECBlocks_valueChanged(int value);
|
void on_nbFECBlocks_valueChanged(int value);
|
||||||
void on_address_returnPressed();
|
void on_apiAddress_returnPressed();
|
||||||
|
void on_apiPort_returnPressed();
|
||||||
|
void on_dataAddress_returnPressed();
|
||||||
void on_dataPort_returnPressed();
|
void on_dataPort_returnPressed();
|
||||||
void on_controlPort_returnPressed();
|
|
||||||
void on_specificParms_returnPressed();
|
|
||||||
void on_applyButton_clicked(bool checked);
|
void on_applyButton_clicked(bool checked);
|
||||||
void on_sendButton_clicked(bool checked);
|
|
||||||
void on_startStop_toggled(bool checked);
|
void on_startStop_toggled(bool checked);
|
||||||
void on_eventCountsReset_clicked(bool checked);
|
void on_eventCountsReset_clicked(bool checked);
|
||||||
void updateHardware();
|
void updateHardware();
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>411</width>
|
<width>400</width>
|
||||||
<height>217</height>
|
<height>217</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>380</width>
|
<width>400</width>
|
||||||
<height>190</height>
|
<height>190</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -221,55 +221,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="interpLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Int</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QComboBox" name="interp">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Interpolation</string>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>1</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>2</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>4</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>8</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>16</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>32</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<property name="text">
|
|
||||||
<string>64</string>
|
|
||||||
</property>
|
|
||||||
</item>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line">
|
<widget class="Line" name="line">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@ -536,17 +487,17 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="addressLayout">
|
<layout class="QHBoxLayout" name="addressLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="addressLabel">
|
<widget class="QLabel" name="apiAddressLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Addr:</string>
|
<string>API</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="address">
|
<widget class="QLineEdit" name="apiAddress">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>120</width>
|
<width>100</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -562,14 +513,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="dataPortLabel">
|
<widget class="QLineEdit" name="apiPort">
|
||||||
<property name="text">
|
|
||||||
<string>D:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="dataPort">
|
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Remote data connection port</string>
|
<string>Remote data connection port</string>
|
||||||
</property>
|
</property>
|
||||||
@ -579,32 +523,39 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>0</string>
|
<string>0</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="controlPortLabel">
|
<widget class="QLabel" name="dataAddressLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>C:</string>
|
<string>Data</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="controlPort">
|
<widget class="QLineEdit" name="dataAddress">
|
||||||
<property name="toolTip">
|
<property name="minimumSize">
|
||||||
<string>Remote control port</string>
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="inputMask">
|
||||||
|
<string>000.000.000.000</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="dataPort">
|
||||||
<property name="inputMask">
|
<property name="inputMask">
|
||||||
<string>00000</string>
|
<string>00000</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>0</string>
|
<string>0</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -622,33 +573,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout" name="controlLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="specificParmsLAbel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Sp:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="specificParms"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="sendButton">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Send</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="padLayout">
|
<layout class="QHBoxLayout" name="padLayout">
|
||||||
<item>
|
<item>
|
||||||
|
@ -66,7 +66,7 @@ bool SDRdaemonSinkOutput::start()
|
|||||||
qDebug() << "SDRdaemonSinkOutput::start";
|
qDebug() << "SDRdaemonSinkOutput::start";
|
||||||
|
|
||||||
m_sdrDaemonSinkThread = new SDRdaemonSinkThread(&m_sampleSourceFifo);
|
m_sdrDaemonSinkThread = new SDRdaemonSinkThread(&m_sampleSourceFifo);
|
||||||
m_sdrDaemonSinkThread->setRemoteAddress(m_settings.m_address, m_settings.m_dataPort);
|
m_sdrDaemonSinkThread->setDataAddress(m_settings.m_dataAddress, m_settings.m_dataPort);
|
||||||
m_sdrDaemonSinkThread->setCenterFrequency(m_settings.m_centerFrequency);
|
m_sdrDaemonSinkThread->setCenterFrequency(m_settings.m_centerFrequency);
|
||||||
m_sdrDaemonSinkThread->setSamplerate(m_settings.m_sampleRate);
|
m_sdrDaemonSinkThread->setSamplerate(m_settings.m_sampleRate);
|
||||||
m_sdrDaemonSinkThread->setNbBlocksFEC(m_settings.m_nbFECBlocks);
|
m_sdrDaemonSinkThread->setNbBlocksFEC(m_settings.m_nbFECBlocks);
|
||||||
@ -246,10 +246,10 @@ void SDRdaemonSinkOutput::applySettings(const SDRdaemonSinkSettings& settings, b
|
|||||||
bool forwardChange = false;
|
bool forwardChange = false;
|
||||||
bool changeTxDelay = false;
|
bool changeTxDelay = false;
|
||||||
|
|
||||||
if (force || (m_settings.m_address != settings.m_address) || (m_settings.m_dataPort != settings.m_dataPort))
|
if (force || (m_settings.m_dataAddress != settings.m_dataAddress) || (m_settings.m_dataPort != settings.m_dataPort))
|
||||||
{
|
{
|
||||||
if (m_sdrDaemonSinkThread != 0) {
|
if (m_sdrDaemonSinkThread != 0) {
|
||||||
m_sdrDaemonSinkThread->setRemoteAddress(settings.m_address, settings.m_dataPort);
|
m_sdrDaemonSinkThread->setDataAddress(settings.m_dataAddress, settings.m_dataPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -272,11 +272,6 @@ void SDRdaemonSinkOutput::applySettings(const SDRdaemonSinkSettings& settings, b
|
|||||||
changeTxDelay = true;
|
changeTxDelay = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (force || (m_settings.m_log2Interp != settings.m_log2Interp))
|
|
||||||
{
|
|
||||||
forwardChange = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (force || (m_settings.m_nbFECBlocks != settings.m_nbFECBlocks))
|
if (force || (m_settings.m_nbFECBlocks != settings.m_nbFECBlocks))
|
||||||
{
|
{
|
||||||
if (m_sdrDaemonSinkThread != 0) {
|
if (m_sdrDaemonSinkThread != 0) {
|
||||||
@ -311,10 +306,11 @@ void SDRdaemonSinkOutput::applySettings(const SDRdaemonSinkSettings& settings, b
|
|||||||
qDebug() << "SDRdaemonSinkOutput::applySettings:"
|
qDebug() << "SDRdaemonSinkOutput::applySettings:"
|
||||||
<< " m_centerFrequency: " << settings.m_centerFrequency
|
<< " m_centerFrequency: " << settings.m_centerFrequency
|
||||||
<< " m_sampleRate: " << settings.m_sampleRate
|
<< " m_sampleRate: " << settings.m_sampleRate
|
||||||
<< " m_log2Interp: " << settings.m_log2Interp
|
|
||||||
<< " m_txDelay: " << settings.m_txDelay
|
<< " m_txDelay: " << settings.m_txDelay
|
||||||
<< " m_nbFECBlocks: " << settings.m_nbFECBlocks
|
<< " m_nbFECBlocks: " << settings.m_nbFECBlocks
|
||||||
<< " m_address: " << settings.m_address
|
<< " m_apiAddress: " << settings.m_apiAddress
|
||||||
|
<< " m_apiPort: " << settings.m_apiPort
|
||||||
|
<< " m_dataAddress: " << settings.m_dataAddress
|
||||||
<< " m_dataPort: " << settings.m_dataPort;
|
<< " m_dataPort: " << settings.m_dataPort;
|
||||||
|
|
||||||
if (forwardChange)
|
if (forwardChange)
|
||||||
@ -376,27 +372,24 @@ int SDRdaemonSinkOutput::webapiSettingsPutPatch(
|
|||||||
if (deviceSettingsKeys.contains("sampleRate")) {
|
if (deviceSettingsKeys.contains("sampleRate")) {
|
||||||
settings.m_sampleRate = response.getSdrDaemonSinkSettings()->getSampleRate();
|
settings.m_sampleRate = response.getSdrDaemonSinkSettings()->getSampleRate();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("log2Interp")) {
|
|
||||||
settings.m_log2Interp = response.getSdrDaemonSinkSettings()->getLog2Interp();
|
|
||||||
}
|
|
||||||
if (deviceSettingsKeys.contains("txDelay")) {
|
if (deviceSettingsKeys.contains("txDelay")) {
|
||||||
settings.m_txDelay = response.getSdrDaemonSinkSettings()->getTxDelay();
|
settings.m_txDelay = response.getSdrDaemonSinkSettings()->getTxDelay();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("nbFECBlocks")) {
|
if (deviceSettingsKeys.contains("nbFECBlocks")) {
|
||||||
settings.m_nbFECBlocks = response.getSdrDaemonSinkSettings()->getNbFecBlocks();
|
settings.m_nbFECBlocks = response.getSdrDaemonSinkSettings()->getNbFecBlocks();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("address")) {
|
if (deviceSettingsKeys.contains("apiAddress")) {
|
||||||
settings.m_address = *response.getSdrDaemonSinkSettings()->getAddress();
|
settings.m_apiAddress = *response.getSdrDaemonSinkSettings()->getApiAddress();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("apiPort")) {
|
||||||
|
settings.m_apiPort = response.getSdrDaemonSinkSettings()->getApiPort();
|
||||||
|
}
|
||||||
|
if (deviceSettingsKeys.contains("dataAddress")) {
|
||||||
|
settings.m_dataAddress = *response.getSdrDaemonSinkSettings()->getDataAddress();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("dataPort")) {
|
if (deviceSettingsKeys.contains("dataPort")) {
|
||||||
settings.m_dataPort = response.getSdrDaemonSinkSettings()->getDataPort();
|
settings.m_dataPort = response.getSdrDaemonSinkSettings()->getDataPort();
|
||||||
}
|
}
|
||||||
if (deviceSettingsKeys.contains("controlPort")) {
|
|
||||||
settings.m_controlPort = response.getSdrDaemonSinkSettings()->getControlPort();
|
|
||||||
}
|
|
||||||
if (deviceSettingsKeys.contains("specificParameters")) {
|
|
||||||
settings.m_specificParameters = *response.getSdrDaemonSinkSettings()->getSpecificParameters();
|
|
||||||
}
|
|
||||||
|
|
||||||
MsgConfigureSDRdaemonSink *msg = MsgConfigureSDRdaemonSink::create(settings, force);
|
MsgConfigureSDRdaemonSink *msg = MsgConfigureSDRdaemonSink::create(settings, force);
|
||||||
m_inputMessageQueue.push(msg);
|
m_inputMessageQueue.push(msg);
|
||||||
@ -425,13 +418,12 @@ void SDRdaemonSinkOutput::webapiFormatDeviceSettings(SWGSDRangel::SWGDeviceSetti
|
|||||||
{
|
{
|
||||||
response.getSdrDaemonSinkSettings()->setCenterFrequency(settings.m_centerFrequency);
|
response.getSdrDaemonSinkSettings()->setCenterFrequency(settings.m_centerFrequency);
|
||||||
response.getSdrDaemonSinkSettings()->setSampleRate(settings.m_sampleRate);
|
response.getSdrDaemonSinkSettings()->setSampleRate(settings.m_sampleRate);
|
||||||
response.getSdrDaemonSinkSettings()->setLog2Interp(settings.m_log2Interp);
|
|
||||||
response.getSdrDaemonSinkSettings()->setTxDelay(settings.m_txDelay);
|
response.getSdrDaemonSinkSettings()->setTxDelay(settings.m_txDelay);
|
||||||
response.getSdrDaemonSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks);
|
response.getSdrDaemonSinkSettings()->setNbFecBlocks(settings.m_nbFECBlocks);
|
||||||
response.getSdrDaemonSinkSettings()->setAddress(new QString(settings.m_address));
|
response.getSdrDaemonSinkSettings()->setApiAddress(new QString(settings.m_apiAddress));
|
||||||
|
response.getSdrDaemonSinkSettings()->setApiPort(settings.m_apiPort);
|
||||||
|
response.getSdrDaemonSinkSettings()->setDataAddress(new QString(settings.m_dataAddress));
|
||||||
response.getSdrDaemonSinkSettings()->setDataPort(settings.m_dataPort);
|
response.getSdrDaemonSinkSettings()->setDataPort(settings.m_dataPort);
|
||||||
response.getSdrDaemonSinkSettings()->setControlPort(settings.m_controlPort);
|
|
||||||
response.getSdrDaemonSinkSettings()->setSpecificParameters(new QString(settings.m_specificParameters));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDRdaemonSinkOutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
void SDRdaemonSinkOutput::webapiFormatDeviceReport(SWGSDRangel::SWGDeviceReport& response)
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
const PluginDescriptor SDRdaemonSinkPlugin::m_pluginDescriptor = {
|
const PluginDescriptor SDRdaemonSinkPlugin::m_pluginDescriptor = {
|
||||||
QString("SDRdaemon sink output"),
|
QString("SDRdaemon sink output"),
|
||||||
QString("4.0.0"),
|
QString("4.1.0"),
|
||||||
QString("(c) Edouard Griffiths, F4EXB"),
|
QString("(c) Edouard Griffiths, F4EXB"),
|
||||||
QString("https://github.com/f4exb/sdrangel"),
|
QString("https://github.com/f4exb/sdrangel"),
|
||||||
true,
|
true,
|
||||||
|
@ -26,27 +26,26 @@ void SDRdaemonSinkSettings::resetToDefaults()
|
|||||||
{
|
{
|
||||||
m_centerFrequency = 435000*1000;
|
m_centerFrequency = 435000*1000;
|
||||||
m_sampleRate = 48000;
|
m_sampleRate = 48000;
|
||||||
m_log2Interp = 0;
|
|
||||||
m_txDelay = 0.5;
|
m_txDelay = 0.5;
|
||||||
m_nbFECBlocks = 0;
|
m_nbFECBlocks = 0;
|
||||||
m_address = "127.0.0.1";
|
m_apiAddress = "127.0.0.1";
|
||||||
|
m_apiPort = 9091;
|
||||||
|
m_dataAddress = "127.0.0.1";
|
||||||
m_dataPort = 9090;
|
m_dataPort = 9090;
|
||||||
m_controlPort = 9093;
|
|
||||||
m_specificParameters = "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray SDRdaemonSinkSettings::serialize() const
|
QByteArray SDRdaemonSinkSettings::serialize() const
|
||||||
{
|
{
|
||||||
SimpleSerializer s(1);
|
SimpleSerializer s(1);
|
||||||
|
|
||||||
s.writeU64(1, m_sampleRate);
|
s.writeU64(1, m_centerFrequency);
|
||||||
s.writeU32(2, m_log2Interp);
|
s.writeU32(2, m_sampleRate);
|
||||||
s.writeFloat(3, m_txDelay);
|
s.writeFloat(3, m_txDelay);
|
||||||
s.writeU32(4, m_nbFECBlocks);
|
s.writeU32(4, m_nbFECBlocks);
|
||||||
s.writeString(5, m_address);
|
s.writeString(5, m_apiAddress);
|
||||||
s.writeU32(6, m_dataPort);
|
s.writeU32(6, m_apiPort);
|
||||||
s.writeU32(7, m_controlPort);
|
s.writeString(7, m_dataAddress);
|
||||||
s.writeString(8, m_specificParameters);
|
s.writeU32(8, m_dataPort);
|
||||||
|
|
||||||
return s.final();
|
return s.final();
|
||||||
}
|
}
|
||||||
@ -64,16 +63,16 @@ bool SDRdaemonSinkSettings::deserialize(const QByteArray& data)
|
|||||||
if (d.getVersion() == 1)
|
if (d.getVersion() == 1)
|
||||||
{
|
{
|
||||||
quint32 uintval;
|
quint32 uintval;
|
||||||
d.readU64(1, &m_sampleRate, 48000);
|
d.readU64(1, &m_centerFrequency, 435000*1000);
|
||||||
d.readU32(2, &m_log2Interp, 0);
|
d.readU32(2, &m_sampleRate, 48000);
|
||||||
d.readFloat(3, &m_txDelay, 0.5);
|
d.readFloat(3, &m_txDelay, 0.5);
|
||||||
d.readU32(4, &m_nbFECBlocks, 0);
|
d.readU32(4, &m_nbFECBlocks, 0);
|
||||||
d.readString(5, &m_address, "127.0.0.1");
|
d.readString(5, &m_apiAddress, "127.0.0.1");
|
||||||
d.readU32(6, &uintval, 9090);
|
d.readU32(6, &uintval, 9090);
|
||||||
|
m_apiPort = uintval % (1<<16);
|
||||||
|
d.readString(7, &m_dataAddress, "127.0.0.1");
|
||||||
|
d.readU32(8, &uintval, 9090);
|
||||||
m_dataPort = uintval % (1<<16);
|
m_dataPort = uintval % (1<<16);
|
||||||
d.readU32(7, &uintval, 9090);
|
|
||||||
m_controlPort = uintval % (1<<16);
|
|
||||||
d.readString(8, &m_specificParameters, "");
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -21,14 +21,13 @@
|
|||||||
|
|
||||||
struct SDRdaemonSinkSettings {
|
struct SDRdaemonSinkSettings {
|
||||||
quint64 m_centerFrequency;
|
quint64 m_centerFrequency;
|
||||||
quint64 m_sampleRate;
|
quint32 m_sampleRate;
|
||||||
quint32 m_log2Interp;
|
|
||||||
float m_txDelay;
|
float m_txDelay;
|
||||||
quint32 m_nbFECBlocks;
|
quint32 m_nbFECBlocks;
|
||||||
QString m_address;
|
QString m_apiAddress;
|
||||||
|
quint16 m_apiPort;
|
||||||
|
QString m_dataAddress;
|
||||||
quint16 m_dataPort;
|
quint16 m_dataPort;
|
||||||
quint16 m_controlPort;
|
|
||||||
QString m_specificParameters;
|
|
||||||
|
|
||||||
SDRdaemonSinkSettings();
|
SDRdaemonSinkSettings();
|
||||||
void resetToDefaults();
|
void resetToDefaults();
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
void setSamplerate(int samplerate);
|
void setSamplerate(int samplerate);
|
||||||
void setNbBlocksFEC(uint32_t nbBlocksFEC) { m_udpSinkFEC.setNbBlocksFEC(nbBlocksFEC); };
|
void setNbBlocksFEC(uint32_t nbBlocksFEC) { m_udpSinkFEC.setNbBlocksFEC(nbBlocksFEC); };
|
||||||
void setTxDelay(uint32_t txDelay) { m_udpSinkFEC.setTxDelay(txDelay); };
|
void setTxDelay(uint32_t txDelay) { m_udpSinkFEC.setTxDelay(txDelay); };
|
||||||
void setRemoteAddress(const QString& address, uint16_t port) { m_udpSinkFEC.setRemoteAddress(address, port); }
|
void setDataAddress(const QString& address, uint16_t port) { m_udpSinkFEC.setRemoteAddress(address, port); }
|
||||||
|
|
||||||
bool isRunning() const { return m_running; }
|
bool isRunning() const { return m_running; }
|
||||||
|
|
||||||
|
@ -3274,9 +3274,6 @@ margin-bottom: 20px;
|
|||||||
"sampleRate" : {
|
"sampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
"log2Interp" : {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"txDelay" : {
|
"txDelay" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
@ -3285,17 +3282,17 @@ margin-bottom: 20px;
|
|||||||
"nbFECBlocks" : {
|
"nbFECBlocks" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
"address" : {
|
"apiAddress" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"apiPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"dataAddress" : {
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"dataPort" : {
|
"dataPort" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
|
||||||
"controlPort" : {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"specificParameters" : {
|
|
||||||
"type" : "string"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "SDRdaemonSink"
|
"description" : "SDRdaemonSink"
|
||||||
@ -28215,7 +28212,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-08-23T17:21:24.907+02:00
|
Generated 2018-08-29T15:59:39.880+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,22 +6,20 @@ SDRdaemonSinkSettings:
|
|||||||
format: uint64
|
format: uint64
|
||||||
sampleRate:
|
sampleRate:
|
||||||
type: integer
|
type: integer
|
||||||
log2Interp:
|
|
||||||
type: integer
|
|
||||||
txDelay:
|
txDelay:
|
||||||
description: minimum delay in ms between two consecutive packets sending
|
description: minimum delay in ms between two consecutive packets sending
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
nbFECBlocks:
|
nbFECBlocks:
|
||||||
type: integer
|
type: integer
|
||||||
address:
|
apiAddress:
|
||||||
|
type: string
|
||||||
|
apiPort:
|
||||||
|
type: integer
|
||||||
|
dataAddress:
|
||||||
type: string
|
type: string
|
||||||
dataPort:
|
dataPort:
|
||||||
type: integer
|
type: integer
|
||||||
controlPort:
|
|
||||||
type: integer
|
|
||||||
specificParameters:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
SDRdaemonSinkReport:
|
SDRdaemonSinkReport:
|
||||||
description: SDRdaemonSource
|
description: SDRdaemonSource
|
||||||
|
@ -6,22 +6,20 @@ SDRdaemonSinkSettings:
|
|||||||
format: uint64
|
format: uint64
|
||||||
sampleRate:
|
sampleRate:
|
||||||
type: integer
|
type: integer
|
||||||
log2Interp:
|
|
||||||
type: integer
|
|
||||||
txDelay:
|
txDelay:
|
||||||
description: minimum delay in ms between two consecutive packets sending
|
description: minimum delay in ms between two consecutive packets sending
|
||||||
type: number
|
type: number
|
||||||
format: float
|
format: float
|
||||||
nbFECBlocks:
|
nbFECBlocks:
|
||||||
type: integer
|
type: integer
|
||||||
address:
|
apiAddress:
|
||||||
|
type: string
|
||||||
|
apiPort:
|
||||||
|
type: integer
|
||||||
|
dataAddress:
|
||||||
type: string
|
type: string
|
||||||
dataPort:
|
dataPort:
|
||||||
type: integer
|
type: integer
|
||||||
controlPort:
|
|
||||||
type: integer
|
|
||||||
specificParameters:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
SDRdaemonSinkReport:
|
SDRdaemonSinkReport:
|
||||||
description: SDRdaemonSource
|
description: SDRdaemonSource
|
||||||
|
@ -3274,9 +3274,6 @@ margin-bottom: 20px;
|
|||||||
"sampleRate" : {
|
"sampleRate" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
"log2Interp" : {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"txDelay" : {
|
"txDelay" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
"format" : "float",
|
"format" : "float",
|
||||||
@ -3285,17 +3282,17 @@ margin-bottom: 20px;
|
|||||||
"nbFECBlocks" : {
|
"nbFECBlocks" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
},
|
||||||
"address" : {
|
"apiAddress" : {
|
||||||
|
"type" : "string"
|
||||||
|
},
|
||||||
|
"apiPort" : {
|
||||||
|
"type" : "integer"
|
||||||
|
},
|
||||||
|
"dataAddress" : {
|
||||||
"type" : "string"
|
"type" : "string"
|
||||||
},
|
},
|
||||||
"dataPort" : {
|
"dataPort" : {
|
||||||
"type" : "integer"
|
"type" : "integer"
|
||||||
},
|
|
||||||
"controlPort" : {
|
|
||||||
"type" : "integer"
|
|
||||||
},
|
|
||||||
"specificParameters" : {
|
|
||||||
"type" : "string"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"description" : "SDRdaemonSink"
|
"description" : "SDRdaemonSink"
|
||||||
@ -28215,7 +28212,7 @@ except ApiException as e:
|
|||||||
</div>
|
</div>
|
||||||
<div id="generator">
|
<div id="generator">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
Generated 2018-08-23T17:21:24.907+02:00
|
Generated 2018-08-29T15:59:39.880+02:00
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,20 +32,18 @@ SWGSDRdaemonSinkSettings::SWGSDRdaemonSinkSettings() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
sample_rate = 0;
|
sample_rate = 0;
|
||||||
m_sample_rate_isSet = false;
|
m_sample_rate_isSet = false;
|
||||||
log2_interp = 0;
|
|
||||||
m_log2_interp_isSet = false;
|
|
||||||
tx_delay = 0.0f;
|
tx_delay = 0.0f;
|
||||||
m_tx_delay_isSet = false;
|
m_tx_delay_isSet = false;
|
||||||
nb_fec_blocks = 0;
|
nb_fec_blocks = 0;
|
||||||
m_nb_fec_blocks_isSet = false;
|
m_nb_fec_blocks_isSet = false;
|
||||||
address = nullptr;
|
api_address = nullptr;
|
||||||
m_address_isSet = false;
|
m_api_address_isSet = false;
|
||||||
|
api_port = 0;
|
||||||
|
m_api_port_isSet = false;
|
||||||
|
data_address = nullptr;
|
||||||
|
m_data_address_isSet = false;
|
||||||
data_port = 0;
|
data_port = 0;
|
||||||
m_data_port_isSet = false;
|
m_data_port_isSet = false;
|
||||||
control_port = 0;
|
|
||||||
m_control_port_isSet = false;
|
|
||||||
specific_parameters = nullptr;
|
|
||||||
m_specific_parameters_isSet = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGSDRdaemonSinkSettings::~SWGSDRdaemonSinkSettings() {
|
SWGSDRdaemonSinkSettings::~SWGSDRdaemonSinkSettings() {
|
||||||
@ -58,20 +56,18 @@ SWGSDRdaemonSinkSettings::init() {
|
|||||||
m_center_frequency_isSet = false;
|
m_center_frequency_isSet = false;
|
||||||
sample_rate = 0;
|
sample_rate = 0;
|
||||||
m_sample_rate_isSet = false;
|
m_sample_rate_isSet = false;
|
||||||
log2_interp = 0;
|
|
||||||
m_log2_interp_isSet = false;
|
|
||||||
tx_delay = 0.0f;
|
tx_delay = 0.0f;
|
||||||
m_tx_delay_isSet = false;
|
m_tx_delay_isSet = false;
|
||||||
nb_fec_blocks = 0;
|
nb_fec_blocks = 0;
|
||||||
m_nb_fec_blocks_isSet = false;
|
m_nb_fec_blocks_isSet = false;
|
||||||
address = new QString("");
|
api_address = new QString("");
|
||||||
m_address_isSet = false;
|
m_api_address_isSet = false;
|
||||||
|
api_port = 0;
|
||||||
|
m_api_port_isSet = false;
|
||||||
|
data_address = new QString("");
|
||||||
|
m_data_address_isSet = false;
|
||||||
data_port = 0;
|
data_port = 0;
|
||||||
m_data_port_isSet = false;
|
m_data_port_isSet = false;
|
||||||
control_port = 0;
|
|
||||||
m_control_port_isSet = false;
|
|
||||||
specific_parameters = new QString("");
|
|
||||||
m_specific_parameters_isSet = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -80,15 +76,14 @@ SWGSDRdaemonSinkSettings::cleanup() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(api_address != nullptr) {
|
||||||
if(address != nullptr) {
|
delete api_address;
|
||||||
delete address;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(data_address != nullptr) {
|
||||||
if(specific_parameters != nullptr) {
|
delete data_address;
|
||||||
delete specific_parameters;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SWGSDRdaemonSinkSettings*
|
SWGSDRdaemonSinkSettings*
|
||||||
@ -106,20 +101,18 @@ SWGSDRdaemonSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
|||||||
|
|
||||||
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
::SWGSDRangel::setValue(&sample_rate, pJson["sampleRate"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&log2_interp, pJson["log2Interp"], "qint32", "");
|
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&tx_delay, pJson["txDelay"], "float", "");
|
::SWGSDRangel::setValue(&tx_delay, pJson["txDelay"], "float", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", "");
|
::SWGSDRangel::setValue(&nb_fec_blocks, pJson["nbFECBlocks"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&address, pJson["address"], "QString", "QString");
|
::SWGSDRangel::setValue(&api_address, pJson["apiAddress"], "QString", "QString");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&api_port, pJson["apiPort"], "qint32", "");
|
||||||
|
|
||||||
|
::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", "");
|
::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", "");
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&control_port, pJson["controlPort"], "qint32", "");
|
|
||||||
|
|
||||||
::SWGSDRangel::setValue(&specific_parameters, pJson["specificParameters"], "QString", "QString");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
@ -142,27 +135,24 @@ SWGSDRdaemonSinkSettings::asJsonObject() {
|
|||||||
if(m_sample_rate_isSet){
|
if(m_sample_rate_isSet){
|
||||||
obj->insert("sampleRate", QJsonValue(sample_rate));
|
obj->insert("sampleRate", QJsonValue(sample_rate));
|
||||||
}
|
}
|
||||||
if(m_log2_interp_isSet){
|
|
||||||
obj->insert("log2Interp", QJsonValue(log2_interp));
|
|
||||||
}
|
|
||||||
if(m_tx_delay_isSet){
|
if(m_tx_delay_isSet){
|
||||||
obj->insert("txDelay", QJsonValue(tx_delay));
|
obj->insert("txDelay", QJsonValue(tx_delay));
|
||||||
}
|
}
|
||||||
if(m_nb_fec_blocks_isSet){
|
if(m_nb_fec_blocks_isSet){
|
||||||
obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks));
|
obj->insert("nbFECBlocks", QJsonValue(nb_fec_blocks));
|
||||||
}
|
}
|
||||||
if(address != nullptr && *address != QString("")){
|
if(api_address != nullptr && *api_address != QString("")){
|
||||||
toJsonValue(QString("address"), address, obj, QString("QString"));
|
toJsonValue(QString("apiAddress"), api_address, obj, QString("QString"));
|
||||||
|
}
|
||||||
|
if(m_api_port_isSet){
|
||||||
|
obj->insert("apiPort", QJsonValue(api_port));
|
||||||
|
}
|
||||||
|
if(data_address != nullptr && *data_address != QString("")){
|
||||||
|
toJsonValue(QString("dataAddress"), data_address, obj, QString("QString"));
|
||||||
}
|
}
|
||||||
if(m_data_port_isSet){
|
if(m_data_port_isSet){
|
||||||
obj->insert("dataPort", QJsonValue(data_port));
|
obj->insert("dataPort", QJsonValue(data_port));
|
||||||
}
|
}
|
||||||
if(m_control_port_isSet){
|
|
||||||
obj->insert("controlPort", QJsonValue(control_port));
|
|
||||||
}
|
|
||||||
if(specific_parameters != nullptr && *specific_parameters != QString("")){
|
|
||||||
toJsonValue(QString("specificParameters"), specific_parameters, obj, QString("QString"));
|
|
||||||
}
|
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
@ -187,16 +177,6 @@ SWGSDRdaemonSinkSettings::setSampleRate(qint32 sample_rate) {
|
|||||||
this->m_sample_rate_isSet = true;
|
this->m_sample_rate_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
|
||||||
SWGSDRdaemonSinkSettings::getLog2Interp() {
|
|
||||||
return log2_interp;
|
|
||||||
}
|
|
||||||
void
|
|
||||||
SWGSDRdaemonSinkSettings::setLog2Interp(qint32 log2_interp) {
|
|
||||||
this->log2_interp = log2_interp;
|
|
||||||
this->m_log2_interp_isSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
float
|
float
|
||||||
SWGSDRdaemonSinkSettings::getTxDelay() {
|
SWGSDRdaemonSinkSettings::getTxDelay() {
|
||||||
return tx_delay;
|
return tx_delay;
|
||||||
@ -218,13 +198,33 @@ SWGSDRdaemonSinkSettings::setNbFecBlocks(qint32 nb_fec_blocks) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QString*
|
QString*
|
||||||
SWGSDRdaemonSinkSettings::getAddress() {
|
SWGSDRdaemonSinkSettings::getApiAddress() {
|
||||||
return address;
|
return api_address;
|
||||||
}
|
}
|
||||||
void
|
void
|
||||||
SWGSDRdaemonSinkSettings::setAddress(QString* address) {
|
SWGSDRdaemonSinkSettings::setApiAddress(QString* api_address) {
|
||||||
this->address = address;
|
this->api_address = api_address;
|
||||||
this->m_address_isSet = true;
|
this->m_api_address_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
qint32
|
||||||
|
SWGSDRdaemonSinkSettings::getApiPort() {
|
||||||
|
return api_port;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSinkSettings::setApiPort(qint32 api_port) {
|
||||||
|
this->api_port = api_port;
|
||||||
|
this->m_api_port_isSet = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString*
|
||||||
|
SWGSDRdaemonSinkSettings::getDataAddress() {
|
||||||
|
return data_address;
|
||||||
|
}
|
||||||
|
void
|
||||||
|
SWGSDRdaemonSinkSettings::setDataAddress(QString* data_address) {
|
||||||
|
this->data_address = data_address;
|
||||||
|
this->m_data_address_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
qint32
|
||||||
@ -237,26 +237,6 @@ SWGSDRdaemonSinkSettings::setDataPort(qint32 data_port) {
|
|||||||
this->m_data_port_isSet = true;
|
this->m_data_port_isSet = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
qint32
|
|
||||||
SWGSDRdaemonSinkSettings::getControlPort() {
|
|
||||||
return control_port;
|
|
||||||
}
|
|
||||||
void
|
|
||||||
SWGSDRdaemonSinkSettings::setControlPort(qint32 control_port) {
|
|
||||||
this->control_port = control_port;
|
|
||||||
this->m_control_port_isSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString*
|
|
||||||
SWGSDRdaemonSinkSettings::getSpecificParameters() {
|
|
||||||
return specific_parameters;
|
|
||||||
}
|
|
||||||
void
|
|
||||||
SWGSDRdaemonSinkSettings::setSpecificParameters(QString* specific_parameters) {
|
|
||||||
this->specific_parameters = specific_parameters;
|
|
||||||
this->m_specific_parameters_isSet = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SWGSDRdaemonSinkSettings::isSet(){
|
SWGSDRdaemonSinkSettings::isSet(){
|
||||||
@ -264,13 +244,12 @@ SWGSDRdaemonSinkSettings::isSet(){
|
|||||||
do{
|
do{
|
||||||
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
if(m_center_frequency_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
if(m_sample_rate_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_log2_interp_isSet){ isObjectUpdated = true; break;}
|
|
||||||
if(m_tx_delay_isSet){ isObjectUpdated = true; break;}
|
if(m_tx_delay_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
if(m_nb_fec_blocks_isSet){ isObjectUpdated = true; break;}
|
||||||
if(address != nullptr && *address != QString("")){ isObjectUpdated = true; break;}
|
if(api_address != nullptr && *api_address != QString("")){ isObjectUpdated = true; break;}
|
||||||
|
if(m_api_port_isSet){ isObjectUpdated = true; break;}
|
||||||
|
if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;}
|
||||||
if(m_data_port_isSet){ isObjectUpdated = true; break;}
|
if(m_data_port_isSet){ isObjectUpdated = true; break;}
|
||||||
if(m_control_port_isSet){ isObjectUpdated = true; break;}
|
|
||||||
if(specific_parameters != nullptr && *specific_parameters != QString("")){ isObjectUpdated = true; break;}
|
|
||||||
}while(false);
|
}while(false);
|
||||||
return isObjectUpdated;
|
return isObjectUpdated;
|
||||||
}
|
}
|
||||||
|
@ -48,27 +48,24 @@ public:
|
|||||||
qint32 getSampleRate();
|
qint32 getSampleRate();
|
||||||
void setSampleRate(qint32 sample_rate);
|
void setSampleRate(qint32 sample_rate);
|
||||||
|
|
||||||
qint32 getLog2Interp();
|
|
||||||
void setLog2Interp(qint32 log2_interp);
|
|
||||||
|
|
||||||
float getTxDelay();
|
float getTxDelay();
|
||||||
void setTxDelay(float tx_delay);
|
void setTxDelay(float tx_delay);
|
||||||
|
|
||||||
qint32 getNbFecBlocks();
|
qint32 getNbFecBlocks();
|
||||||
void setNbFecBlocks(qint32 nb_fec_blocks);
|
void setNbFecBlocks(qint32 nb_fec_blocks);
|
||||||
|
|
||||||
QString* getAddress();
|
QString* getApiAddress();
|
||||||
void setAddress(QString* address);
|
void setApiAddress(QString* api_address);
|
||||||
|
|
||||||
|
qint32 getApiPort();
|
||||||
|
void setApiPort(qint32 api_port);
|
||||||
|
|
||||||
|
QString* getDataAddress();
|
||||||
|
void setDataAddress(QString* data_address);
|
||||||
|
|
||||||
qint32 getDataPort();
|
qint32 getDataPort();
|
||||||
void setDataPort(qint32 data_port);
|
void setDataPort(qint32 data_port);
|
||||||
|
|
||||||
qint32 getControlPort();
|
|
||||||
void setControlPort(qint32 control_port);
|
|
||||||
|
|
||||||
QString* getSpecificParameters();
|
|
||||||
void setSpecificParameters(QString* specific_parameters);
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool isSet() override;
|
virtual bool isSet() override;
|
||||||
|
|
||||||
@ -79,27 +76,24 @@ private:
|
|||||||
qint32 sample_rate;
|
qint32 sample_rate;
|
||||||
bool m_sample_rate_isSet;
|
bool m_sample_rate_isSet;
|
||||||
|
|
||||||
qint32 log2_interp;
|
|
||||||
bool m_log2_interp_isSet;
|
|
||||||
|
|
||||||
float tx_delay;
|
float tx_delay;
|
||||||
bool m_tx_delay_isSet;
|
bool m_tx_delay_isSet;
|
||||||
|
|
||||||
qint32 nb_fec_blocks;
|
qint32 nb_fec_blocks;
|
||||||
bool m_nb_fec_blocks_isSet;
|
bool m_nb_fec_blocks_isSet;
|
||||||
|
|
||||||
QString* address;
|
QString* api_address;
|
||||||
bool m_address_isSet;
|
bool m_api_address_isSet;
|
||||||
|
|
||||||
|
qint32 api_port;
|
||||||
|
bool m_api_port_isSet;
|
||||||
|
|
||||||
|
QString* data_address;
|
||||||
|
bool m_data_address_isSet;
|
||||||
|
|
||||||
qint32 data_port;
|
qint32 data_port;
|
||||||
bool m_data_port_isSet;
|
bool m_data_port_isSet;
|
||||||
|
|
||||||
qint32 control_port;
|
|
||||||
bool m_control_port_isSet;
|
|
||||||
|
|
||||||
QString* specific_parameters;
|
|
||||||
bool m_specific_parameters_isSet;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user