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

#include <plutosdroutputsettings.h>

Public Types

enum  RFPath { RFPATH_A = 0, RFPATH_B, RFPATH_END }
 

Public Member Functions

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

Static Public Member Functions

static void translateRFPath (RFPath path, 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_lpfFIRlog2Interp
 digital lowpass FIR filter log2 of interpolation factor (0..2) More...
 
int m_lpfFIRGain
 digital lowpass FIR filter gain (dB) More...
 
quint32 m_log2Interp
 
quint32 m_lpfBW
 analog lowpass filter bandwidth (Hz) More...
 
qint32 m_att
 "hardware" attenuation in dB fourths More...
 
RFPath m_antennaPath
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 26 of file plutosdroutputsettings.h.

Member Enumeration Documentation

◆ RFPath

Constructor & Destructor Documentation

◆ PlutoSDROutputSettings()

PlutoSDROutputSettings::PlutoSDROutputSettings ( )

Definition at line 23 of file plutosdroutputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool PlutoSDROutputSettings::deserialize ( const QByteArray &  data)

Definition at line 73 of file plutosdroutputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_att, m_devSampleRate, m_log2Interp, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Interp, 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, and RFPATH_END.

Referenced by PlutoSDROutputGUI::deserialize(), and PlutoSDROutput::deserialize().

74 {
75  SimpleDeserializer d(data);
76 
77  if (!d.isValid())
78  {
80  return false;
81  }
82 
83  if (d.getVersion() == 1)
84  {
85  int intval;
86  uint32_t uintval;
87 
88  d.readS32(1, &m_LOppmTenths, 0);
89  d.readS32(2, &m_lpfFIRGain, 0);
90  d.readU32(3, &uintval, 0);
91  if (uintval > 2) {
93  } else {
94  m_lpfFIRlog2Interp = uintval;
95  }
96  d.readU32(4, &m_log2Interp, 0);
97  d.readU32(9, &m_lpfBW, 1500000);
98  d.readBool(10, &m_lpfFIREnable, false);
99  d.readU32(11, &m_lpfFIRBW, 500000U);
100  d.readU64(12, &m_devSampleRate, 1536000U);
101  d.readS32(13, &m_att, -50);
102  d.readS32(14, &intval, 0);
103  if ((intval >= 0) && (intval < (int) RFPATH_END)) {
104  m_antennaPath = (RFPath) intval;
105  } else {
107  }
108  d.readBool(15, &m_transverterMode, false);
109  d.readS64(16, &m_transverterDeltaFrequency, 0);
110  d.readBool(17, &m_useReverseAPI, false);
111  d.readString(18, &m_reverseAPIAddress, "127.0.0.1");
112  d.readU32(19, &uintval, 0);
113 
114  if ((uintval > 1023) && (uintval < 65535)) {
115  m_reverseAPIPort = uintval;
116  } else {
117  m_reverseAPIPort = 8888;
118  }
119 
120  d.readU32(20, &uintval, 0);
121  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
122 
123  return true;
124  }
125  else
126  {
127  resetToDefaults();
128  return false;
129  }
130 }
qint32 m_LOppmTenths
XO correction.
qint32 m_att
"hardware" attenuation in dB fourths
unsigned int uint32_t
Definition: rtptypes_win.h:46
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Interp
digital lowpass FIR filter log2 of interpolation factor (0..2)
quint64 m_devSampleRate
Host interface sample rate.
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void PlutoSDROutputSettings::resetToDefaults ( )

Definition at line 28 of file plutosdroutputsettings.cpp.

References m_antennaPath, m_att, m_centerFrequency, m_devSampleRate, m_log2Interp, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Interp, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, and RFPATH_A.

Referenced by deserialize(), PlutoSDROutput::deserialize(), and PlutoSDROutputSettings().

29 {
30  m_centerFrequency = 435000 * 1000;
31  m_LOppmTenths = 0;
32  m_log2Interp = 0;
33  m_devSampleRate = 2500 * 1000;
34  m_lpfBW = 1500000;
35  m_lpfFIREnable = false;
36  m_lpfFIRBW = 500000U;
38  m_lpfFIRGain = 0;
39  m_att = -50;
41  m_transverterMode = false;
43  m_useReverseAPI = false;
44  m_reverseAPIAddress = "127.0.0.1";
45  m_reverseAPIPort = 8888;
47 }
qint32 m_LOppmTenths
XO correction.
qint32 m_att
"hardware" attenuation in dB fourths
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Interp
digital lowpass FIR filter log2 of interpolation factor (0..2)
quint64 m_devSampleRate
Host interface sample rate.
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
+ Here is the caller graph for this function:

◆ serialize()

QByteArray PlutoSDROutputSettings::serialize ( ) const

Definition at line 49 of file plutosdroutputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_att, m_devSampleRate, m_log2Interp, m_LOppmTenths, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_lpfFIRGain, m_lpfFIRlog2Interp, 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 PlutoSDROutputGUI::serialize(), and PlutoSDROutput::serialize().

50 {
51  SimpleSerializer s(1);
52 
53  s.writeS32(1, m_LOppmTenths);
54  s.writeS32(2, m_lpfFIRGain);
55  s.writeU32(3, m_lpfFIRlog2Interp);
56  s.writeU32(4, m_log2Interp);
57  s.writeU32(9, m_lpfBW);
58  s.writeBool(10, m_lpfFIREnable);
59  s.writeU32(11, m_lpfFIRBW);
60  s.writeU64(12, m_devSampleRate);
61  s.writeS32(13, m_att);
62  s.writeS32(14, (int) m_antennaPath);
63  s.writeBool(15, m_transverterMode);
64  s.writeS64(16, m_transverterDeltaFrequency);
65  s.writeBool(17, m_useReverseAPI);
66  s.writeString(18, m_reverseAPIAddress);
67  s.writeU32(19, m_reverseAPIPort);
68  s.writeU32(20, m_reverseAPIDeviceIndex);
69 
70  return s.final();
71 }
qint32 m_LOppmTenths
XO correction.
qint32 m_att
"hardware" attenuation in dB fourths
quint32 m_lpfBW
analog lowpass filter bandwidth (Hz)
bool m_lpfFIREnable
enable digital lowpass FIR filter
quint32 m_lpfFIRlog2Interp
digital lowpass FIR filter log2 of interpolation factor (0..2)
quint64 m_devSampleRate
Host interface sample rate.
int m_lpfFIRGain
digital lowpass FIR filter gain (dB)
quint32 m_lpfFIRBW
digital lowpass FIR filter bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ translateRFPath()

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

Definition at line 132 of file plutosdroutputsettings.cpp.

References RFPATH_A, and RFPATH_B.

Referenced by PlutoSDROutput::applySettings().

133 {
134  switch(path)
135  {
136  case RFPATH_A:
137  s = "A";
138  break;
139  case RFPATH_B:
140  s = "B";
141  break;
142  default:
143  s = "A";
144  break;
145  }
146 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

RFPath PlutoSDROutputSettings::m_antennaPath

◆ m_att

qint32 PlutoSDROutputSettings::m_att

◆ m_centerFrequency

quint64 PlutoSDROutputSettings::m_centerFrequency

◆ m_devSampleRate

quint64 PlutoSDROutputSettings::m_devSampleRate

◆ m_log2Interp

quint32 PlutoSDROutputSettings::m_log2Interp

◆ m_LOppmTenths

qint32 PlutoSDROutputSettings::m_LOppmTenths

◆ m_lpfBW

quint32 PlutoSDROutputSettings::m_lpfBW

◆ m_lpfFIRBW

quint32 PlutoSDROutputSettings::m_lpfFIRBW

◆ m_lpfFIREnable

bool PlutoSDROutputSettings::m_lpfFIREnable

◆ m_lpfFIRGain

int PlutoSDROutputSettings::m_lpfFIRGain

◆ m_lpfFIRlog2Interp

quint32 PlutoSDROutputSettings::m_lpfFIRlog2Interp

◆ m_reverseAPIAddress

QString PlutoSDROutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t PlutoSDROutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t PlutoSDROutputSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 PlutoSDROutputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool PlutoSDROutputSettings::m_transverterMode

◆ m_useReverseAPI

bool PlutoSDROutputSettings::m_useReverseAPI

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