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

#include <bladerf2outputsettings.h>

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
int m_LOppmTenths
 
qint32 m_devSampleRate
 
qint32 m_bandwidth
 
int m_globalGain
 
bool m_biasTee
 
quint32 m_log2Interp
 
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 24 of file bladerf2outputsettings.h.

Constructor & Destructor Documentation

◆ BladeRF2OutputSettings()

BladeRF2OutputSettings::BladeRF2OutputSettings ( )

Definition at line 24 of file bladerf2outputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool BladeRF2OutputSettings::deserialize ( const QByteArray &  data)

Definition at line 66 of file bladerf2outputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_bandwidth, m_biasTee, m_devSampleRate, m_globalGain, m_log2Interp, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by BladeRF2OutputGui::deserialize(), and BladeRF2Output::deserialize().

67 {
68  SimpleDeserializer d(data);
69 
70  if (!d.isValid())
71  {
73  return false;
74  }
75 
76  if (d.getVersion() == 1)
77  {
78  uint32_t uintval;
79 
80  d.readS32(1, &m_devSampleRate);
81  d.readS32(2, &m_bandwidth);
82  d.readS32(3, &m_LOppmTenths);
83  d.readS32(4, &m_globalGain);
84  d.readBool(5, &m_biasTee);
85  d.readU32(6, &m_log2Interp);
86  d.readBool(7, &m_transverterMode, false);
87  d.readS64(8, &m_transverterDeltaFrequency, 0);
88  d.readBool(9, &m_useReverseAPI, false);
89  d.readString(10, &m_reverseAPIAddress, "127.0.0.1");
90  d.readU32(11, &uintval, 0);
91 
92  if ((uintval > 1023) && (uintval < 65535)) {
93  m_reverseAPIPort = uintval;
94  } else {
95  m_reverseAPIPort = 8888;
96  }
97 
98  d.readU32(12, &uintval, 0);
99  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
100 
101  return true;
102  }
103  else
104  {
105  resetToDefaults();
106  return false;
107  }
108 }
unsigned int uint32_t
Definition: rtptypes_win.h:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void BladeRF2OutputSettings::resetToDefaults ( )

Definition at line 29 of file bladerf2outputsettings.cpp.

References m_bandwidth, m_biasTee, m_centerFrequency, m_devSampleRate, m_globalGain, m_log2Interp, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, and m_useReverseAPI.

Referenced by BladeRF2OutputSettings(), deserialize(), BladeRF2Output::deserialize(), and BladeRF2OutputGui::resetToDefaults().

30 {
31  m_centerFrequency = 435000*1000;
32  m_LOppmTenths = 0;
33  m_devSampleRate = 3072000;
34  m_bandwidth = 1500000;
35  m_globalGain = -3;
36  m_biasTee = false;
37  m_log2Interp = 0;
38  m_transverterMode = false;
40  m_useReverseAPI = false;
41  m_reverseAPIAddress = "127.0.0.1";
42  m_reverseAPIPort = 8888;
44 }
+ Here is the caller graph for this function:

◆ serialize()

QByteArray BladeRF2OutputSettings::serialize ( ) const

Definition at line 46 of file bladerf2outputsettings.cpp.

References SimpleSerializer::final(), m_bandwidth, m_biasTee, m_devSampleRate, m_globalGain, m_log2Interp, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by BladeRF2OutputGui::serialize(), and BladeRF2Output::serialize().

47 {
48  SimpleSerializer s(1);
49 
50  s.writeS32(1, m_devSampleRate);
51  s.writeS32(2, m_bandwidth);
52  s.writeS32(3, m_LOppmTenths);
53  s.writeS32(4, m_globalGain);
54  s.writeBool(5, m_biasTee);
55  s.writeU32(6, m_log2Interp);
56  s.writeBool(7, m_transverterMode);
57  s.writeS64(8, m_transverterDeltaFrequency);
58  s.writeBool(9, m_useReverseAPI);
59  s.writeString(10, m_reverseAPIAddress);
60  s.writeU32(11, m_reverseAPIPort);
61  s.writeU32(12, m_reverseAPIDeviceIndex);
62 
63  return s.final();
64 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidth

qint32 BladeRF2OutputSettings::m_bandwidth

◆ m_biasTee

bool BladeRF2OutputSettings::m_biasTee

◆ m_centerFrequency

quint64 BladeRF2OutputSettings::m_centerFrequency

◆ m_devSampleRate

qint32 BladeRF2OutputSettings::m_devSampleRate

◆ m_globalGain

int BladeRF2OutputSettings::m_globalGain

◆ m_log2Interp

quint32 BladeRF2OutputSettings::m_log2Interp

◆ m_LOppmTenths

int BladeRF2OutputSettings::m_LOppmTenths

◆ m_reverseAPIAddress

QString BladeRF2OutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t BladeRF2OutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t BladeRF2OutputSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 BladeRF2OutputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool BladeRF2OutputSettings::m_transverterMode

◆ m_useReverseAPI

bool BladeRF2OutputSettings::m_useReverseAPI

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