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

#include <sdrplaysettings.h>

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

 SDRPlaySettings ()
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
void debug (const char *title) const
 

Public Attributes

uint64_t m_centerFrequency
 
qint32 m_tunerGain
 
int32_t m_LOppmTenths
 
uint32_t m_frequencyBandIndex
 
uint32_t m_ifFrequencyIndex
 
uint32_t m_bandwidthIndex
 
uint32_t m_devSampleRateIndex
 
uint32_t m_log2Decim
 
fcPos_t m_fcPos
 
bool m_dcBlock
 
bool m_iqCorrection
 
bool m_tunerGainMode
 
bool m_lnaOn
 
bool m_mixerAmpOn
 
int m_basebandGain
 
QString m_fileRecordName
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 26 of file sdrplaysettings.h.

Member Enumeration Documentation

◆ fcPos_t

Enumerator
FC_POS_INFRA 
FC_POS_SUPRA 
FC_POS_CENTER 

Definition at line 27 of file sdrplaysettings.h.

Constructor & Destructor Documentation

◆ SDRPlaySettings()

SDRPlaySettings::SDRPlaySettings ( )

Definition at line 23 of file sdrplaysettings.cpp.

References resetToDefaults().

24 {
26 }
+ Here is the call graph for this function:

Member Function Documentation

◆ debug()

void SDRPlaySettings::debug ( const char *  title) const
inline

Definition at line 59 of file sdrplaysettings.h.

References m_basebandGain.

60  {
61  qDebug() << QString(title)
62  << ": m_centerFrequency: " << m_centerFrequency
63  << " m_tunerGain: " << m_tunerGain
64  << " m_LOppmTenths: " << m_LOppmTenths
65  << " m_frequencyBandIndex: " << m_frequencyBandIndex
66  << " m_ifFrequencyIndex: " << m_ifFrequencyIndex
67  << " m_bandwidthIndex: " << m_bandwidthIndex
68  << " m_devSampleRateIndex: " << m_devSampleRateIndex
69  << " m_log2Decim: " << m_log2Decim
70  << " m_fcPos: " << m_fcPos
71  << " m_dcBlock: " << m_dcBlock
72  << " m_iqCorrection: " << m_iqCorrection
73  << " m_tunerGainMode: " << m_tunerGainMode
74  << " m_lnaOn: " << m_lnaOn
75  << " m_mixerAmpOn: " << m_mixerAmpOn
76  << " m_basebandGain: " << m_basebandGain;
77  }
uint32_t m_ifFrequencyIndex
uint64_t m_centerFrequency
uint32_t m_frequencyBandIndex
uint32_t m_log2Decim
uint32_t m_bandwidthIndex
uint32_t m_devSampleRateIndex

◆ deserialize()

bool SDRPlaySettings::deserialize ( const QByteArray &  data)

Definition at line 78 of file sdrplaysettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_bandwidthIndex, m_basebandGain, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_frequencyBandIndex, m_ifFrequencyIndex, m_iqCorrection, m_lnaOn, m_log2Decim, m_LOppmTenths, m_mixerAmpOn, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tunerGain, m_tunerGainMode, m_useReverseAPI, SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by SDRPlayGui::deserialize(), and SDRPlayInput::deserialize().

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

◆ resetToDefaults()

void SDRPlaySettings::resetToDefaults ( )

Definition at line 28 of file sdrplaysettings.cpp.

References FC_POS_CENTER, m_bandwidthIndex, m_basebandGain, m_centerFrequency, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_fileRecordName, m_frequencyBandIndex, m_ifFrequencyIndex, m_iqCorrection, m_lnaOn, m_log2Decim, m_LOppmTenths, m_mixerAmpOn, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tunerGain, m_tunerGainMode, and m_useReverseAPI.

Referenced by deserialize(), SDRPlayInput::deserialize(), SDRPlayGui::resetToDefaults(), and SDRPlaySettings().

