![]() |
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 <kiwisdrinput.h>
Inheritance diagram for KiwiSDRInput:
Collaboration diagram for KiwiSDRInput:Classes | |
| class | MsgConfigureKiwiSDR |
| class | MsgFileRecord |
| class | MsgSetStatus |
| class | MsgStartStop |
Signals | |
| void | startWorker () |
| void | stopWorker () |
| void | setWorkerCenterFrequency (quint64 centerFrequency) |
| void | setWorkerServerAddress (QString serverAddress) |
| void | setWorkerGain (quint32 gain, bool useAGC) |
Public Member Functions | |
| KiwiSDRInput (DeviceAPI *deviceAPI) | |
| virtual | ~KiwiSDRInput () |
| 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 | webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
| virtual int | webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
| virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
Public Member Functions inherited from DeviceSampleSource | |
| DeviceSampleSource () | |
| virtual | ~DeviceSampleSource () |
| MessageQueue * | getInputMessageQueue () |
| MessageQueue * | getMessageQueueToGUI () |
| SampleSinkFifo * | getSampleFifo () |
Private Slots | |
| void | setWorkerStatus (int status) |
| void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
| int | getStatus () const |
| bool | applySettings (const KiwiSDRSettings &settings, bool force) |
| void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const KiwiSDRSettings &settings) |
| void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) |
| void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const KiwiSDRSettings &settings, bool force) |
| void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
| DeviceAPI * | m_deviceAPI |
| FileRecord * | m_fileSink |
| File sink to record device I/Q output. More... | |
| QMutex | m_mutex |
| KiwiSDRSettings | m_settings |
| KiwiSDRWorker * | m_kiwiSDRWorker |
| QThread | m_kiwiSDRWorkerThread |
| QString | m_deviceDescription |
| bool | m_running |
| const QTimer & | m_masterTimer |
| 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 37 of file kiwisdrinput.h.
| KiwiSDRInput::KiwiSDRInput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 45 of file kiwisdrinput.cpp.
References start().
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Definition at line 67 of file kiwisdrinput.cpp.
References m_deviceAPI, m_fileSink, m_kiwiSDRWorkerThread, m_networkManager, m_running, networkManagerFinished(), DeviceAPI::removeAncillarySink(), and stop().
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 270 of file kiwisdrinput.cpp.
References DeviceAPI::configureCorrections(), DeviceAPI::getDeviceEngineInputMessageQueue(), getSampleRate(), FileRecord::handleMessage(), KiwiSDRSettings::m_centerFrequency, KiwiSDRSettings::m_dcBlock, m_deviceAPI, KiwiSDRSettings::m_fileRecordName, m_fileSink, KiwiSDRSettings::m_gain, KiwiSDRSettings::m_reverseAPIAddress, KiwiSDRSettings::m_reverseAPIDeviceIndex, KiwiSDRSettings::m_reverseAPIPort, KiwiSDRSettings::m_serverAddress, m_settings, KiwiSDRSettings::m_useAGC, KiwiSDRSettings::m_useReverseAPI, MessageQueue::push(), setWorkerCenterFrequency(), setWorkerGain(), setWorkerServerAddress(), and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 135 of file kiwisdrinput.cpp.
References KiwiSDRInput::MsgConfigureKiwiSDR::create(), KiwiSDRSettings::deserialize(), DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and KiwiSDRSettings::resetToDefaults().
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 83 of file kiwisdrinput.cpp.
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the caller graph for this function:
|
virtual |
Center frequency exposed by the source.
Implements DeviceSampleSource.
Definition at line 167 of file kiwisdrinput.cpp.
References KiwiSDRSettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 157 of file kiwisdrinput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
Here is the caller graph for this function:
|
virtual |
Sample rate exposed by the source.
Implements DeviceSampleSource.
Definition at line 162 of file kiwisdrinput.cpp.
Referenced by applySettings(), and setMessageQueueToGUI().
Here is the caller graph for this function:
|
private |
Definition at line 261 of file kiwisdrinput.cpp.
References KiwiSDRWorker::getStatus(), and m_kiwiSDRWorker.
Referenced by webapiFormatDeviceReport().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 194 of file kiwisdrinput.cpp.
References applySettings(), FileRecord::genUniqueFileName(), DeviceAPI::getDeviceUID(), KiwiSDRInput::MsgConfigureKiwiSDR::getForce(), KiwiSDRInput::MsgConfigureKiwiSDR::getSettings(), KiwiSDRInput::MsgFileRecord::getStartStop(), KiwiSDRInput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), m_deviceAPI, KiwiSDRSettings::m_fileRecordName, m_fileSink, m_settings, KiwiSDRSettings::m_useReverseAPI, Message::match(), FileRecord::setFileName(), DeviceAPI::startDeviceEngine(), FileRecord::startRecording(), DeviceAPI::stopDeviceEngine(), FileRecord::stopRecording(), 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 DeviceSampleSource.
Definition at line 88 of file kiwisdrinput.cpp.
References applySettings(), and m_settings.
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Definition at line 552 of file kiwisdrinput.cpp.
Referenced by ~KiwiSDRInput().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 130 of file kiwisdrinput.cpp.
References m_settings, and KiwiSDRSettings::serialize().
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 172 of file kiwisdrinput.cpp.
References KiwiSDRInput::MsgConfigureKiwiSDR::create(), KiwiSDRSettings::m_centerFrequency, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::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:
|
inlinevirtual |
Implements DeviceSampleSource.
Definition at line 131 of file kiwisdrinput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSource::m_guiMessageQueue.
Here is the call graph for this function:
|
inlinevirtual |
For when the source sample rate is set externally.
Implements DeviceSampleSource.
Definition at line 134 of file kiwisdrinput.h.
References getCenterFrequency(), handleMessage(), setCenterFrequency(), webapiReportGet(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
|
signal |
|
signal |
|
signal |
|
privateslot |
Definition at line 187 of file kiwisdrinput.cpp.
References KiwiSDRInput::MsgSetStatus::create(), DeviceSampleSource::m_guiMessageQueue, and MessageQueue::push().
Referenced by start(), and stop().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 93 of file kiwisdrinput.cpp.
References applySettings(), m_kiwiSDRWorker, m_kiwiSDRWorkerThread, m_mutex, m_running, DeviceSampleSource::m_sampleFifo, m_settings, KiwiSDRWorker::onCenterFrequencyChanged(), KiwiSDRWorker::onGainChanged(), KiwiSDRWorker::onServerAddressChanged(), setWorkerCenterFrequency(), setWorkerGain(), setWorkerServerAddress(), setWorkerStatus(), stop(), and KiwiSDRWorker::updateStatus().
Referenced by KiwiSDRInput(), and KiwiSDRInput::MsgSetStatus::MsgSetStatus().
Here is the call graph for this function:
Here is the caller graph for this function:
|
signal |
|
virtual |
Implements DeviceSampleSource.
Definition at line 115 of file kiwisdrinput.cpp.
References m_kiwiSDRWorker, m_mutex, m_running, and setWorkerStatus().
Referenced by KiwiSDRInput::MsgSetStatus::MsgSetStatus(), start(), and ~KiwiSDRInput().
Here is the call graph for this function:
Here is the caller graph for this function:
|
signal |
|
private |
Definition at line 471 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGDeviceReport::getKiwiSdrReport(), getStatus(), and SWGSDRangel::SWGKiwiSDRReport::setStatus().
Referenced by webapiReportGet().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 440 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGKiwiSDRSettings::getFileRecordName(), SWGSDRangel::SWGDeviceSettings::getKiwiSdrSettings(), SWGSDRangel::SWGKiwiSDRSettings::getReverseApiAddress(), SWGSDRangel::SWGKiwiSDRSettings::getServerAddress(), KiwiSDRSettings::m_centerFrequency, KiwiSDRSettings::m_dcBlock, KiwiSDRSettings::m_fileRecordName, KiwiSDRSettings::m_gain, KiwiSDRSettings::m_reverseAPIAddress, KiwiSDRSettings::m_reverseAPIDeviceIndex, KiwiSDRSettings::m_reverseAPIPort, KiwiSDRSettings::m_serverAddress, KiwiSDRSettings::m_useAGC, KiwiSDRSettings::m_useReverseAPI, SWGSDRangel::SWGKiwiSDRSettings::setCenterFrequency(), SWGSDRangel::SWGKiwiSDRSettings::setDcBlock(), SWGSDRangel::SWGKiwiSDRSettings::setFileRecordName(), SWGSDRangel::SWGKiwiSDRSettings::setGain(), SWGSDRangel::SWGKiwiSDRSettings::setReverseApiAddress(), SWGSDRangel::SWGKiwiSDRSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGKiwiSDRSettings::setReverseApiPort(), SWGSDRangel::SWGKiwiSDRSettings::setServerAddress(), SWGSDRangel::SWGKiwiSDRSettings::setUseAgc(), and SWGSDRangel::SWGKiwiSDRSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 429 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGDeviceReport::getKiwiSdrReport(), SWGSDRangel::SWGKiwiSDRReport::init(), SWGSDRangel::SWGDeviceReport::setKiwiSdrReport(), and webapiFormatDeviceReport().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 476 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGDeviceSettings::getKiwiSdrSettings(), KiwiSDRSettings::m_centerFrequency, KiwiSDRSettings::m_dcBlock, m_deviceAPI, KiwiSDRSettings::m_fileRecordName, KiwiSDRSettings::m_gain, m_networkManager, m_networkRequest, KiwiSDRSettings::m_reverseAPIAddress, KiwiSDRSettings::m_reverseAPIDeviceIndex, KiwiSDRSettings::m_reverseAPIPort, KiwiSDRSettings::m_serverAddress, KiwiSDRSettings::m_useAGC, SWGSDRangel::SWGKiwiSDRSettings::setCenterFrequency(), SWGSDRangel::SWGKiwiSDRSettings::setDcBlock(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGKiwiSDRSettings::setFileRecordName(), SWGSDRangel::SWGKiwiSDRSettings::setGain(), SWGSDRangel::SWGDeviceSettings::setKiwiSdrSettings(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), SWGSDRangel::SWGKiwiSDRSettings::setServerAddress(), and SWGSDRangel::SWGKiwiSDRSettings::setUseAgc().
Referenced by applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 524 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, KiwiSDRSettings::m_reverseAPIAddress, KiwiSDRSettings::m_reverseAPIDeviceIndex, KiwiSDRSettings::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 DeviceSampleSource.
Definition at line 346 of file kiwisdrinput.cpp.
References KiwiSDRInput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::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 DeviceSampleSource.
Definition at line 337 of file kiwisdrinput.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 DeviceSampleSource.
Definition at line 365 of file kiwisdrinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getKiwiSdrSettings(), SWGSDRangel::SWGKiwiSDRSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setKiwiSdrSettings(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 376 of file kiwisdrinput.cpp.
References KiwiSDRInput::MsgConfigureKiwiSDR::create(), SWGSDRangel::SWGKiwiSDRSettings::getCenterFrequency(), SWGSDRangel::SWGKiwiSDRSettings::getDcBlock(), SWGSDRangel::SWGKiwiSDRSettings::getFileRecordName(), SWGSDRangel::SWGKiwiSDRSettings::getGain(), SWGSDRangel::SWGDeviceSettings::getKiwiSdrSettings(), SWGSDRangel::SWGKiwiSDRSettings::getReverseApiAddress(), SWGSDRangel::SWGKiwiSDRSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGKiwiSDRSettings::getReverseApiPort(), SWGSDRangel::SWGKiwiSDRSettings::getServerAddress(), SWGSDRangel::SWGKiwiSDRSettings::getUseAgc(), SWGSDRangel::SWGKiwiSDRSettings::getUseReverseApi(), KiwiSDRSettings::m_centerFrequency, KiwiSDRSettings::m_dcBlock, KiwiSDRSettings::m_fileRecordName, KiwiSDRSettings::m_gain, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, KiwiSDRSettings::m_reverseAPIAddress, KiwiSDRSettings::m_reverseAPIDeviceIndex, KiwiSDRSettings::m_reverseAPIPort, KiwiSDRSettings::m_serverAddress, m_settings, KiwiSDRSettings::m_useAGC, KiwiSDRSettings::m_useReverseAPI, 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 164 of file kiwisdrinput.h.
Referenced by applySettings(), handleMessage(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~KiwiSDRInput().
|
private |
Definition at line 170 of file kiwisdrinput.h.
Referenced by getDeviceDescription().
|
private |
File sink to record device I/Q output.
Definition at line 165 of file kiwisdrinput.h.
Referenced by applySettings(), handleMessage(), and ~KiwiSDRInput().
|
private |
Definition at line 168 of file kiwisdrinput.h.
Referenced by getStatus(), start(), and stop().
|
private |
Definition at line 169 of file kiwisdrinput.h.
Referenced by start(), and ~KiwiSDRInput().
|
private |
Definition at line 172 of file kiwisdrinput.h.
|
private |
Definition at line 166 of file kiwisdrinput.h.
|
private |
Definition at line 173 of file kiwisdrinput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~KiwiSDRInput().
|
private |
Definition at line 174 of file kiwisdrinput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 171 of file kiwisdrinput.h.
Referenced by start(), stop(), and ~KiwiSDRInput().
|
private |
Definition at line 167 of file kiwisdrinput.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), handleMessage(), init(), serialize(), setCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
1.8.13