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

#include <plutosdrinputsettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER, FC_POS_END }
 
enum  RFPath {
  RFPATH_A_BAL = 0, RFPATH_B_BAL, RFPATH_C_BAL, RFPATH_A_NEG,
  RFPATH_A_POS, RFPATH_B_NEG, RFPATH_B_POS, RFPATH_C_NEG,
  RFPATH_C_POS, RFPATH_TX1MON, RFPATH_TX2MON, RFPATH_TX3MON,
  RFPATH_END
}
 
enum  GainMode {
  GAIN_MANUAL, GAIN_AGC_SLOW, GAIN_AGC_FAST, GAIN_HYBRID,
  GAIN_END
}
 

Public Member Functions

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

Static Public Member Functions

static void translateRFPath (RFPath path, QString &s)
 
static void translateGainMode (GainMode mod, QString &s)
 

Public Attributes

quint64 m_centerFrequency
 
quint64 m_devSampleRate
 Host interface sample rate. More...
 
qint32 m_LOppmTenths
 XO correction. More...
 
bool m_lpfFIREnable
 enable digital lowpass FIR filter More...
 
quint32 m_lpfFIRBW
 digital lowpass FIR filter bandwidth (Hz) More...
 
quint32 m_lpfFIRlog2Decim
 digital lowpass FIR filter log2 of decimation factor (0..2) More...
 
int m_lpfFIRGain
 digital lowpass FIR filter gain (dB) More...
 
fcPos_t m_fcPos
 
bool m_dcBlock
 
bool m_iqCorrection
 
bool m_hwBBDCBlock
 Hardware baseband DC blocking. More...
 
bool m_hwRFDCBlock
 Hardware RF DC blocking. More...
 
bool m_hwIQCorrection
 Hardware IQ correction. More...
 
quint32 m_log2Decim
 
quint32 m_lpfBW
 analog lowpass filter bandwidth (Hz) More...
 
quint32 m_gain
 "hardware" gain More...
 
RFPath m_antennaPath
 
GainMode m_gainMode
 
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 25 of file plutosdrinputsettings.h.

Member Enumeration Documentation

◆ fcPos_t

◆ GainMode

◆ RFPath

Constructor & Destructor Documentation

◆ PlutoSDRInputSettings()

PlutoSDRInputSettings::PlutoSDRInputSettings ( )

Definition at line 24 of file plutosdrinputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool PlutoSDRInputSettings::deserialize ( const QByteArray &  data)

Definition at line 89 of file plutosdrinputsettings.cpp.

References FC_POS_INFRA, GAIN_END, GAIN_MANUAL, SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_dcBlock, m_devSampleRate, m_fcPos, m_gain, m_gainMode, m_hwBBDCBlock, m_hwIQCorrection, m_hwRFDCBlock, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Decim, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), SimpleDeserializer::readU64(), resetToDefaults(), RFPATH_A_BAL, and RFPATH_END.

Referenced by PlutoSDRInputGui::deserialize(), and PlutoSDRInput::deserialize().

90 {
91  SimpleDeserializer d(data);
92 
93  if (!d.isValid())
94  {
96  return false;
97  }
98 
99  if (d.getVersion() == 1)
100  {
101  int intval;
102  uint32_t uintval;
103 
104  d.readS32(1, &m_LOppmTenths, 0);
105  d.readS32(2, &m_lpfFIRGain, 0);
106  d.readU32(3, &uintval, 0);
107  if (uintval > 2) {
108  m_lpfFIRlog2Decim = 2;
109  } else {
110  m_lpfFIRlog2Decim = uintval;
111  }
112  d.readU32(4, &m_log2Decim, 0);
113  d.readS32(5, &intval, 0);
114  if ((intval < 0) || (intval > 2)) {
116  } else {
117  m_fcPos = (fcPos_t) intval;
118  }
119  d.readBool(7, &m_dcBlock, false);
120  d.readBool(8, &m_iqCorrection, false);
121  d.readU32(9, &m_lpfBW, 1500000);
122  d.readBool(10, &m_lpfFIREnable, false);
123  d.readU32(11, &m_lpfFIRBW, 500000U);
124  d.readU64(12, &m_devSampleRate, 1536000U);
125  d.readU32(13, &m_gain, 40);
126  d.readS32(14, &intval, 0);
127  if ((intval >= 0) && (intval < (int) RFPATH_END)) {
128  m_antennaPath = (RFPath) intval;
129  } else {
131  }
132  d.readS32(15, &intval, 0);
133  if ((intval >= 0) && (intval < (int) GAIN_END)) {
134  m_gainMode = (GainMode) intval;
135  } else {
137  }
138  d.readBool(16, &m_transverterMode, false);
139  d.readS64(17, &m_transverterDeltaFrequency, 0);
140  d.readBool(18, &m_useReverseAPI, false);
141  d.readString(19, &m_reverseAPIAddress, "127.0.0.1");
142  d.readU32(20, &uintval, 0);
143 
144  if ((uintval > 1023) && (uintval < 65535)) {
145  m_reverseAPIPort = uintval;
146  } else {
147  m_reverseAPIPort = 8888;
148  }
149 
150  d.readU32(21, &uintval, 0);
151  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
152 
153  d.readBool(22, &m_hwBBDCBlock, true);
154  d.readBool(23, &m_hwRFDCBlock, true);
155  d.readBool(24, &m_hwIQCorrection, true);
156 
157  return true;
158  }
159  else
160  {
161  resetToDefaults();
162  return false;
163  }
164 }
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Decim
digital lowpass FIR filter log2 of decimation factor (0..2)
bool m_hwRFDCBlock
Hardware RF DC blocking.
unsigned int uint32_t
Definition: rtptypes_win.h:46
bool m_hwIQCorrection
Hardware IQ correction.
quint64 m_devSampleRate
Host interface sample rate.
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
quint32 m_gain
"hardware" gain
qint32 m_LOppmTenths
XO correction.
bool m_hwBBDCBlock
Hardware baseband DC blocking.
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void PlutoSDRInputSettings::resetToDefaults ( )

