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 | Private Attributes | List of all members
SWGSDRangel::SWGWFMDemodReport Class Reference

#include <SWGWFMDemodReport.h>

+ Inheritance diagram for SWGSDRangel::SWGWFMDemodReport:
+ Collaboration diagram for SWGSDRangel::SWGWFMDemodReport:

Public Member Functions

 SWGWFMDemodReport ()
 
 SWGWFMDemodReport (QString *json)
 
virtual ~SWGWFMDemodReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGWFMDemodReportfromJson (QString &jsonString) override
 
float getChannelPowerDb ()
 
void setChannelPowerDb (float channel_power_db)
 
qint32 getSquelch ()
 
void setSquelch (qint32 squelch)
 
qint32 getAudioSampleRate ()
 
void setAudioSampleRate (qint32 audio_sample_rate)
 
qint32 getChannelSampleRate ()
 
void setChannelSampleRate (qint32 channel_sample_rate)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

float channel_power_db
 
bool m_channel_power_db_isSet
 
qint32 squelch
 
bool m_squelch_isSet
 
qint32 audio_sample_rate
 
bool m_audio_sample_rate_isSet
 
qint32 channel_sample_rate
 
bool m_channel_sample_rate_isSet
 

Detailed Description

Definition at line 31 of file SWGWFMDemodReport.h.

Constructor & Destructor Documentation

◆ SWGWFMDemodReport() [1/2]

SWGSDRangel::SWGWFMDemodReport::SWGWFMDemodReport ( )

◆ SWGWFMDemodReport() [2/2]

SWGSDRangel::SWGWFMDemodReport::SWGWFMDemodReport ( QString *  json)

Definition at line 25 of file SWGWFMDemodReport.cpp.

References fromJson(), and init().

25  {
26  init();
27  this->fromJson(*json);
28 }
virtual SWGWFMDemodReport * fromJson(QString &jsonString) override
+ Here is the call graph for this function:

◆ ~SWGWFMDemodReport()

SWGSDRangel::SWGWFMDemodReport::~SWGWFMDemodReport ( )
virtual

Definition at line 41 of file SWGWFMDemodReport.cpp.

References cleanup().

41  {
42  this->cleanup();
43 }
+ Here is the call graph for this function:

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGWFMDemodReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 87 of file SWGWFMDemodReport.cpp.

References asJsonObject().

88 {
89  QJsonObject* obj = this->asJsonObject();
90 
91  QJsonDocument doc(*obj);
92  QByteArray bytes = doc.toJson();
93  delete obj;
94  return QString(bytes);
95 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

QJsonObject * SWGSDRangel::SWGWFMDemodReport::asJsonObject ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 98 of file SWGWFMDemodReport.cpp.

References audio_sample_rate, channel_power_db, channel_sample_rate, m_audio_sample_rate_isSet, m_channel_power_db_isSet, m_channel_sample_rate_isSet, m_squelch_isSet, and squelch.

Referenced by asJson().

98  {
99  QJsonObject* obj = new QJsonObject();
101  obj->insert("channelPowerDB", QJsonValue(channel_power_db));
102  }
103  if(m_squelch_isSet){
104  obj->insert("squelch", QJsonValue(squelch));
105  }
107  obj->insert("audioSampleRate", QJsonValue(audio_sample_rate));
108  }
110  obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
111  }
112 
113  return obj;
114 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGWFMDemodReport::cleanup ( )

Definition at line 58 of file SWGWFMDemodReport.cpp.

Referenced by ~SWGWFMDemodReport().

58  {
59 
60 
61 
62 
63 }
+ Here is the caller graph for this function:

◆ fromJson()

SWGWFMDemodReport * SWGSDRangel::SWGWFMDemodReport::fromJson ( QString &  jsonString)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 66 of file SWGWFMDemodReport.cpp.

References fromJsonObject().

Referenced by SWGWFMDemodReport().

66  {
67  QByteArray array (json.toStdString().c_str());
68  QJsonDocument doc = QJsonDocument::fromJson(array);
69  QJsonObject jsonObject = doc.object();
70  this->fromJsonObject(jsonObject);
71  return this;
72 }
virtual void fromJsonObject(QJsonObject &json) override
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fromJsonObject()

void SWGSDRangel::SWGWFMDemodReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 75 of file SWGWFMDemodReport.cpp.

References audio_sample_rate, channel_power_db, channel_sample_rate, SWGSDRangel::setValue(), and squelch.

Referenced by fromJson().

75  {
76  ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", "");
77 
78  ::SWGSDRangel::setValue(&squelch, pJson["squelch"], "qint32", "");
79 
80  ::SWGSDRangel::setValue(&audio_sample_rate, pJson["audioSampleRate"], "qint32", "");
81 
82  ::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
83 
84 }
void setValue(void *value, QJsonValue obj, QString type, QString complexType)
Definition: SWGHelpers.cpp:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAudioSampleRate()

