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

#include <limesdrinputsettings.h>

Public Types

enum  PathRFE {
  PATH_RFE_NONE = 0, PATH_RFE_LNAH, PATH_RFE_LNAL, PATH_RFE_LNAW,
  PATH_RFE_LB1, PATH_RFE_LB2
}
 
enum  GainMode { GAIN_AUTO, GAIN_MANUAL }
 

Public Member Functions

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

Public Attributes

uint64_t m_centerFrequency
 
int m_devSampleRate
 
uint32_t m_log2HardDecim
 
bool m_dcBlock
 
bool m_iqCorrection
 
uint32_t m_log2SoftDecim
 
float m_lpfBW
 LMS amalog lowpass filter bandwidth (Hz) More...
 
bool m_lpfFIREnable
 Enable LMS digital lowpass FIR filters. More...
 
float m_lpfFIRBW
 LMS digital lowpass FIR filters bandwidth (Hz) More...
 
uint32_t m_gain
 Optimally distributed gain (dB) More...
 
bool m_ncoEnable
 Enable TSP NCO and mixing. More...
 
int m_ncoFrequency
 Actual NCO frequency (the resulting frequency with mixing is displayed) More...
 
PathRFE m_antennaPath
 
GainMode m_gainMode
 Gain mode: auto or manual. More...
 
uint32_t m_lnaGain
 Manual LAN gain. More...
 
uint32_t m_tiaGain
 Manual TIA gain. More...
 
uint32_t m_pgaGain
 Manual PGA gain. More...
 
bool m_extClock
 True if external clock source. More...
 
uint32_t m_extClockFreq
 Frequency (Hz) of external clock source. More...
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
QString m_fileRecordName
 
uint8_t m_gpioDir
 GPIO pin direction LSB first; 0 input, 1 output. More...
 
uint8_t m_gpioPins
 GPIO pins to write; LSB first. More...
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

These are the settings individual to each hardware channel or software Rx chain Plus the settings to be saved in the presets

Definition at line 29 of file limesdrinputsettings.h.

Member Enumeration Documentation

◆ GainMode

◆ PathRFE

Constructor & Destructor Documentation

◆ LimeSDRInputSettings()

LimeSDRInputSettings::LimeSDRInputSettings ( )

Definition at line 21 of file limesdrinputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool LimeSDRInputSettings::deserialize ( const QByteArray &  data)