29 {
30  m_centerFrequency = 7040*1000;
31  m_tunerGain = 0;
32  m_LOppmTenths = 0;
35  m_bandwidthIndex = 0;
37  m_log2Decim = 0;
39  m_dcBlock = false;
40  m_iqCorrection = false;
41  m_tunerGainMode = true;
42  m_lnaOn = false;
43  m_mixerAmpOn = false;
44  m_basebandGain = 29;
45  m_fileRecordName = "";
46  m_useReverseAPI = false;
47  m_reverseAPIAddress = "127.0.0.1";
48  m_reverseAPIPort = 8888;
50 }
uint32_t m_ifFrequencyIndex
uint16_t m_reverseAPIPort
QString m_reverseAPIAddress
QString m_fileRecordName
uint64_t m_centerFrequency
uint32_t m_frequencyBandIndex
uint32_t m_log2Decim
uint32_t m_bandwidthIndex
uint16_t m_reverseAPIDeviceIndex
uint32_t m_devSampleRateIndex
+ Here is the caller graph for this function:

◆ serialize()

QByteArray SDRPlaySettings::serialize ( ) const

Definition at line 52 of file sdrplaysettings.cpp.

References SimpleSerializer::final(), m_bandwidthIndex, m_basebandGain, m_dcBlock, m_devSampleRateIndex, m_fcPos, m_frequencyBandIndex, m_ifFrequencyIndex, m_iqCorrection, m_lnaOn, m_log2Decim, m_LOppmTenths, m_mixerAmpOn, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_tunerGain, m_tunerGainMode, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by SDRPlayGui::serialize(), and SDRPlayInput::serialize().

53 {
54  SimpleSerializer s(1);
55 
56  s.writeS32(1, m_LOppmTenths);
57  s.writeU32(2, m_frequencyBandIndex);
58  s.writeU32(3, m_ifFrequencyIndex);
59  s.writeS32(4, m_tunerGain);
60  s.writeU32(5, m_bandwidthIndex);
61  s.writeU32(6, m_devSampleRateIndex);
62  s.writeU32(7, m_log2Decim);
63  s.writeS32(8, (int) m_fcPos);
64  s.writeBool(9, m_dcBlock);
65  s.writeBool(10, m_iqCorrection);
66  s.writeBool(11, m_tunerGainMode);
67  s.writeBool(12, m_lnaOn);
68  s.writeBool(13, m_mixerAmpOn);
69  s.writeS32(14, m_basebandGain);
70  s.writeBool(15, m_useReverseAPI);
71  s.writeString(16, m_reverseAPIAddress);
72  s.writeU32(17, m_reverseAPIPort);
73  s.writeU32(18, m_reverseAPIDeviceIndex);
74 
75  return s.final();
76 }
uint32_t m_ifFrequencyIndex
uint16_t m_reverseAPIPort
QString m_reverseAPIAddress
uint32_t m_frequencyBandIndex
uint32_t m_log2Decim
uint32_t m_bandwidthIndex
uint16_t m_reverseAPIDeviceIndex
uint32_t m_devSampleRateIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidthIndex

uint32_t SDRPlaySettings::m_bandwidthIndex

◆ m_basebandGain

int SDRPlaySettings::m_basebandGain

◆ m_centerFrequency

uint64_t SDRPlaySettings::m_centerFrequency

◆ m_dcBlock

bool SDRPlaySettings::m_dcBlock

◆ m_devSampleRateIndex

uint32_t SDRPlaySettings::m_devSampleRateIndex

◆ m_fcPos

fcPos_t SDRPlaySettings::m_fcPos

◆ m_fileRecordName

QString SDRPlaySettings::m_fileRecordName

◆ m_frequencyBandIndex

uint32_t SDRPlaySettings::m_frequencyBandIndex

◆ m_ifFrequencyIndex

uint32_t SDRPlaySettings::m_ifFrequencyIndex

◆ m_iqCorrection

bool SDRPlaySettings::m_iqCorrection

◆ m_lnaOn

bool SDRPlaySettings::m_lnaOn

◆ m_log2Decim

uint32_t SDRPlaySettings::m_log2Decim

◆ m_LOppmTenths

int32_t SDRPlaySettings::m_LOppmTenths

◆ m_mixerAmpOn

bool SDRPlaySettings::m_mixerAmpOn

◆ m_reverseAPIAddress

QString SDRPlaySettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t SDRPlaySettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t SDRPlaySettings::m_reverseAPIPort

◆ m_tunerGain

qint32 SDRPlaySettings::m_tunerGain

◆ m_tunerGainMode

bool SDRPlaySettings::m_tunerGainMode

◆ m_useReverseAPI

bool SDRPlaySettings::m_useReverseAPI

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