|  | 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 <localinput.h>
 Inheritance diagram for LocalInput:
 Inheritance diagram for LocalInput: Collaboration diagram for LocalInput:
 Collaboration diagram for LocalInput:| Classes | |
| class | MsgConfigureLocalInput | 
| class | MsgFileRecord | 
| class | MsgReportSampleRateAndFrequency | 
| class | MsgStartStop | 
| Public Member Functions | |
| LocalInput (DeviceAPI *deviceAPI) | |
| virtual | ~LocalInput () | 
| 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 source.  More... | |
| virtual void | setSampleRate (int sampleRate) | 
| For when the source sample rate is set externally.  More... | |
| virtual quint64 | getCenterFrequency () const | 
| Center frequency exposed by the source.  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 | 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 DeviceSampleSource | |
| DeviceSampleSource () | |
| virtual | ~DeviceSampleSource () | 
| MessageQueue * | getInputMessageQueue () | 
| MessageQueue * | getMessageQueueToGUI () | 
| SampleSinkFifo * | getSampleFifo () | 
| Private Slots | |
| void | networkManagerFinished (QNetworkReply *reply) | 
| Private Member Functions | |
| void | applySettings (const LocalInputSettings &settings, bool force=false) | 
| void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const LocalInputSettings &settings) | 
| void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) | 
| void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const LocalInputSettings &settings, bool force) | 
| void | webapiReverseSendStartStop (bool start) | 
| Private Attributes | |
| DeviceAPI * | m_deviceAPI | 
| QMutex | m_mutex | 
| LocalInputSettings | 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 DeviceSampleSource | |
| enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } | 
| enum | FrequencyShiftScheme { FSHIFT_STD = 0, FSHIFT_TXSYNC } | 
|  Static Public Member Functions inherited from DeviceSampleSource | |
| static qint64 | calculateDeviceCenterFrequency (quint64 centerFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) | 
| static qint64 | calculateCenterFrequency (quint64 deviceCenterFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) | 
| static qint32 | calculateFrequencyShift (int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme) | 
|  Protected Slots inherited from DeviceSampleSource | |
| void | handleInputMessages () | 
|  Protected Attributes inherited from DeviceSampleSource | |
| SampleSinkFifo | m_sampleFifo | 
| MessageQueue | m_inputMessageQueue | 
| Input queue to the source.  More... | |
| MessageQueue * | m_guiMessageQueue | 
| Input message queue to the GUI.  More... | |
Definition at line 39 of file localinput.h.
| LocalInput::LocalInput | ( | DeviceAPI * | deviceAPI | ) | 
Definition at line 43 of file localinput.cpp.
References arg().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Definition at line 59 of file localinput.cpp.
References m_deviceAPI, m_fileSink, m_networkManager, networkManagerFinished(), DeviceAPI::removeAncillarySink(), and stop().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 229 of file localinput.cpp.
References DeviceAPI::configureCorrections(), LocalInputSettings::m_dcBlock, m_deviceAPI, LocalInputSettings::m_fileRecordName, LocalInputSettings::m_iqCorrection, m_mutex, m_remoteAddress, LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::m_reverseAPIPort, m_settings, LocalInputSettings::m_useReverseAPI, and webapiReverseSendSettings().
Referenced by handleMessage(), and init().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 94 of file localinput.cpp.
References LocalInput::MsgConfigureLocalInput::create(), LocalInputSettings::deserialize(), DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and LocalInputSettings::resetToDefaults().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 68 of file localinput.cpp.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Center frequency exposed by the source.
Implements DeviceSampleSource.
Definition at line 145 of file localinput.cpp.
References m_centerFrequency.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 121 of file localinput.cpp.
References m_deviceDescription.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Sample rate exposed by the source.
Implements DeviceSampleSource.
Definition at line 126 of file localinput.cpp.
References m_sampleRate.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 164 of file localinput.cpp.
References applySettings(), FileRecord::genUniqueFileName(), DeviceAPI::getDeviceUID(), LocalInput::MsgConfigureLocalInput::getForce(), Message::getIdentifier(), LocalInput::MsgConfigureLocalInput::getSettings(), LocalInput::MsgFileRecord::getStartStop(), LocalInput::MsgStartStop::getStartStop(), FileRecord::handleMessage(), DeviceAPI::initDeviceEngine(), m_deviceAPI, LocalInputSettings::m_fileRecordName, m_fileSink, m_settings, LocalInputSettings::m_useReverseAPI, Message::match(), FileRecord::setFileName(), DeviceAPI::startDeviceEngine(), FileRecord::startRecording(), DeviceAPI::stopDeviceEngine(), FileRecord::stopRecording(), and webapiReverseSendStartStop().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller 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 DeviceSampleSource.
Definition at line 73 of file localinput.cpp.
References applySettings(), and m_settings.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | privateslot | 
Definition at line 465 of file localinput.cpp.
Referenced by ~LocalInput().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 89 of file localinput.cpp.
References m_settings, and LocalInputSettings::serialize().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 150 of file localinput.cpp.
References LocalInput::MsgReportSampleRateAndFrequency::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceSampleSource::getMessageQueueToGUI(), m_centerFrequency, m_deviceAPI, m_sampleRate, and MessageQueue::push().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 116 of file localinput.cpp.
References DeviceSampleSource::m_guiMessageQueue.
Referenced by LocalInputGui::LocalInputGui(), and LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
For when the source sample rate is set externally.
Implements DeviceSampleSource.
Definition at line 131 of file localinput.cpp.
References LocalInput::MsgReportSampleRateAndFrequency::create(), DeviceAPI::getDeviceEngineInputMessageQueue(), DeviceSampleSource::getMessageQueueToGUI(), m_centerFrequency, m_deviceAPI, m_sampleRate, and MessageQueue::push().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 78 of file localinput.cpp.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements DeviceSampleSource.
Definition at line 84 of file localinput.cpp.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency(), and ~LocalInput().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 392 of file localinput.cpp.
References SWGSDRangel::SWGDeviceReport::getLocalInputReport(), m_centerFrequency, m_sampleRate, SWGSDRangel::SWGLocalInputReport::setCenterFrequency(), and SWGSDRangel::SWGLocalInputReport::setSampleRate().
Referenced by webapiReportGet().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 358 of file localinput.cpp.
References SWGSDRangel::SWGLocalInputSettings::getFileRecordName(), SWGSDRangel::SWGDeviceSettings::getLocalInputSettings(), SWGSDRangel::SWGLocalInputSettings::getReverseApiAddress(), LocalInputSettings::m_dcBlock, LocalInputSettings::m_fileRecordName, LocalInputSettings::m_iqCorrection, LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::m_reverseAPIPort, LocalInputSettings::m_useReverseAPI, SWGSDRangel::SWGLocalInputSettings::setDcBlock(), SWGSDRangel::SWGLocalInputSettings::setFileRecordName(), SWGSDRangel::SWGLocalInputSettings::setIqCorrection(), SWGSDRangel::SWGLocalInputSettings::setReverseApiAddress(), SWGSDRangel::SWGLocalInputSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGLocalInputSettings::setReverseApiPort(), and SWGSDRangel::SWGLocalInputSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Reimplemented from DeviceSampleSource.
Definition at line 381 of file localinput.cpp.
References SWGSDRangel::SWGDeviceReport::getLocalInputReport(), SWGSDRangel::SWGLocalInputReport::init(), SWGSDRangel::SWGDeviceReport::setLocalInputReport(), and webapiFormatDeviceReport().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 398 of file localinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGDeviceSettings::getLocalInputSettings(), LocalInputSettings::m_dcBlock, m_deviceAPI, LocalInputSettings::m_fileRecordName, LocalInputSettings::m_iqCorrection, m_networkManager, m_networkRequest, LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::m_reverseAPIPort, SWGSDRangel::SWGLocalInputSettings::setDcBlock(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGLocalInputSettings::setFileRecordName(), SWGSDRangel::SWGLocalInputSettings::setIqCorrection(), SWGSDRangel::SWGDeviceSettings::setLocalInputSettings(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by applySettings().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 437 of file localinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::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 call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Reimplemented from DeviceSampleSource.
Definition at line 284 of file localinput.cpp.
References LocalInput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, and MessageQueue::push().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Reimplemented from DeviceSampleSource.
Definition at line 275 of file localinput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Reimplemented from DeviceSampleSource.
Definition at line 303 of file localinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getLocalInputSettings(), SWGSDRangel::SWGLocalInputSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setLocalInputSettings(), and webapiFormatDeviceSettings().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Reimplemented from DeviceSampleSource.
Definition at line 314 of file localinput.cpp.
References LocalInput::MsgConfigureLocalInput::create(), SWGSDRangel::SWGLocalInputSettings::getDcBlock(), SWGSDRangel::SWGLocalInputSettings::getFileRecordName(), SWGSDRangel::SWGLocalInputSettings::getIqCorrection(), SWGSDRangel::SWGDeviceSettings::getLocalInputSettings(), SWGSDRangel::SWGLocalInputSettings::getReverseApiAddress(), SWGSDRangel::SWGLocalInputSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGLocalInputSettings::getReverseApiPort(), SWGSDRangel::SWGLocalInputSettings::getUseReverseApi(), LocalInputSettings::m_dcBlock, LocalInputSettings::m_fileRecordName, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, LocalInputSettings::m_iqCorrection, LocalInputSettings::m_reverseAPIAddress, LocalInputSettings::m_reverseAPIDeviceIndex, LocalInputSettings::m_reverseAPIPort, m_settings, LocalInputSettings::m_useReverseAPI, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by LocalInput::MsgReportSampleRateAndFrequency::MsgReportSampleRateAndFrequency().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 172 of file localinput.h.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::getCenterFrequency(), getCenterFrequency(), setCenterFrequency(), setSampleRate(), and webapiFormatDeviceReport().
| 
 | private | 
Definition at line 169 of file localinput.h.
Referenced by applySettings(), handleMessage(), setCenterFrequency(), setSampleRate(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~LocalInput().
| 
 | private | 
Definition at line 175 of file localinput.h.
Referenced by getDeviceDescription().
| 
 | private | 
File sink to record device I/Q output.
Definition at line 176 of file localinput.h.
Referenced by handleMessage(), and ~LocalInput().
| 
 | private | 
Definition at line 170 of file localinput.h.
Referenced by applySettings().
| 
 | private | 
Definition at line 177 of file localinput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~LocalInput().
| 
 | private | 
Definition at line 178 of file localinput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
| 
 | private | 
Definition at line 174 of file localinput.h.
Referenced by applySettings().
| 
 | private | 
Definition at line 173 of file localinput.h.
Referenced by LocalInput::MsgReportSampleRateAndFrequency::getSampleRate(), getSampleRate(), setCenterFrequency(), setSampleRate(), and webapiFormatDeviceReport().
| 
 | private | 
Definition at line 171 of file localinput.h.
Referenced by applySettings(), deserialize(), handleMessage(), init(), serialize(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
 1.8.13
 1.8.13