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

#include <airspysettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
qint32 m_LOppmTenths
 
quint32 m_devSampleRateIndex
 
quint32 m_lnaGain
 
quint32 m_mixerGain
 
quint32 m_vgaGain
 
bool m_lnaAGC
 
bool m_mixerAGC
 
quint32 m_log2Decim
 
fcPos_t m_fcPos
 
bool m_biasT
 
bool m_dcBlock
 
bool m_iqCorrection
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
QString m_fileRecordName
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 23 of file airspysettings.h.

Member Enumeration Documentation

◆ fcPos_t

Enumerator
FC_POS_INFRA 
FC_POS_SUPRA 
FC_POS_CENTER 

Definition at line 24 of file airspysettings.h.

Constructor & Destructor Documentation

◆ AirspySettings()

AirspySettings::AirspySettings ( )

Definition at line 22 of file airspysettings.cpp.

References resetToDefaults().

23 {
25 }
+ Here is the call graph for this function:

Member Function Documentation

◆ deserialize()

bool AirspySettings::deserialize ( const QByteArray &  data)

Definition at line 77 of file airspysettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_biasT, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_iqCorrection, m_lnaAGC, m_lnaGain, m_log2Decim, m_LOppmTenths, m_mixerAGC, m_mixerGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, m_vgaGain, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by AirspyGui::deserialize(), and AirspyInput::deserialize().

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

◆ resetToDefaults()

void AirspySettings::resetToDefaults ( )

Definition at line 27 of file airspysettings.cpp.

References FC_POS_CENTER, m_biasT, m_centerFrequency, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_fileRecordName, m_iqCorrection, m_lnaAGC, m_lnaGain, m_log2Decim, m_LOppmTenths, m_mixerAGC, m_mixerGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, and m_vgaGain.

Referenced by AirspySettings(), deserialize(), AirspyInput::deserialize(), and AirspyGui::resetToDefaults().

28 {
29  m_centerFrequency = 435000*1000;
31  m_LOppmTenths = 0;
32  m_lnaGain = 14;
33  m_mixerGain = 15;
34  m_vgaGain = 4;
35  m_lnaAGC = false;
36  m_mixerAGC = false;
37  m_log2Decim = 0;
39  m_biasT = false;
40  m_dcBlock = false;
41  m_iqCorrection = false;
42  m_transverterMode = false;
44  m_fileRecordName = "";
45  m_useReverseAPI = false;
46  m_reverseAPIAddress = "127.0.0.1";
47  m_reverseAPIPort = 8888;
49 }
quint32 m_devSampleRateIndex
quint64 m_centerFrequency
QString m_fileRecordName
quint32 m_log2Decim
quint32 m_mixerGain
qint64 m_transverterDeltaFrequency
uint16_t m_reverseAPIPort
QString m_reverseAPIAddress
uint16_t m_reverseAPIDeviceIndex
qint32 m_LOppmTenths
+ Here is the caller graph for this function:

◆ serialize()

QByteArray AirspySettings::serialize ( ) const

Definition at line 51 of file airspysettings.cpp.

References SimpleSerializer::final(), m_biasT, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_iqCorrection, m_lnaAGC, m_lnaGain, m_log2Decim, m_LOppmTenths, m_mixerAGC, m_mixerGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, m_vgaGain, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by AirspyGui::serialize(), and AirspyInput::serialize().

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

Member Data Documentation

◆ m_biasT

bool AirspySettings::m_biasT

◆ m_centerFrequency

quint64 AirspySettings::m_centerFrequency

◆ m_dcBlock

bool AirspySettings::m_dcBlock

◆ m_devSampleRateIndex

quint32 AirspySettings::m_devSampleRateIndex

◆ m_fcPos

fcPos_t AirspySettings::m_fcPos

◆ m_fileRecordName

QString AirspySettings::m_fileRecordName

◆ m_iqCorrection

bool AirspySettings::m_iqCorrection

◆ m_lnaAGC

bool AirspySettings::m_lnaAGC

◆ m_lnaGain

quint32 AirspySettings::m_lnaGain

◆ m_log2Decim

quint32 AirspySettings::m_log2Decim

◆ m_LOppmTenths

qint32 AirspySettings::m_LOppmTenths

◆ m_mixerAGC

bool AirspySettings::m_mixerAGC

◆ m_mixerGain

quint32 AirspySettings::m_mixerGain

◆ m_reverseAPIAddress

QString AirspySettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t AirspySettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t AirspySettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 AirspySettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool AirspySettings::m_transverterMode

◆ m_useReverseAPI

bool AirspySettings::m_useReverseAPI

◆ m_vgaGain

quint32 AirspySettings::m_vgaGain

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