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 <perseusinput.h>
Classes | |
class | MsgConfigurePerseus |
class | MsgFileRecord |
class | MsgStartStop |
Public Member Functions | |
PerseusInput (DeviceAPI *deviceAPI) | |
~PerseusInput () | |
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) |
const std::vector< uint32_t > & | getSampleRates () const |
Public Member Functions inherited from DeviceSampleSource | |
DeviceSampleSource () | |
virtual | ~DeviceSampleSource () |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
SampleSinkFifo * | getSampleFifo () |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
bool | openDevice () |
void | closeDevice () |
void | setDeviceCenterFrequency (quint64 freq, const PerseusSettings &settings) |
bool | applySettings (const PerseusSettings &settings, bool force=false) |
void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const PerseusSettings &settings) |
void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) |
void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const PerseusSettings &settings, bool force) |
void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
FileRecord * | m_fileSink |
QString | m_deviceDescription |
PerseusSettings | m_settings |
bool | m_running |
PerseusThread * | m_perseusThread |
perseus_descr * | m_perseusDescriptor |
std::vector< uint32_t > | m_sampleRates |
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 36 of file perseusinput.h.
PerseusInput::PerseusInput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 40 of file perseusinput.cpp.
References arg().
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
PerseusInput::~PerseusInput | ( | ) |
Definition at line 57 of file perseusinput.cpp.
References closeDevice(), m_deviceAPI, m_fileSink, m_networkManager, networkManagerFinished(), and DeviceAPI::removeAncillarySink().
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
private |
Definition at line 299 of file perseusinput.cpp.
References DeviceAPI::getDeviceEngineInputMessageQueue(), FileRecord::handleMessage(), i, PerseusSettings::m_adcDither, PerseusSettings::m_adcPreamp, PerseusSettings::m_attenuator, PerseusSettings::m_centerFrequency, m_deviceAPI, PerseusSettings::m_devSampleRateIndex, m_fileSink, PerseusSettings::m_log2Decim, PerseusSettings::m_LOppmTenths, m_perseusDescriptor, m_perseusThread, PerseusSettings::m_reverseAPIAddress, PerseusSettings::m_reverseAPIDeviceIndex, PerseusSettings::m_reverseAPIPort, m_sampleRates, m_settings, PerseusSettings::m_transverterDeltaFrequency, PerseusSettings::m_transverterMode, PerseusSettings::m_useReverseAPI, PerseusSettings::m_wideBand, MessageQueue::push(), setDeviceCenterFrequency(), PerseusThread::setLog2Decimation(), and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
|
private |
Definition at line 275 of file perseusinput.cpp.
References m_perseusDescriptor, m_running, and stop().
Referenced by openDevice(), and ~PerseusInput().
|
virtual |
Implements DeviceSampleSource.
Definition at line 112 of file perseusinput.cpp.
References PerseusInput::MsgConfigurePerseus::create(), PerseusSettings::deserialize(), DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and PerseusSettings::resetToDefaults().
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 66 of file perseusinput.cpp.
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
virtual |
Center frequency exposed by the source.
Implements DeviceSampleSource.
Definition at line 147 of file perseusinput.cpp.
References PerseusSettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
|
virtual |
Implements DeviceSampleSource.
Definition at line 134 of file perseusinput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
|
virtual |
Sample rate exposed by the source.
Implements DeviceSampleSource.
Definition at line 138 of file perseusinput.cpp.
References PerseusSettings::m_devSampleRateIndex, PerseusSettings::m_log2Decim, m_sampleRates, and m_settings.
Referenced by setMessageQueueToGUI().
|
inline |
Definition at line 143 of file perseusinput.h.
References m_sampleRates.
Referenced by PerseusGui::PerseusGui(), and webapiFormatDeviceReport().
|
virtual |
Implements DeviceSampleSource.
Definition at line 167 of file perseusinput.cpp.
References applySettings(), FileRecord::genUniqueFileName(), DeviceAPI::getDeviceUID(), PerseusInput::MsgConfigurePerseus::getForce(), PerseusInput::MsgConfigurePerseus::getSettings(), PerseusInput::MsgFileRecord::getStartStop(), PerseusInput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), m_deviceAPI, PerseusSettings::m_fileRecordName, m_fileSink, m_settings, PerseusSettings::m_useReverseAPI, Message::match(), FileRecord::setFileName(), DeviceAPI::startDeviceEngine(), FileRecord::startRecording(), DeviceAPI::stopDeviceEngine(), FileRecord::stopRecording(), and webapiReverseSendStartStop().
Referenced by setSampleRate().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSource.
Definition at line 71 of file perseusinput.cpp.
References applySettings(), and m_settings.
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
privateslot |
Definition at line 705 of file perseusinput.cpp.
Referenced by ~PerseusInput().
|
private |
Definition at line 233 of file perseusinput.cpp.
References closeDevice(), DeviceAPI::getSamplingDeviceSerial(), DevicePerseus::getSequenceFromSerial(), i, DevicePerseus::instance(), m_deviceAPI, m_perseusDescriptor, DeviceSampleSource::m_sampleFifo, m_sampleRates, PERSEUS_NBSAMPLES, and SampleSinkFifo::setSize().
|
virtual |
Implements DeviceSampleSource.
Definition at line 107 of file perseusinput.cpp.
References m_settings, and PerseusSettings::serialize().
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 152 of file perseusinput.cpp.
References PerseusInput::MsgConfigurePerseus::create(), PerseusSettings::m_centerFrequency, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
|
private |
Definition at line 284 of file perseusinput.cpp.
References PerseusSettings::m_LOppmTenths, m_perseusDescriptor, and PerseusSettings::m_wideBand.
Referenced by applySettings().
|
inlinevirtual |
Implements DeviceSampleSource.
Definition at line 111 of file perseusinput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSource::m_guiMessageQueue.
Referenced by PerseusGui::PerseusGui().
|
inlinevirtual |
For when the source sample rate is set externally.
Implements DeviceSampleSource.
Definition at line 114 of file perseusinput.h.
References getCenterFrequency(), handleMessage(), setCenterFrequency(), webapiReportGet(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Implements DeviceSampleSource.
Definition at line 76 of file perseusinput.cpp.
References applySettings(), PerseusSettings::m_log2Decim, m_perseusDescriptor, m_perseusThread, m_running, DeviceSampleSource::m_sampleFifo, m_settings, PerseusThread::setLog2Decimation(), PerseusThread::startWork(), and stop().
Referenced by PerseusInput::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleSource.
Definition at line 95 of file perseusinput.cpp.
References m_perseusThread, m_running, and PerseusThread::stopWork().
Referenced by closeDevice(), PerseusInput::MsgStartStop::MsgStartStop(), and start().
|
private |
Definition at line 603 of file perseusinput.cpp.
References SWGSDRangel::SWGDeviceReport::getPerseusReport(), SWGSDRangel::SWGPerseusReport::getSampleRates(), getSampleRates(), and SWGSDRangel::SWGPerseusReport::setSampleRates().
Referenced by webapiReportGet().
|
private |
Definition at line 572 of file perseusinput.cpp.
References SWGSDRangel::SWGPerseusSettings::getFileRecordName(), SWGSDRangel::SWGDeviceSettings::getPerseusSettings(), SWGSDRangel::SWGPerseusSettings::getReverseApiAddress(), PerseusSettings::m_adcDither, PerseusSettings::m_adcPreamp, PerseusSettings::m_attenuator, PerseusSettings::m_centerFrequency, PerseusSettings::m_devSampleRateIndex, PerseusSettings::m_fileRecordName, PerseusSettings::m_log2Decim, PerseusSettings::m_LOppmTenths, PerseusSettings::m_reverseAPIAddress, PerseusSettings::m_reverseAPIDeviceIndex, PerseusSettings::m_reverseAPIPort, PerseusSettings::m_transverterDeltaFrequency, PerseusSettings::m_transverterMode, PerseusSettings::m_useReverseAPI, PerseusSettings::m_wideBand, SWGSDRangel::SWGPerseusSettings::setAdcDither(), SWGSDRangel::SWGPerseusSettings::setAdcPreamp(), SWGSDRangel::SWGPerseusSettings::setAttenuator(), SWGSDRangel::SWGPerseusSettings::setCenterFrequency(), SWGSDRangel::SWGPerseusSettings::setDevSampleRateIndex(), SWGSDRangel::SWGPerseusSettings::setFileRecordName(), SWGSDRangel::SWGPerseusSettings::setLog2Decim(), SWGSDRangel::SWGPerseusSettings::setLOppmTenths(), SWGSDRangel::SWGPerseusSettings::setReverseApiAddress(), SWGSDRangel::SWGPerseusSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGPerseusSettings::setReverseApiPort(), SWGSDRangel::SWGPerseusSettings::setTransverterDeltaFrequency(), SWGSDRangel::SWGPerseusSettings::setTransverterMode(), SWGSDRangel::SWGPerseusSettings::setUseReverseApi(), and SWGSDRangel::SWGPerseusSettings::setWideBand().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 561 of file perseusinput.cpp.
References SWGSDRangel::SWGDeviceReport::getPerseusReport(), SWGSDRangel::SWGPerseusReport::init(), SWGSDRangel::SWGDeviceReport::setPerseusReport(), and webapiFormatDeviceReport().
Referenced by setSampleRate().
|
private |
Definition at line 614 of file perseusinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGDeviceSettings::getPerseusSettings(), PerseusSettings::m_adcDither, PerseusSettings::m_adcPreamp, PerseusSettings::m_attenuator, PerseusSettings::m_centerFrequency, m_deviceAPI, PerseusSettings::m_devSampleRateIndex, PerseusSettings::m_fileRecordName, PerseusSettings::m_log2Decim, PerseusSettings::m_LOppmTenths, m_networkManager, m_networkRequest, PerseusSettings::m_reverseAPIAddress, PerseusSettings::m_reverseAPIDeviceIndex, PerseusSettings::m_reverseAPIPort, PerseusSettings::m_transverterDeltaFrequency, PerseusSettings::m_transverterMode, PerseusSettings::m_wideBand, SWGSDRangel::SWGPerseusSettings::setAdcDither(), SWGSDRangel::SWGPerseusSettings::setAdcPreamp(), SWGSDRangel::SWGPerseusSettings::setAttenuator(), SWGSDRangel::SWGPerseusSettings::setCenterFrequency(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGPerseusSettings::setDevSampleRateIndex(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGPerseusSettings::setFileRecordName(), SWGSDRangel::SWGPerseusSettings::setLog2Decim(), SWGSDRangel::SWGPerseusSettings::setLOppmTenths(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), SWGSDRangel::SWGDeviceSettings::setPerseusSettings(), SWGSDRangel::SWGPerseusSettings::setTransverterDeltaFrequency(), SWGSDRangel::SWGPerseusSettings::setTransverterMode(), and SWGSDRangel::SWGPerseusSettings::setWideBand().
Referenced by applySettings().
|
private |
Definition at line 677 of file perseusinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, PerseusSettings::m_reverseAPIAddress, PerseusSettings::m_reverseAPIDeviceIndex, PerseusSettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 461 of file perseusinput.cpp.
References PerseusInput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 452 of file perseusinput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 480 of file perseusinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getPerseusSettings(), SWGSDRangel::SWGPerseusSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setPerseusSettings(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 491 of file perseusinput.cpp.
References PerseusInput::MsgConfigurePerseus::create(), SWGSDRangel::SWGPerseusSettings::getAdcDither(), SWGSDRangel::SWGPerseusSettings::getAdcPreamp(), SWGSDRangel::SWGPerseusSettings::getAttenuator(), SWGSDRangel::SWGPerseusSettings::getCenterFrequency(), SWGSDRangel::SWGPerseusSettings::getDevSampleRateIndex(), SWGSDRangel::SWGPerseusSettings::getFileRecordName(), SWGSDRangel::SWGPerseusSettings::getLog2Decim(), SWGSDRangel::SWGPerseusSettings::getLOppmTenths(), SWGSDRangel::SWGDeviceSettings::getPerseusSettings(), SWGSDRangel::SWGPerseusSettings::getReverseApiAddress(), SWGSDRangel::SWGPerseusSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGPerseusSettings::getReverseApiPort(), SWGSDRangel::SWGPerseusSettings::getTransverterDeltaFrequency(), SWGSDRangel::SWGPerseusSettings::getTransverterMode(), SWGSDRangel::SWGPerseusSettings::getUseReverseApi(), SWGSDRangel::SWGPerseusSettings::getWideBand(), PerseusSettings::m_adcDither, PerseusSettings::m_adcPreamp, PerseusSettings::m_attenuator, PerseusSettings::m_centerFrequency, PerseusSettings::m_devSampleRateIndex, PerseusSettings::m_fileRecordName, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, PerseusSettings::m_log2Decim, PerseusSettings::m_LOppmTenths, PerseusSettings::m_reverseAPIAddress, PerseusSettings::m_reverseAPIDeviceIndex, PerseusSettings::m_reverseAPIPort, m_settings, PerseusSettings::m_transverterDeltaFrequency, PerseusSettings::m_transverterMode, PerseusSettings::m_useReverseAPI, PerseusSettings::m_wideBand, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
|
private |
Definition at line 146 of file perseusinput.h.
Referenced by applySettings(), handleMessage(), openDevice(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~PerseusInput().
|
private |
Definition at line 148 of file perseusinput.h.
Referenced by getDeviceDescription().
|
private |
Definition at line 147 of file perseusinput.h.
Referenced by applySettings(), handleMessage(), and ~PerseusInput().
|
private |
Definition at line 154 of file perseusinput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~PerseusInput().
|
private |
Definition at line 155 of file perseusinput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
Definition at line 152 of file perseusinput.h.
Referenced by applySettings(), closeDevice(), openDevice(), setDeviceCenterFrequency(), and start().
|
private |
Definition at line 151 of file perseusinput.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 150 of file perseusinput.h.
Referenced by closeDevice(), start(), and stop().
|
private |
Definition at line 153 of file perseusinput.h.
Referenced by applySettings(), getSampleRate(), getSampleRates(), and openDevice().
|
private |
Definition at line 149 of file perseusinput.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), getSampleRate(), handleMessage(), init(), serialize(), setCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().