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
RTLSDRSettings Struct Reference

#include <rtlsdrsettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

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

Public Attributes

int m_devSampleRate
 
bool m_lowSampleRate
 
quint64 m_centerFrequency
 
qint32 m_gain
 
qint32 m_loPpmCorrection
 
quint32 m_log2Decim
 
fcPos_t m_fcPos
 
bool m_dcBlock
 
bool m_iqImbalance
 
bool m_agc
 
bool m_noModMode
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
quint32 m_rfBandwidth
 RF filter bandwidth in Hz. More...
 
QString m_fileRecordName
 
bool m_offsetTuning
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 23 of file rtlsdrsettings.h.

Member Enumeration Documentation

◆ fcPos_t

Enumerator
FC_POS_INFRA 
FC_POS_SUPRA 
FC_POS_CENTER 

Definition at line 24 of file rtlsdrsettings.h.

Constructor & Destructor Documentation

◆ RTLSDRSettings()

RTLSDRSettings::RTLSDRSettings ( )

Definition at line 22 of file rtlsdrsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool RTLSDRSettings::deserialize ( const QByteArray &  data)

Definition at line 77 of file rtlsdrsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_agc, m_dcBlock, m_devSampleRate, m_fcPos, m_gain, m_iqImbalance, m_log2Decim, m_loPpmCorrection, m_lowSampleRate, m_noModMode, m_offsetTuning, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by RTLSDRGui::deserialize(), and RTLSDRInput::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 utmp;
91 
92  d.readS32(2, &m_gain, 0);
93  d.readS32(3, &m_loPpmCorrection, 0);
94  d.readU32(4, &m_log2Decim, 4);
95  d.readBool(5, &m_dcBlock, false);
96  d.readBool(6, &m_iqImbalance, false);
97  d.readS32(7, &intval, 0);
98  m_fcPos = (fcPos_t) intval;
99  d.readS32(8, &m_devSampleRate, 1024*1000);
100  d.readBool(9, &m_lowSampleRate, false);
101  d.readBool(10, &m_agc, false);
102  d.readBool(11, &m_noModMode, false);
103  d.readBool(12, &m_transverterMode, false);
104  d.readS64(13, &m_transverterDeltaFrequency, 0);
105  d.readU32(4, &m_rfBandwidth, 2500 * 1000);
106  d.readBool(15, &m_offsetTuning, false);
107  d.readBool(16, &m_useReverseAPI, false);
108  d.readString(17, &m_reverseAPIAddress, "127.0.0.1");
109  d.readU32(18, &utmp, 0);
110 
111  if ((utmp > 1023) && (utmp < 65535)) {
112  m_reverseAPIPort = utmp;
113  } else {
114  m_reverseAPIPort = 8888;
115  }
116 
117  d.readU32(19, &utmp, 0);
118  m_reverseAPIDeviceIndex = utmp > 99 ? 99 : utmp;
119 
120  return true;
121  }
122  else
123  {
124  resetToDefaults();
125  return false;
126  }
127 }
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
quint32 m_log2Decim
quint32 m_rfBandwidth
RF filter bandwidth in Hz.
qint32 m_loPpmCorrection
QString m_reverseAPIAddress
qint64 m_transverterDeltaFrequency
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void RTLSDRSettings::resetToDefaults ( )

Definition at line 27 of file rtlsdrsettings.cpp.

References FC_POS_CENTER, m_agc, m_centerFrequency, m_dcBlock, m_devSampleRate, m_fcPos, m_fileRecordName, m_gain, m_iqImbalance, m_log2Decim, m_loPpmCorrection, m_lowSampleRate, m_noModMode, m_offsetTuning, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_transverterDeltaFrequency, m_transverterMode, and m_useReverseAPI.

Referenced by deserialize(), RTLSDRInput::deserialize(), RTLSDRGui::resetToDefaults(), and RTLSDRSettings().

