![]() |
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 <hackrfoutput.h>
Inheritance diagram for HackRFOutput:
Collaboration diagram for HackRFOutput:Classes | |
| class | MsgConfigureHackRF |
| class | MsgReportHackRF |
| class | MsgStartStop |
Public Member Functions | |
| HackRFOutput (DeviceAPI *deviceAPI) | |
| virtual | ~HackRFOutput () |
| 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 HackRFOutputSettings &settings, bool force) |
| void | setDeviceCenterFrequency (quint64 freq_hz, qint32 LOppmTenths) |
| void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const HackRFOutputSettings &settings) |
| void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const HackRFOutputSettings &settings, bool force) |
| void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
| DeviceAPI * | m_deviceAPI |
| QMutex | m_mutex |
| HackRFOutputSettings | m_settings |
| struct hackrf_device * | m_dev |
| HackRFOutputThread * | m_hackRFThread |
| QString | m_deviceDescription |
| DeviceHackRFParams | m_sharedParams |
| QNetworkAccessManager * | m_networkManager |
| QNetworkRequest | m_networkRequest |
| bool | m_running |
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 hackrfoutput.h.
| HackRFOutput::HackRFOutput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 40 of file hackrfoutput.cpp.
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the caller graph for this function:
|
virtual |
Definition at line 55 of file hackrfoutput.cpp.
References closeDevice(), m_deviceAPI, m_networkManager, m_running, networkManagerFinished(), DeviceAPI::setBuddySharedPtr(), and stop().
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 325 of file hackrfoutput.cpp.
References DeviceSampleSink::calculateDeviceCenterFrequency(), DeviceHackRFShared::MsgSynchronizeFrequency::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceAPI::getSamplingDeviceInputMessageQueue(), DeviceAPI::getSourceBuddies(), HackRFOutputSettings::m_bandwidth, HackRFOutputSettings::m_biasT, HackRFOutputSettings::m_centerFrequency, m_dev, m_deviceAPI, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_fcPos, m_hackRFThread, HackRFOutputSettings::m_lnaExt, HackRFOutputSettings::m_log2Interp, HackRFOutputSettings::m_LOppmTenths, HackRFOutputSettings::m_reverseAPIAddress, HackRFOutputSettings::m_reverseAPIDeviceIndex, HackRFOutputSettings::m_reverseAPIPort, DeviceHackRFShared::m_sampleFifoLengthInSeconds, DeviceHackRFShared::m_sampleFifoMinSize, DeviceSampleSink::m_sampleSourceFifo, m_settings, HackRFOutputSettings::m_useReverseAPI, HackRFOutputSettings::m_vgaGain, leansdr::max(), MessageQueue::push(), SampleSourceFifo::resize(), setDeviceCenterFrequency(), HackRFOutputThread::setFcPos(), HackRFOutputThread::setLog2Interpolation(), HackRFOutputThread::startWork(), HackRFOutputThread::stopWork(), and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 148 of file hackrfoutput.cpp.
References DeviceAPI::getSourceBuddies(), DeviceHackRFParams::m_dev, m_dev, m_deviceAPI, and m_sharedParams.
Referenced by openDevice(), and ~HackRFOutput().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 185 of file hackrfoutput.cpp.
References HackRFOutput::MsgConfigureHackRF::create(), HackRFOutputSettings::deserialize(), DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, MessageQueue::push(), and HackRFOutputSettings::resetToDefaults().
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 68 of file hackrfoutput.cpp.
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the caller graph for this function:
|
virtual |
Center frequency exposed by the sink.
Implements DeviceSampleSink.
Definition at line 218 of file hackrfoutput.cpp.
References HackRFOutputSettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 207 of file hackrfoutput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
Here is the caller graph for this function:
|
virtual |
Sample rate exposed by the sink.
Implements DeviceSampleSink.
Definition at line 212 of file hackrfoutput.cpp.
References HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_log2Interp, and m_settings.
Referenced by setMessageQueueToGUI().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 238 of file hackrfoutput.cpp.
References applySettings(), DeviceSampleSink::calculateCenterFrequency(), HackRFOutput::MsgConfigureHackRF::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), HackRFOutput::MsgConfigureHackRF::getForce(), DeviceHackRFShared::MsgSynchronizeFrequency::getFrequency(), HackRFOutput::MsgConfigureHackRF::getSettings(), HackRFOutput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), HackRFOutputSettings::m_centerFrequency, m_deviceAPI, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_fcPos, DeviceSampleSink::m_guiMessageQueue, HackRFOutputSettings::m_log2Interp, m_settings, HackRFOutputSettings::m_useReverseAPI, Message::match(), MessageQueue::push(), DeviceAPI::startDeviceEngine(), DeviceAPI::stopDeviceEngine(), and webapiReverseSendStartStop().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSink.
Definition at line 116 of file hackrfoutput.cpp.
References applySettings(), and m_settings.
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Definition at line 758 of file hackrfoutput.cpp.
Referenced by ~HackRFOutput().
Here is the caller graph for this function:
|
private |
Definition at line 73 of file hackrfoutput.cpp.
References closeDevice(), DeviceAPI::getBuddySharedPtr(), DeviceAPI::getSamplingDeviceSerial(), DeviceAPI::getSourceBuddies(), DeviceHackRFParams::m_dev, m_dev, m_deviceAPI, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_log2Interp, DeviceSampleSink::m_sampleSourceFifo, m_settings, m_sharedParams, DeviceHackRF::open_hackrf(), and SampleSourceFifo::resize().
Here is the call graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 180 of file hackrfoutput.cpp.
References m_settings, and HackRFOutputSettings::serialize().
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 223 of file hackrfoutput.cpp.
References HackRFOutput::MsgConfigureHackRF::create(), HackRFOutputSettings::m_centerFrequency, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 309 of file hackrfoutput.cpp.
References m_dev.
Referenced by applySettings().
Here is the caller graph for this function:
|
inlinevirtual |
Implements DeviceSampleSink.
Definition at line 109 of file hackrfoutput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSink::m_guiMessageQueue.
Here is the call graph for this function:
|
inlinevirtual |
For when the sink sample rate is set externally.
Implements DeviceSampleSink.
Definition at line 112 of file hackrfoutput.h.
References getCenterFrequency(), handleMessage(), setCenterFrequency(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 121 of file hackrfoutput.cpp.
References applySettings(), m_dev, HackRFOutputSettings::m_fcPos, m_hackRFThread, HackRFOutputSettings::m_log2Interp, m_running, DeviceSampleSink::m_sampleSourceFifo, m_settings, HackRFOutputThread::setFcPos(), HackRFOutputThread::setLog2Interpolation(), HackRFOutputThread::startWork(), and stop().
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSink.
Definition at line 165 of file hackrfoutput.cpp.
References m_hackRFThread, m_running, and HackRFOutputThread::stopWork().
Referenced by HackRFOutput::MsgReportHackRF::MsgReportHackRF(), start(), and ~HackRFOutput().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 621 of file hackrfoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::getHackRfOutputSettings(), SWGSDRangel::SWGHackRFOutputSettings::getReverseApiAddress(), HackRFOutputSettings::m_bandwidth, HackRFOutputSettings::m_biasT, HackRFOutputSettings::m_centerFrequency, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_fcPos, HackRFOutputSettings::m_lnaExt, HackRFOutputSettings::m_log2Interp, HackRFOutputSettings::m_LOppmTenths, HackRFOutputSettings::m_reverseAPIAddress, HackRFOutputSettings::m_reverseAPIDeviceIndex, HackRFOutputSettings::m_reverseAPIPort, HackRFOutputSettings::m_useReverseAPI, HackRFOutputSettings::m_vgaGain, SWGSDRangel::SWGHackRFOutputSettings::setBandwidth(), SWGSDRangel::SWGHackRFOutputSettings::setBiasT(), SWGSDRangel::SWGHackRFOutputSettings::setCenterFrequency(), SWGSDRangel::SWGHackRFOutputSettings::setDevSampleRate(), SWGSDRangel::SWGHackRFOutputSettings::setFcPos(), SWGSDRangel::SWGHackRFOutputSettings::setLnaExt(), SWGSDRangel::SWGHackRFOutputSettings::setLog2Interp(), SWGSDRangel::SWGHackRFOutputSettings::setLOppmTenths(), SWGSDRangel::SWGHackRFOutputSettings::setReverseApiAddress(), SWGSDRangel::SWGHackRFOutputSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGHackRFOutputSettings::setReverseApiPort(), SWGSDRangel::SWGHackRFOutputSettings::setUseReverseApi(), and SWGSDRangel::SWGHackRFOutputSettings::setVgaGain().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 673 of file hackrfoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGDeviceSettings::getHackRfOutputSettings(), HackRFOutputSettings::m_bandwidth, HackRFOutputSettings::m_biasT, HackRFOutputSettings::m_centerFrequency, m_deviceAPI, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_fcPos, HackRFOutputSettings::m_lnaExt, HackRFOutputSettings::m_log2Interp, HackRFOutputSettings::m_LOppmTenths, m_networkManager, m_networkRequest, HackRFOutputSettings::m_reverseAPIAddress, HackRFOutputSettings::m_reverseAPIDeviceIndex, HackRFOutputSettings::m_reverseAPIPort, HackRFOutputSettings::m_vgaGain, SWGSDRangel::SWGHackRFOutputSettings::setBandwidth(), SWGSDRangel::SWGHackRFOutputSettings::setBiasT(), SWGSDRangel::SWGHackRFOutputSettings::setCenterFrequency(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGHackRFOutputSettings::setDevSampleRate(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGHackRFOutputSettings::setFcPos(), SWGSDRangel::SWGDeviceSettings::setHackRfOutputSettings(), SWGSDRangel::SWGHackRFOutputSettings::setLnaExt(), SWGSDRangel::SWGHackRFOutputSettings::setLog2Interp(), SWGSDRangel::SWGHackRFOutputSettings::setLOppmTenths(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), and SWGSDRangel::SWGHackRFOutputSettings::setVgaGain().
Referenced by applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 730 of file hackrfoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, HackRFOutputSettings::m_reverseAPIAddress, HackRFOutputSettings::m_reverseAPIDeviceIndex, HackRFOutputSettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 654 of file hackrfoutput.cpp.
References HackRFOutput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 645 of file hackrfoutput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 545 of file hackrfoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::getHackRfOutputSettings(), SWGSDRangel::SWGHackRFOutputSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setHackRfOutputSettings(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 556 of file hackrfoutput.cpp.
References HackRFOutput::MsgConfigureHackRF::create(), SWGSDRangel::SWGHackRFOutputSettings::getBandwidth(), SWGSDRangel::SWGHackRFOutputSettings::getBiasT(), SWGSDRangel::SWGHackRFOutputSettings::getCenterFrequency(), SWGSDRangel::SWGHackRFOutputSettings::getDevSampleRate(), SWGSDRangel::SWGHackRFOutputSettings::getFcPos(), SWGSDRangel::SWGDeviceSettings::getHackRfOutputSettings(), SWGSDRangel::SWGHackRFOutputSettings::getLnaExt(), SWGSDRangel::SWGHackRFOutputSettings::getLog2Interp(), SWGSDRangel::SWGHackRFOutputSettings::getLOppmTenths(), SWGSDRangel::SWGHackRFOutputSettings::getReverseApiAddress(), SWGSDRangel::SWGHackRFOutputSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGHackRFOutputSettings::getReverseApiPort(), SWGSDRangel::SWGHackRFOutputSettings::getUseReverseApi(), SWGSDRangel::SWGHackRFOutputSettings::getVgaGain(), HackRFOutputSettings::m_bandwidth, HackRFOutputSettings::m_biasT, HackRFOutputSettings::m_centerFrequency, HackRFOutputSettings::m_devSampleRate, HackRFOutputSettings::m_fcPos, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, HackRFOutputSettings::m_lnaExt, HackRFOutputSettings::m_log2Interp, HackRFOutputSettings::m_LOppmTenths, HackRFOutputSettings::m_reverseAPIAddress, HackRFOutputSettings::m_reverseAPIDeviceIndex, HackRFOutputSettings::m_reverseAPIPort, m_settings, HackRFOutputSettings::m_useReverseAPI, HackRFOutputSettings::m_vgaGain, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 141 of file hackrfoutput.h.
Referenced by applySettings(), closeDevice(), openDevice(), setDeviceCenterFrequency(), and start().
|
private |
Definition at line 138 of file hackrfoutput.h.
Referenced by applySettings(), closeDevice(), handleMessage(), openDevice(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~HackRFOutput().
|
private |
Definition at line 143 of file hackrfoutput.h.
Referenced by getDeviceDescription().
|
private |
Definition at line 142 of file hackrfoutput.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 139 of file hackrfoutput.h.
|
private |
Definition at line 145 of file hackrfoutput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~HackRFOutput().
|
private |
Definition at line 146 of file hackrfoutput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 147 of file hackrfoutput.h.
Referenced by start(), stop(), and ~HackRFOutput().
|
private |
Definition at line 140 of file hackrfoutput.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), getSampleRate(), handleMessage(), init(), openDevice(), serialize(), setCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 144 of file hackrfoutput.h.
Referenced by closeDevice(), and openDevice().
1.8.13