SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <remotesource.h>
Classes | |
class | MsgConfigureRemoteSource |
class | MsgQueryStreamData |
class | MsgReportStreamData |
class | MsgSampleRateNotification |
Public Member Functions | |
RemoteSource (DeviceAPI *deviceAPI) | |
~RemoteSource () | |
virtual void | destroy () |
virtual void | pull (Sample &sample) |
virtual void | pullAudio (int nbSamples) |
virtual void | start () |
virtual void | stop () |
virtual bool | handleMessage (const Message &cmd) |
Processing of a message. Returns true if message has actually been processed. More... | |
virtual void | getIdentifier (QString &id) |
virtual void | getTitle (QString &title) |
virtual qint64 | getCenterFrequency () const |
Applies to a default stream. More... | |
virtual int | getNbSinkStreams () const |
virtual int | getNbSourceStreams () const |
virtual qint64 | getStreamCenterFrequency (int streamIndex, bool sinkElseSource) const |
virtual QByteArray | serialize () const |
virtual bool | deserialize (const QByteArray &data) |
virtual int | webapiSettingsGet (SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) |
virtual int | webapiSettingsPutPatch (bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) |
virtual int | webapiReportGet (SWGSDRangel::SWGChannelReport &response, QString &errorMessage) |
void | setDataLink (const QString &dataAddress, uint16_t dataPort) |
Public Member Functions inherited from BasebandSampleSource | |
BasebandSampleSource () | |
virtual | ~BasebandSampleSource () |
void | feed (SampleSourceFifo *sampleFifo, int nbSamples) |
SampleSourceFifo & | getSampleSourceFifo () |
MessageQueue * | getInputMessageQueue () |
Get the queue for asynchronous inbound communication. More... | |
virtual void | setMessageQueueToGUI (MessageQueue *queue) |
MessageQueue * | getMessageQueueToGUI () |
void | setDeviceSampleSourceFifo (SampleSourceFifo *deviceSampleFifo) |
Public Member Functions inherited from ChannelAPI | |
ChannelAPI (const QString &name, StreamType streamType) | |
virtual | ~ChannelAPI () |
virtual void | setName (const QString &name) |
virtual const QString & | getName () const |
int | getIndexInDeviceSet () const |
void | setIndexInDeviceSet (int indexInDeviceSet) |
int | getDeviceSetIndex () const |
void | setDeviceSetIndex (int deviceSetIndex) |
DeviceAPI * | getDeviceAPI () |
void | setDeviceAPI (DeviceAPI *deviceAPI) |
uint64_t | getUID () const |
StreamType | getStreamType () const |
Static Public Attributes | |
static const QString | m_channelIdURI = "sdrangel.channeltx.remotesource" |
static const QString | m_channelId ="RemoteSource" |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
void | handleData () |
Private Member Functions | |
void | applySettings (const RemoteSourceSettings &settings, bool force=false) |
void | handleDataBlock (RemoteDataBlock *dataBlock) |
void | printMeta (const QString &header, RemoteMetaDataFEC *metaData) |
uint32_t | calculateDataReadQueueSize (int sampleRate) |
void | webapiFormatChannelSettings (SWGSDRangel::SWGChannelSettings &response, const RemoteSourceSettings &settings) |
void | webapiFormatChannelReport (SWGSDRangel::SWGChannelReport &response) |
void | webapiReverseSendSettings (QList< QString > &channelSettingsKeys, const RemoteSourceSettings &settings, bool force) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
ThreadedBasebandSampleSource * | m_threadedChannelizer |
UpChannelizer * | m_channelizer |
RemoteDataQueue | m_dataQueue |
RemoteSourceThread * | m_sourceThread |
CM256 | m_cm256 |
CM256 * | m_cm256p |
bool | m_running |
RemoteSourceSettings | m_settings |
CM256::cm256_block | m_cm256DescriptorBlocks [2 *RemoteNbOrginalBlocks] |
CM256 decoder descriptors (block addresses and block indexes) More... | |
RemoteMetaDataFEC | m_currentMeta |
RemoteDataReadQueue | m_dataReadQueue |
uint32_t | m_nbCorrectableErrors |
count of correctable errors in number of blocks More... | |
uint32_t | m_nbUncorrectableErrors |
count of uncorrectable errors in number of blocks More... | |
QNetworkAccessManager * | m_networkManager |
QNetworkRequest | m_networkRequest |
Additional Inherited Members | |
Public Types inherited from ChannelAPI | |
enum | StreamType { StreamSingleSink, StreamSingleSource, StreamMIMO } |
< This is the same enum as in PluginInterface More... | |
Protected Slots inherited from BasebandSampleSource | |
void | handleInputMessages () |
void | handleWriteToFifo (int nbSamples) |
void | handleWriteToDeviceFifo (int nbSamples) |
Protected Member Functions inherited from BasebandSampleSource | |
void | handleWriteToFifo (SampleSourceFifo *sampleFifo, int nbSamples) |
Protected Attributes inherited from BasebandSampleSource | |
MessageQueue | m_inputMessageQueue |
Queue for asynchronous inbound communication. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
SampleSourceFifo | m_sampleFifo |
Internal FIFO for multi-channel processing. More... | |
SampleSourceFifo * | m_deviceSampleFifo |
Reference to the device FIFO for single channel processing. More... | |
Definition at line 44 of file remotesource.h.
RemoteSource::RemoteSource | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 54 of file remotesource.cpp.
References DeviceAPI::addChannelSource(), DeviceAPI::addChannelSourceAPI(), handleData(), RemoteMetaDataFEC::init(), m_channelId, m_channelizer, m_cm256, m_cm256p, m_currentMeta, m_dataQueue, m_deviceAPI, m_networkManager, m_threadedChannelizer, and networkManagerFinished().
Referenced by RemoteSource::MsgReportStreamData::MsgReportStreamData().
RemoteSource::~RemoteSource | ( | ) |
Definition at line 77 of file remotesource.cpp.
References m_channelizer, m_deviceAPI, m_networkManager, m_threadedChannelizer, networkManagerFinished(), DeviceAPI::removeChannelSource(), and DeviceAPI::removeChannelSourceAPI().
Referenced by RemoteSource::MsgReportStreamData::MsgReportStreamData().
|
private |
Definition at line 211 of file remotesource.cpp.
References RemoteSourceThread::dataBind(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, RemoteSourceSettings::m_reverseAPIAddress, RemoteSourceSettings::m_reverseAPIChannelIndex, RemoteSourceSettings::m_reverseAPIDeviceIndex, RemoteSourceSettings::m_reverseAPIPort, m_settings, m_sourceThread, RemoteSourceSettings::m_useReverseAPI, and webapiReverseSendSettings().
Referenced by handleMessage().
|
private |
Definition at line 379 of file remotesource.cpp.
|
virtual |
Implements ChannelAPI.
Definition at line 193 of file remotesource.cpp.
References RemoteSource::MsgConfigureRemoteSource::create(), RemoteSourceSettings::deserialize(), BasebandSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and RemoteSourceSettings::resetToDefaults().
Referenced by getStreamCenterFrequency().
|
inlinevirtual |
Implements ChannelAPI.
Definition at line 187 of file remotesource.h.
References handleMessage(), pull(), pullAudio(), start(), and stop().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements ChannelAPI.
Definition at line 202 of file remotesource.h.
References deserialize(), serialize(), setDataLink(), webapiReportGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
inlinevirtual |
Implements ChannelAPI.
Definition at line 196 of file remotesource.h.
References RemoteSource::MsgConfigureRemoteSource::m_settings, and RemoteSourceSettings::m_title.
|
privateslot |
Definition at line 356 of file remotesource.cpp.
References handleDataBlock(), m_dataQueue, m_running, and RemoteDataQueue::pop().
Referenced by RemoteSource().
|
private |
Definition at line 252 of file remotesource.cpp.
References RemoteRxControlBlock::m_blockCount, and RemoteDataBlock::m_rxControlBlock.
Referenced by handleData().
|
virtual |
Processing of a message. Returns true if message has actually been processed.
Implements BasebandSampleSource.
Definition at line 135 of file remotesource.cpp.
References applySettings(), RemoteSource::MsgSampleRateNotification::create(), RemoteSource::MsgReportStreamData::create(), UpChannelizer::MsgChannelizerNotification::getBasebandSampleRate(), RemoteSource::MsgConfigureRemoteSource::getForce(), UpChannelizer::MsgChannelizerNotification::getFrequencyOffset(), UpChannelizer::MsgChannelizerNotification::getSampleRate(), RemoteSource::MsgConfigureRemoteSource::getSettings(), RemoteDataReadQueue::length(), RemoteMetaDataFEC::m_centerFrequency, m_currentMeta, m_dataReadQueue, BasebandSampleSource::m_guiMessageQueue, m_nbCorrectableErrors, RemoteMetaDataFEC::m_nbFECBlocks, RemoteMetaDataFEC::m_nbOriginalBlocks, m_nbUncorrectableErrors, RemoteMetaDataFEC::m_sampleRate, Message::match(), MessageQueue::push(), RemoteDataReadQueue::readSampleCount(), and RemoteDataReadQueue::size().
Referenced by destroy().
|
privateslot |
Definition at line 563 of file remotesource.cpp.
Referenced by RemoteSource(), and ~RemoteSource().
|
private |
Definition at line 365 of file remotesource.cpp.
References RemoteMetaDataFEC::m_centerFrequency, RemoteMetaDataFEC::m_nbFECBlocks, RemoteMetaDataFEC::m_nbOriginalBlocks, RemoteMetaDataFEC::m_sampleBits, RemoteMetaDataFEC::m_sampleBytes, RemoteMetaDataFEC::m_sampleRate, RemoteMetaDataFEC::m_tv_sec, and RemoteMetaDataFEC::m_tv_usec.
|
virtual |
Implements BasebandSampleSource.
Definition at line 87 of file remotesource.cpp.
References m_dataReadQueue, and RemoteDataReadQueue::readSample().
Referenced by destroy().
|
virtual |
Reimplemented from BasebandSampleSource.
Definition at line 92 of file remotesource.cpp.
Referenced by destroy().
|
virtual |
Implements ChannelAPI.
Definition at line 188 of file remotesource.cpp.
References m_settings, and RemoteSourceSettings::serialize().
Referenced by getStreamCenterFrequency().
void RemoteSource::setDataLink | ( | const QString & | dataAddress, |
uint16_t | dataPort | ||
) |
Definition at line 125 of file remotesource.cpp.
References RemoteSource::MsgConfigureRemoteSource::create(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, BasebandSampleSource::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by getStreamCenterFrequency().
|
virtual |
Implements BasebandSampleSource.
Definition at line 97 of file remotesource.cpp.
References RemoteSourceThread::dataBind(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, m_dataQueue, m_running, m_settings, m_sourceThread, RemoteSourceThread::startStop(), and stop().
Referenced by destroy().
|
virtual |
Implements BasebandSampleSource.
Definition at line 111 of file remotesource.cpp.
References m_running, m_sourceThread, and RemoteSourceThread::startStop().
Referenced by destroy(), and start().
|
private |
Definition at line 499 of file remotesource.cpp.
References DeviceSampleSink::getCenterFrequency(), SWGSDRangel::SWGChannelReport::getRemoteSourceReport(), DeviceSampleSink::getSampleRate(), DeviceAPI::getSampleSink(), RemoteDataReadQueue::length(), RemoteMetaDataFEC::m_centerFrequency, m_currentMeta, m_dataReadQueue, m_deviceAPI, m_nbCorrectableErrors, RemoteMetaDataFEC::m_nbFECBlocks, RemoteMetaDataFEC::m_nbOriginalBlocks, m_nbUncorrectableErrors, RemoteMetaDataFEC::m_sampleRate, RemoteDataReadQueue::readSampleCount(), SWGSDRangel::SWGRemoteSourceReport::setCenterFreq(), SWGSDRangel::SWGRemoteSourceReport::setCorrectableErrorsCount(), SWGSDRangel::SWGRemoteSourceReport::setDeviceCenterFreq(), SWGSDRangel::SWGRemoteSourceReport::setDeviceSampleRate(), SWGSDRangel::SWGRemoteSourceReport::setNbFecBlocks(), SWGSDRangel::SWGRemoteSourceReport::setNbOriginalBlocks(), SWGSDRangel::SWGRemoteSourceReport::setQueueLength(), SWGSDRangel::SWGRemoteSourceReport::setQueueSize(), SWGSDRangel::SWGRemoteSourceReport::setSampleRate(), SWGSDRangel::SWGRemoteSourceReport::setSamplesCount(), SWGSDRangel::SWGRemoteSourceReport::setTvSec(), SWGSDRangel::SWGRemoteSourceReport::setTvUSec(), SWGSDRangel::SWGRemoteSourceReport::setUncorrectableErrorsCount(), and RemoteDataReadQueue::size().
Referenced by webapiReportGet().
|
private |
Definition at line 469 of file remotesource.cpp.
References SWGSDRangel::SWGRemoteSourceSettings::getDataAddress(), SWGSDRangel::SWGChannelSettings::getRemoteSourceSettings(), SWGSDRangel::SWGRemoteSourceSettings::getReverseApiAddress(), SWGSDRangel::SWGRemoteSourceSettings::getTitle(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, RemoteSourceSettings::m_reverseAPIAddress, RemoteSourceSettings::m_reverseAPIChannelIndex, RemoteSourceSettings::m_reverseAPIDeviceIndex, RemoteSourceSettings::m_reverseAPIPort, RemoteSourceSettings::m_rgbColor, RemoteSourceSettings::m_title, RemoteSourceSettings::m_useReverseAPI, SWGSDRangel::SWGRemoteSourceSettings::setDataAddress(), SWGSDRangel::SWGRemoteSourceSettings::setDataPort(), SWGSDRangel::SWGRemoteSourceSettings::setReverseApiAddress(), SWGSDRangel::SWGRemoteSourceSettings::setReverseApiChannelIndex(), SWGSDRangel::SWGRemoteSourceSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGRemoteSourceSettings::setReverseApiPort(), SWGSDRangel::SWGRemoteSourceSettings::setRgbColor(), SWGSDRangel::SWGRemoteSourceSettings::setTitle(), and SWGSDRangel::SWGRemoteSourceSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Reimplemented from ChannelAPI.
Definition at line 458 of file remotesource.cpp.
References SWGSDRangel::SWGChannelReport::getRemoteSourceReport(), SWGSDRangel::SWGRemoteSourceReport::init(), SWGSDRangel::SWGChannelReport::setRemoteSourceReport(), and webapiFormatChannelReport().
Referenced by getStreamCenterFrequency().
|
private |
Definition at line 519 of file remotesource.cpp.
References SWGSDRangel::SWGChannelSettings::asJson(), ChannelAPI::getDeviceSetIndex(), ChannelAPI::getIndexInDeviceSet(), SWGSDRangel::SWGChannelSettings::getRemoteSourceSettings(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, m_networkManager, m_networkRequest, RemoteSourceSettings::m_reverseAPIAddress, RemoteSourceSettings::m_reverseAPIChannelIndex, RemoteSourceSettings::m_reverseAPIDeviceIndex, RemoteSourceSettings::m_reverseAPIPort, RemoteSourceSettings::m_rgbColor, RemoteSourceSettings::m_title, SWGSDRangel::SWGChannelSettings::setChannelType(), SWGSDRangel::SWGRemoteSourceSettings::setDataAddress(), SWGSDRangel::SWGRemoteSourceSettings::setDataPort(), SWGSDRangel::SWGChannelSettings::setDirection(), SWGSDRangel::SWGChannelSettings::setOriginatorChannelIndex(), SWGSDRangel::SWGChannelSettings::setOriginatorDeviceSetIndex(), SWGSDRangel::SWGChannelSettings::setRemoteSourceSettings(), SWGSDRangel::SWGRemoteSourceSettings::setRgbColor(), and SWGSDRangel::SWGRemoteSourceSettings::setTitle().
Referenced by applySettings().
|
virtual |
Reimplemented from ChannelAPI.
Definition at line 388 of file remotesource.cpp.
References SWGSDRangel::SWGChannelSettings::getRemoteSourceSettings(), SWGSDRangel::SWGRemoteSourceSettings::init(), m_settings, SWGSDRangel::SWGChannelSettings::setRemoteSourceSettings(), and webapiFormatChannelSettings().
Referenced by getStreamCenterFrequency().
|
virtual |
Reimplemented from ChannelAPI.
Definition at line 399 of file remotesource.cpp.
References RemoteSource::MsgConfigureRemoteSource::create(), SWGSDRangel::SWGRemoteSourceSettings::getDataAddress(), SWGSDRangel::SWGRemoteSourceSettings::getDataPort(), SWGSDRangel::SWGChannelSettings::getRemoteSourceSettings(), SWGSDRangel::SWGRemoteSourceSettings::getReverseApiAddress(), SWGSDRangel::SWGRemoteSourceSettings::getReverseApiChannelIndex(), SWGSDRangel::SWGRemoteSourceSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGRemoteSourceSettings::getReverseApiPort(), SWGSDRangel::SWGRemoteSourceSettings::getRgbColor(), SWGSDRangel::SWGRemoteSourceSettings::getTitle(), SWGSDRangel::SWGRemoteSourceSettings::getUseReverseApi(), RemoteSourceSettings::m_dataAddress, RemoteSourceSettings::m_dataPort, BasebandSampleSource::m_guiMessageQueue, BasebandSampleSource::m_inputMessageQueue, RemoteSourceSettings::m_reverseAPIAddress, RemoteSourceSettings::m_reverseAPIChannelIndex, RemoteSourceSettings::m_reverseAPIDeviceIndex, RemoteSourceSettings::m_reverseAPIPort, RemoteSourceSettings::m_rgbColor, m_settings, RemoteSourceSettings::m_title, RemoteSourceSettings::m_useReverseAPI, MessageQueue::push(), and webapiFormatChannelSettings().
Referenced by getStreamCenterFrequency().
|
static |
Definition at line 229 of file remotesource.h.
Referenced by RemoteSourcePlugin::initPlugin(), and RemoteSource().
|
static |
Definition at line 228 of file remotesource.h.
Referenced by RemoteSourcePlugin::initPlugin(), and RemoteSourceGUI::RemoteSourceGUI().
|
private |
Definition at line 234 of file remotesource.h.
Referenced by RemoteSource(), and ~RemoteSource().
|
private |
Definition at line 237 of file remotesource.h.
Referenced by RemoteSource().
|
private |
CM256 decoder descriptors (block addresses and block indexes)
Definition at line 243 of file remotesource.h.
|
private |
Definition at line 238 of file remotesource.h.
Referenced by RemoteSource().
|
private |
Definition at line 244 of file remotesource.h.
Referenced by handleMessage(), RemoteSource(), and webapiFormatChannelReport().
|
private |
Definition at line 235 of file remotesource.h.
Referenced by handleData(), RemoteSource(), and start().
|
private |
Definition at line 246 of file remotesource.h.
Referenced by handleMessage(), pull(), and webapiFormatChannelReport().
|
private |
Definition at line 232 of file remotesource.h.
Referenced by RemoteSource(), webapiFormatChannelReport(), and ~RemoteSource().
|
private |
count of correctable errors in number of blocks
Definition at line 248 of file remotesource.h.
Referenced by RemoteSource::MsgReportStreamData::get_nbCorrectableErrors(), handleMessage(), and webapiFormatChannelReport().
|
private |
count of uncorrectable errors in number of blocks
Definition at line 249 of file remotesource.h.
Referenced by RemoteSource::MsgReportStreamData::get_nbUncorrectableErrors(), handleMessage(), and webapiFormatChannelReport().
|
private |
Definition at line 251 of file remotesource.h.
Referenced by RemoteSource(), webapiReverseSendSettings(), and ~RemoteSource().
|
private |
Definition at line 252 of file remotesource.h.
Referenced by webapiReverseSendSettings().
|
private |
Definition at line 239 of file remotesource.h.
Referenced by handleData(), start(), and stop().
|
private |
Definition at line 241 of file remotesource.h.
Referenced by applySettings(), deserialize(), serialize(), setDataLink(), start(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 236 of file remotesource.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 233 of file remotesource.h.
Referenced by RemoteSource(), and ~RemoteSource().