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

#include <xtrxinputsettings.h>

Public Types

enum  GainMode { GAIN_AUTO, GAIN_MANUAL }
 

Public Member Functions

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

Public Attributes

uint64_t m_centerFrequency
 
double m_devSampleRate
 
uint32_t m_log2HardDecim
 
bool m_dcBlock
 
bool m_iqCorrection
 
uint32_t m_log2SoftDecim
 
float m_lpfBW
 LMS analog lowpass filter 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...
 
xtrx_antenna_t m_antennaPath
 
GainMode m_gainMode
 Gain mode: auto or manual. More...
 
uint32_t m_lnaGain
 Manual LNA 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...
 
uint32_t m_pwrmode
 
QString m_fileRecordName
 
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 32 of file xtrxinputsettings.h.

Member Enumeration Documentation

◆ GainMode

Enumerator
GAIN_AUTO 
GAIN_MANUAL 

Definition at line 34 of file xtrxinputsettings.h.

Constructor & Destructor Documentation

◆ XTRXInputSettings()

XTRXInputSettings::XTRXInputSettings ( )

Definition at line 21 of file xtrxinputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool XTRXInputSettings::deserialize ( const QByteArray &  data)

Definition at line 83 of file xtrxinputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_fileRecordName, m_gain, m_gainMode, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readDouble(), SimpleDeserializer::readFloat(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by XTRXInputGUI::deserialize(), and XTRXInput::deserialize().

84 {
85  SimpleDeserializer d(data);
86 
87  if (!d.isValid())
88  {
90  return false;
91  }
92 
93  if (d.getVersion() == 1)
94  {
95  int intval;
96  uint32_t uintval;
97 
98  d.readDouble(1, &m_devSampleRate, 5e6);
99  d.readU32(2, &m_log2HardDecim, 2);
100  d.readBool(3, &m_dcBlock, false);
101  d.readBool(4, &m_iqCorrection, false);
102  d.readU32(5, &m_log2SoftDecim, 0);
103  d.readFloat(7, &m_lpfBW, 1.5e6);
104  d.readU32(10, &m_gain, 50);
105  d.readBool(11, &m_ncoEnable, false);
106  d.readS32(12, &m_ncoFrequency, 0);
107  d.readS32(13, &intval, 0);
108  m_antennaPath = (xtrx_antenna_t) intval;
109  d.readS32(14, &intval, 0);
110  m_gainMode = (GainMode) intval;
111  d.readU32(15, &m_lnaGain, 15);
112  d.readU32(16, &m_tiaGain, 2);
113  d.readU32(17, &m_pgaGain, 16);
114  d.readBool(18, &m_extClock, false);
115  d.readU32(19, &m_extClockFreq, 0);
116  d.readU32(20, &m_pwrmode, 2);
117  d.readString(21, &m_fileRecordName, "");
118  d.readBool(22, &m_useReverseAPI, false);
119  d.readString(23, &m_reverseAPIAddress, "127.0.0.1");
120  d.readU32(24, &uintval, 0);
121 
122  if ((uintval > 1023) && (uintval < 65535)) {
123  m_reverseAPIPort = uintval;
124  } else {
125  m_reverseAPIPort = 8888;
126  }
127 
128  d.readU32(25, &uintval, 0);
129  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
130 
131  return true;
132  }
133  else
134  {
135  resetToDefaults();
136  return false;
137  }
138 
139 }
bool m_extClock
True if external clock source.
bool m_ncoEnable
Enable TSP NCO and mixing.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint16_t m_reverseAPIDeviceIndex
GainMode m_gainMode
Gain mode: auto or manual.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
uint32_t m_gain
Optimally distributed gain (dB)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
uint32_t m_tiaGain
Manual TIA gain.
uint32_t m_lnaGain
Manual LNA gain.
xtrx_antenna_t m_antennaPath
uint32_t m_pgaGain
Manual PGA gain.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void XTRXInputSettings::resetToDefaults ( )

Definition at line 26 of file xtrxinputsettings.cpp.

References GAIN_AUTO, m_antennaPath, m_centerFrequency, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_fileRecordName, m_gain, m_gainMode, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, and m_useReverseAPI.

Referenced by deserialize(), XTRXInput::deserialize(), XTRXInputGUI::resetToDefaults(), and XTRXInputSettings().

27 {
28  m_centerFrequency = 435000*1000;
29  m_devSampleRate = 5e6;
30  m_log2HardDecim = 1;
31  m_dcBlock = false;
32  m_iqCorrection = false;
33  m_log2SoftDecim = 0;
34  m_lpfBW = 4.5e6f;
35  m_gain = 50;
36  m_ncoEnable = false;
37  m_ncoFrequency = 0;
38  m_antennaPath = XTRX_RX_L;
40  m_lnaGain = 15;
41  m_tiaGain = 2;
42  m_pgaGain = 16;
43  m_extClock = false;
44  m_extClockFreq = 0; // Auto
45  m_pwrmode = 1;
46  m_fileRecordName = "";
47  m_useReverseAPI = false;
48  m_reverseAPIAddress = "127.0.0.1";
49  m_reverseAPIPort = 8888;
51 }
bool m_extClock
True if external clock source.
bool m_ncoEnable
Enable TSP NCO and mixing.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint16_t m_reverseAPIDeviceIndex
GainMode m_gainMode
Gain mode: auto or manual.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
uint32_t m_gain
Optimally distributed gain (dB)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
uint32_t m_tiaGain
Manual TIA gain.
uint32_t m_lnaGain
Manual LNA gain.
xtrx_antenna_t m_antennaPath
uint32_t m_pgaGain
Manual PGA gain.
+ Here is the caller graph for this function:

◆ serialize()

QByteArray XTRXInputSettings::serialize ( ) const

Definition at line 53 of file xtrxinputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_dcBlock, m_devSampleRate, m_extClock, m_extClockFreq, m_fileRecordName, m_gain, m_gainMode, m_iqCorrection, m_lnaGain, m_log2HardDecim, m_log2SoftDecim, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pgaGain, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tiaGain, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeDouble(), SimpleSerializer::writeFloat(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by XTRXInputGUI::serialize(), and XTRXInput::serialize().

54 {
55  SimpleSerializer s(1);
56 
57  s.writeDouble(1, m_devSampleRate);
58  s.writeU32(2, m_log2HardDecim);
59  s.writeBool(3, m_dcBlock);
60  s.writeBool(4, m_iqCorrection);
61  s.writeU32(5, m_log2SoftDecim);
62  s.writeFloat(7, m_lpfBW);
63  s.writeU32(10, m_gain);
64  s.writeBool(11, m_ncoEnable);
65  s.writeS32(12, m_ncoFrequency);
66  s.writeS32(13, (int) m_antennaPath);
67  s.writeS32(14, (int) m_gainMode);
68  s.writeU32(15, m_lnaGain);
69  s.writeU32(16, m_tiaGain);
70  s.writeU32(17, m_pgaGain);
71  s.writeBool(18, m_extClock);
72  s.writeU32(19, m_extClockFreq);
73  s.writeU32(20, m_pwrmode);
74  s.writeString(21, m_fileRecordName);
75  s.writeBool(22, m_useReverseAPI);
76  s.writeString(23, m_reverseAPIAddress);
77  s.writeU32(24, m_reverseAPIPort);
78  s.writeU32(25, m_reverseAPIDeviceIndex);
79 
80  return s.final();
81 }
bool m_extClock
True if external clock source.
bool m_ncoEnable
Enable TSP NCO and mixing.
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint16_t m_reverseAPIDeviceIndex
GainMode m_gainMode
Gain mode: auto or manual.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
uint32_t m_gain
Optimally distributed gain (dB)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
uint32_t m_tiaGain
Manual TIA gain.
uint32_t m_lnaGain
Manual LNA gain.
xtrx_antenna_t m_antennaPath
uint32_t m_pgaGain
Manual PGA gain.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

xtrx_antenna_t XTRXInputSettings::m_antennaPath

◆ m_centerFrequency

uint64_t XTRXInputSettings::m_centerFrequency

◆ m_dcBlock

bool XTRXInputSettings::m_dcBlock

◆ m_devSampleRate

double XTRXInputSettings::m_devSampleRate

◆ m_extClock

bool XTRXInputSettings::m_extClock

◆ m_extClockFreq

uint32_t XTRXInputSettings::m_extClockFreq

◆ m_fileRecordName

QString XTRXInputSettings::m_fileRecordName

◆ m_gain

uint32_t XTRXInputSettings::m_gain

◆ m_gainMode

GainMode XTRXInputSettings::m_gainMode

◆ m_iqCorrection

bool XTRXInputSettings::m_iqCorrection

◆ m_lnaGain

uint32_t XTRXInputSettings::m_lnaGain

◆ m_log2HardDecim

uint32_t XTRXInputSettings::m_log2HardDecim

◆ m_log2SoftDecim

uint32_t XTRXInputSettings::m_log2SoftDecim

◆ m_lpfBW

float XTRXInputSettings::m_lpfBW

◆ m_ncoEnable

bool XTRXInputSettings::m_ncoEnable

◆ m_ncoFrequency

int XTRXInputSettings::m_ncoFrequency

◆ m_pgaGain

uint32_t XTRXInputSettings::m_pgaGain

◆ m_pwrmode

uint32_t XTRXInputSettings::m_pwrmode

◆ m_reverseAPIAddress

QString XTRXInputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t XTRXInputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t XTRXInputSettings::m_reverseAPIPort

◆ m_tiaGain

uint32_t XTRXInputSettings::m_tiaGain

◆ m_useReverseAPI

bool XTRXInputSettings::m_useReverseAPI

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