28 {
29  m_devSampleRate = 1024*1000;
30  m_lowSampleRate = false;
31  m_centerFrequency = 435000*1000;
32  m_gain = 0;
34  m_log2Decim = 4;
36  m_dcBlock = false;
37  m_iqImbalance = false;
38  m_agc = false;
39  m_noModMode = false;
40  m_transverterMode = false;
42  m_rfBandwidth = 2500 * 1000; // Hz
43  m_fileRecordName = "";
44  m_offsetTuning = false;
45  m_useReverseAPI = false;
46  m_reverseAPIAddress = "127.0.0.1";
47  m_reverseAPIPort = 8888;
49 }
QString m_fileRecordName
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
quint32 m_log2Decim
quint32 m_rfBandwidth
RF filter bandwidth in Hz.
qint32 m_loPpmCorrection
QString m_reverseAPIAddress
qint64 m_transverterDeltaFrequency
quint64 m_centerFrequency
+ Here is the caller graph for this function:

◆ serialize()

QByteArray RTLSDRSettings::serialize ( ) const

Definition at line 51 of file rtlsdrsettings.cpp.

References SimpleSerializer::final(), m_agc, m_dcBlock, m_devSampleRate, m_fcPos, m_gain, m_iqImbalance, m_log2Decim, m_loPpmCorrection, m_lowSampleRate, m_noModMode, m_offsetTuning, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfBandwidth, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by RTLSDRGui::serialize(), and RTLSDRInput::serialize().

52 {
53  SimpleSerializer s(1);
54 
55  s.writeS32(2, m_gain);
56  s.writeS32(3, m_loPpmCorrection);
57  s.writeU32(4, m_log2Decim);
58  s.writeBool(5, m_dcBlock);
59  s.writeBool(6, m_iqImbalance);
60  s.writeS32(7, (int) m_fcPos);
61  s.writeS32(8, m_devSampleRate);
62  s.writeBool(9, m_lowSampleRate);
63  s.writeBool(10, m_agc);
64  s.writeBool(11, m_noModMode);
65  s.writeBool(12, m_transverterMode);
66  s.writeS64(13, m_transverterDeltaFrequency);
67  s.writeU32(14, m_rfBandwidth);
68  s.writeBool(15, m_offsetTuning);
69  s.writeBool(16, m_useReverseAPI);
70  s.writeString(17, m_reverseAPIAddress);
71  s.writeU32(18, m_reverseAPIPort);
72  s.writeU32(19, m_reverseAPIDeviceIndex);
73 
74  return s.final();
75 }
uint16_t m_reverseAPIDeviceIndex
uint16_t m_reverseAPIPort
quint32 m_log2Decim
quint32 m_rfBandwidth
RF filter bandwidth in Hz.
qint32 m_loPpmCorrection
QString m_reverseAPIAddress
qint64 m_transverterDeltaFrequency
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_agc

bool RTLSDRSettings::m_agc

◆ m_centerFrequency

quint64 RTLSDRSettings::m_centerFrequency

◆ m_dcBlock

bool RTLSDRSettings::m_dcBlock

◆ m_devSampleRate

int RTLSDRSettings::m_devSampleRate

◆ m_fcPos

fcPos_t RTLSDRSettings::m_fcPos

◆ m_fileRecordName

QString RTLSDRSettings::m_fileRecordName

◆ m_gain

qint32 RTLSDRSettings::m_gain

◆ m_iqImbalance

bool RTLSDRSettings::m_iqImbalance

◆ m_log2Decim

quint32 RTLSDRSettings::m_log2Decim

◆ m_loPpmCorrection

qint32 RTLSDRSettings::m_loPpmCorrection

◆ m_lowSampleRate

bool RTLSDRSettings::m_lowSampleRate

◆ m_noModMode

bool RTLSDRSettings::m_noModMode

◆ m_offsetTuning

bool RTLSDRSettings::m_offsetTuning

◆ m_reverseAPIAddress

QString RTLSDRSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t RTLSDRSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t RTLSDRSettings::m_reverseAPIPort

◆ m_rfBandwidth

quint32 RTLSDRSettings::m_rfBandwidth

◆ m_transverterDeltaFrequency

qint64 RTLSDRSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool RTLSDRSettings::m_transverterMode

◆ m_useReverseAPI

bool RTLSDRSettings::m_useReverseAPI

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