Definition at line 29 of file plutosdrinputsettings.cpp.

References FC_POS_CENTER, GAIN_MANUAL, m_antennaPath, m_centerFrequency, m_dcBlock, m_devSampleRate, m_fcPos, m_fileRecordName, m_gain, m_gainMode, m_hwBBDCBlock, m_hwIQCorrection, m_hwRFDCBlock, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Decim, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, and RFPATH_A_BAL.

Referenced by deserialize(), PlutoSDRInput::deserialize(), and PlutoSDRInputSettings().

30 {
31  m_centerFrequency = 435000 * 1000;
33  m_LOppmTenths = 0;
34  m_log2Decim = 0;
35  m_devSampleRate = 2500 * 1000;
36  m_dcBlock = false;
37  m_iqCorrection = false;
38  m_hwBBDCBlock = true;
39  m_hwRFDCBlock = true;
40  m_hwIQCorrection = true;
41  m_lpfBW = 1500000;
42  m_lpfFIREnable = false;
43  m_lpfFIRBW = 500000U;
45  m_lpfFIRGain = 0;
46  m_gain = 40;
49  m_transverterMode = false;
51  m_fileRecordName = "";
52  m_useReverseAPI = false;
53  m_reverseAPIAddress = "127.0.0.1";
54  m_reverseAPIPort = 8888;
56 }
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Decim
digital lowpass FIR filter log2 of decimation factor (0..2)
bool m_hwRFDCBlock
Hardware RF DC blocking.
bool m_hwIQCorrection
Hardware IQ correction.
quint64 m_devSampleRate
Host interface sample rate.
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
quint32 m_gain
"hardware" gain
qint32 m_LOppmTenths
XO correction.
bool m_hwBBDCBlock
Hardware baseband DC blocking.
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
+ Here is the caller graph for this function:

◆ serialize()

QByteArray PlutoSDRInputSettings::serialize ( ) const

Definition at line 58 of file plutosdrinputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_dcBlock, m_devSampleRate, m_fcPos, m_gain, m_gainMode, m_hwBBDCBlock, m_hwIQCorrection, m_hwRFDCBlock, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Decim, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), SimpleSerializer::writeU32(), and SimpleSerializer::writeU64().

Referenced by PlutoSDRInputGui::serialize(), and PlutoSDRInput::serialize().

59 {
60  SimpleSerializer s(1);
61 
62  s.writeS32(1, m_LOppmTenths);
63  s.writeS32(2, m_lpfFIRGain);
64  s.writeU32(3, m_lpfFIRlog2Decim);
65  s.writeU32(4, m_log2Decim);
66  s.writeS32(5, m_fcPos);
67  s.writeBool(7, m_dcBlock);
68  s.writeBool(8, m_iqCorrection);
69  s.writeU32(9, m_lpfBW);
70  s.writeBool(10, m_lpfFIREnable);
71  s.writeU32(11, m_lpfFIRBW);
72  s.writeU64(12, m_devSampleRate);
73  s.writeU32(13, m_gain);
74  s.writeS32(14, (int) m_antennaPath);
75  s.writeS32(15, (int) m_gainMode);
76  s.writeBool(16, m_transverterMode);
77  s.writeS64(17, m_transverterDeltaFrequency);
78  s.writeBool(18, m_useReverseAPI);
79  s.writeString(19, m_reverseAPIAddress);
80  s.writeU32(20, m_reverseAPIPort);
81  s.writeU32(21, m_reverseAPIDeviceIndex);
82  s.writeBool(22, m_hwBBDCBlock);
83  s.writeBool(23, m_hwRFDCBlock);
84  s.writeBool(24, m_hwIQCorrection);
85 
86  return s.final();
87 }
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Decim
digital lowpass FIR filter log2 of decimation factor (0..2)
bool m_hwRFDCBlock
Hardware RF DC blocking.
bool m_hwIQCorrection
Hardware IQ correction.
quint64 m_devSampleRate
Host interface sample rate.
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
quint32 m_gain
"hardware" gain
qint32 m_LOppmTenths
XO correction.
bool m_hwBBDCBlock
Hardware baseband DC blocking.
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ translateGainMode()

