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 <preset.h>
Classes | |
struct | ChannelConfig |
struct | DeviceConfig |
Public Types | |
typedef QList< ChannelConfig > | ChannelConfigs |
typedef QList< DeviceConfig > | DeviceeConfigs |
Public Member Functions | |
Preset () | |
void | resetToDefaults () |
void | setSourcePreset (bool isSourcePreset) |
bool | isSourcePreset () const |
QByteArray | serialize () const |
bool | deserialize (const QByteArray &data) |
void | setGroup (const QString &group) |
const QString & | getGroup () const |
void | setDescription (const QString &description) |
const QString & | getDescription () const |
void | setCenterFrequency (const quint64 centerFrequency) |
quint64 | getCenterFrequency () const |
void | setSpectrumConfig (const QByteArray &data) |
const QByteArray & | getSpectrumConfig () const |
void | setLayout (const QByteArray &data) |
const QByteArray & | getLayout () const |
void | clearChannels () |
void | addChannel (const QString &channel, const QByteArray &config) |
int | getChannelCount () const |
const ChannelConfig & | getChannelConfig (int index) const |
void | setDeviceConfig (const QString &deviceId, const QString &deviceSerial, int deviceSequence, const QByteArray &config) |
void | addOrUpdateDeviceConfig (const QString &deviceId, const QString &deviceSerial, int deviceSequence, const QByteArray &config) |
const QByteArray * | findBestDeviceConfig (const QString &deviceId, const QString &deviceSerial, int deviceSequence) const |
Static Public Member Functions | |
static bool | presetCompare (const Preset *p1, Preset *p2) |
Protected Attributes | |
bool | m_sourcePreset |
QString | m_group |
QString | m_description |
quint64 | m_centerFrequency |
QByteArray | m_spectrumConfig |
bool | m_dcOffsetCorrection |
bool | m_iqImbalanceCorrection |
ChannelConfigs | m_channelConfigs |
DeviceeConfigs | m_deviceConfigs |
QByteArray | m_layout |
Private Member Functions | |
const QByteArray * | findBestDeviceConfigSoapy (const QString &sourceId, const QString &deviceSerial) const |
Friends | |
class | WebAPIAdapterBase |
typedef QList<ChannelConfig> Preset::ChannelConfigs |
typedef QList<DeviceConfig> Preset::DeviceeConfigs |
Preset::Preset | ( | ) |
Definition at line 25 of file preset.cpp.
References resetToDefaults().
|
inline |
Definition at line 85 of file preset.h.
Referenced by DeviceSet::saveRxChannelSettings(), DeviceUISet::saveRxChannelSettings(), DeviceSet::saveTxChannelSettings(), and DeviceUISet::saveTxChannelSettings().
void Preset::addOrUpdateDeviceConfig | ( | const QString & | deviceId, |
const QString & | deviceSerial, | ||
int | deviceSequence, | ||
const QByteArray & | config | ||
) |
Definition at line 177 of file preset.cpp.
References m_deviceConfigs.
Referenced by DeviceAPI::saveSamplingDeviceSettings().
|
inline |
Definition at line 84 of file preset.h.
Referenced by MainCore::savePresetSettings(), and MainWindow::savePresetSettings().
bool Preset::deserialize | ( | const QByteArray & | data | ) |
Definition at line 94 of file preset.cpp.
References SimpleDeserializer::getVersion(), i, SimpleDeserializer::isValid(), m_centerFrequency, m_channelConfigs, m_description, m_deviceConfigs, m_group, m_layout, m_sourcePreset, m_spectrumConfig, SimpleDeserializer::readBlob(), SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU64(), and resetToDefaults().
Referenced by WebAPIAdapterSrv::instancePresetFilePut(), MainSettings::load(), and MainWindow::on_presetImport_clicked().
const QByteArray * Preset::findBestDeviceConfig | ( | const QString & | deviceId, |
const QString & | deviceSerial, | ||
int | deviceSequence | ||
) | const |
Definition at line 215 of file preset.cpp.
References findBestDeviceConfigSoapy(), and m_deviceConfigs.
Referenced by DeviceAPI::loadSamplingDeviceSettings().
|
private |
Definition at line 288 of file preset.cpp.
References m_deviceConfigs.
Referenced by findBestDeviceConfig().
|
inline |
Definition at line 76 of file preset.h.
Referenced by MainWindow::addPresetToTree(), MainWindow::handleMessage(), WebAPIAdapterGUI::instancePresetDelete(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterGUI::instancePresetsGet(), WebAPIAdapterSrv::instancePresetsGet(), and DeviceAPI::loadSamplingDeviceSettings().
|
inline |
Definition at line 87 of file preset.h.
Referenced by DeviceSet::loadRxChannelSettings(), DeviceUISet::loadRxChannelSettings(), DeviceSet::loadTxChannelSettings(), and DeviceUISet::loadTxChannelSettings().
|
inline |
Definition at line 86 of file preset.h.
Referenced by DeviceSet::loadRxChannelSettings(), DeviceUISet::loadRxChannelSettings(), DeviceSet::loadTxChannelSettings(), and DeviceUISet::loadTxChannelSettings().
|
inline |
Definition at line 74 of file preset.h.
Referenced by MainWindow::addPresetToTree(), MainWindow::handleMessage(), WebAPIAdapterGUI::instancePresetDelete(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterGUI::instancePresetsGet(), WebAPIAdapterSrv::instancePresetsGet(), MainCore::loadPresetSettings(), MainWindow::loadPresetSettings(), DeviceSet::loadRxChannelSettings(), DeviceUISet::loadRxChannelSettings(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::loadTxChannelSettings(), DeviceUISet::loadTxChannelSettings(), MainWindow::on_presetDelete_clicked(), MainWindow::on_presetEdit_clicked(), MainCore::savePresetSettings(), and MainWindow::savePresetSettings().
|
inline |
Definition at line 72 of file preset.h.
Referenced by MainWindow::addPresetToTree(), MainWindow::handleMessage(), WebAPIAdapterGUI::instancePresetDelete(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterGUI::instancePresetsGet(), WebAPIAdapterSrv::instancePresetsGet(), MainCore::loadPresetSettings(), MainWindow::loadPresetSettings(), DeviceSet::loadRxChannelSettings(), DeviceUISet::loadRxChannelSettings(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::loadTxChannelSettings(), DeviceUISet::loadTxChannelSettings(), MainWindow::on_presetEdit_clicked(), MainCore::savePresetSettings(), and MainWindow::savePresetSettings().
|
inline |
Definition at line 82 of file preset.h.
Referenced by MainWindow::loadPresetSettings().
|
inline |
Definition at line 79 of file preset.h.
Referenced by MainWindow::loadPresetSettings().
|
inline |
Definition at line 66 of file preset.h.
Referenced by MainWindow::addPresetToTree(), MainWindow::handleMessage(), WebAPIAdapterGUI::instancePresetDelete(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterGUI::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterGUI::instancePresetPost(), WebAPIAdapterGUI::instancePresetPut(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterGUI::instancePresetsGet(), WebAPIAdapterSrv::instancePresetsGet(), DeviceSet::loadRxChannelSettings(), DeviceUISet::loadRxChannelSettings(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::loadTxChannelSettings(), DeviceUISet::loadTxChannelSettings(), DeviceSet::saveRxChannelSettings(), DeviceUISet::saveRxChannelSettings(), DeviceAPI::saveSamplingDeviceSettings(), DeviceSet::saveTxChannelSettings(), and DeviceUISet::saveTxChannelSettings().
Definition at line 103 of file preset.h.
References m_centerFrequency, m_description, and m_group.
Referenced by MainSettings::sortPresets().
void Preset::resetToDefaults | ( | ) |
Definition at line 30 of file preset.cpp.
References m_centerFrequency, m_channelConfigs, m_dcOffsetCorrection, m_description, m_group, m_iqImbalanceCorrection, m_layout, m_sourcePreset, and m_spectrumConfig.
Referenced by deserialize(), Preset(), and MainSettings::resetToDefaults().
QByteArray Preset::serialize | ( | ) | const |
Definition at line 43 of file preset.cpp.
References SimpleSerializer::final(), i, m_centerFrequency, m_channelConfigs, m_description, m_deviceConfigs, m_group, m_layout, m_sourcePreset, m_spectrumConfig, SimpleSerializer::writeBlob(), SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU64().
Referenced by WebAPIAdapterSrv::instancePresetFilePost(), MainWindow::on_presetExport_clicked(), and MainSettings::save().
|
inline |
Definition at line 75 of file preset.h.
Referenced by DeviceAPI::saveSamplingDeviceSettings().
|
inline |
Definition at line 73 of file preset.h.
Referenced by WebAPIAdapterSrv::instancePresetFilePut(), MainSettings::newPreset(), and MainWindow::on_presetEdit_clicked().
|
inline |
Definition at line 89 of file preset.h.
|
inline |
Definition at line 71 of file preset.h.
Referenced by WebAPIAdapterSrv::instancePresetFilePut(), MainSettings::newPreset(), MainWindow::on_presetEdit_clicked(), MainWindow::on_presetImport_clicked(), and MainSettings::renamePresetGroup().
|
inline |
Definition at line 81 of file preset.h.
Referenced by MainWindow::savePresetSettings().
|
inline |
Definition at line 65 of file preset.h.
Referenced by MainCore::savePresetSettings(), and MainWindow::savePresetSettings().
|
inline |
Definition at line 78 of file preset.h.
Referenced by MainWindow::savePresetSettings().
|
friend |
|
protected |
Definition at line 127 of file preset.h.
Referenced by deserialize(), presetCompare(), resetToDefaults(), serialize(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 137 of file preset.h.
Referenced by deserialize(), resetToDefaults(), and serialize().
|
protected |
Definition at line 133 of file preset.h.
Referenced by resetToDefaults(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 126 of file preset.h.
Referenced by deserialize(), presetCompare(), resetToDefaults(), serialize(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 140 of file preset.h.
Referenced by addOrUpdateDeviceConfig(), deserialize(), findBestDeviceConfig(), findBestDeviceConfigSoapy(), and serialize().
|
protected |
Definition at line 125 of file preset.h.
Referenced by deserialize(), presetCompare(), resetToDefaults(), serialize(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 134 of file preset.h.
Referenced by resetToDefaults(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 143 of file preset.h.
Referenced by deserialize(), resetToDefaults(), and serialize().
|
protected |
Definition at line 122 of file preset.h.
Referenced by deserialize(), resetToDefaults(), serialize(), and WebAPIAdapterBase::webapiFormatPreset().
|
protected |
Definition at line 130 of file preset.h.
Referenced by deserialize(), resetToDefaults(), and serialize().