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

#include <chanalyzersettings.h>

+ Collaboration diagram for ChannelAnalyzerSettings:

Public Types

enum  InputType { InputSignal, InputPLL, InputAutoCorr }
 

Public Member Functions

 ChannelAnalyzerSettings ()
 
void resetToDefaults ()
 
void setChannelMarker (Serializable *channelMarker)
 
void setSpectrumGUI (Serializable *spectrumGUI)
 
void setScopeGUI (Serializable *scopeGUI)
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 

Public Attributes

int m_frequency
 
bool m_downSample
 
quint32 m_downSampleRate
 
int m_bandwidth
 
int m_lowCutoff
 
int m_spanLog2
 
bool m_ssb
 
bool m_pll
 
bool m_fll
 
bool m_rrc
 
quint32 m_rrcRolloff
 in 100ths More...
 
unsigned int m_pllPskOrder
 
InputType m_inputType
 
quint32 m_rgbColor
 
QString m_title
 
Serializablem_channelMarker
 
Serializablem_spectrumGUI
 
Serializablem_scopeGUI
 

Detailed Description

Definition at line 25 of file chanalyzersettings.h.

Member Enumeration Documentation

◆ InputType

Enumerator
InputSignal 
InputPLL 
InputAutoCorr 

Definition at line 27 of file chanalyzersettings.h.

Constructor & Destructor Documentation

◆ ChannelAnalyzerSettings()

ChannelAnalyzerSettings::ChannelAnalyzerSettings ( )

Definition at line 26 of file chanalyzersettings.cpp.

References resetToDefaults().

26  :
27  m_channelMarker(0),
28  m_spectrumGUI(0),
29  m_scopeGUI(0)
30 {
32 }
Serializable * m_channelMarker
+ Here is the call graph for this function:

Member Function Documentation

◆ deserialize()

bool ChannelAnalyzerSettings::deserialize ( const QByteArray &  data)

Definition at line 78 of file chanalyzersettings.cpp.

References Serializable::deserialize(), SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_bandwidth, m_downSample, m_downSampleRate, m_fll, m_frequency, m_inputType, m_lowCutoff, m_pll, m_pllPskOrder, m_rgbColor, m_rrc, m_rrcRolloff, m_scopeGUI, m_spanLog2, m_spectrumGUI, m_ssb, m_title, SimpleDeserializer::readBlob(), SimpleDeserializer::readBool(), SimpleDeserializer::readS32(), SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by ChannelAnalyzerGUI::deserialize(), and setScopeGUI().

79 {
80  SimpleDeserializer d(data);
81 
82  if(!d.isValid())
83  {
85  return false;
86  }
87 
88  if(d.getVersion() == 1)
89  {
90  QByteArray bytetmp;
91  int tmp;
92 
93  d.readS32(1, &m_frequency, 0);
94  d.readS32(2, &m_bandwidth, 5000);
95 
96  if (m_spectrumGUI) {
97  d.readBlob(3, &bytetmp);
98  m_spectrumGUI->deserialize(bytetmp);
99  }
100 
101  d.readU32(4, &m_rgbColor);
102  d.readS32(5, &m_lowCutoff, 3);
103  d.readS32(6, &m_spanLog2, 0);
104  d.readBool(7, &m_ssb, false);
105 
106  if (m_scopeGUI) {
107  d.readBlob(8, &bytetmp);
108  m_scopeGUI->deserialize(bytetmp);
109  }
110 
111  d.readBool(9, &m_downSample, false);
112  d.readU32(10, &m_downSampleRate, 2000U);
113  d.readBool(11, &m_pll, false);
114  d.readBool(12, &m_fll, false);
115  d.readU32(13, &m_pllPskOrder, 1);
116  d.readS32(14, &tmp, 0);
117  m_inputType = (InputType) tmp;
118  d.readString(15, &m_title, "Channel Analyzer");
119  d.readBool(16, &m_rrc, false);
120  d.readU32(17, &m_rrcRolloff, 35);
121 
122  return true;
123  }
124  else
125  {
126  resetToDefaults();
127  return false;
128  }
129 }
quint32 m_rrcRolloff
in 100ths
virtual bool deserialize(const QByteArray &data)=0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void ChannelAnalyzerSettings::resetToDefaults ( )

Definition at line 34 of file chanalyzersettings.cpp.

References InputSignal, m_bandwidth, m_downSample, m_downSampleRate, m_fll, m_frequency, m_inputType, m_lowCutoff, m_pll, m_pllPskOrder, m_rgbColor, m_rrc, m_rrcRolloff, m_spanLog2, m_ssb, and m_title.

Referenced by ChannelAnalyzerSettings(), ChannelAnalyzerGUI::deserialize(), deserialize(), and ChannelAnalyzerGUI::resetToDefaults().