void PlutoSDRInputSettings::translateGainMode ( GainMode  mod,
QString &  s 
)
static

Definition at line 212 of file plutosdrinputsettings.cpp.

References GAIN_AGC_FAST, GAIN_AGC_SLOW, GAIN_HYBRID, and GAIN_MANUAL.

Referenced by PlutoSDRInput::applySettings().

213 {
214  switch(mode)
215  {
216  case GAIN_MANUAL:
217  s = "manual";
218  break;
219  case GAIN_AGC_SLOW:
220  s = "slow_attack";
221  break;
222  case GAIN_AGC_FAST:
223  s = "fast_attack";
224  break;
225  case GAIN_HYBRID:
226  s = "hybrid";
227  break;
228  default:
229  s = "manual";
230  break;
231  }
232 }
+ Here is the caller graph for this function:

◆ translateRFPath()

void PlutoSDRInputSettings::translateRFPath ( RFPath  path,
QString &  s 
)
static

Definition at line 166 of file plutosdrinputsettings.cpp.

References RFPATH_A_BAL, RFPATH_A_NEG, RFPATH_A_POS, RFPATH_B_BAL, RFPATH_B_NEG, RFPATH_B_POS, RFPATH_C_BAL, RFPATH_C_NEG, RFPATH_C_POS, RFPATH_TX1MON, RFPATH_TX2MON, and RFPATH_TX3MON.

Referenced by PlutoSDRInput::applySettings().

167 {
168  switch(path)
169  {
170  case RFPATH_A_BAL:
171  s = "A_BALANCED";
172  break;
173  case RFPATH_B_BAL:
174  s = "B_BALANCED";
175  break;
176  case RFPATH_C_BAL:
177  s = "C_BALANCED";
178  break;
179  case RFPATH_A_NEG:
180  s = "A_N";
181  break;
182  case RFPATH_A_POS:
183  s = "A_P";
184  break;
185  case RFPATH_B_NEG:
186  s = "B_N";
187  break;
188  case RFPATH_B_POS:
189  s = "B_P";
190  break;
191  case RFPATH_C_NEG:
192  s = "C_N";
193  break;
194  case RFPATH_C_POS:
195  s = "C_P";
196  break;
197  case RFPATH_TX1MON:
198  s = "TX_MONITOR1";
199  break;
200  case RFPATH_TX2MON:
201  s = "TX_MONITOR2";
202  break;
203  case RFPATH_TX3MON:
204  s = "TX_MONITOR3";
205  break;
206  default:
207  s = "A_BALANCED";
208  break;
209  }
210 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

RFPath PlutoSDRInputSettings::m_antennaPath

◆ m_centerFrequency

quint64 PlutoSDRInputSettings::m_centerFrequency

◆ m_dcBlock

bool PlutoSDRInputSettings::m_dcBlock

◆ m_devSampleRate

quint64 PlutoSDRInputSettings::m_devSampleRate

◆ m_fcPos

fcPos_t PlutoSDRInputSettings::m_fcPos

◆ m_fileRecordName

QString PlutoSDRInputSettings::m_fileRecordName

◆ m_gain

quint32 PlutoSDRInputSettings::m_gain

◆ m_gainMode

GainMode PlutoSDRInputSettings::m_gainMode

◆ m_hwBBDCBlock

bool PlutoSDRInputSettings::m_hwBBDCBlock

◆ m_hwIQCorrection

bool PlutoSDRInputSettings::m_hwIQCorrection

◆ m_hwRFDCBlock

bool PlutoSDRInputSettings::m_hwRFDCBlock

◆ m_iqCorrection

bool PlutoSDRInputSettings::m_iqCorrection

◆ m_log2Decim

quint32 PlutoSDRInputSettings::m_log2Decim

◆ m_LOppmTenths

qint32 PlutoSDRInputSettings::m_LOppmTenths

◆ m_lpfBW

quint32 PlutoSDRInputSettings::m_lpfBW

◆ m_lpfFIRBW

quint32 PlutoSDRInputSettings::m_lpfFIRBW

◆ m_lpfFIREnable

bool PlutoSDRInputSettings::m_lpfFIREnable

◆ m_lpfFIRGain

int PlutoSDRInputSettings::m_lpfFIRGain

◆ m_lpfFIRlog2Decim

quint32 PlutoSDRInputSettings::m_lpfFIRlog2Decim

◆ m_reverseAPIAddress

QString PlutoSDRInputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t PlutoSDRInputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t PlutoSDRInputSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 PlutoSDRInputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool PlutoSDRInputSettings::m_transverterMode

◆ m_useReverseAPI

bool PlutoSDRInputSettings::m_useReverseAPI

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