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 <remotesink.h>
Classes | |
class | MsgConfigureChannelizer |
class | MsgConfigureRemoteSink |
class | MsgSampleRateNotification |
Signals | |
void | dataBlockAvailable (RemoteDataBlock *dataBlock) |
Public Member Functions | |
RemoteSink (DeviceAPI *deviceAPI) | |
virtual | ~RemoteSink () |
virtual void | destroy () |
virtual void | feed (const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool po) |
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 QByteArray | serialize () const |
virtual bool | deserialize (const QByteArray &data) |
virtual int | getNbSinkStreams () const |
virtual int | getNbSourceStreams () const |
virtual qint64 | getStreamCenterFrequency (int streamIndex, bool sinkElseSource) const |
virtual int | webapiSettingsGet (SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) |
virtual int | webapiSettingsPutPatch (bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) |
void | setCenterFrequency (uint64_t centerFrequency) |
void | setSampleRate (uint32_t sampleRate) |
void | setNbBlocksFEC (int nbBlocksFEC) |
void | setTxDelay (int txDelay, int nbBlocksFEC) |
void | setDataAddress (const QString &address) |
void | setDataPort (uint16_t port) |
void | setChannelizer (unsigned int log2Decim, unsigned int filterChainHash) |
Public Member Functions inherited from BasebandSampleSink | |
BasebandSampleSink () | |
virtual | ~BasebandSampleSink () |
MessageQueue * | getInputMessageQueue () |
Get the queue for asynchronous inbound communication. More... | |
virtual void | setMessageQueueToGUI (MessageQueue *queue) |
MessageQueue * | getMessageQueueToGUI () |
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 |
virtual int | webapiReportGet (SWGSDRangel::SWGChannelReport &response, QString &errorMessage) |
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.channel.remotesink" |
static const QString | m_channelId = "RemoteSink" |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
void | applySettings (const RemoteSinkSettings &settings, bool force=false) |
void | validateFilterChainHash (RemoteSinkSettings &settings) |
void | calculateFrequencyOffset () |
void | webapiFormatChannelSettings (SWGSDRangel::SWGChannelSettings &response, const RemoteSinkSettings &settings) |
void | webapiReverseSendSettings (QList< QString > &channelSettingsKeys, const RemoteSinkSettings &settings, bool force) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
ThreadedBasebandSampleSink * | m_threadedChannelizer |
DownChannelizer * | m_channelizer |
bool | m_running |
RemoteSinkSettings | m_settings |
RemoteSinkThread * | m_sinkThread |
int | m_txBlockIndex |
Current index in blocks to transmit in the Tx row. More... | |
uint16_t | m_frameCount |
transmission frame count More... | |
int | m_sampleIndex |
Current sample index in protected block data. More... | |
RemoteSuperBlock | m_superBlock |
RemoteMetaDataFEC | m_currentMetaFEC |
RemoteDataBlock * | m_dataBlock |
QMutex | m_dataBlockMutex |
uint64_t | m_centerFrequency |
int64_t | m_frequencyOffset |
uint32_t | m_sampleRate |
uint32_t | m_deviceSampleRate |
int | m_nbBlocksFEC |
int | m_txDelay |
QString | m_dataAddress |
uint16_t | m_dataPort |
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 BasebandSampleSink | |
void | handleInputMessages () |
Protected Attributes inherited from BasebandSampleSink | |
MessageQueue | m_inputMessageQueue |
Queue for asynchronous inbound communication. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
Definition at line 43 of file remotesink.h.
RemoteSink::RemoteSink | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 58 of file remotesink.cpp.
References DeviceAPI::addChannelSink(), DeviceAPI::addChannelSinkAPI(), m_channelId, m_channelizer, m_deviceAPI, m_networkManager, m_threadedChannelizer, and networkManagerFinished().
Referenced by RemoteSink::MsgConfigureChannelizer::MsgConfigureChannelizer().
|
virtual |
Definition at line 87 of file remotesink.cpp.
References m_channelizer, RemoteTxControlBlock::m_complete, m_dataBlock, m_dataBlockMutex, m_deviceAPI, m_networkManager, m_threadedChannelizer, RemoteDataBlock::m_txControlBlock, networkManagerFinished(), DeviceAPI::removeChannelSink(), and DeviceAPI::removeChannelSinkAPI().
Referenced by RemoteSink::MsgConfigureChannelizer::MsgConfigureChannelizer().
|
private |
Definition at line 366 of file remotesink.cpp.
References RemoteSinkSettings::m_dataAddress, m_dataAddress, RemoteSinkSettings::m_dataPort, m_dataPort, RemoteSinkSettings::m_nbFECBlocks, RemoteSinkSettings::m_reverseAPIAddress, RemoteSinkSettings::m_reverseAPIChannelIndex, RemoteSinkSettings::m_reverseAPIDeviceIndex, RemoteSinkSettings::m_reverseAPIPort, m_settings, RemoteSinkSettings::m_txDelay, RemoteSinkSettings::m_useReverseAPI, setNbBlocksFEC(), setTxDelay(), and webapiReverseSendSettings().
Referenced by handleMessage().
|
private |
Definition at line 426 of file remotesink.cpp.
References HBFilterChainConverter::getShiftFactor(), m_deviceSampleRate, RemoteSinkSettings::m_filterChainHash, m_frequencyOffset, RemoteSinkSettings::m_log2Decim, and m_settings.
Referenced by handleMessage().
|
signal |
|
virtual |
Implements ChannelAPI.
Definition at line 348 of file remotesink.cpp.
References RemoteSink::MsgConfigureRemoteSink::create(), RemoteSinkSettings::deserialize(), BasebandSampleSink::m_inputMessageQueue, m_settings, MessageQueue::push(), and RemoteSinkSettings::resetToDefaults().
Referenced by getCenterFrequency().
|
inlinevirtual |
Implements ChannelAPI.
Definition at line 114 of file remotesink.h.
References feed(), handleMessage(), start(), and stop().
|
virtual |
Implements BasebandSampleSink.
Definition at line 123 of file remotesink.cpp.
References m_centerFrequency, m_frequencyOffset, m_sampleRate, m_txBlockIndex, and SDR_RX_SAMP_SZ.
Referenced by destroy().
|
inlinevirtual |
Applies to a default stream.
Implements ChannelAPI.
Definition at line 123 of file remotesink.h.
References deserialize(), m_frequencyOffset, and serialize().
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Implements ChannelAPI.
Definition at line 131 of file remotesink.h.
References m_frequencyOffset, webapiSettingsGet(), and webapiSettingsPutPatch().
|
inlinevirtual |
|
virtual |
Processing of a message. Returns true if message has actually been processed.
Implements BasebandSampleSink.
Definition at line 267 of file remotesink.cpp.
References applySettings(), calculateFrequencyOffset(), RemoteSink::MsgSampleRateNotification::create(), DSPSignalNotification::getCenterFrequency(), RemoteSink::MsgConfigureChannelizer::getFilterChainHash(), RemoteSink::MsgConfigureRemoteSink::getForce(), DownChannelizer::MsgChannelizerNotification::getFrequencyOffset(), BasebandSampleSink::getInputMessageQueue(), RemoteSink::MsgConfigureChannelizer::getLog2Decim(), DownChannelizer::MsgChannelizerNotification::getSampleRate(), DSPSignalNotification::getSampleRate(), RemoteSink::MsgConfigureRemoteSink::getSettings(), m_channelizer, m_deviceSampleRate, RemoteSinkSettings::m_filterChainHash, BasebandSampleSink::m_guiMessageQueue, RemoteSinkSettings::m_log2Decim, RemoteSinkSettings::m_nbFECBlocks, m_settings, RemoteSinkSettings::m_txDelay, Message::match(), MessageQueue::push(), DownChannelizer::set(), setCenterFrequency(), setSampleRate(), and setTxDelay().
Referenced by destroy().
|
privateslot |
Definition at line 634 of file remotesink.cpp.
Referenced by RemoteSink(), and ~RemoteSink().
|
virtual |
Implements ChannelAPI.
Definition at line 343 of file remotesink.cpp.
References m_settings, and RemoteSinkSettings::serialize().
Referenced by getCenterFrequency().
|
inline |
Set center frequency given in Hz
Definition at line 149 of file remotesink.h.
References m_centerFrequency.
Referenced by handleMessage().
void RemoteSink::setChannelizer | ( | unsigned int | log2Decim, |
unsigned int | filterChainHash | ||
) |
|
inline |
|
inline |
Definition at line 157 of file remotesink.h.
References m_dataPort, and setChannelizer().
void RemoteSink::setNbBlocksFEC | ( | int | nbBlocksFEC | ) |
Definition at line 117 of file remotesink.cpp.
References m_nbBlocksFEC.
Referenced by applySettings(), and setSampleRate().
|
inline |
Set sample rate given in Hz
Definition at line 152 of file remotesink.h.
References m_sampleRate, setNbBlocksFEC(), and setTxDelay().
Referenced by handleMessage().
void RemoteSink::setTxDelay | ( | int | txDelay, |
int | nbBlocksFEC | ||
) |
Definition at line 104 of file remotesink.cpp.
Referenced by applySettings(), handleMessage(), and setSampleRate().
|
virtual |
Implements BasebandSampleSink.
Definition at line 233 of file remotesink.cpp.
References dataBlockAvailable(), m_currentMetaFEC, m_running, m_sinkThread, RemoteSinkThread::startStop(), and stop().
Referenced by destroy().
|
virtual |
Implements BasebandSampleSink.
Definition at line 253 of file remotesink.cpp.
References m_running, m_sinkThread, and RemoteSinkThread::startStop().
Referenced by destroy(), and start().
|
private |
Definition at line 415 of file remotesink.cpp.
References i, RemoteSinkSettings::m_filterChainHash, and RemoteSinkSettings::m_log2Decim.
Referenced by webapiSettingsPutPatch().
|
private |
Definition at line 542 of file remotesink.cpp.
References SWGSDRangel::SWGRemoteSinkSettings::getDataAddress(), SWGSDRangel::SWGChannelSettings::getRemoteSinkSettings(), SWGSDRangel::SWGRemoteSinkSettings::getReverseApiAddress(), SWGSDRangel::SWGRemoteSinkSettings::getTitle(), RemoteSinkSettings::m_dataAddress, RemoteSinkSettings::m_dataPort, RemoteSinkSettings::m_filterChainHash, RemoteSinkSettings::m_log2Decim, RemoteSinkSettings::m_nbFECBlocks, RemoteSinkSettings::m_reverseAPIAddress, RemoteSinkSettings::m_reverseAPIChannelIndex, RemoteSinkSettings::m_reverseAPIDeviceIndex, RemoteSinkSettings::m_reverseAPIPort, RemoteSinkSettings::m_rgbColor, RemoteSinkSettings::m_title, RemoteSinkSettings::m_txDelay, RemoteSinkSettings::m_useReverseAPI, SWGSDRangel::SWGRemoteSinkSettings::setDataAddress(), SWGSDRangel::SWGRemoteSinkSettings::setDataPort(), SWGSDRangel::SWGRemoteSinkSettings::setFilterChainHash(), SWGSDRangel::SWGRemoteSinkSettings::setLog2Decim(), SWGSDRangel::SWGRemoteSinkSettings::setNbFecBlocks(), SWGSDRangel::SWGRemoteSinkSettings::setReverseApiAddress(), SWGSDRangel::SWGRemoteSinkSettings::setReverseApiChannelIndex(), SWGSDRangel::SWGRemoteSinkSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGRemoteSinkSettings::setReverseApiPort(), SWGSDRangel::SWGRemoteSinkSettings::setRgbColor(), SWGSDRangel::SWGRemoteSinkSettings::setTitle(), SWGSDRangel::SWGRemoteSinkSettings::setTxDelay(), and SWGSDRangel::SWGRemoteSinkSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 577 of file remotesink.cpp.
References SWGSDRangel::SWGChannelSettings::asJson(), ChannelAPI::getDeviceSetIndex(), ChannelAPI::getIndexInDeviceSet(), SWGSDRangel::SWGChannelSettings::getRemoteSinkSettings(), RemoteSinkSettings::m_dataAddress, RemoteSinkSettings::m_dataPort, RemoteSinkSettings::m_filterChainHash, RemoteSinkSettings::m_log2Decim, RemoteSinkSettings::m_nbFECBlocks, m_networkManager, m_networkRequest, RemoteSinkSettings::m_reverseAPIAddress, RemoteSinkSettings::m_reverseAPIChannelIndex, RemoteSinkSettings::m_reverseAPIDeviceIndex, RemoteSinkSettings::m_reverseAPIPort, RemoteSinkSettings::m_rgbColor, RemoteSinkSettings::m_title, RemoteSinkSettings::m_txDelay, SWGSDRangel::SWGChannelSettings::setChannelType(), SWGSDRangel::SWGRemoteSinkSettings::setDataAddress(), SWGSDRangel::SWGRemoteSinkSettings::setDataPort(), SWGSDRangel::SWGChannelSettings::setDirection(), SWGSDRangel::SWGRemoteSinkSettings::setFilterChainHash(), SWGSDRangel::SWGRemoteSinkSettings::setLog2Decim(), SWGSDRangel::SWGRemoteSinkSettings::setNbFecBlocks(), SWGSDRangel::SWGChannelSettings::setOriginatorChannelIndex(), SWGSDRangel::SWGChannelSettings::setOriginatorDeviceSetIndex(), SWGSDRangel::SWGChannelSettings::setRemoteSinkSettings(), SWGSDRangel::SWGRemoteSinkSettings::setRgbColor(), SWGSDRangel::SWGRemoteSinkSettings::setTitle(), and SWGSDRangel::SWGRemoteSinkSettings::setTxDelay().
Referenced by applySettings().
|
virtual |
Reimplemented from ChannelAPI.
Definition at line 432 of file remotesink.cpp.
References SWGSDRangel::SWGChannelSettings::getRemoteSinkSettings(), SWGSDRangel::SWGRemoteSinkSettings::init(), m_settings, SWGSDRangel::SWGChannelSettings::setRemoteSinkSettings(), and webapiFormatChannelSettings().
Referenced by getStreamCenterFrequency().
|
virtual |
Reimplemented from ChannelAPI.
Definition at line 443 of file remotesink.cpp.
References RemoteSink::MsgConfigureRemoteSink::create(), RemoteSink::MsgConfigureChannelizer::create(), SWGSDRangel::SWGRemoteSinkSettings::getDataAddress(), SWGSDRangel::SWGRemoteSinkSettings::getDataPort(), SWGSDRangel::SWGRemoteSinkSettings::getFilterChainHash(), SWGSDRangel::SWGRemoteSinkSettings::getLog2Decim(), SWGSDRangel::SWGRemoteSinkSettings::getNbFecBlocks(), SWGSDRangel::SWGChannelSettings::getRemoteSinkSettings(), SWGSDRangel::SWGRemoteSinkSettings::getReverseApiAddress(), SWGSDRangel::SWGRemoteSinkSettings::getReverseApiChannelIndex(), SWGSDRangel::SWGRemoteSinkSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGRemoteSinkSettings::getReverseApiPort(), SWGSDRangel::SWGRemoteSinkSettings::getRgbColor(), SWGSDRangel::SWGRemoteSinkSettings::getTitle(), SWGSDRangel::SWGRemoteSinkSettings::getTxDelay(), SWGSDRangel::SWGRemoteSinkSettings::getUseReverseApi(), RemoteSinkSettings::m_dataAddress, RemoteSinkSettings::m_dataPort, RemoteSinkSettings::m_filterChainHash, BasebandSampleSink::m_guiMessageQueue, BasebandSampleSink::m_inputMessageQueue, RemoteSinkSettings::m_log2Decim, RemoteSinkSettings::m_nbFECBlocks, RemoteSinkSettings::m_reverseAPIAddress, RemoteSinkSettings::m_reverseAPIChannelIndex, RemoteSinkSettings::m_reverseAPIDeviceIndex, RemoteSinkSettings::m_reverseAPIPort, RemoteSinkSettings::m_rgbColor, m_settings, RemoteSinkSettings::m_title, RemoteSinkSettings::m_txDelay, RemoteSinkSettings::m_useReverseAPI, MessageQueue::push(), validateFilterChainHash(), and webapiFormatChannelSettings().
Referenced by getStreamCenterFrequency().
|
private |
Definition at line 183 of file remotesink.h.
Referenced by feed(), and setCenterFrequency().
|
static |
Definition at line 161 of file remotesink.h.
Referenced by RemoteSinkPlugin::initPlugin(), and RemoteSink().
|
static |
Definition at line 160 of file remotesink.h.
Referenced by RemoteSinkPlugin::initPlugin(), and RemoteSinkGUI::RemoteSinkGUI().
|
private |
Definition at line 169 of file remotesink.h.
Referenced by handleMessage(), RemoteSink(), and ~RemoteSink().
|
private |
Definition at line 179 of file remotesink.h.
Referenced by start().
|
private |
Definition at line 189 of file remotesink.h.
Referenced by applySettings(), and setDataAddress().
|
private |
Definition at line 180 of file remotesink.h.
Referenced by ~RemoteSink().
|
private |
Definition at line 181 of file remotesink.h.
Referenced by ~RemoteSink().
|
private |
Definition at line 190 of file remotesink.h.
Referenced by applySettings(), and setDataPort().
|
private |
Definition at line 167 of file remotesink.h.
Referenced by RemoteSink(), and ~RemoteSink().
|
private |
Definition at line 186 of file remotesink.h.
Referenced by calculateFrequencyOffset(), and handleMessage().
|
private |
transmission frame count
Definition at line 176 of file remotesink.h.
|
private |
Definition at line 184 of file remotesink.h.
Referenced by calculateFrequencyOffset(), feed(), getCenterFrequency(), and getStreamCenterFrequency().
|
private |
Definition at line 187 of file remotesink.h.
Referenced by setNbBlocksFEC().
|
private |
Definition at line 191 of file remotesink.h.
Referenced by RemoteSink(), webapiReverseSendSettings(), and ~RemoteSink().
|
private |
Definition at line 192 of file remotesink.h.
Referenced by webapiReverseSendSettings().
|
private |
Definition at line 170 of file remotesink.h.
|
private |
Current sample index in protected block data.
Definition at line 177 of file remotesink.h.
|
private |
Definition at line 185 of file remotesink.h.
Referenced by feed(), RemoteSink::MsgSampleRateNotification::getSampleRate(), and setSampleRate().
|
private |
Definition at line 172 of file remotesink.h.
Referenced by applySettings(), calculateFrequencyOffset(), deserialize(), handleMessage(), serialize(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 173 of file remotesink.h.
|
private |
Definition at line 178 of file remotesink.h.
|
private |
Definition at line 168 of file remotesink.h.
Referenced by RemoteSink(), and ~RemoteSink().
|
private |
Current index in blocks to transmit in the Tx row.
Definition at line 175 of file remotesink.h.
Referenced by feed().
|
private |
Definition at line 188 of file remotesink.h.