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

#include <limesdroutputsettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 
enum  PathRFE { PATH_RFE_NONE = 0, PATH_RFE_TXRF1, PATH_RFE_TXEF2 }
 

Public Member Functions

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

Public Attributes

uint64_t m_centerFrequency
 
int m_devSampleRate
 
uint32_t m_log2HardInterp
 
uint32_t m_log2SoftInterp
 
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
 
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
 
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 Tx chain Plus the settings to be saved in the presets

Definition at line 30 of file limesdroutputsettings.h.

Member Enumeration Documentation

◆ fcPos_t

◆ PathRFE

Constructor & Destructor Documentation

◆ LimeSDROutputSettings()

LimeSDROutputSettings::LimeSDROutputSettings ( )

Definition at line 22 of file limesdroutputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool LimeSDROutputSettings::deserialize ( const QByteArray &  data)

Definition at line 80 of file limesdroutputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_gpioDir, m_gpioPins, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readFloat(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by LimeSDROutputGUI::deserialize(), and LimeSDROutput::deserialize().

81 {
82  SimpleDeserializer d(data);
83 
84  if (!d.isValid())
85  {
87  return false;
88  }
89 
90  if (d.getVersion() == 1)
91  {
92  int intval;
93  uint32_t uintval;
94 
95  d.readS32(1, &m_devSampleRate, 5000000);
96  d.readU32(2, &m_log2HardInterp, 2);
97  d.readU32(5, &m_log2SoftInterp, 0);
98  d.readFloat(7, &m_lpfBW, 1.5e6);
99  d.readBool(8, &m_lpfFIREnable, false);
100  d.readFloat(9, &m_lpfFIRBW, 1.5e6);
101  d.readU32(10, &m_gain, 4);
102  d.readBool(11, &m_ncoEnable, false);
103  d.readS32(12, &m_ncoFrequency, 0);
104  d.readS32(13, &intval, 0);
105  m_antennaPath = (PathRFE) intval;
106  d.readBool(14, &m_extClock, false);
107  d.readU32(15, &m_extClockFreq, 10000000);
108  d.readBool(16, &m_transverterMode, false);
109  d.readS64(17, &m_transverterDeltaFrequency, 0);
110  d.readU32(18, &uintval, 0);
111  m_gpioDir = uintval & 0xFF;
112  d.readU32(19, &uintval, 0);
113  m_gpioPins = uintval & 0xFF;
114  d.readBool(20, &m_useReverseAPI, false);
115  d.readString(21, &m_reverseAPIAddress, "127.0.0.1");
116  d.readU32(22, &uintval, 0);
117 
118  if ((uintval > 1023) && (uintval < 65535)) {
119  m_reverseAPIPort = uintval;
120  } else {
121  m_reverseAPIPort = 8888;
122  }
123 
124  d.readU32(23, &uintval, 0);
125  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
126 
127  return true;
128  }
129  else
130  {
131  resetToDefaults();
132  return false;
133  }
134 
135 }
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
unsigned int uint32_t
Definition: rtptypes_win.h:46
bool m_ncoEnable
Enable TSP NCO and mixing.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
bool m_extClock
True if external clock source.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
uint32_t m_gain
Optimally distributed gain (dB)
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LimeSDROutputSettings::resetToDefaults ( )

Definition at line 27 of file limesdroutputsettings.cpp.

References m_antennaPath, m_centerFrequency, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_gpioDir, m_gpioPins, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, and PATH_RFE_NONE.

Referenced by deserialize(), LimeSDROutput::deserialize(), LimeSDROutputSettings(), and LimeSDROutputGUI::resetToDefaults().

28 {
29  m_centerFrequency = 435000*1000;
30  m_devSampleRate = 5000000;
31  m_log2HardInterp = 3;
32  m_log2SoftInterp = 0;
33  m_lpfBW = 5.5e6f;
34  m_lpfFIREnable = false;
35  m_lpfFIRBW = 2.5e6f;
36  m_gain = 4;
37  m_ncoEnable = false;
38  m_ncoFrequency = 0;
40  m_extClock = false;
41  m_extClockFreq = 10000000; // 10 MHz
42  m_transverterMode = false;
44  m_gpioDir = 0;
45  m_gpioPins = 0;
46  m_useReverseAPI = false;
47  m_reverseAPIAddress = "127.0.0.1";
48  m_reverseAPIPort = 8888;
50 }
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
bool m_ncoEnable
Enable TSP NCO and mixing.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
bool m_extClock
True if external clock source.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
uint32_t m_gain
Optimally distributed gain (dB)
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
+ Here is the caller graph for this function:

◆ serialize()

QByteArray LimeSDROutputSettings::serialize ( ) const

Definition at line 52 of file limesdroutputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_gpioDir, m_gpioPins, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_lpfFIRBW, m_lpfFIREnable, m_ncoEnable, m_ncoFrequency, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeFloat(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by LimeSDROutputGUI::serialize(), and LimeSDROutput::serialize().

53 {
54  SimpleSerializer s(1);
55 
56  s.writeS32(1, m_devSampleRate);
57  s.writeU32(2, m_log2HardInterp);
58  s.writeU32(5, m_log2SoftInterp);
59  s.writeFloat(7, m_lpfBW);
60  s.writeBool(8, m_lpfFIREnable);
61  s.writeFloat(9, m_lpfFIRBW);
62  s.writeU32(10, m_gain);
63  s.writeBool(11, m_ncoEnable);
64  s.writeS32(12, m_ncoFrequency);
65  s.writeS32(13, (int) m_antennaPath);
66  s.writeBool(14, m_extClock);
67  s.writeU32(15, m_extClockFreq);
68  s.writeBool(16, m_transverterMode);
69  s.writeS64(17, m_transverterDeltaFrequency);
70  s.writeU32(18, m_gpioDir);
71  s.writeU32(19, m_gpioPins);
72  s.writeBool(20, m_useReverseAPI);
73  s.writeString(21, m_reverseAPIAddress);
74  s.writeU32(22, m_reverseAPIPort);
75  s.writeU32(23, m_reverseAPIDeviceIndex);
76 
77  return s.final();
78 }
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
bool m_ncoEnable
Enable TSP NCO and mixing.
uint8_t m_gpioPins
GPIO pins to write; LSB first.
uint8_t m_gpioDir
GPIO pin direction LSB first; 0 input, 1 output.
bool m_extClock
True if external clock source.
bool m_lpfFIREnable
Enable LMS digital lowpass FIR filters.
uint32_t m_gain
Optimally distributed gain (dB)
float m_lpfBW
LMS amalog lowpass filter bandwidth (Hz)
float m_lpfFIRBW
LMS digital lowpass FIR filters bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

PathRFE LimeSDROutputSettings::m_antennaPath

◆ m_centerFrequency

uint64_t LimeSDROutputSettings::m_centerFrequency

◆ m_devSampleRate

int LimeSDROutputSettings::m_devSampleRate

◆ m_extClock

bool LimeSDROutputSettings::m_extClock

◆ m_extClockFreq

uint32_t LimeSDROutputSettings::m_extClockFreq

◆ m_gain

uint32_t LimeSDROutputSettings::m_gain

◆ m_gpioDir

uint8_t LimeSDROutputSettings::m_gpioDir

◆ m_gpioPins

uint8_t LimeSDROutputSettings::m_gpioPins

◆ m_log2HardInterp

uint32_t LimeSDROutputSettings::m_log2HardInterp

◆ m_log2SoftInterp

uint32_t LimeSDROutputSettings::m_log2SoftInterp

◆ m_lpfBW

float LimeSDROutputSettings::m_lpfBW

◆ m_lpfFIRBW

float LimeSDROutputSettings::m_lpfFIRBW

◆ m_lpfFIREnable

bool LimeSDROutputSettings::m_lpfFIREnable

◆ m_ncoEnable

bool LimeSDROutputSettings::m_ncoEnable

◆ m_ncoFrequency

int LimeSDROutputSettings::m_ncoFrequency

◆ m_reverseAPIAddress

QString LimeSDROutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t LimeSDROutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t LimeSDROutputSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 LimeSDROutputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool LimeSDROutputSettings::m_transverterMode

◆ m_useReverseAPI

bool LimeSDROutputSettings::m_useReverseAPI

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