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 <devicesamplesink.h>
Public Types | |
enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
Public Member Functions | |
DeviceSampleSink () | |
virtual | ~DeviceSampleSink () |
virtual void | destroy ()=0 |
virtual void | init ()=0 |
initializations to be done when all collaborating objects are created and possibly connected More... | |
virtual bool | start ()=0 |
virtual void | stop ()=0 |
virtual QByteArray | serialize () const =0 |
virtual bool | deserialize (const QByteArray &data)=0 |
virtual const QString & | getDeviceDescription () const =0 |
virtual int | getSampleRate () const =0 |
Sample rate exposed by the sink. More... | |
virtual void | setSampleRate (int sampleRate)=0 |
For when the sink sample rate is set externally. More... | |
virtual quint64 | getCenterFrequency () const =0 |
Center frequency exposed by the sink. More... | |
virtual void | setCenterFrequency (qint64 centerFrequency)=0 |
virtual bool | handleMessage (const Message &message)=0 |
virtual int | webapiSettingsGet (SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiSettingsPutPatch (bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
virtual int | webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
MessageQueue * | getInputMessageQueue () |
virtual void | setMessageQueueToGUI (MessageQueue *queue)=0 |
MessageQueue * | getMessageQueueToGUI () |
SampleSourceFifo * | getSampleFifo () |
Static Public Member Functions | |
static qint64 | calculateDeviceCenterFrequency (quint64 centerFrequency, qint64 transverterDeltaFrequency, int log2Interp, fcPos_t fcPos, quint32 devSampleRate, bool transverterMode=false) |
static qint64 | calculateCenterFrequency (quint64 deviceCenterFrequency, qint64 transverterDeltaFrequency, int log2Interp, fcPos_t fcPos, quint32 devSampleRate, bool transverterMode=false) |
static qint32 | calculateFrequencyShift (int log2Interp, fcPos_t fcPos, quint32 devSampleRate) |
Protected Slots | |
void | handleInputMessages () |
Protected Attributes | |
SampleSourceFifo | m_sampleSourceFifo |
MessageQueue | m_inputMessageQueue |
Input queue to the sink. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
Definition at line 36 of file devicesamplesink.h.
DeviceSampleSink::DeviceSampleSink | ( | ) |
Definition at line 23 of file devicesamplesink.cpp.
References handleInputMessages(), and m_inputMessageQueue.
|
virtual |
Definition at line 30 of file devicesamplesink.cpp.
|
static |
Definition at line 74 of file devicesamplesink.cpp.
References calculateFrequencyShift().
Referenced by HackRFOutput::handleMessage().
|
static |
Definition at line 47 of file devicesamplesink.cpp.
References calculateFrequencyShift().
Referenced by HackRFOutput::applySettings().
|
static |
log2Interp = 0: no shift
log2Interp = 1: middle of side band (inf or sup: 1/2) ^ | ^ | inf | inf | sup | sup |
log2Interp = 2: middle of far side half side band (inf, inf or sup, sup: 1/2 + 1/4) ^ | ^ | inf | inf | sup | sup |
log2Interp = 3: inf, inf, sup or sup, sup, inf: 1/2 + 1/4 - 1/8 = 5/8 log2Interp = 4: inf, inf, sup, inf or sup, sup, inf, sup: 1/2 + 1/4 - 1/8 + 1/16 = 11/16 log2Interp = 5: inf, inf, sup, inf, sup or sup, sup, inf, sup, inf: 1/2 + 1/4 - 1/8 + 1/16 - 1/32 = 21/32 log2Interp = 6: inf, sup, inf, sup, inf, sup or sup, inf, sup, inf, sup, inf: 1/2 - 1/4 + 1/8 -1/16 + 1/32 - 1/64 = 21/64
Definition at line 114 of file devicesamplesink.cpp.
References FC_POS_CENTER, and FC_POS_INFRA.
Referenced by calculateCenterFrequency(), calculateDeviceCenterFrequency(), and HackRFOutputGui::displayFcTooltip().
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by DeviceAPI::loadSamplingDeviceSettings().
|
pure virtual |
Implemented in LimeSDROutput, FileSinkOutput, XTRXOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by PluginInterface::deleteSampleSinkPluginInstanceOutput().
|
pure virtual |
Center frequency exposed by the sink.
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by WebAPIAdapterGUI::getDeviceSet(), WebAPIAdapterSrv::getDeviceSet(), DSPDeviceSinkEngine::gotoInit(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), DeviceAPI::saveSamplingDeviceSettings(), and RemoteSource::webapiFormatChannelReport().
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by LocalSource::getLocalDevice(), LocalSource::getLocalDevices(), DSPDeviceSinkEngine::gotoInit(), and DSPDeviceSinkEngine::handleSetSink().
|
inline |
Definition at line 114 of file devicesamplesink.h.
Referenced by FileSinkGui::configureFileName(), DeviceAPI::getSamplingDeviceInputMessageQueue(), LocalOutputGui::handleInputMessages(), PlutoSDROutputGUI::on_startStop_toggled(), XTRXOutputGUI::on_startStop_toggled(), LimeSDROutputGUI::on_startStop_toggled(), Bladerf1OutputGui::on_startStop_toggled(), BladeRF2OutputGui::on_startStop_toggled(), FileSinkGui::on_startStop_toggled(), LocalOutputGui::on_startStop_toggled(), HackRFOutputGui::on_startStop_toggled(), SoapySDROutputGui::on_startStop_toggled(), RemoteOutputSinkGui::on_startStop_toggled(), RemoteOutput::sampleRateCorrection(), FileSinkGui::tick(), Bladerf1OutputGui::updateHardware(), BladeRF2OutputGui::updateHardware(), LocalOutputGui::updateHardware(), FileSinkGui::updateHardware(), PlutoSDROutputGUI::updateHardware(), XTRXOutputGUI::updateHardware(), HackRFOutputGui::updateHardware(), LimeSDROutputGUI::updateHardware(), SoapySDROutputGui::updateHardware(), RemoteOutputSinkGui::updateHardware(), XTRXOutputGUI::updateStatus(), and LimeSDROutputGUI::updateStatus().
|
inline |
Definition at line 116 of file devicesamplesink.h.
Referenced by BladeRF2Output::applySettings(), SoapySDROutput::applySettings(), XTRXOutput::applySettings(), DeviceAPI::getSamplingDeviceGUIMessageQueue(), DSPDeviceSinkEngine::gotoInit(), DSPDeviceSinkEngine::handleInputMessages(), BladeRF2Output::handleMessage(), SoapySDROutput::handleMessage(), FileSinkOutput::handleMessage(), XTRXOutput::handleMessage(), LimeSDROutput::handleMessage(), LocalOutput::setCenterFrequency(), LocalOutput::setSampleRate(), FileSinkOutput::start(), and FileSinkOutput::stop().
|
inline |
Definition at line 117 of file devicesamplesink.h.
Referenced by LocalSource::applySettings(), DSPDeviceSinkEngine::checkNumberOfBasebandSources(), DSPDeviceSinkEngine::gotoIdle(), DSPDeviceSinkEngine::gotoRunning(), DSPDeviceSinkEngine::handleForwardToSpectrumSink(), LocalSource::start(), and DSPDeviceSinkEngine::work().
|
pure virtual |
Sample rate exposed by the sink.
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by WebAPIAdapterGUI::getDeviceSet(), WebAPIAdapterSrv::getDeviceSet(), DSPDeviceSinkEngine::gotoInit(), and RemoteSource::webapiFormatChannelReport().
|
protectedslot |
Definition at line 34 of file devicesamplesink.cpp.
References handleMessage(), m_inputMessageQueue, and MessageQueue::pop().
Referenced by DeviceSampleSink().
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by handleInputMessages().
|
pure virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implemented in LimeSDROutput, FileSinkOutput, XTRXOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by DeviceAPI::saveSamplingDeviceSettings().
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by DeviceAPI::loadSamplingDeviceSettings(), and LocalSource::propagateSampleRateAndFrequency().
|
pure virtual |
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by MainWindow::sampleSinkChanged().
|
pure virtual |
For when the sink sample rate is set externally.
Implemented in LimeSDROutput, XTRXOutput, FileSinkOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by LocalSource::propagateSampleRateAndFrequency().
|
pure virtual |
Implemented in LimeSDROutput, FileSinkOutput, XTRXOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by DSPDeviceSinkEngine::gotoRunning().
|
pure virtual |
Implemented in LimeSDROutput, FileSinkOutput, XTRXOutput, RemoteOutput, SoapySDROutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Referenced by DSPDeviceSinkEngine::gotoIdle().
|
inlinevirtual |
Reimplemented in LimeSDROutput, XTRXOutput, SoapySDROutput, RemoteOutput, BladeRF2Output, LocalOutput, and PlutoSDROutput.
Definition at line 105 of file devicesamplesink.h.
Referenced by WebAPIAdapterGUI::devicesetDeviceReportGet(), and WebAPIAdapterSrv::devicesetDeviceReportGet().
|
inlinevirtual |
Reimplemented in LimeSDROutput, XTRXOutput, FileSinkOutput, SoapySDROutput, RemoteOutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Definition at line 95 of file devicesamplesink.h.
Referenced by WebAPIAdapterGUI::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterGUI::devicesetDeviceRunPost(), and WebAPIAdapterSrv::devicesetDeviceRunPost().
|
inlinevirtual |
Reimplemented in LimeSDROutput, XTRXOutput, FileSinkOutput, SoapySDROutput, RemoteOutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Definition at line 86 of file devicesamplesink.h.
Referenced by WebAPIAdapterGUI::devicesetDeviceRunGet(), and WebAPIAdapterSrv::devicesetDeviceRunGet().
|
inlinevirtual |
Reimplemented in LimeSDROutput, XTRXOutput, SoapySDROutput, RemoteOutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Definition at line 64 of file devicesamplesink.h.
Referenced by WebAPIAdapterGUI::devicesetDeviceSettingsGet(), and WebAPIAdapterSrv::devicesetDeviceSettingsGet().
|
inlinevirtual |
force | true to force settings = put |
Reimplemented in LimeSDROutput, XTRXOutput, SoapySDROutput, RemoteOutput, BladeRF2Output, LocalOutput, HackRFOutput, Bladerf1Output, and PlutoSDROutput.
Definition at line 73 of file devicesamplesink.h.
Referenced by WebAPIAdapterGUI::devicesetDeviceSettingsPutPatch(), and WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch().
|
protected |
Input message queue to the GUI.
Definition at line 146 of file devicesamplesink.h.
Referenced by PlutoSDROutput::deserialize(), Bladerf1Output::deserialize(), HackRFOutput::deserialize(), LocalOutput::deserialize(), BladeRF2Output::deserialize(), SoapySDROutput::deserialize(), RemoteOutput::deserialize(), FileSinkOutput::deserialize(), XTRXOutput::deserialize(), LimeSDROutput::deserialize(), HackRFOutput::handleMessage(), PlutoSDROutput::setCenterFrequency(), Bladerf1Output::setCenterFrequency(), HackRFOutput::setCenterFrequency(), BladeRF2Output::setCenterFrequency(), SoapySDROutput::setCenterFrequency(), FileSinkOutput::setCenterFrequency(), XTRXOutput::setCenterFrequency(), LimeSDROutput::setCenterFrequency(), PlutoSDROutput::setMessageQueueToGUI(), Bladerf1Output::setMessageQueueToGUI(), HackRFOutput::setMessageQueueToGUI(), LocalOutput::setMessageQueueToGUI(), BladeRF2Output::setMessageQueueToGUI(), RemoteOutput::setMessageQueueToGUI(), FileSinkOutput::setMessageQueueToGUI(), XTRXOutput::setMessageQueueToGUI(), LimeSDROutput::setMessageQueueToGUI(), PlutoSDROutput::webapiRun(), Bladerf1Output::webapiRun(), HackRFOutput::webapiRun(), LocalOutput::webapiRun(), BladeRF2Output::webapiRun(), RemoteOutput::webapiRun(), SoapySDROutput::webapiRun(), FileSinkOutput::webapiRun(), XTRXOutput::webapiRun(), LimeSDROutput::webapiRun(), PlutoSDROutput::webapiSettingsPutPatch(), Bladerf1Output::webapiSettingsPutPatch(), HackRFOutput::webapiSettingsPutPatch(), LocalOutput::webapiSettingsPutPatch(), BladeRF2Output::webapiSettingsPutPatch(), RemoteOutput::webapiSettingsPutPatch(), SoapySDROutput::webapiSettingsPutPatch(), XTRXOutput::webapiSettingsPutPatch(), and LimeSDROutput::webapiSettingsPutPatch().
|
protected |
Input queue to the sink.
Definition at line 145 of file devicesamplesink.h.
Referenced by PlutoSDROutput::deserialize(), Bladerf1Output::deserialize(), HackRFOutput::deserialize(), LocalOutput::deserialize(), BladeRF2Output::deserialize(), SoapySDROutput::deserialize(), RemoteOutput::deserialize(), FileSinkOutput::deserialize(), XTRXOutput::deserialize(), LimeSDROutput::deserialize(), DeviceSampleSink(), handleInputMessages(), PlutoSDROutput::setCenterFrequency(), Bladerf1Output::setCenterFrequency(), HackRFOutput::setCenterFrequency(), BladeRF2Output::setCenterFrequency(), SoapySDROutput::setCenterFrequency(), FileSinkOutput::setCenterFrequency(), XTRXOutput::setCenterFrequency(), LimeSDROutput::setCenterFrequency(), PlutoSDROutput::webapiRun(), Bladerf1Output::webapiRun(), HackRFOutput::webapiRun(), LocalOutput::webapiRun(), BladeRF2Output::webapiRun(), RemoteOutput::webapiRun(), SoapySDROutput::webapiRun(), FileSinkOutput::webapiRun(), XTRXOutput::webapiRun(), LimeSDROutput::webapiRun(), PlutoSDROutput::webapiSettingsPutPatch(), Bladerf1Output::webapiSettingsPutPatch(), HackRFOutput::webapiSettingsPutPatch(), LocalOutput::webapiSettingsPutPatch(), BladeRF2Output::webapiSettingsPutPatch(), RemoteOutput::webapiSettingsPutPatch(), SoapySDROutput::webapiSettingsPutPatch(), XTRXOutput::webapiSettingsPutPatch(), and LimeSDROutput::webapiSettingsPutPatch().
|
protected |
Definition at line 144 of file devicesamplesink.h.
Referenced by PlutoSDROutput::applySettings(), Bladerf1Output::applySettings(), HackRFOutput::applySettings(), BladeRF2Output::applySettings(), SoapySDROutput::applySettings(), LimeSDROutput::applySettings(), PlutoSDROutput::openDevice(), Bladerf1Output::openDevice(), HackRFOutput::openDevice(), BladeRF2Output::openDevice(), SoapySDROutput::openDevice(), XTRXOutput::openDevice(), PlutoSDROutput::start(), Bladerf1Output::start(), HackRFOutput::start(), BladeRF2Output::start(), SoapySDROutput::start(), RemoteOutput::start(), XTRXOutput::start(), FileSinkOutput::start(), LimeSDROutput::start(), XTRXOutput::stop(), and RemoteOutput::webapiFormatDeviceReport().