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

#include <xtrxoutputsettings.h>

Public Member Functions

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

Public Attributes

uint64_t m_centerFrequency
 
double m_devSampleRate
 
uint32_t m_log2HardInterp
 
uint32_t m_log2SoftInterp
 
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
 
bool m_extClock
 True if external clock source. More...
 
uint32_t m_extClockFreq
 Frequency (Hz) of external clock source. More...
 
uint32_t m_pwrmode
 
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 32 of file xtrxoutputsettings.h.

Constructor & Destructor Documentation

◆ XTRXOutputSettings()

XTRXOutputSettings::XTRXOutputSettings ( )

Definition at line 22 of file xtrxoutputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool XTRXOutputSettings::deserialize ( const QByteArray &  data)

Definition at line 70 of file xtrxoutputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_antennaPath, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readDouble(), SimpleDeserializer::readFloat(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by XTRXOutputGUI::deserialize(), and XTRXOutput::deserialize().

71 {
72  SimpleDeserializer d(data);
73 
74  if (!d.isValid())
75  {
77  return false;
78  }
79 
80  if (d.getVersion() == 1)
81  {
82  int intval;
83  uint32_t uintval;
84 
85  d.readDouble(1, &m_devSampleRate, 5e6);
86  d.readU32(2, &m_log2HardInterp, 2);
87  d.readU32(3, &m_log2SoftInterp, 0);
88  d.readFloat(4, &m_lpfBW, 1.5e6);
89  d.readU32(5, &m_gain, 20);
90  d.readBool(6, &m_ncoEnable, true);
91  d.readS32(7, &m_ncoFrequency, 500000);
92  d.readS32(8, &intval, 0);
93  m_antennaPath = (xtrx_antenna_t) intval;
94  d.readBool(9, &m_extClock, false);
95  d.readU32(10, &m_extClockFreq, 0);
96  d.readU32(11, &m_pwrmode, 2);
97  d.readBool(12, &m_useReverseAPI, false);
98  d.readString(13, &m_reverseAPIAddress, "127.0.0.1");
99  d.readU32(14, &uintval, 0);
100 
101  if ((uintval > 1023) && (uintval < 65535)) {
102  m_reverseAPIPort = uintval;
103  } else {
104  m_reverseAPIPort = 8888;
105  }
106 
107  d.readU32(15, &uintval, 0);
108  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
109 
110  return true;
111  }
112  else
113  {
114  resetToDefaults();
115  return false;
116  }
117 
118 }
bool m_extClock
True if external clock source.
uint32_t m_gain
Optimally distributed gain (dB)
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
xtrx_antenna_t m_antennaPath
bool m_ncoEnable
Enable TSP NCO and mixing.
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint16_t m_reverseAPIDeviceIndex
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void XTRXOutputSettings::resetToDefaults ( )

Definition at line 27 of file xtrxoutputsettings.cpp.

References m_antennaPath, m_centerFrequency, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, and m_useReverseAPI.

Referenced by deserialize(), XTRXOutput::deserialize(), XTRXOutputGUI::resetToDefaults(), and XTRXOutputSettings().

28 {
29  m_centerFrequency = 435000*1000;
30  m_devSampleRate = 5e6;
31  m_log2HardInterp = 2;
32  m_log2SoftInterp = 4;
33  m_lpfBW = 4.5e6f;
34  m_gain = 20;
35  m_ncoEnable = true;
36  m_ncoFrequency = 500000;
37  m_antennaPath = XTRX_TX_W;
38  m_extClock = false;
39  m_extClockFreq = 0; // Auto
40  m_pwrmode = 1;
41  m_useReverseAPI = false;
42  m_reverseAPIAddress = "127.0.0.1";
43  m_reverseAPIPort = 8888;
45 }
bool m_extClock
True if external clock source.
uint32_t m_gain
Optimally distributed gain (dB)
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
xtrx_antenna_t m_antennaPath
bool m_ncoEnable
Enable TSP NCO and mixing.
uint16_t m_reverseAPIDeviceIndex
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
+ Here is the caller graph for this function:

◆ serialize()

QByteArray XTRXOutputSettings::serialize ( ) const

Definition at line 47 of file xtrxoutputsettings.cpp.

References SimpleSerializer::final(), m_antennaPath, m_devSampleRate, m_extClock, m_extClockFreq, m_gain, m_log2HardInterp, m_log2SoftInterp, m_lpfBW, m_ncoEnable, m_ncoFrequency, m_pwrmode, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeDouble(), SimpleSerializer::writeFloat(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by XTRXOutputGUI::serialize(), and XTRXOutput::serialize().

48 {
49  SimpleSerializer s(1);
50 
51  s.writeDouble(1, m_devSampleRate);
52  s.writeU32(2, m_log2HardInterp);
53  s.writeU32(3, m_log2SoftInterp);
54  s.writeFloat(4, m_lpfBW);
55  s.writeU32(5, m_gain);
56  s.writeBool(6, m_ncoEnable);
57  s.writeS32(7, m_ncoFrequency);
58  s.writeS32(8, (int) m_antennaPath);
59  s.writeBool(9, m_extClock);
60  s.writeU32(10, m_extClockFreq);
61  s.writeU32(11, m_pwrmode);
62  s.writeBool(12, m_useReverseAPI);
63  s.writeString(13, m_reverseAPIAddress);
64  s.writeU32(14, m_reverseAPIPort);
65  s.writeU32(15, m_reverseAPIDeviceIndex);
66 
67  return s.final();
68 }
bool m_extClock
True if external clock source.
uint32_t m_gain
Optimally distributed gain (dB)
int m_ncoFrequency
Actual NCO frequency (the resulting frequency with mixing is displayed)
xtrx_antenna_t m_antennaPath
bool m_ncoEnable
Enable TSP NCO and mixing.
uint16_t m_reverseAPIDeviceIndex
uint32_t m_extClockFreq
Frequency (Hz) of external clock source.
float m_lpfBW
LMS analog lowpass filter bandwidth (Hz)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_antennaPath

xtrx_antenna_t XTRXOutputSettings::m_antennaPath

◆ m_centerFrequency

uint64_t XTRXOutputSettings::m_centerFrequency

◆ m_devSampleRate

double XTRXOutputSettings::m_devSampleRate

◆ m_extClock

bool XTRXOutputSettings::m_extClock

◆ m_extClockFreq

uint32_t XTRXOutputSettings::m_extClockFreq

◆ m_gain

uint32_t XTRXOutputSettings::m_gain

◆ m_log2HardInterp

uint32_t XTRXOutputSettings::m_log2HardInterp

◆ m_log2SoftInterp

uint32_t XTRXOutputSettings::m_log2SoftInterp

◆ m_lpfBW

float XTRXOutputSettings::m_lpfBW

◆ m_ncoEnable

bool XTRXOutputSettings::m_ncoEnable

◆ m_ncoFrequency

int XTRXOutputSettings::m_ncoFrequency

◆ m_pwrmode

uint32_t XTRXOutputSettings::m_pwrmode

◆ m_reverseAPIAddress

QString XTRXOutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t XTRXOutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t XTRXOutputSettings::m_reverseAPIPort

◆ m_useReverseAPI

bool XTRXOutputSettings::m_useReverseAPI

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