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

#include <bladerf1outputsettings.h>

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
qint32 m_devSampleRate
 
qint32 m_vga1
 
qint32 m_vga2
 
qint32 m_bandwidth
 
quint32 m_log2Interp
 
bool m_xb200
 
bladerf_xb200_path m_xb200Path
 
bladerf_xb200_filter m_xb200Filter
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 26 of file bladerf1outputsettings.h.

Constructor & Destructor Documentation

◆ BladeRF1OutputSettings()

BladeRF1OutputSettings::BladeRF1OutputSettings ( )

Definition at line 24 of file bladerf1outputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool BladeRF1OutputSettings::deserialize ( const QByteArray &  data)

Definition at line 66 of file bladerf1outputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_bandwidth, m_devSampleRate, m_log2Interp, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, m_vga1, m_vga2, m_xb200, m_xb200Filter, m_xb200Path, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by Bladerf1OutputGui::deserialize(), and Bladerf1Output::deserialize().

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

◆ resetToDefaults()

void BladeRF1OutputSettings::resetToDefaults ( )

Definition at line 29 of file bladerf1outputsettings.cpp.

References m_bandwidth, m_centerFrequency, m_devSampleRate, m_log2Interp, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, m_vga1, m_vga2, m_xb200, m_xb200Filter, and m_xb200Path.

Referenced by BladeRF1OutputSettings(), deserialize(), Bladerf1Output::deserialize(), and Bladerf1OutputGui::resetToDefaults().

30 {
31  m_centerFrequency = 435000*1000;
32  m_devSampleRate = 3072000;
33  m_vga1 = -20;
34  m_vga2 = 20;
35  m_bandwidth = 1500000;
36  m_log2Interp = 0;
37  m_xb200 = false;
38  m_xb200Path = BLADERF_XB200_MIX;
39  m_xb200Filter = BLADERF_XB200_AUTO_1DB;
40  m_useReverseAPI = false;
41  m_reverseAPIAddress = "127.0.0.1";
42  m_reverseAPIPort = 8888;
44 }
bladerf_xb200_path m_xb200Path
bladerf_xb200_filter m_xb200Filter
+ Here is the caller graph for this function:

◆ serialize()

QByteArray BladeRF1OutputSettings::serialize ( ) const

Definition at line 46 of file bladerf1outputsettings.cpp.

References SimpleSerializer::final(), m_bandwidth, m_devSampleRate, m_log2Interp, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, m_vga1, m_vga2, m_xb200, m_xb200Filter, m_xb200Path, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by Bladerf1OutputGui::serialize(), and Bladerf1Output::serialize().

47 {
48  SimpleSerializer s(1);
49 
50  s.writeS32(1, m_devSampleRate);
51  s.writeS32(2, m_vga1);
52  s.writeS32(3, m_vga2);
53  s.writeS32(4, m_bandwidth);
54  s.writeU32(5, m_log2Interp);
55  s.writeBool(6, m_xb200);
56  s.writeS32(7, (int) m_xb200Path);
57  s.writeS32(8, (int) m_xb200Filter);
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 }
bladerf_xb200_path m_xb200Path
bladerf_xb200_filter m_xb200Filter
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidth

qint32 BladeRF1OutputSettings::m_bandwidth

◆ m_centerFrequency

quint64 BladeRF1OutputSettings::m_centerFrequency

◆ m_devSampleRate

qint32 BladeRF1OutputSettings::m_devSampleRate

◆ m_log2Interp

quint32 BladeRF1OutputSettings::m_log2Interp

◆ m_reverseAPIAddress

QString BladeRF1OutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t BladeRF1OutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t BladeRF1OutputSettings::m_reverseAPIPort

◆ m_useReverseAPI

bool BladeRF1OutputSettings::m_useReverseAPI

◆ m_vga1

qint32 BladeRF1OutputSettings::m_vga1

◆ m_vga2

qint32 BladeRF1OutputSettings::m_vga2

◆ m_xb200

bool BladeRF1OutputSettings::m_xb200

◆ m_xb200Filter

bladerf_xb200_filter BladeRF1OutputSettings::m_xb200Filter

◆ m_xb200Path

bladerf_xb200_path BladeRF1OutputSettings::m_xb200Path

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