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 <localoutput.h>
Classes | |
class | MsgConfigureLocalOutput |
class | MsgReportSampleRateAndFrequency |
class | MsgStartStop |
Public Member Functions | |
LocalOutput (DeviceAPI *deviceAPI) | |
virtual | ~LocalOutput () |
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) |
std::time_t | getStartingTimeStamp () const |
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 | webapiReportGet (SWGSDRangel::SWGDeviceReport &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 () |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
SampleSourceFifo * | getSampleFifo () |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
void | applySettings (const LocalOutputSettings &settings, bool force=false) |
void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const LocalOutputSettings &settings) |
void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) |
void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const LocalOutputSettings &settings, bool force) |
void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
QMutex | m_mutex |
LocalOutputSettings | m_settings |
qint64 | m_centerFrequency |
int | m_sampleRate |
QString | m_remoteAddress |
QString | m_deviceDescription |
FileRecord * | m_fileSink |
File sink to record device I/Q output. More... | |
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 39 of file localoutput.h.
LocalOutput::LocalOutput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 41 of file localoutput.cpp.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Definition at line 55 of file localoutput.cpp.
References m_networkManager, networkManagerFinished(), and stop().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
private |
Definition at line 200 of file localoutput.cpp.
References m_mutex, m_remoteAddress, LocalOutputSettings::m_reverseAPIAddress, LocalOutputSettings::m_reverseAPIDeviceIndex, LocalOutputSettings::m_reverseAPIPort, m_settings, LocalOutputSettings::m_useReverseAPI, and webapiReverseSendSettings().
Referenced by handleMessage(), and init().
|
virtual |
Implements DeviceSampleSink.
Definition at line 88 of file localoutput.cpp.
References LocalOutput::MsgConfigureLocalOutput::create(), LocalOutputSettings::deserialize(), DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, MessageQueue::push(), and LocalOutputSettings::resetToDefaults().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 62 of file localoutput.cpp.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Center frequency exposed by the sink.
Implements DeviceSampleSink.
Definition at line 139 of file localoutput.cpp.
References m_centerFrequency.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 115 of file localoutput.cpp.
References m_deviceDescription.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Sample rate exposed by the sink.
Implements DeviceSampleSink.
Definition at line 120 of file localoutput.cpp.
References m_sampleRate.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
std::time_t LocalOutput::getStartingTimeStamp | ( | ) | const |
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 158 of file localoutput.cpp.
References applySettings(), LocalOutput::MsgConfigureLocalOutput::getForce(), Message::getIdentifier(), LocalOutput::MsgConfigureLocalOutput::getSettings(), LocalOutput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), m_deviceAPI, m_settings, LocalOutputSettings::m_useReverseAPI, Message::match(), DeviceAPI::startDeviceEngine(), DeviceAPI::stopDeviceEngine(), and webapiReverseSendStartStop().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSink.
Definition at line 67 of file localoutput.cpp.
References applySettings(), and m_settings.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
privateslot |
Definition at line 386 of file localoutput.cpp.
Referenced by ~LocalOutput().
|
virtual |
Implements DeviceSampleSink.
Definition at line 83 of file localoutput.cpp.
References m_settings, and LocalOutputSettings::serialize().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 144 of file localoutput.cpp.
References LocalOutput::MsgReportSampleRateAndFrequency::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceSampleSink::getMessageQueueToGUI(), m_centerFrequency, m_deviceAPI, m_sampleRate, and MessageQueue::push().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 110 of file localoutput.cpp.
References DeviceSampleSink::m_guiMessageQueue.
Referenced by LocalOutputGui::LocalOutputGui(), and LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
For when the sink sample rate is set externally.
Implements DeviceSampleSink.
Definition at line 125 of file localoutput.cpp.
References LocalOutput::MsgReportSampleRateAndFrequency::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceSampleSink::getMessageQueueToGUI(), m_centerFrequency, m_deviceAPI, m_sampleRate, and MessageQueue::push().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 72 of file localoutput.cpp.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Implements DeviceSampleSink.
Definition at line 78 of file localoutput.cpp.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency(), and ~LocalOutput().
|
private |
Definition at line 322 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceReport::getLocalOutputReport(), m_centerFrequency, m_sampleRate, SWGSDRangel::SWGLocalOutputReport::setCenterFrequency(), and SWGSDRangel::SWGLocalOutputReport::setSampleRate().
Referenced by webapiReportGet().
|
private |
Definition at line 297 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::getLocalOutputSettings(), SWGSDRangel::SWGLocalOutputSettings::getReverseApiAddress(), LocalOutputSettings::m_reverseAPIAddress, LocalOutputSettings::m_reverseAPIDeviceIndex, LocalOutputSettings::m_reverseAPIPort, LocalOutputSettings::m_useReverseAPI, SWGSDRangel::SWGLocalOutputSettings::setReverseApiAddress(), SWGSDRangel::SWGLocalOutputSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGLocalOutputSettings::setReverseApiPort(), and SWGSDRangel::SWGLocalOutputSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 311 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceReport::getLocalOutputReport(), SWGSDRangel::SWGLocalOutputReport::init(), SWGSDRangel::SWGDeviceReport::setLocalOutputReport(), and webapiFormatDeviceReport().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
private |
Definition at line 328 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, LocalOutputSettings::m_reverseAPIAddress, LocalOutputSettings::m_reverseAPIDeviceIndex, LocalOutputSettings::m_reverseAPIPort, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGDeviceSettings::setLocalOutputSettings(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by applySettings().
|
private |
Definition at line 358 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, LocalOutputSettings::m_reverseAPIAddress, LocalOutputSettings::m_reverseAPIDeviceIndex, LocalOutputSettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 232 of file localoutput.cpp.
References LocalOutput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, and MessageQueue::push().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 223 of file localoutput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 251 of file localoutput.cpp.
References SWGSDRangel::SWGDeviceSettings::getLocalOutputSettings(), SWGSDRangel::SWGLocalOutputSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setLocalOutputSettings(), and webapiFormatDeviceSettings().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 262 of file localoutput.cpp.
References LocalOutput::MsgConfigureLocalOutput::create(), SWGSDRangel::SWGDeviceSettings::getLocalOutputSettings(), SWGSDRangel::SWGLocalOutputSettings::getReverseApiAddress(), SWGSDRangel::SWGLocalOutputSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGLocalOutputSettings::getReverseApiPort(), SWGSDRangel::SWGLocalOutputSettings::getUseReverseApi(), DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, LocalOutputSettings::m_reverseAPIAddress, LocalOutputSettings::m_reverseAPIDeviceIndex, LocalOutputSettings::m_reverseAPIPort, m_settings, LocalOutputSettings::m_useReverseAPI, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
|
private |
Definition at line 154 of file localoutput.h.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::getCenterFrequency(), getCenterFrequency(), setCenterFrequency(), setSampleRate(), and webapiFormatDeviceReport().
|
private |
Definition at line 151 of file localoutput.h.
Referenced by handleMessage(), setCenterFrequency(), setSampleRate(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), and webapiRunGet().
|
private |
Definition at line 157 of file localoutput.h.
Referenced by getDeviceDescription().
|
private |
File sink to record device I/Q output.
Definition at line 158 of file localoutput.h.
|
private |
Definition at line 152 of file localoutput.h.
Referenced by applySettings().
|
private |
Definition at line 159 of file localoutput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~LocalOutput().
|
private |
Definition at line 160 of file localoutput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 156 of file localoutput.h.
Referenced by applySettings().
|
private |
Definition at line 155 of file localoutput.h.
Referenced by LocalOutput::MsgReportSampleRateAndFrequency::getSampleRate(), getSampleRate(), setCenterFrequency(), setSampleRate(), and webapiFormatDeviceReport().
|
private |
Definition at line 153 of file localoutput.h.
Referenced by applySettings(), deserialize(), handleMessage(), init(), serialize(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().