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.
Public Member Functions | Public Attributes | List of all members
AirspyHFSettings Struct Reference

#include <airspyhfsettings.h>

Public Member Functions

 AirspyHFSettings ()
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 

Public Attributes

quint64 m_centerFrequency
 
qint32 m_LOppmTenths
 
quint32 m_devSampleRateIndex
 
quint32 m_log2Decim
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
quint32 m_bandIndex
 
QString m_fileRecordName
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 
bool m_useDSP
 
bool m_useAGC
 
bool m_agcHigh
 
bool m_useLNA
 
quint32 m_attenuatorSteps
 
bool m_dcBlock
 
bool m_iqCorrection
 

Detailed Description

Definition at line 23 of file airspyhfsettings.h.

Constructor & Destructor Documentation

◆ AirspyHFSettings()

AirspyHFSettings::AirspyHFSettings ( )

Definition at line 23 of file airspyhfsettings.cpp.

References resetToDefaults().

24 {
26 }
+ Here is the call graph for this function:

Member Function Documentation

◆ deserialize()

bool AirspyHFSettings::deserialize ( const QByteArray &  data)

Definition at line 76 of file airspyhfsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_agcHigh, m_attenuatorSteps, m_bandIndex, m_dcBlock, m_devSampleRateIndex, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useAGC, m_useDSP, m_useLNA, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by AirspyHFGui::deserialize(), and AirspyHFInput::deserialize().

77 {
78  SimpleDeserializer d(data);
79 
80  if (!d.isValid())
81  {
83  return false;
84  }
85 
86  if (d.getVersion() == 1)
87  {
88  int intval;
89  quint32 uintval;
90 
91  d.readU32(1, &m_devSampleRateIndex, 0);
92  d.readS32(2, &m_LOppmTenths, 0);
93  d.readU32(3, &m_log2Decim, 0);
94  d.readS32(4, &intval, 0);
95  d.readBool(7, &m_transverterMode, false);
96  d.readS64(8, &m_transverterDeltaFrequency, 0);
97  d.readU32(9, &uintval, 0);
98  m_bandIndex = uintval > 1 ? 1 : uintval;
99  d.readBool(10, &m_useReverseAPI, false);
100  d.readString(11, &m_reverseAPIAddress, "127.0.0.1");
101  d.readU32(12, &uintval, 0);
102 
103  if ((uintval > 1023) && (uintval < 65535)) {
104  m_reverseAPIPort = uintval;
105  } else {
106  m_reverseAPIPort = 8888;
107  }
108 
109  d.readU32(13, &uintval, 0);
110  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
111  d.readBool(14, &m_useDSP, true);
112  d.readBool(15, &m_useAGC, false);
113  d.readBool(16, &m_agcHigh, false);
114  d.readBool(17, &m_useLNA, false);
115  d.readU32(18, &m_attenuatorSteps, 0);
116  d.readBool(19, &m_dcBlock, false);
117  d.readBool(20, &m_iqCorrection, false);
118 
119  return true;
120  }
121  else
122  {
123  resetToDefaults();
124  return false;
125  }
126 }
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
qint64 m_transverterDeltaFrequency
QString m_reverseAPIAddress
quint32 m_devSampleRateIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void AirspyHFSettings::resetToDefaults ( )

Definition at line 28 of file airspyhfsettings.cpp.

References m_agcHigh, m_attenuatorSteps, m_bandIndex, m_centerFrequency, m_dcBlock, m_devSampleRateIndex, m_fileRecordName, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useAGC, m_useDSP, m_useLNA, and m_useReverseAPI.

Referenced by AirspyHFSettings(), deserialize(), AirspyHFInput::deserialize(), and AirspyHFGui::resetToDefaults().

29 {
30  m_centerFrequency = 7150*1000;
31  m_LOppmTenths = 0;
33  m_log2Decim = 0;
34  m_transverterMode = false;
36  m_bandIndex = 0;
37  m_fileRecordName = "";
38  m_useReverseAPI = false;
39  m_reverseAPIAddress = "127.0.0.1";
40  m_reverseAPIPort = 8888;
42  m_useDSP = true;
43  m_useAGC = false;
44  m_agcHigh = false;
45  m_useLNA = false;
47  m_dcBlock = false;
48  m_iqCorrection = false;
49 }
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
qint64 m_transverterDeltaFrequency
QString m_reverseAPIAddress
quint32 m_devSampleRateIndex
+ Here is the caller graph for this function:

◆ serialize()

QByteArray AirspyHFSettings::serialize ( ) const

Definition at line 51 of file airspyhfsettings.cpp.

References SimpleSerializer::final(), m_agcHigh, m_attenuatorSteps, m_bandIndex, m_dcBlock, m_devSampleRateIndex, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useAGC, m_useDSP, m_useLNA, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by AirspyHFGui::serialize(), and AirspyHFInput::serialize().

52 {
53  SimpleSerializer s(1);
54 
55  s.writeU32(1, m_devSampleRateIndex);
56  s.writeS32(2, m_LOppmTenths);
57  s.writeU32(3, m_log2Decim);
58  s.writeBool(7, m_transverterMode);
59  s.writeS64(8, m_transverterDeltaFrequency);
60  s.writeU32(9, m_bandIndex);
61  s.writeBool(10, m_useReverseAPI);
62  s.writeString(11, m_reverseAPIAddress);
63  s.writeU32(12, m_reverseAPIPort);
64  s.writeU32(13, m_reverseAPIDeviceIndex);
65  s.writeBool(14, m_useDSP);
66  s.writeBool(15, m_useAGC);
67  s.writeBool(16, m_agcHigh);
68  s.writeBool(17, m_useLNA);
69  s.writeU32(18, m_attenuatorSteps);
70  s.writeBool(19, m_dcBlock);
71  s.writeBool(20, m_iqCorrection);
72 
73  return s.final();
74 }
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
qint64 m_transverterDeltaFrequency
QString m_reverseAPIAddress
quint32 m_devSampleRateIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_agcHigh

bool AirspyHFSettings::m_agcHigh

◆ m_attenuatorSteps

quint32 AirspyHFSettings::m_attenuatorSteps

◆ m_bandIndex

quint32 AirspyHFSettings::m_bandIndex

◆ m_centerFrequency

quint64 AirspyHFSettings::m_centerFrequency

◆ m_dcBlock

bool AirspyHFSettings::m_dcBlock

◆ m_devSampleRateIndex

quint32 AirspyHFSettings::m_devSampleRateIndex

◆ m_fileRecordName

QString AirspyHFSettings::m_fileRecordName

◆ m_iqCorrection

bool AirspyHFSettings::m_iqCorrection

◆ m_log2Decim

quint32 AirspyHFSettings::m_log2Decim

◆ m_LOppmTenths

qint32 AirspyHFSettings::m_LOppmTenths

◆ m_reverseAPIAddress

QString AirspyHFSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t AirspyHFSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t AirspyHFSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 AirspyHFSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool AirspyHFSettings::m_transverterMode

◆ m_useAGC

bool AirspyHFSettings::m_useAGC

◆ m_useDSP

bool AirspyHFSettings::m_useDSP

◆ m_useLNA

bool AirspyHFSettings::m_useLNA

◆ m_useReverseAPI

bool AirspyHFSettings::m_useReverseAPI

The documentation for this struct was generated from the following files: