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 <bladerf1output.h>
Classes | |
class | MsgConfigureBladerf1 |
class | MsgReportBladerf1 |
class | MsgStartStop |
Public Member Functions | |
Bladerf1Output (DeviceAPI *deviceAPI) | |
virtual | ~Bladerf1Output () |
virtual void | destroy () |
virtual void | init () |
initializations to be done when all collaborating objects are created and possibly connected More... | |
virtual bool | start () |
virtual void | stop () |
virtual QByteArray | serialize () const |
virtual bool | deserialize (const QByteArray &data) |
virtual void | setMessageQueueToGUI (MessageQueue *queue) |
virtual const QString & | getDeviceDescription () const |
virtual int | getSampleRate () const |
Sample rate exposed by the sink. More... | |
virtual void | setSampleRate (int sampleRate) |
For when the sink sample rate is set externally. More... | |
virtual quint64 | getCenterFrequency () const |
Center frequency exposed by the sink. More... | |
virtual void | setCenterFrequency (qint64 centerFrequency) |
virtual bool | handleMessage (const Message &message) |
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) |
Public Member Functions inherited from DeviceSampleSink | |
DeviceSampleSink () | |
virtual | ~DeviceSampleSink () |
virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
SampleSourceFifo * | getSampleFifo () |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
bool | openDevice () |
void | closeDevice () |
bool | applySettings (const BladeRF1OutputSettings &settings, bool force) |
void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const BladeRF1OutputSettings &settings) |
void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const BladeRF1OutputSettings &settings, bool force) |
void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
QMutex | m_mutex |
BladeRF1OutputSettings | m_settings |
struct bladerf * | m_dev |
Bladerf1OutputThread * | m_bladerfThread |
QString | m_deviceDescription |
DeviceBladeRF1Params | m_sharedParams |
bool | m_running |
QNetworkAccessManager * | m_networkManager |
QNetworkRequest | m_networkRequest |
Additional Inherited Members | |
Public Types inherited from DeviceSampleSink | |
enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
Static Public Member Functions inherited from DeviceSampleSink | |
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 inherited from DeviceSampleSink | |
void | handleInputMessages () |
Protected Attributes inherited from DeviceSampleSink | |
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 35 of file bladerf1output.h.
Bladerf1Output::Bladerf1Output | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 41 of file bladerf1output.cpp.
References BLADERFOUTPUT_BLOCKSIZE.
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
virtual |
Definition at line 57 of file bladerf1output.cpp.
References closeDevice(), m_deviceAPI, m_networkManager, m_running, networkManagerFinished(), DeviceAPI::setBuddySharedPtr(), and stop().
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
private |
Definition at line 304 of file bladerf1output.cpp.
References DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceAPI::getDeviceSourceEngine(), DeviceAPI::getSourceBuddies(), Bladerf1OutputThread::isRunning(), BladeRF1OutputSettings::m_bandwidth, m_bladerfThread, BladeRF1OutputSettings::m_centerFrequency, m_dev, m_deviceAPI, BladeRF1OutputSettings::m_devSampleRate, BladeRF1OutputSettings::m_log2Interp, BladeRF1OutputSettings::m_reverseAPIAddress, BladeRF1OutputSettings::m_reverseAPIDeviceIndex, BladeRF1OutputSettings::m_reverseAPIPort, DeviceBladeRF1Shared::m_sampleFifoLengthInSeconds, DeviceBladeRF1Shared::m_sampleFifoMinSize, DeviceBladeRF1Shared::m_sampleFifoMinSize32, DeviceSampleSink::m_sampleSourceFifo, m_settings, m_sharedParams, BladeRF1OutputSettings::m_useReverseAPI, BladeRF1OutputSettings::m_vga1, BladeRF1OutputSettings::m_vga2, BladeRF1OutputSettings::m_xb200, DeviceBladeRF1Params::m_xb200Attached, BladeRF1OutputSettings::m_xb200Filter, BladeRF1OutputSettings::m_xb200Path, leansdr::max(), MessageQueue::push(), SampleSourceFifo::resize(), Bladerf1OutputThread::setLog2Interpolation(), Bladerf1OutputThread::startWork(), DSPDeviceSourceEngine::state(), Bladerf1OutputThread::stopWork(), DSPDeviceSourceEngine::StRunning, and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
|
private |
Definition at line 163 of file bladerf1output.cpp.
References DeviceAPI::getSourceBuddies(), DeviceBladeRF1Params::m_dev, m_dev, m_deviceAPI, and m_sharedParams.
Referenced by openDevice(), and ~Bladerf1Output().
|
virtual |
Implements DeviceSampleSink.
Definition at line 208 of file bladerf1output.cpp.
References Bladerf1Output::MsgConfigureBladerf1::create(), BladeRF1OutputSettings::deserialize(), DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, MessageQueue::push(), and BladeRF1OutputSettings::resetToDefaults().
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
virtual |
Implements DeviceSampleSink.
Definition at line 70 of file bladerf1output.cpp.
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
virtual |
Center frequency exposed by the sink.
Implements DeviceSampleSink.
Definition at line 241 of file bladerf1output.cpp.
References BladeRF1OutputSettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
|
virtual |
Implements DeviceSampleSink.
Definition at line 230 of file bladerf1output.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
|
virtual |
Sample rate exposed by the sink.
Implements DeviceSampleSink.
Definition at line 235 of file bladerf1output.cpp.
References BladeRF1OutputSettings::m_devSampleRate, BladeRF1OutputSettings::m_log2Interp, and m_settings.
Referenced by setMessageQueueToGUI().
|
virtual |
Implements DeviceSampleSink.
Definition at line 261 of file bladerf1output.cpp.
References applySettings(), Bladerf1Output::MsgConfigureBladerf1::getForce(), Bladerf1Output::MsgConfigureBladerf1::getSettings(), Bladerf1Output::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), m_deviceAPI, m_settings, BladeRF1OutputSettings::m_useReverseAPI, Message::match(), DeviceAPI::startDeviceEngine(), DeviceAPI::stopDeviceEngine(), and webapiReverseSendStartStop().
Referenced by setSampleRate().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSink.
Definition at line 133 of file bladerf1output.cpp.
References applySettings(), and m_settings.
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
privateslot |
Definition at line 760 of file bladerf1output.cpp.
Referenced by ~Bladerf1Output().
|
private |
Definition at line 75 of file bladerf1output.cpp.
References closeDevice(), DeviceAPI::getBuddySharedPtr(), DeviceAPI::getSamplingDeviceSerial(), DeviceAPI::getSourceBuddies(), DeviceBladeRF1Params::m_dev, m_dev, m_deviceAPI, BladeRF1OutputSettings::m_devSampleRate, BladeRF1OutputSettings::m_log2Interp, DeviceSampleSink::m_sampleSourceFifo, m_settings, m_sharedParams, DeviceBladeRF1::open_bladerf(), and SampleSourceFifo::resize().
|
virtual |
Implements DeviceSampleSink.
Definition at line 203 of file bladerf1output.cpp.
References m_settings, and BladeRF1OutputSettings::serialize().
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
virtual |
Implements DeviceSampleSink.
Definition at line 246 of file bladerf1output.cpp.
References Bladerf1Output::MsgConfigureBladerf1::create(), BladeRF1OutputSettings::m_centerFrequency, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
|
inlinevirtual |
Implements DeviceSampleSink.
Definition at line 108 of file bladerf1output.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSink::m_guiMessageQueue.
|
inlinevirtual |
For when the sink sample rate is set externally.
Implements DeviceSampleSink.
Definition at line 111 of file bladerf1output.h.
References getCenterFrequency(), handleMessage(), setCenterFrequency(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Implements DeviceSampleSink.
Definition at line 138 of file bladerf1output.cpp.
References applySettings(), m_bladerfThread, m_dev, BladeRF1OutputSettings::m_log2Interp, m_running, DeviceSampleSink::m_sampleSourceFifo, m_settings, Bladerf1OutputThread::setLog2Interpolation(), Bladerf1OutputThread::startWork(), and stop().
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1().
|
virtual |
Implements DeviceSampleSink.
Definition at line 190 of file bladerf1output.cpp.
References m_bladerfThread, m_running, and Bladerf1OutputThread::stopWork().
Referenced by Bladerf1Output::MsgReportBladerf1::MsgReportBladerf1(), start(), and ~Bladerf1Output().
|
private |
Definition at line 561 of file bladerf1output.cpp.
References SWGSDRangel::SWGDeviceSettings::getBladeRf1OutputSettings(), SWGSDRangel::SWGBladeRF1OutputSettings::getReverseApiAddress(), BladeRF1OutputSettings::m_bandwidth, BladeRF1OutputSettings::m_centerFrequency, BladeRF1OutputSettings::m_devSampleRate, BladeRF1OutputSettings::m_log2Interp, BladeRF1OutputSettings::m_reverseAPIAddress, BladeRF1OutputSettings::m_reverseAPIDeviceIndex, BladeRF1OutputSettings::m_reverseAPIPort, BladeRF1OutputSettings::m_useReverseAPI, BladeRF1OutputSettings::m_vga1, BladeRF1OutputSettings::m_vga2, BladeRF1OutputSettings::m_xb200, BladeRF1OutputSettings::m_xb200Filter, BladeRF1OutputSettings::m_xb200Path, SWGSDRangel::SWGBladeRF1OutputSettings::setBandwidth(), SWGSDRangel::SWGBladeRF1OutputSettings::setCenterFrequency(), SWGSDRangel::SWGBladeRF1OutputSettings::setDevSampleRate(), SWGSDRangel::SWGBladeRF1OutputSettings::setLog2Interp(), SWGSDRangel::SWGBladeRF1OutputSettings::setReverseApiAddress(), SWGSDRangel::SWGBladeRF1OutputSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGBladeRF1OutputSettings::setReverseApiPort(), SWGSDRangel::SWGBladeRF1OutputSettings::setUseReverseApi(), SWGSDRangel::SWGBladeRF1OutputSettings::setVga1(), SWGSDRangel::SWGBladeRF1OutputSettings::setVga2(), SWGSDRangel::SWGBladeRF1OutputSettings::setXb200(), SWGSDRangel::SWGBladeRF1OutputSettings::setXb200Filter(), and SWGSDRangel::SWGBladeRF1OutputSettings::setXb200Path().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 675 of file bladerf1output.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), SWGSDRangel::SWGDeviceSettings::getBladeRf1OutputSettings(), DeviceAPI::getDeviceSetIndex(), BladeRF1OutputSettings::m_bandwidth, BladeRF1OutputSettings::m_centerFrequency, m_deviceAPI, BladeRF1OutputSettings::m_devSampleRate, BladeRF1OutputSettings::m_log2Interp, m_networkManager, m_networkRequest, BladeRF1OutputSettings::m_reverseAPIAddress, BladeRF1OutputSettings::m_reverseAPIDeviceIndex, BladeRF1OutputSettings::m_reverseAPIPort, BladeRF1OutputSettings::m_vga1, BladeRF1OutputSettings::m_vga2, BladeRF1OutputSettings::m_xb200, BladeRF1OutputSettings::m_xb200Filter, BladeRF1OutputSettings::m_xb200Path, SWGSDRangel::SWGBladeRF1OutputSettings::setBandwidth(), SWGSDRangel::SWGDeviceSettings::setBladeRf1OutputSettings(), SWGSDRangel::SWGBladeRF1OutputSettings::setCenterFrequency(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGBladeRF1OutputSettings::setDevSampleRate(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGBladeRF1OutputSettings::setLog2Interp(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), SWGSDRangel::SWGBladeRF1OutputSettings::setVga1(), SWGSDRangel::SWGBladeRF1OutputSettings::setVga2(), SWGSDRangel::SWGBladeRF1OutputSettings::setXb200(), SWGSDRangel::SWGBladeRF1OutputSettings::setXb200Filter(), and SWGSDRangel::SWGBladeRF1OutputSettings::setXb200Path().
Referenced by applySettings().
|
private |
Definition at line 732 of file bladerf1output.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, BladeRF1OutputSettings::m_reverseAPIAddress, BladeRF1OutputSettings::m_reverseAPIDeviceIndex, BladeRF1OutputSettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 656 of file bladerf1output.cpp.
References Bladerf1Output::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 647 of file bladerf1output.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 550 of file bladerf1output.cpp.
References SWGSDRangel::SWGDeviceSettings::getBladeRf1OutputSettings(), SWGSDRangel::SWGBladeRF1OutputSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setBladeRf1OutputSettings(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 585 of file bladerf1output.cpp.
References Bladerf1Output::MsgConfigureBladerf1::create(), SWGSDRangel::SWGBladeRF1OutputSettings::getBandwidth(), SWGSDRangel::SWGDeviceSettings::getBladeRf1OutputSettings(), SWGSDRangel::SWGBladeRF1OutputSettings::getCenterFrequency(), SWGSDRangel::SWGBladeRF1OutputSettings::getDevSampleRate(), SWGSDRangel::SWGBladeRF1OutputSettings::getLog2Interp(), SWGSDRangel::SWGBladeRF1OutputSettings::getReverseApiAddress(), SWGSDRangel::SWGBladeRF1OutputSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGBladeRF1OutputSettings::getReverseApiPort(), SWGSDRangel::SWGBladeRF1OutputSettings::getUseReverseApi(), SWGSDRangel::SWGBladeRF1OutputSettings::getVga1(), SWGSDRangel::SWGBladeRF1OutputSettings::getVga2(), SWGSDRangel::SWGBladeRF1OutputSettings::getXb200(), SWGSDRangel::SWGBladeRF1OutputSettings::getXb200Filter(), SWGSDRangel::SWGBladeRF1OutputSettings::getXb200Path(), BladeRF1OutputSettings::m_bandwidth, BladeRF1OutputSettings::m_centerFrequency, BladeRF1OutputSettings::m_devSampleRate, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, BladeRF1OutputSettings::m_log2Interp, BladeRF1OutputSettings::m_reverseAPIAddress, BladeRF1OutputSettings::m_reverseAPIDeviceIndex, BladeRF1OutputSettings::m_reverseAPIPort, m_settings, BladeRF1OutputSettings::m_useReverseAPI, BladeRF1OutputSettings::m_vga1, BladeRF1OutputSettings::m_vga2, BladeRF1OutputSettings::m_xb200, BladeRF1OutputSettings::m_xb200Filter, BladeRF1OutputSettings::m_xb200Path, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
|
private |
Definition at line 141 of file bladerf1output.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 140 of file bladerf1output.h.
Referenced by applySettings(), closeDevice(), openDevice(), and start().
|
private |
Definition at line 137 of file bladerf1output.h.
Referenced by applySettings(), closeDevice(), handleMessage(), openDevice(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~Bladerf1Output().
|
private |
Definition at line 142 of file bladerf1output.h.
Referenced by getDeviceDescription().
|
private |
Definition at line 138 of file bladerf1output.h.
|
private |
Definition at line 145 of file bladerf1output.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~Bladerf1Output().
|
private |
Definition at line 146 of file bladerf1output.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 144 of file bladerf1output.h.
Referenced by start(), stop(), and ~Bladerf1Output().
|
private |
Definition at line 139 of file bladerf1output.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), getSampleRate(), handleMessage(), init(), openDevice(), serialize(), setCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 143 of file bladerf1output.h.
Referenced by applySettings(), closeDevice(), and openDevice().