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 <simpleserializer.h>
Classes | |
struct | Element |
Public Member Functions | |
SimpleDeserializer (const QByteArray &data) | |
bool | readS32 (quint32 id, qint32 *result, qint32 def=0) const |
bool | readU32 (quint32 id, quint32 *result, quint32 def=0) const |
bool | readS64 (quint32 id, qint64 *result, qint64 def=0) const |
bool | readU64 (quint32 id, quint64 *result, quint64 def=0) const |
bool | readFloat (quint32 id, float *result, float def=0) const |
bool | readDouble (quint32 id, double *result, double def=0) const |
bool | readReal (quint32 id, Real *result, Real def=0) const |
bool | readBool (quint32 id, bool *result, bool def=false) const |
bool | readString (quint32 id, QString *result, const QString &def=QString::null) const |
bool | readBlob (quint32 id, QByteArray *result, const QByteArray &def=QByteArray()) const |
bool | isValid () const |
quint32 | getVersion () const |
void | dump () const |
Private Types | |
enum | Type { TSigned32 = 0, TUnsigned32 = 1, TSigned64 = 2, TUnsigned64 = 3, TFloat = 4, TDouble = 5, TBool = 6, TString = 7, TBlob = 8, TVersion = 9 } |
typedef QMap< quint32, Element > | Elements |
Private Member Functions | |
bool | parseAll () |
bool | readTag (uint *readOfs, uint readEnd, Type *type, quint32 *id, quint32 *length) const |
quint8 | readByte (uint *readOfs) const |
Private Attributes | |
QByteArray | m_data |
bool | m_valid |
Elements | m_elements |
quint32 | m_version |
Definition at line 51 of file simpleserializer.h.
|
private |
Definition at line 95 of file simpleserializer.h.
|
private |
Enumerator | |
---|---|
TSigned32 | |
TUnsigned32 | |
TSigned64 | |
TUnsigned64 | |
TFloat | |
TDouble | |
TBool | |
TString | |
TBlob | |
TVersion |
Definition at line 71 of file simpleserializer.h.
SimpleDeserializer::SimpleDeserializer | ( | const QByteArray & | data | ) |
Definition at line 297 of file simpleserializer.cpp.
References i, m_elements, m_valid, m_version, parseAll(), readByte(), and TVersion.
void SimpleDeserializer::dump | ( | ) | const |
Definition at line 587 of file simpleserializer.cpp.
References m_elements, m_valid, m_version, PRINTF_FORMAT_S32, PRINTF_FORMAT_U32, readBlob(), readBool(), readDouble(), readFloat(), readS32(), readS64(), readString(), readU32(), readU64(), TBlob, TBool, TDouble, TFloat, TSigned32, TSigned64, TString, TUnsigned32, TUnsigned64, and TVersion.
|
inline |
Definition at line 67 of file simpleserializer.h.
Referenced by Preferences::deserialize(), LoRaDemodSettings::deserialize(), FileSinkSettings::deserialize(), LocalOutputSettings::deserialize(), GLSpectrumGUI::deserialize(), LocalInputSettings::deserialize(), RemoteInputSettings::deserialize(), Command::deserialize(), FileInputSettings::deserialize(), KiwiSDRSettings::deserialize(), BladeRF2OutputSettings::deserialize(), RemoteOutputSettings::deserialize(), BladeRF1OutputSettings::deserialize(), RemoteSourceSettings::deserialize(), LocalSourceSettings::deserialize(), LocalSinkSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), SoapySDROutputSettings::deserialize(), HackRFInputSettings::deserialize(), DeviceUserArgs::deserialize(), BladeRF2InputSettings::deserialize(), WFMDemodSettings::deserialize(), ATVDemodGUI::deserialize(), AirspySettings::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), RemoteSinkSettings::deserialize(), CWKeyerSettings::deserialize(), BFMDemodSettings::deserialize(), XTRXOutputSettings::deserialize(), AMDemodSettings::deserialize(), SDRPlaySettings::deserialize(), PlutoSDROutputSettings::deserialize(), GLScopeGUI::deserialize(), NFMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), SoapySDRInputSettings::deserialize(), DSDDemodSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), Preset::deserialize(), LimeSDROutputSettings::deserialize(), NFMModSettings::deserialize(), TestSourceSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), TestMISettings::deserialize(), LimeSDRInputSettings::deserialize(), UDPSinkSettings::deserialize(), ChannelMarker::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), ATVDemodSettings::deserialize(), DATVDemodSettings::deserialize(), DoubleBufferSimple< Sample >::deserialize(), AudioDeviceManager::deserialize(), ScopeVis::TraceBackBuffer::deserialize(), ScopeVis::TraceBackDiscreteMemory::deserialize(), ScopeVis::deserializeMemory(), and SampleSourceSerializer::readSerializedData().
|
inline |
Definition at line 66 of file simpleserializer.h.
Referenced by Preferences::deserialize(), LoRaDemodSettings::deserialize(), FileSinkSettings::deserialize(), LocalOutputSettings::deserialize(), GLSpectrumGUI::deserialize(), LocalInputSettings::deserialize(), RemoteInputSettings::deserialize(), Command::deserialize(), FileInputSettings::deserialize(), KiwiSDRSettings::deserialize(), BladeRF2OutputSettings::deserialize(), RemoteOutputSettings::deserialize(), BladeRF1OutputSettings::deserialize(), RemoteSourceSettings::deserialize(), LocalSourceSettings::deserialize(), LocalSinkSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), SoapySDROutputSettings::deserialize(), HackRFInputSettings::deserialize(), DeviceUserArgs::deserialize(), BladeRF2InputSettings::deserialize(), WFMDemodSettings::deserialize(), ATVDemodGUI::deserialize(), AirspySettings::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), RemoteSinkSettings::deserialize(), CWKeyerSettings::deserialize(), BFMDemodSettings::deserialize(), XTRXOutputSettings::deserialize(), AMDemodSettings::deserialize(), SDRPlaySettings::deserialize(), PlutoSDROutputSettings::deserialize(), GLScopeGUI::deserialize(), NFMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), SoapySDRInputSettings::deserialize(), DSDDemodSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), Preset::deserialize(), LimeSDROutputSettings::deserialize(), NFMModSettings::deserialize(), TestSourceSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), TestMISettings::deserialize(), LimeSDRInputSettings::deserialize(), UDPSinkSettings::deserialize(), ChannelMarker::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), ATVDemodSettings::deserialize(), DATVDemodSettings::deserialize(), DoubleBufferSimple< Sample >::deserialize(), AudioDeviceManager::deserialize(), ScopeVis::TraceBackBuffer::deserialize(), ScopeVis::TraceBackDiscreteMemory::deserialize(), ScopeVis::deserializeMemory(), and SampleSourceSerializer::readSerializedData().
|
private |
Definition at line 664 of file simpleserializer.cpp.
References m_data, m_elements, and readTag().
Referenced by SimpleDeserializer().
bool SimpleDeserializer::readBlob | ( | quint32 | id, |
QByteArray * | result, | ||
const QByteArray & | def = QByteArray() |
||
) | const |
Definition at line 571 of file simpleserializer.cpp.
References m_data, m_elements, and TBlob.
Referenced by LoRaDemodSettings::deserialize(), SoapySDROutputSettings::deserialize(), DeviceUserArgs::deserialize(), WFMDemodSettings::deserialize(), BFMDemodSettings::deserialize(), AMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), NFMDemodSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), DSDDemodSettings::deserialize(), SoapySDRInputSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), Preset::deserialize(), NFMModSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), UDPSinkSettings::deserialize(), ATVModSettings::deserialize(), DATVDemodSettings::deserialize(), DoubleBufferSimple< Sample >::deserialize(), AudioDeviceManager::deserialize(), ScopeVis::TraceBackBuffer::deserialize(), ScopeVis::TraceBackDiscreteMemory::deserialize(), ScopeVis::deserializeMemory(), and dump().
bool SimpleDeserializer::readBool | ( | quint32 | id, |
bool * | result, | ||
bool | def = false |
||
) | const |
Definition at line 531 of file simpleserializer.cpp.
References m_elements, readByte(), and TBool.
Referenced by Preferences::deserialize(), LocalInputSettings::deserialize(), GLSpectrumGUI::deserialize(), RemoteInputSettings::deserialize(), Command::deserialize(), BladeRF2OutputSettings::deserialize(), FileInputSettings::deserialize(), KiwiSDRSettings::deserialize(), RemoteOutputSettings::deserialize(), RemoteSourceSettings::deserialize(), BladeRF1OutputSettings::deserialize(), LocalSourceSettings::deserialize(), LocalSinkSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), SoapySDROutputSettings::deserialize(), HackRFInputSettings::deserialize(), BladeRF2InputSettings::deserialize(), WFMDemodSettings::deserialize(), ATVDemodGUI::deserialize(), AirspySettings::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), CWKeyerSettings::deserialize(), RemoteSinkSettings::deserialize(), XTRXOutputSettings::deserialize(), BFMDemodSettings::deserialize(), AMDemodSettings::deserialize(), SDRPlaySettings::deserialize(), NFMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), GLScopeGUI::deserialize(), PlutoSDROutputSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), DSDDemodSettings::deserialize(), SoapySDRInputSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), Preset::deserialize(), TestSourceSettings::deserialize(), LimeSDROutputSettings::deserialize(), NFMModSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), LimeSDRInputSettings::deserialize(), TestMISettings::deserialize(), UDPSinkSettings::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), ATVDemodSettings::deserialize(), DATVDemodSettings::deserialize(), and dump().
|
inlineprivate |
Definition at line 104 of file simpleserializer.h.
Referenced by readBool(), readDouble(), readFloat(), readReal(), readS32(), readS64(), readTag(), readU32(), readU64(), and SimpleDeserializer().
bool SimpleDeserializer::readDouble | ( | quint32 | id, |
double * | result, | ||
double | def = 0 |
||
) | const |
Definition at line 450 of file simpleserializer.cpp.
References doubleasint::d, i, m_elements, readByte(), TDouble, and doubleasint::u.
Referenced by SoapySDROutputSettings::deserialize(), XTRXOutputSettings::deserialize(), SoapySDRInputSettings::deserialize(), XTRXInputSettings::deserialize(), and dump().
bool SimpleDeserializer::readFloat | ( | quint32 | id, |
float * | result, | ||
float | def = 0 |
||
) | const |
Definition at line 426 of file simpleserializer.cpp.
References floatasint::f, i, m_elements, readByte(), TFloat, and floatasint::u.
Referenced by Preferences::deserialize(), RemoteOutputSettings::deserialize(), XTRXOutputSettings::deserialize(), GLScopeGUI::deserialize(), FreqTrackerSettings::deserialize(), XTRXInputSettings::deserialize(), TestSourceSettings::deserialize(), LimeSDROutputSettings::deserialize(), LimeSDRInputSettings::deserialize(), TestMISettings::deserialize(), DATVDemodSettings::deserialize(), and dump().
Definition at line 484 of file simpleserializer.cpp.
References i, m_elements, real4asint::r, real8asint::r, readByte(), TDouble, TFloat, real4asint::u, and real8asint::u.
Referenced by GLSpectrumGUI::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), NFMModSettings::deserialize(), UDPSourceSettings::deserialize(), SSBModSettings::deserialize(), UDPSinkSettings::deserialize(), and ATVModSettings::deserialize().
bool SimpleDeserializer::readS32 | ( | quint32 | id, |
qint32 * | result, | ||
qint32 | def = 0 |
||
) | const |
Definition at line 322 of file simpleserializer.cpp.
References i, m_elements, readByte(), and TSigned32.
Referenced by Preferences::deserialize(), LoRaDemodSettings::deserialize(), GLSpectrumGUI::deserialize(), Command::deserialize(), BladeRF2OutputSettings::deserialize(), BladeRF1OutputSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), HackRFInputSettings::deserialize(), SoapySDROutputSettings::deserialize(), BladeRF2InputSettings::deserialize(), WFMDemodSettings::deserialize(), ATVDemodGUI::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), CWKeyerSettings::deserialize(), AirspySettings::deserialize(), BFMDemodSettings::deserialize(), XTRXOutputSettings::deserialize(), SDRPlaySettings::deserialize(), AMDemodSettings::deserialize(), NFMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), GLScopeGUI::deserialize(), PlutoSDROutputSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), SoapySDRInputSettings::deserialize(), DSDDemodSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), Preset::deserialize(), TestSourceSettings::deserialize(), NFMModSettings::deserialize(), LimeSDROutputSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), TestMISettings::deserialize(), LimeSDRInputSettings::deserialize(), UDPSinkSettings::deserialize(), ChannelMarker::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), ATVDemodSettings::deserialize(), DATVDemodSettings::deserialize(), DoubleBufferSimple< Sample >::deserialize(), ScopeVis::deserializeMemory(), dump(), and SampleSourceSerializer::readSerializedData().
bool SimpleDeserializer::readS64 | ( | quint32 | id, |
qint64 * | result, | ||
qint64 | def = 0 |
||
) | const |
Definition at line 374 of file simpleserializer.cpp.
References i, m_elements, readByte(), and TSigned64.
Referenced by BladeRF2OutputSettings::deserialize(), AirspyHFSettings::deserialize(), SoapySDROutputSettings::deserialize(), BladeRF2InputSettings::deserialize(), FCDProPlusSettings::deserialize(), AirspySettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), PlutoSDROutputSettings::deserialize(), FCDProSettings::deserialize(), SoapySDRInputSettings::deserialize(), LimeSDROutputSettings::deserialize(), LimeSDRInputSettings::deserialize(), PlutoSDRInputSettings::deserialize(), and dump().
bool SimpleDeserializer::readString | ( | quint32 | id, |
QString * | result, | ||
const QString & | def = QString::null |
||
) | const |
Definition at line 555 of file simpleserializer.cpp.
References m_data, m_elements, and TString.
Referenced by Preferences::deserialize(), LoRaDemodSettings::deserialize(), LocalOutputSettings::deserialize(), LocalInputSettings::deserialize(), RemoteInputSettings::deserialize(), Command::deserialize(), FileInputSettings::deserialize(), KiwiSDRSettings::deserialize(), BladeRF2OutputSettings::deserialize(), RemoteOutputSettings::deserialize(), RemoteSourceSettings::deserialize(), BladeRF1OutputSettings::deserialize(), LocalSourceSettings::deserialize(), LocalSinkSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), SoapySDROutputSettings::deserialize(), HackRFInputSettings::deserialize(), WFMDemodSettings::deserialize(), BladeRF2InputSettings::deserialize(), AirspySettings::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), RemoteSinkSettings::deserialize(), CWKeyerSettings::deserialize(), XTRXOutputSettings::deserialize(), BFMDemodSettings::deserialize(), SDRPlaySettings::deserialize(), AMDemodSettings::deserialize(), SSBDemodSettings::deserialize(), NFMDemodSettings::deserialize(), PlutoSDROutputSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), SoapySDRInputSettings::deserialize(), DSDDemodSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), Preset::deserialize(), TestSourceSettings::deserialize(), NFMModSettings::deserialize(), LimeSDROutputSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), LimeSDRInputSettings::deserialize(), TestMISettings::deserialize(), UDPSinkSettings::deserialize(), ChannelMarker::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), DATVDemodSettings::deserialize(), and dump().
|
private |
Definition at line 700 of file simpleserializer.cpp.
References i, and readByte().
Referenced by parseAll().
bool SimpleDeserializer::readU32 | ( | quint32 | id, |
quint32 * | result, | ||
quint32 | def = 0 |
||
) | const |
Definition at line 350 of file simpleserializer.cpp.
References i, m_elements, readByte(), and TUnsigned32.
Referenced by FileSinkSettings::deserialize(), LocalOutputSettings::deserialize(), LocalInputSettings::deserialize(), RemoteInputSettings::deserialize(), FileInputSettings::deserialize(), KiwiSDRSettings::deserialize(), BladeRF2OutputSettings::deserialize(), RemoteOutputSettings::deserialize(), RemoteSourceSettings::deserialize(), BladeRF1OutputSettings::deserialize(), LocalSinkSettings::deserialize(), LocalSourceSettings::deserialize(), FileSourceSettings::deserialize(), AirspyHFSettings::deserialize(), HackRFOutputSettings::deserialize(), SoapySDROutputSettings::deserialize(), HackRFInputSettings::deserialize(), BladeRF2InputSettings::deserialize(), WFMDemodSettings::deserialize(), AirspySettings::deserialize(), BladeRF1InputSettings::deserialize(), FCDProPlusSettings::deserialize(), PerseusSettings::deserialize(), RTLSDRSettings::deserialize(), CWKeyerSettings::deserialize(), RemoteSinkSettings::deserialize(), XTRXOutputSettings::deserialize(), BFMDemodSettings::deserialize(), AMDemodSettings::deserialize(), SDRPlaySettings::deserialize(), SSBDemodSettings::deserialize(), GLScopeGUI::deserialize(), NFMDemodSettings::deserialize(), PlutoSDROutputSettings::deserialize(), ChannelAnalyzerSettings::deserialize(), FreqTrackerSettings::deserialize(), FreeDVDemodSettings::deserialize(), FCDProSettings::deserialize(), DSDDemodSettings::deserialize(), SoapySDRInputSettings::deserialize(), AMModSettings::deserialize(), WFMModSettings::deserialize(), XTRXInputSettings::deserialize(), TestSourceSettings::deserialize(), NFMModSettings::deserialize(), LimeSDROutputSettings::deserialize(), UDPSourceSettings::deserialize(), FreeDVModSettings::deserialize(), SSBModSettings::deserialize(), TestMISettings::deserialize(), LimeSDRInputSettings::deserialize(), UDPSinkSettings::deserialize(), ChannelMarker::deserialize(), PlutoSDRInputSettings::deserialize(), ATVModSettings::deserialize(), DATVDemodSettings::deserialize(), DoubleBufferSimple< Sample >::deserialize(), ScopeVis::TraceBackBuffer::deserialize(), ScopeVis::TraceBackDiscreteMemory::deserialize(), ScopeVis::deserializeMemory(), dump(), and SampleSourceSerializer::readSerializedData().
bool SimpleDeserializer::readU64 | ( | quint32 | id, |
quint64 * | result, | ||
quint64 | def = 0 |
||
) | const |
Definition at line 402 of file simpleserializer.cpp.
References i, m_elements, readByte(), and TUnsigned64.
Referenced by FileSinkSettings::deserialize(), RemoteOutputSettings::deserialize(), HackRFOutputSettings::deserialize(), HackRFInputSettings::deserialize(), PlutoSDROutputSettings::deserialize(), Preset::deserialize(), PlutoSDRInputSettings::deserialize(), dump(), and SampleSourceSerializer::readSerializedData().
|
private |
Definition at line 97 of file simpleserializer.h.
Referenced by parseAll(), readBlob(), and readString().
|
private |
Definition at line 99 of file simpleserializer.h.
Referenced by dump(), parseAll(), readBlob(), readBool(), readDouble(), readFloat(), readReal(), readS32(), readS64(), readString(), readU32(), readU64(), and SimpleDeserializer().
|
private |
Definition at line 98 of file simpleserializer.h.
Referenced by dump(), and SimpleDeserializer().
|
private |
Definition at line 100 of file simpleserializer.h.
Referenced by dump(), and SimpleDeserializer().