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

#include <bladerf2inputsettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
qint32 m_LOppmTenths
 
qint32 m_devSampleRate
 
qint32 m_bandwidth
 
int m_gainMode
 
int m_globalGain
 
bool m_biasTee
 
quint32 m_log2Decim
 
fcPos_t m_fcPos
 
bool m_dcBlock
 
bool m_iqCorrection
 
bool m_transverterMode
 
qint64 m_transverterDeltaFrequency
 
QString m_fileRecordName
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 24 of file bladerf2inputsettings.h.

Member Enumeration Documentation

◆ fcPos_t

Constructor & Destructor Documentation

◆ BladeRF2InputSettings()

BladeRF2InputSettings::BladeRF2InputSettings ( )

Definition at line 22 of file bladerf2inputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool BladeRF2InputSettings::deserialize ( const QByteArray &  data)

Definition at line 73 of file bladerf2inputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_bandwidth, m_biasTee, m_dcBlock, m_devSampleRate, m_fcPos, m_gainMode, m_globalGain, m_iqCorrection, m_log2Decim, 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 BladeRF2InputGui::deserialize(), and BladeRF2Input::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_devSampleRate, 3072000);
89  d.readS32(2, &m_bandwidth);
90  d.readS32(3, &m_gainMode);
91  d.readS32(4, &m_globalGain);
92  d.readBool(5, &m_biasTee);
93  d.readU32(6, &m_log2Decim);
94  d.readS32(7, &intval);
95  m_fcPos = (fcPos_t) intval;
96  d.readBool(8, &m_dcBlock);
97  d.readBool(9, &m_iqCorrection);
98  d.readS32(10, &m_LOppmTenths);
99  d.readBool(11, &m_transverterMode, false);
100  d.readS64(12, &m_transverterDeltaFrequency, 0);
101  d.readBool(13, &m_useReverseAPI, false);
102  d.readString(14, &m_reverseAPIAddress, "127.0.0.1");
103  d.readU32(15, &uintval, 0);
104 
105  if ((uintval > 1023) && (uintval < 65535)) {
106  m_reverseAPIPort = uintval;
107  } else {
108  m_reverseAPIPort = 8888;
109  }
110 
111  d.readU32(16, &uintval, 0);
112  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
113 
114  return true;
115  }
116  else
117  {
118  resetToDefaults();
119  return false;
120  }
121 }
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 BladeRF2InputSettings::resetToDefaults ( )

Definition at line 27 of file bladerf2inputsettings.cpp.

References FC_POS_INFRA, m_bandwidth, m_biasTee, m_centerFrequency, m_dcBlock, m_devSampleRate, m_fcPos, m_fileRecordName, m_gainMode, m_globalGain, m_iqCorrection, m_log2Decim, m_LOppmTenths, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_transverterDeltaFrequency, m_transverterMode, and m_useReverseAPI.

Referenced by BladeRF2InputSettings(), deserialize(), BladeRF2Input::deserialize(), and BladeRF2InputGui::resetToDefaults().

28 {
29  m_centerFrequency = 435000*1000;
30  m_LOppmTenths = 0;
31  m_devSampleRate = 3072000;
32  m_bandwidth = 1500000;
33  m_gainMode = 0;
34  m_globalGain = 0;
35  m_biasTee = false;
36  m_log2Decim = 0;
38  m_dcBlock = false;
39  m_iqCorrection = false;
40  m_transverterMode = false;
42  m_fileRecordName = "";
43  m_useReverseAPI = false;
44  m_reverseAPIAddress = "127.0.0.1";
45  m_reverseAPIPort = 8888;
47 }
+ Here is the caller graph for this function:

◆ serialize()

QByteArray BladeRF2InputSettings::serialize ( ) const

Definition at line 49 of file bladerf2inputsettings.cpp.

References SimpleSerializer::final(), m_bandwidth, m_biasTee, m_dcBlock, m_devSampleRate, m_fcPos, m_gainMode, m_globalGain, m_iqCorrection, m_log2Decim, 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 BladeRF2InputGui::serialize(), and BladeRF2Input::serialize().

50 {
51  SimpleSerializer s(1);
52 
53  s.writeS32(1, m_devSampleRate);
54  s.writeS32(2, m_bandwidth);
55  s.writeS32(3, m_gainMode);
56  s.writeS32(4, m_globalGain);
57  s.writeBool(5, m_biasTee);
58  s.writeU32(6, m_log2Decim);
59  s.writeS32(7, (int) m_fcPos);
60  s.writeBool(8, m_dcBlock);
61  s.writeBool(9, m_iqCorrection);
62  s.writeS32(10, m_LOppmTenths);
63  s.writeBool(11, m_transverterMode);
64  s.writeS64(12, m_transverterDeltaFrequency);
65  s.writeBool(13, m_useReverseAPI);
66  s.writeString(14, m_reverseAPIAddress);
67  s.writeU32(15, m_reverseAPIPort);
68  s.writeU32(16, m_reverseAPIDeviceIndex);
69 
70  return s.final();
71 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidth

qint32 BladeRF2InputSettings::m_bandwidth

◆ m_biasTee

bool BladeRF2InputSettings::m_biasTee

◆ m_centerFrequency

quint64 BladeRF2InputSettings::m_centerFrequency

◆ m_dcBlock

bool BladeRF2InputSettings::m_dcBlock

◆ m_devSampleRate

qint32 BladeRF2InputSettings::m_devSampleRate

◆ m_fcPos

fcPos_t BladeRF2InputSettings::m_fcPos

◆ m_fileRecordName

QString BladeRF2InputSettings::m_fileRecordName

◆ m_gainMode

int BladeRF2InputSettings::m_gainMode

◆ m_globalGain

int BladeRF2InputSettings::m_globalGain

◆ m_iqCorrection

bool BladeRF2InputSettings::m_iqCorrection

◆ m_log2Decim

quint32 BladeRF2InputSettings::m_log2Decim

◆ m_LOppmTenths

qint32 BladeRF2InputSettings::m_LOppmTenths

◆ m_reverseAPIAddress

QString BladeRF2InputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t BladeRF2InputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t BladeRF2InputSettings::m_reverseAPIPort

◆ m_transverterDeltaFrequency

qint64 BladeRF2InputSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool BladeRF2InputSettings::m_transverterMode

◆ m_useReverseAPI

bool BladeRF2InputSettings::m_useReverseAPI

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