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 <testmi.h>
Classes | |
struct | DeviceSettingsKeys |
class | MsgConfigureTestSource |
class | MsgFileRecord |
class | MsgStartStop |
Public Member Functions | |
TestMI (DeviceAPI *deviceAPI) | |
virtual | ~TestMI () |
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 | getSourceSampleRate (int index) const |
Sample rate exposed by the source at index. More... | |
virtual void | setSourceSampleRate (int sampleRate, int index) |
For when the source sample rate is set externally. More... | |
virtual quint64 | getSourceCenterFrequency (int index) const |
Center frequency exposed by the source at index. More... | |
virtual void | setSourceCenterFrequency (qint64 centerFrequency, int index) |
virtual int | getSinkSampleRate (int index) const |
Sample rate exposed by the sink at index. More... | |
virtual void | setSinkSampleRate (int sampleRate, int index) |
For when the sink sample rate is set externally. More... | |
virtual quint64 | getSinkCenterFrequency (int index) const |
Center frequency exposed by the sink at index. More... | |
virtual void | setSinkCenterFrequency (qint64 centerFrequency, int index) |
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) |
bool | isRecording (unsigned int istream) const |
Public Member Functions inherited from DeviceSampleMIMO | |
DeviceSampleMIMO () | |
virtual | ~DeviceSampleMIMO () |
virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
unsigned int | getNbSourceFifos () const |
Get the number of Tx FIFOs. More... | |
unsigned int | getNbSinkFifos () const |
Get the number of Rx FIFOs. More... | |
SampleSourceFifo * | getSampleSourceFifo (unsigned int index) |
Get Tx FIFO at index. More... | |
SampleSinkFifo * | getSampleSinkFifo (unsigned int index) |
Get Rx FIFO at index. More... | |
unsigned int | getNbSourceStreams () const |
Commodity function same as getNbSinkFifos (Rx or source streams) More... | |
unsigned int | getNbSinkStreams () const |
Commodity function same as getNbSourceFifos (Tx or sink streams) More... | |
Private Slots | |
void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
bool | applySettings (const TestMISettings &settings, bool force) |
void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const TestMISettings &settings) |
void | webapiReverseSendSettings (const DeviceSettingsKeys &deviceSettingsKeys, const TestMISettings &settings, bool force) |
void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
std::vector< FileRecord * > | m_fileSinks |
File sinks to record device I/Q output. More... | |
QMutex | m_mutex |
TestMISettings | m_settings |
std::vector< TestMIThread * > | m_testSourceThreads |
QString | m_deviceDescription |
bool | m_running |
const QTimer & | m_masterTimer |
QNetworkAccessManager * | m_networkManager |
QNetworkRequest | m_networkRequest |
Additional Inherited Members | |
Public Types inherited from DeviceSampleMIMO | |
enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
Protected Slots inherited from DeviceSampleMIMO | |
void | handleInputMessages () |
Protected Attributes inherited from DeviceSampleMIMO | |
std::vector< SampleSourceFifo > | m_sampleSourceFifos |
Tx FIFOs. More... | |
std::vector< SampleSinkFifo > | m_sampleSinkFifos |
Rx FIFOs. More... | |
MessageQueue | m_inputMessageQueue |
Input queue to the sink. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
TestMI::TestMI | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 45 of file testmi.cpp.
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
virtual |
Definition at line 61 of file testmi.cpp.
References m_deviceAPI, m_fileSinks, m_networkManager, m_running, networkManagerFinished(), DeviceAPI::removeAncillarySink(), DeviceAPI::removeLastSourceStream(), and stop().
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
private |
Definition at line 277 of file testmi.cpp.
References TestMIStreamSettings::AutoCorrDC, TestMIStreamSettings::AutoCorrDCAndIQ, TestMIStreamSettings::AutoCorrNone, DeviceSampleSource::calculateDeviceCenterFrequency(), DeviceSampleSource::calculateFrequencyShift(), DeviceAPI::configureCorrections(), DeviceSampleSource::FSHIFT_STD, DeviceAPI::getDeviceEngineInputMessageQueue(), m_deviceAPI, TestMISettings::m_fileRecordName, m_fileSinks, TestMISettings::m_reverseAPIAddress, TestMISettings::m_reverseAPIDeviceIndex, TestMISettings::m_reverseAPIPort, m_settings, TestMISettings::m_streams, TestMI::DeviceSettingsKeys::m_streamsSettingsKeys, m_testSourceThreads, TestMISettings::m_useReverseAPI, TestMIStreamSettings::ModulationPattern0, TestMIStreamSettings::ModulationPattern1, TestMIStreamSettings::ModulationPattern2, MessageQueue::push(), and webapiReverseSendSettings().
Referenced by handleMessage(), init(), and start().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 145 of file testmi.cpp.
References TestMI::MsgConfigureTestSource::create(), TestMISettings::deserialize(), DeviceSampleMIMO::m_guiMessageQueue, DeviceSampleMIMO::m_inputMessageQueue, m_settings, MessageQueue::push(), and TestMISettings::resetToDefaults().
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 83 of file testmi.cpp.
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 167 of file testmi.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
|
inlinevirtual |
Center frequency exposed by the sink at index.
Implements DeviceSampleMIMO.
|
inlinevirtual |
Sample rate exposed by the sink at index.
Implements DeviceSampleMIMO.
|
virtual |
Center frequency exposed by the source at index.
Implements DeviceSampleMIMO.
Definition at line 181 of file testmi.cpp.
References m_settings, and TestMISettings::m_streams.
Referenced by setSourceSampleRate().
|
virtual |
Sample rate exposed by the source at index.
Implements DeviceSampleMIMO.
Definition at line 172 of file testmi.cpp.
References m_settings, and TestMISettings::m_streams.
Referenced by setMessageQueueToGUI().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 209 of file testmi.cpp.
References applySettings(), DeviceAPI::getDeviceUID(), TestMI::MsgConfigureTestSource::getForce(), TestMI::MsgConfigureTestSource::getSettings(), TestMI::MsgFileRecord::getStartStop(), TestMI::MsgStartStop::getStartStop(), TestMI::MsgFileRecord::getStreamIndex(), DeviceAPI::initDeviceEngine(), m_deviceAPI, TestMISettings::m_fileRecordName, m_fileSinks, m_settings, TestMISettings::m_useReverseAPI, Message::match(), DeviceAPI::startDeviceEngine(), DeviceAPI::stopDeviceEngine(), and webapiReverseSendStartStop().
Referenced by setSinkCenterFrequency().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleMIMO.
Definition at line 88 of file testmi.cpp.
References DeviceAPI::addAncillarySink(), applySettings(), arg(), DeviceAPI::getDeviceUID(), m_deviceAPI, m_fileSinks, and m_settings.
Referenced by TestMI::MsgStartStop::MsgStartStop().
bool TestMI::isRecording | ( | unsigned int | istream | ) | const |
Definition at line 862 of file testmi.cpp.
References m_fileSinks.
Referenced by setSinkCenterFrequency().
|
privateslot |
Definition at line 844 of file testmi.cpp.
Referenced by ~TestMI().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 140 of file testmi.cpp.
References m_settings, and TestMISettings::serialize().
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
inlinevirtual |
Implements DeviceSampleMIMO.
Definition at line 113 of file testmi.h.
References getDeviceDescription(), getSourceSampleRate(), and DeviceSampleMIMO::m_guiMessageQueue.
|
inlinevirtual |
Implements DeviceSampleMIMO.
Definition at line 124 of file testmi.h.
References handleMessage(), isRecording(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
inlinevirtual |
For when the sink sample rate is set externally.
Implements DeviceSampleMIMO.
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 190 of file testmi.cpp.
References TestMI::MsgConfigureTestSource::create(), DeviceSampleMIMO::m_guiMessageQueue, DeviceSampleMIMO::m_inputMessageQueue, m_settings, TestMISettings::m_streams, and MessageQueue::push().
Referenced by setSourceSampleRate().
|
inlinevirtual |
For when the source sample rate is set externally.
Implements DeviceSampleMIMO.
Definition at line 117 of file testmi.h.
References getSourceCenterFrequency(), and setSourceCenterFrequency().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 98 of file testmi.cpp.
References applySettings(), m_mutex, m_running, DeviceSampleMIMO::m_sampleSinkFifos, m_settings, TestMISettings::m_streams, m_testSourceThreads, and stop().
Referenced by TestMI::MsgStartStop::MsgStartStop().
|
virtual |
Implements DeviceSampleMIMO.
Definition at line 123 of file testmi.cpp.
References m_mutex, m_running, and m_testSourceThreads.
Referenced by TestMI::MsgStartStop::MsgStartStop(), start(), and ~TestMI().
|
private |
Definition at line 672 of file testmi.cpp.
References SWGSDRangel::SWGTestMISettings::getFileRecordName(), SWGSDRangel::SWGTestMISettings::getReverseApiAddress(), SWGSDRangel::SWGTestMISettings::getStreams(), SWGSDRangel::SWGDeviceSettings::getTestMiSettings(), TestMISettings::m_fileRecordName, TestMISettings::m_reverseAPIAddress, TestMISettings::m_reverseAPIDeviceIndex, TestMISettings::m_reverseAPIPort, TestMISettings::m_streams, TestMISettings::m_useReverseAPI, SWGSDRangel::SWGTestMISettings::setFileRecordName(), SWGSDRangel::SWGTestMISettings::setReverseApiAddress(), SWGSDRangel::SWGTestMISettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGTestMISettings::setReverseApiPort(), and SWGSDRangel::SWGTestMISettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 719 of file testmi.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGTestMISettings::getStreams(), SWGSDRangel::SWGDeviceSettings::getTestMiSettings(), TestMI::DeviceSettingsKeys::m_commonSettingsKeys, m_deviceAPI, TestMISettings::m_fileRecordName, m_networkManager, m_networkRequest, TestMISettings::m_reverseAPIAddress, TestMISettings::m_reverseAPIDeviceIndex, TestMISettings::m_reverseAPIPort, TestMISettings::m_streams, TestMI::DeviceSettingsKeys::m_streamsSettingsKeys, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGTestMISettings::setFileRecordName(), SWGSDRangel::SWGDeviceSettings::setOriginatorIndex(), and SWGSDRangel::SWGDeviceSettings::setTestMiSettings().
Referenced by applySettings().
|
private |
Definition at line 816 of file testmi.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, TestMISettings::m_reverseAPIAddress, TestMISettings::m_reverseAPIDeviceIndex, TestMISettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
|
virtual |
Reimplemented from DeviceSampleMIMO.
Definition at line 535 of file testmi.cpp.
References TestMI::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleMIMO::m_guiMessageQueue, DeviceSampleMIMO::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSinkCenterFrequency().
|
virtual |
Reimplemented from DeviceSampleMIMO.
Definition at line 526 of file testmi.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSinkCenterFrequency().
|
virtual |
Reimplemented from DeviceSampleMIMO.
Definition at line 554 of file testmi.cpp.
References SWGSDRangel::SWGDeviceSettings::getTestMiSettings(), SWGSDRangel::SWGTestMISettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setTestMiSettings(), and webapiFormatDeviceSettings().
Referenced by setSinkCenterFrequency().
|
virtual |
Reimplemented from DeviceSampleMIMO.
Definition at line 565 of file testmi.cpp.
References arg(), TestMIStreamSettings::AutoCorrLast, TestMI::MsgConfigureTestSource::create(), SWGSDRangel::SWGTestMISettings::getFileRecordName(), SWGSDRangel::SWGTestMISettings::getReverseApiAddress(), SWGSDRangel::SWGTestMISettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGTestMISettings::getReverseApiPort(), SWGSDRangel::SWGTestMISettings::getStreams(), SWGSDRangel::SWGDeviceSettings::getTestMiSettings(), SWGSDRangel::SWGTestMISettings::getUseReverseApi(), TestMISettings::m_fileRecordName, DeviceSampleMIMO::m_guiMessageQueue, DeviceSampleMIMO::m_inputMessageQueue, TestMISettings::m_reverseAPIAddress, TestMISettings::m_reverseAPIDeviceIndex, TestMISettings::m_reverseAPIPort, m_settings, TestMISettings::m_streams, TestMISettings::m_useReverseAPI, TestMIStreamSettings::ModulationLast, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by setSinkCenterFrequency().
|
private |
Definition at line 156 of file testmi.h.
Referenced by applySettings(), handleMessage(), init(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), webapiRunGet(), and ~TestMI().
|
private |
Definition at line 161 of file testmi.h.
Referenced by getDeviceDescription().
|
private |
File sinks to record device I/Q output.
Definition at line 157 of file testmi.h.
Referenced by applySettings(), handleMessage(), init(), isRecording(), and ~TestMI().
|
private |
|
private |
Definition at line 164 of file testmi.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~TestMI().
|
private |
Definition at line 165 of file testmi.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
|
private |
Definition at line 159 of file testmi.h.
Referenced by applySettings(), deserialize(), getSourceCenterFrequency(), getSourceSampleRate(), handleMessage(), init(), serialize(), setSourceCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 160 of file testmi.h.
Referenced by applySettings(), start(), and stop().