qint32 SWGSDRangel::SWGWFMDemodReport::getAudioSampleRate ( )

Definition at line 137 of file SWGWFMDemodReport.cpp.

References audio_sample_rate.

137  {
138  return audio_sample_rate;
139 }

◆ getChannelPowerDb()

float SWGSDRangel::SWGWFMDemodReport::getChannelPowerDb ( )

Definition at line 117 of file SWGWFMDemodReport.cpp.

References channel_power_db.

117  {
118  return channel_power_db;
119 }

◆ getChannelSampleRate()

qint32 SWGSDRangel::SWGWFMDemodReport::getChannelSampleRate ( )

Definition at line 147 of file SWGWFMDemodReport.cpp.

References channel_sample_rate.

147  {
148  return channel_sample_rate;
149 }

◆ getSquelch()

qint32 SWGSDRangel::SWGWFMDemodReport::getSquelch ( )

Definition at line 127 of file SWGWFMDemodReport.cpp.

References squelch.

127  {
128  return squelch;
129 }

◆ init()

void SWGSDRangel::SWGWFMDemodReport::init ( )

◆ isSet()

bool SWGSDRangel::SWGWFMDemodReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 158 of file SWGWFMDemodReport.cpp.

References m_audio_sample_rate_isSet, m_channel_power_db_isSet, m_channel_sample_rate_isSet, and m_squelch_isSet.

Referenced by SWGSDRangel::SWGChannelReport::asJsonObject(), and SWGSDRangel::SWGChannelReport::isSet().

158  {
159  bool isObjectUpdated = false;
160  do{
161  if(m_channel_power_db_isSet){ isObjectUpdated = true; break;}
162  if(m_squelch_isSet){ isObjectUpdated = true; break;}
163  if(m_audio_sample_rate_isSet){ isObjectUpdated = true; break;}
164  if(m_channel_sample_rate_isSet){ isObjectUpdated = true; break;}
165  }while(false);
166  return isObjectUpdated;
167 }
+ Here is the caller graph for this function:

◆ setAudioSampleRate()

void SWGSDRangel::SWGWFMDemodReport::setAudioSampleRate ( qint32  audio_sample_rate)

Definition at line 141 of file SWGWFMDemodReport.cpp.

References audio_sample_rate, and m_audio_sample_rate_isSet.

Referenced by WFMDemod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelPowerDb()

void SWGSDRangel::SWGWFMDemodReport::setChannelPowerDb ( float  channel_power_db)

Definition at line 121 of file SWGWFMDemodReport.cpp.

References channel_power_db, and m_channel_power_db_isSet.

Referenced by WFMDemod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelSampleRate()

void SWGSDRangel::SWGWFMDemodReport::setChannelSampleRate ( qint32  channel_sample_rate)

Definition at line 151 of file SWGWFMDemodReport.cpp.

References channel_sample_rate, and m_channel_sample_rate_isSet.

Referenced by WFMDemod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setSquelch()

void SWGSDRangel::SWGWFMDemodReport::setSquelch ( qint32  squelch)

Definition at line 131 of file SWGWFMDemodReport.cpp.

References m_squelch_isSet, and squelch.

Referenced by WFMDemod::webapiFormatChannelReport().

131  {
132  this->squelch = squelch;
133  this->m_squelch_isSet = true;
134 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ audio_sample_rate

qint32 SWGSDRangel::SWGWFMDemodReport::audio_sample_rate
private

◆ channel_power_db

float SWGSDRangel::SWGWFMDemodReport::channel_power_db
private

◆ channel_sample_rate

qint32 SWGSDRangel::SWGWFMDemodReport::channel_sample_rate
private

◆ m_audio_sample_rate_isSet

bool SWGSDRangel::SWGWFMDemodReport::m_audio_sample_rate_isSet
private

Definition at line 67 of file SWGWFMDemodReport.h.

Referenced by asJsonObject(), init(), isSet(), setAudioSampleRate(), and SWGWFMDemodReport().

◆ m_channel_power_db_isSet

bool SWGSDRangel::SWGWFMDemodReport::m_channel_power_db_isSet
private

Definition at line 61 of file SWGWFMDemodReport.h.

Referenced by asJsonObject(), init(), isSet(), setChannelPowerDb(), and SWGWFMDemodReport().

◆ m_channel_sample_rate_isSet

bool SWGSDRangel::SWGWFMDemodReport::m_channel_sample_rate_isSet
private

◆ m_squelch_isSet

bool SWGSDRangel::SWGWFMDemodReport::m_squelch_isSet
private

Definition at line 64 of file SWGWFMDemodReport.h.

Referenced by asJsonObject(), init(), isSet(), setSquelch(), and SWGWFMDemodReport().

◆ squelch

qint32 SWGSDRangel::SWGWFMDemodReport::squelch
private

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