Definition at line 91 of file limesdrinputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_gainMode, m_gpioDir, m_gpioPins, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readFloat(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by LimeSDRInputGUI::deserialize(), and LimeSDRInput::deserialize().

92 {
93  SimpleDeserializer d(data);
94 
95  if (!d.isValid())
96  {
98  return false;
99  }
100 
101  if (d.getVersion() == 1)
102  {
103  int intval;
104  uint32_t uintval;
105 
106  d.readS32(1, &m_devSampleRate, 5000000);
107  d.readU32(2, &m_log2HardDecim, 2);
108  d.readBool(3, &m_dcBlock, false);
109  d.readBool(4, &m_iqCorrection, false);
110  d.readU32(5, &m_log2SoftDecim, 0);
111  d.readFloat(7, &m_lpfBW, 1.5e6);
112  d.readBool(8, &m_lpfFIREnable, false);
113  d.readFloat(9, &m_lpfFIRBW, 1.5e6);
114  d.readU32(10, &m_gain, 50);
115  d.readBool(11, &m_ncoEnable, false);
116  d.readS32(12, &m_ncoFrequency, 0);
117  d.readS32(13, &intval, 0);
118  m_antennaPath = (PathRFE) intval;
119  d.readS32(14, &intval, 0);
120  m_gainMode = (GainMode) intval;
121  d.readU32(15, &m_lnaGain, 15);
122  d.readU32(16, &m_tiaGain, 2);
123  d.readU32(17, &m_pgaGain, 16);
124  d.readBool(18, &m_extClock, false);
125  d.readU32(19, &m_extClockFreq, 10000000);
126  d.readBool(20, &m_transverterMode, false);
127  d.readS64(21, &m_transverterDeltaFrequency, 0);
128  d.readU32(22, &uintval, 0);
129  m_gpioDir = uintval & 0xFF;
130  d.readU32(23, &uintval, 0);
131  m_gpioPins = uintval & 0xFF;
132  d.readBool(24, &m_useReverseAPI, false);
133  d.readString(25, &m_reverseAPIAddress, "127.0.0.1");
134  d.readU32(26, &uintval, 0);
135 
136  if ((uintval > 1023) && (uintval < 65535)) {
137  m_reverseAPIPort = uintval;
138  } else {
139  m_reverseAPIPort = 8888;
140  }
141 
142  d.readU32(27, &uintval, 0);
143  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
144 
145  return true;
146  }
147  else
148  {
149  resetToDefaults();
150  return false;
151  }
152 
153 }
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
uint32_t m_tiaGain
Manual TIA gain.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
bool m_extClock
True if external clock source.
uint32_t m_lnaGain
Manual LAN gain.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_gain
Optimally distributed gain (dB)
unsigned int uint32_t
Definition: rtptypes_win.h:46
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
bool m_ncoEnable
Enable TSP NCO and mixing.
uint32_t m_pgaGain
Manual PGA gain.
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
GainMode m_gainMode
Gain mode: auto or manual.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LimeSDRInputSettings::resetToDefaults ( )

Definition at line 26 of file limesdrinputsettings.cpp.

References GAIN_AUTO, m_antennaPath, m_centerFrequency, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_fileRecordName, m_gain, m_gainMode, m_gpioDir, m_gpioPins, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, and PATH_RFE_NONE.

Referenced by deserialize(), LimeSDRInput::deserialize(), LimeSDRInputSettings(), and LimeSDRInputGUI::resetToDefaults().

27 {
28  m_centerFrequency = 435000*1000;
29  m_devSampleRate = 5000000;
30  m_log2HardDecim = 3;
31  m_dcBlock = false;
32  m_iqCorrection = false;
33  m_log2SoftDecim = 0;
34  m_lpfBW = 4.5e6f;
35  m_lpfFIREnable = false;
36  m_lpfFIRBW = 2.5e6f;
37  m_gain = 50;
38  m_ncoEnable = false;
39  m_ncoFrequency = 0;
42  m_lnaGain = 15;
43  m_tiaGain = 2;
44  m_pgaGain = 16;
45  m_extClock = false;
46  m_extClockFreq = 10000000; // 10 MHz
47  m_transverterMode = false;
49  m_fileRecordName = "";
50  m_gpioDir = 0;
51  m_gpioPins = 0;
52  m_useReverseAPI = false;
53  m_reverseAPIAddress = "127.0.0.1";
54  m_reverseAPIPort = 8888;
56 }
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
uint32_t m_tiaGain
Manual TIA gain.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
bool m_extClock
True if external clock source.
uint32_t m_lnaGain
Manual LAN gain.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_gain
Optimally distributed gain (dB)
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
bool m_ncoEnable
Enable TSP NCO and mixing.
uint32_t m_pgaGain
Manual PGA gain.
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
GainMode m_gainMode
Gain mode: auto or manual.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
+ Here is the caller graph for this function:

◆ serialize()

QByteArray LimeSDRInputSettings::serialize ( ) const

Definition at line 58 of file limesdrinputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_gainMode, m_gpioDir, m_gpioPins, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeFloat(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by LimeSDRInputGUI::serialize(), and LimeSDRInput::serialize().

59 {
60  SimpleSerializer s(1);
61 
62  s.writeS32(1, m_devSampleRate);
63  s.writeU32(2, m_log2HardDecim);
64  s.writeBool(3, m_dcBlock);
65  s.writeBool(4, m_iqCorrection);
66  s.writeU32(5, m_log2SoftDecim);
67  s.writeFloat(7, m_lpfBW);
68  s.writeBool(8, m_lpfFIREnable);
69  s.writeFloat(9, m_lpfFIRBW);
70  s.writeU32(10, m_gain);
71  s.writeBool(11, m_ncoEnable);
72  s.writeS32(12, m_ncoFrequency);
73  s.writeS32(13, (int) m_antennaPath);
74  s.writeS32(14, (int) m_gainMode);
75  s.writeU32(15, m_lnaGain);
76  s.writeU32(16, m_tiaGain);
77  s.writeU32(17, m_pgaGain);
78  s.writeBool(18, m_extClock);
79  s.writeU32(19, m_extClockFreq);
80  s.writeBool(20, m_transverterMode);
81  s.writeS64(21, m_transverterDeltaFrequency);
82  s.writeU32(22, m_gpioDir);
83  s.writeU32(23, m_gpioPins);
84  s.writeBool(24, m_useReverseAPI);
85  s.writeString(25, m_reverseAPIAddress);
86  s.writeU32(26, m_reverseAPIPort);
87  s.writeU32(27, m_reverseAPIDeviceIndex);
88  return s.final();
89 }
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
uint32_t m_tiaGain
Manual TIA gain.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
bool m_extClock
True if external clock source.
uint32_t m_lnaGain
Manual LAN gain.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_gain
Optimally distributed gain (dB)
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
bool m_ncoEnable
Enable TSP NCO and mixing.
uint32_t m_pgaGain
Manual PGA gain.
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
GainMode m_gainMode
Gain mode: auto or manual.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

PathRFE LimeSDRInputSettings::m_antennaPath

◆ m_centerFrequency

uint64_t LimeSDRInputSettings::m_centerFrequency

◆ m_dcBlock

bool LimeSDRInputSettings::m_dcBlock

◆ m_devSampleRate

int LimeSDRInputSettings::m_devSampleRate

◆ m_extClock

bool LimeSDRInputSettings::m_extClock

◆ m_extClockFreq

uint32_t LimeSDRInputSettings::m_extClockFreq

◆ m_fileRecordName

QString LimeSDRInputSettings::m_fileRecordName

◆ m_gain

uint32_t LimeSDRInputSettings::m_gain

◆ m_gainMode

GainMode LimeSDRInputSettings::m_gainMode

◆ m_gpioDir

uint8_t LimeSDRInputSettings::m_gpioDir

◆ m_gpioPins

uint8_t LimeSDRInputSettings::m_gpioPins

◆ m_iqCorrection

bool LimeSDRInputSettings::m_iqCorrection

◆ m_lnaGain

uint32_t LimeSDRInputSettings::m_lnaGain

◆ m_log2HardDecim

uint32_t LimeSDRInputSettings::m_log2HardDecim

◆ m_log2SoftDecim

uint32_t LimeSDRInputSettings::m_log2SoftDecim

◆ m_lpfBW

float LimeSDRInputSettings::m_lpfBW

◆ m_lpfFIRBW

float LimeSDRInputSettings::m_lpfFIRBW

◆ m_lpfFIREnable

bool LimeSDRInputSettings::m_lpfFIREnable

◆ m_ncoEnable

bool LimeSDRInputSettings::m_ncoEnable

◆ m_ncoFrequency

int LimeSDRInputSettings::m_ncoFrequency

◆ m_pgaGain

uint32_t LimeSDRInputSettings::m_pgaGain

◆ m_reverseAPIAddress

QString LimeSDRInputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t LimeSDRInputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t LimeSDRInputSettings::m_reverseAPIPort

◆ m_tiaGain

uint32_t LimeSDRInputSettings::m_tiaGain

◆ m_transverterDeltaFrequency

qint64 LimeSDRInputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool LimeSDRInputSettings::m_transverterMode

◆ m_useReverseAPI

bool LimeSDRInputSettings::m_useReverseAPI

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