35 {
36  m_frequency = 0;
37  m_downSample = false;
38  m_downSampleRate = 0;
39  m_bandwidth = 5000;
40  m_lowCutoff = 300;
41  m_spanLog2 = 0;
42  m_ssb = false;
43  m_pll = false;
44  m_fll = false;
45  m_rrc = false;
46  m_rrcRolloff = 35; // 0.35
47  m_pllPskOrder = 1;
49  m_rgbColor = QColor(128, 128, 128).rgb();
50  m_title = "Channel Analyzer";
51 }
quint32 m_rrcRolloff
in 100ths
+ Here is the caller graph for this function:

◆ serialize()

QByteArray ChannelAnalyzerSettings::serialize ( ) const

Definition at line 53 of file chanalyzersettings.cpp.

References SimpleSerializer::final(), m_bandwidth, m_downSample, m_downSampleRate, m_fll, m_frequency, m_inputType, m_lowCutoff, m_pll, m_pllPskOrder, m_rgbColor, m_rrc, m_rrcRolloff, m_scopeGUI, m_spanLog2, m_spectrumGUI, m_ssb, m_title, Serializable::serialize(), SimpleSerializer::writeBlob(), SimpleSerializer::writeBool(), SimpleSerializer::writeS32(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by ChannelAnalyzerGUI::serialize(), and setScopeGUI().

54 {
55  SimpleSerializer s(1);
56 
57  s.writeS32(1, m_frequency);
58  s.writeS32(2, m_bandwidth);
59  s.writeBlob(3, m_spectrumGUI->serialize());
60  s.writeU32(4, m_rgbColor);
61  s.writeS32(5, m_lowCutoff);
62  s.writeS32(6, m_spanLog2);
63  s.writeBool(7, m_ssb);
64  s.writeBlob(8, m_scopeGUI->serialize());
65  s.writeBool(9, m_downSample);
66  s.writeU32(10, m_downSampleRate);
67  s.writeBool(11, m_pll);
68  s.writeBool(12, m_fll);
69  s.writeU32(13, m_pllPskOrder);
70  s.writeS32(14, (int) m_inputType);
71  s.writeString(15, m_title);
72  s.writeBool(16, m_rrc);
73  s.writeU32(17, m_rrcRolloff);
74 
75  return s.final();
76 }
quint32 m_rrcRolloff
in 100ths
virtual QByteArray serialize() const =0
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setChannelMarker()

void ChannelAnalyzerSettings::setChannelMarker ( Serializable channelMarker)
inline

Definition at line 55 of file chanalyzersettings.h.

Referenced by ChannelAnalyzerGUI::ChannelAnalyzerGUI().

55 { m_channelMarker = channelMarker; }
Serializable * m_channelMarker
+ Here is the caller graph for this function:

◆ setScopeGUI()

void ChannelAnalyzerSettings::setScopeGUI ( Serializable scopeGUI)
inline

Definition at line 57 of file chanalyzersettings.h.

References deserialize(), and serialize().

Referenced by ChannelAnalyzerGUI::ChannelAnalyzerGUI().

57 { m_scopeGUI = scopeGUI; }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSpectrumGUI()

void ChannelAnalyzerSettings::setSpectrumGUI ( Serializable spectrumGUI)
inline

Definition at line 56 of file chanalyzersettings.h.

Referenced by ChannelAnalyzerGUI::ChannelAnalyzerGUI().

56 { m_spectrumGUI = spectrumGUI; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_bandwidth

int ChannelAnalyzerSettings::m_bandwidth

◆ m_channelMarker

Serializable* ChannelAnalyzerSettings::m_channelMarker

Definition at line 49 of file chanalyzersettings.h.

◆ m_downSample

bool ChannelAnalyzerSettings::m_downSample

◆ m_downSampleRate

quint32 ChannelAnalyzerSettings::m_downSampleRate

◆ m_fll

bool ChannelAnalyzerSettings::m_fll

◆ m_frequency

int ChannelAnalyzerSettings::m_frequency

◆ m_inputType

InputType ChannelAnalyzerSettings::m_inputType

◆ m_lowCutoff

int ChannelAnalyzerSettings::m_lowCutoff

◆ m_pll

bool ChannelAnalyzerSettings::m_pll

◆ m_pllPskOrder

unsigned int ChannelAnalyzerSettings::m_pllPskOrder

◆ m_rgbColor

quint32 ChannelAnalyzerSettings::m_rgbColor

◆ m_rrc

bool ChannelAnalyzerSettings::m_rrc

◆ m_rrcRolloff

quint32 ChannelAnalyzerSettings::m_rrcRolloff

◆ m_scopeGUI

Serializable* ChannelAnalyzerSettings::m_scopeGUI

Definition at line 51 of file chanalyzersettings.h.

Referenced by deserialize(), and serialize().

◆ m_spanLog2

int ChannelAnalyzerSettings::m_spanLog2

◆ m_spectrumGUI

Serializable* ChannelAnalyzerSettings::m_spectrumGUI

Definition at line 50 of file chanalyzersettings.h.

Referenced by deserialize(), and serialize().

◆ m_ssb

bool ChannelAnalyzerSettings::m_ssb

◆ m_title

QString ChannelAnalyzerSettings::m_title

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