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

#include <fcdproplussettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
bool m_rangeLow
 
bool m_lnaGain
 
bool m_mixGain
 
bool m_biasT
 
quint32 m_ifGain
 
qint32 m_ifFilterIndex
 
qint32 m_rfFilterIndex
 
qint32 m_LOppmTenths
 
quint32 m_log2Decim
 
fcPos_t m_fcPos
 
bool m_dcBlock
 
bool m_iqImbalance
 
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 23 of file fcdproplussettings.h.

Member Enumeration Documentation

◆ fcPos_t

Constructor & Destructor Documentation

◆ FCDProPlusSettings()

FCDProPlusSettings::FCDProPlusSettings ( )

Definition at line 22 of file fcdproplussettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool FCDProPlusSettings::deserialize ( const QByteArray &  data)

Definition at line 76 of file fcdproplussettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_biasT, m_dcBlock, m_fcPos, m_ifFilterIndex, m_ifGain, m_iqImbalance, m_log2Decim, m_LOppmTenths, m_mixGain, m_rangeLow, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfFilterIndex, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readS64(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by FCDProPlusGui::deserialize(), and FCDProPlusInput::deserialize().

77 {
78  SimpleDeserializer d(data);
79 
80  if (!d.isValid())
81  {
83  return false;
84  }
85 
86  if (d.getVersion() == 1)
87  {
88  int intval;
89  uint32_t uintval;
90 
91  d.readBool(1, &m_biasT, false);
92  d.readBool(2, &m_rangeLow, false);
93  d.readBool(3, &m_mixGain, true);
94  d.readS32(4, &m_ifFilterIndex, 0);
95  d.readS32(5, &m_rfFilterIndex, 0);
96  d.readU32(6, &m_log2Decim, 0);
97  d.readS32(7, &intval, 2);
98  m_fcPos = (fcPos_t) intval;
99  d.readBool(8, &m_dcBlock, false);
100  d.readBool(9, &m_iqImbalance, false);
101  d.readS32(10, &m_LOppmTenths, 0);
102  d.readU32(11, &m_ifGain, 0);
103  d.readBool(12, &m_transverterMode, false);
104  d.readS64(13, &m_transverterDeltaFrequency, 0);
105  d.readBool(14, &m_useReverseAPI, false);
106  d.readString(15, &m_reverseAPIAddress, "127.0.0.1");
107  d.readU32(16, &uintval, 0);
108 
109  if ((uintval > 1023) && (uintval < 65535)) {
110  m_reverseAPIPort = uintval;
111  } else {
112  m_reverseAPIPort = 8888;
113  }
114 
115  d.readU32(17, &uintval, 0);
116  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
117  return true;
118  }
119  else
120  {
121  resetToDefaults();
122  return false;
123  }
124 }
unsigned int uint32_t
Definition: rtptypes_win.h:46
uint16_t m_reverseAPIDeviceIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void FCDProPlusSettings::resetToDefaults ( )

Definition at line 27 of file fcdproplussettings.cpp.

References FC_POS_CENTER, m_biasT, m_centerFrequency, m_dcBlock, m_fcPos, m_fileRecordName, m_ifFilterIndex, m_ifGain, m_iqImbalance, m_lnaGain, m_log2Decim, m_LOppmTenths, m_mixGain, m_rangeLow, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfFilterIndex, m_transverterDeltaFrequency, m_transverterMode, and m_useReverseAPI.

Referenced by deserialize(), FCDProPlusInput::deserialize(), FCDProPlusSettings(), and FCDProPlusGui::resetToDefaults().

28 {
29  m_centerFrequency = 435000000;
30  m_rangeLow = true;
31  m_lnaGain = true;
32  m_biasT = false;
33  m_ifGain = 0;
34  m_mixGain = 0;
35  m_rfFilterIndex = 0;
36  m_ifFilterIndex = 0;
37  m_LOppmTenths = 0;
38  m_log2Decim = 0;
40  m_dcBlock = false;
41  m_iqImbalance = false;
42  m_transverterMode = false;
44  m_fileRecordName = "";
45  m_useReverseAPI = false;
46  m_reverseAPIAddress = "127.0.0.1";
47  m_reverseAPIPort = 8888;
49 }
uint16_t m_reverseAPIDeviceIndex
+ Here is the caller graph for this function:

◆ serialize()

QByteArray FCDProPlusSettings::serialize ( ) const

Definition at line 51 of file fcdproplussettings.cpp.

References SimpleSerializer::final(), m_biasT, m_dcBlock, m_fcPos, m_ifFilterIndex, m_ifGain, m_iqImbalance, m_log2Decim, m_LOppmTenths, m_mixGain, m_rangeLow, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_rfFilterIndex, m_transverterDeltaFrequency, m_transverterMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeS64(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by FCDProPlusGui::serialize(), and FCDProPlusInput::serialize().

52 {
53  SimpleSerializer s(1);
54 
55  s.writeBool(1, m_biasT);
56  s.writeBool(2, m_rangeLow);
57  s.writeBool(3, m_mixGain);
58  s.writeS32(4, m_ifFilterIndex);
59  s.writeS32(5, m_rfFilterIndex);
60  s.writeU32(6, m_log2Decim);
61  s.writeS32(7, (int) m_fcPos);
62  s.writeBool(8, m_dcBlock);
63  s.writeBool(9, m_iqImbalance);
64  s.writeS32(10, m_LOppmTenths);
65  s.writeU32(11, m_ifGain);
66  s.writeBool(12, m_transverterMode);
67  s.writeS64(13, m_transverterDeltaFrequency);
68  s.writeBool(14, m_useReverseAPI);
69  s.writeString(15, m_reverseAPIAddress);
70  s.writeU32(16, m_reverseAPIPort);
71  s.writeU32(17, m_reverseAPIDeviceIndex);
72 
73  return s.final();
74 }
uint16_t m_reverseAPIDeviceIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_biasT

bool FCDProPlusSettings::m_biasT

◆ m_centerFrequency

quint64 FCDProPlusSettings::m_centerFrequency

◆ m_dcBlock

bool FCDProPlusSettings::m_dcBlock

◆ m_fcPos

fcPos_t FCDProPlusSettings::m_fcPos

◆ m_fileRecordName

QString FCDProPlusSettings::m_fileRecordName

◆ m_ifFilterIndex

qint32 FCDProPlusSettings::m_ifFilterIndex

◆ m_ifGain

quint32 FCDProPlusSettings::m_ifGain

◆ m_iqImbalance

bool FCDProPlusSettings::m_iqImbalance

◆ m_lnaGain

bool FCDProPlusSettings::m_lnaGain

◆ m_log2Decim

quint32 FCDProPlusSettings::m_log2Decim

◆ m_LOppmTenths

qint32 FCDProPlusSettings::m_LOppmTenths

◆ m_mixGain

bool FCDProPlusSettings::m_mixGain

◆ m_rangeLow

bool FCDProPlusSettings::m_rangeLow

◆ m_reverseAPIAddress

QString FCDProPlusSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t FCDProPlusSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t FCDProPlusSettings::m_reverseAPIPort

◆ m_rfFilterIndex

qint32 FCDProPlusSettings::m_rfFilterIndex

◆ m_transverterDeltaFrequency

qint64 FCDProPlusSettings::m_transverterDeltaFrequency

◆ m_transverterMode

bool FCDProPlusSettings::m_transverterMode

◆ m_useReverseAPI

bool FCDProPlusSettings::m_useReverseAPI

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