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::SWGWFMModReport Class Reference

#include <SWGWFMModReport.h>

+ Inheritance diagram for SWGSDRangel::SWGWFMModReport:
+ Collaboration diagram for SWGSDRangel::SWGWFMModReport:

Public Member Functions

 SWGWFMModReport ()
 
 SWGWFMModReport (QString *json)
 
virtual ~SWGWFMModReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGWFMModReportfromJson (QString &jsonString) override
 
float getChannelPowerDb ()
 
void setChannelPowerDb (float channel_power_db)
 
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 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 SWGWFMModReport.h.

Constructor & Destructor Documentation

◆ SWGWFMModReport() [1/2]

SWGSDRangel::SWGWFMModReport::SWGWFMModReport ( )

◆ SWGWFMModReport() [2/2]

SWGSDRangel::SWGWFMModReport::SWGWFMModReport ( QString *  json)

Definition at line 25 of file SWGWFMModReport.cpp.

References fromJson(), and init().

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

◆ ~SWGWFMModReport()

SWGSDRangel::SWGWFMModReport::~SWGWFMModReport ( )
virtual

Definition at line 39 of file SWGWFMModReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGWFMModReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 80 of file SWGWFMModReport.cpp.

References asJsonObject().

81 {
82  QJsonObject* obj = this->asJsonObject();
83 
84  QJsonDocument doc(*obj);
85  QByteArray bytes = doc.toJson();
86  delete obj;
87  return QString(bytes);
88 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 91 of file SWGWFMModReport.cpp.

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

Referenced by asJson().

91  {
92  QJsonObject* obj = new QJsonObject();
94  obj->insert("channelPowerDB", QJsonValue(channel_power_db));
95  }
97  obj->insert("audioSampleRate", QJsonValue(audio_sample_rate));
98  }
100  obj->insert("channelSampleRate", QJsonValue(channel_sample_rate));
101  }
102 
103  return obj;
104 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGWFMModReport::cleanup ( )

Definition at line 54 of file SWGWFMModReport.cpp.

Referenced by ~SWGWFMModReport().

54  {
55 
56 
57 
58 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 61 of file SWGWFMModReport.cpp.

References fromJsonObject().

Referenced by SWGWFMModReport().

61  {
62  QByteArray array (json.toStdString().c_str());
63  QJsonDocument doc = QJsonDocument::fromJson(array);
64  QJsonObject jsonObject = doc.object();
65  this->fromJsonObject(jsonObject);
66  return this;
67 }
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::SWGWFMModReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 70 of file SWGWFMModReport.cpp.

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

Referenced by fromJson().

70  {
71  ::SWGSDRangel::setValue(&channel_power_db, pJson["channelPowerDB"], "float", "");
72 
73  ::SWGSDRangel::setValue(&audio_sample_rate, pJson["audioSampleRate"], "qint32", "");
74 
75  ::SWGSDRangel::setValue(&channel_sample_rate, pJson["channelSampleRate"], "qint32", "");
76 
77 }
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::SWGWFMModReport::getAudioSampleRate ( )

Definition at line 117 of file SWGWFMModReport.cpp.

References audio_sample_rate.

117  {
118  return audio_sample_rate;
119 }

◆ getChannelPowerDb()

float SWGSDRangel::SWGWFMModReport::getChannelPowerDb ( )

Definition at line 107 of file SWGWFMModReport.cpp.

References channel_power_db.

107  {
108  return channel_power_db;
109 }

◆ getChannelSampleRate()

qint32 SWGSDRangel::SWGWFMModReport::getChannelSampleRate ( )

Definition at line 127 of file SWGWFMModReport.cpp.

References channel_sample_rate.

127  {
128  return channel_sample_rate;
129 }

◆ init()

void SWGSDRangel::SWGWFMModReport::init ( )

◆ isSet()

bool SWGSDRangel::SWGWFMModReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 138 of file SWGWFMModReport.cpp.

References m_audio_sample_rate_isSet, m_channel_power_db_isSet, and m_channel_sample_rate_isSet.

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

138  {
139  bool isObjectUpdated = false;
140  do{
141  if(m_channel_power_db_isSet){ isObjectUpdated = true; break;}
142  if(m_audio_sample_rate_isSet){ isObjectUpdated = true; break;}
143  if(m_channel_sample_rate_isSet){ isObjectUpdated = true; break;}
144  }while(false);
145  return isObjectUpdated;
146 }
+ Here is the caller graph for this function:

◆ setAudioSampleRate()

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

Definition at line 121 of file SWGWFMModReport.cpp.

References audio_sample_rate, and m_audio_sample_rate_isSet.

Referenced by WFMMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelPowerDb()

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

Definition at line 111 of file SWGWFMModReport.cpp.

References channel_power_db, and m_channel_power_db_isSet.

Referenced by WFMMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelSampleRate()

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

Definition at line 131 of file SWGWFMModReport.cpp.

References channel_sample_rate, and m_channel_sample_rate_isSet.

Referenced by WFMMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ audio_sample_rate

qint32 SWGSDRangel::SWGWFMModReport::audio_sample_rate
private

◆ channel_power_db

float SWGSDRangel::SWGWFMModReport::channel_power_db
private

◆ channel_sample_rate

qint32 SWGSDRangel::SWGWFMModReport::channel_sample_rate
private

◆ m_audio_sample_rate_isSet

bool SWGSDRangel::SWGWFMModReport::m_audio_sample_rate_isSet
private

Definition at line 61 of file SWGWFMModReport.h.

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

◆ m_channel_power_db_isSet

bool SWGSDRangel::SWGWFMModReport::m_channel_power_db_isSet
private

Definition at line 58 of file SWGWFMModReport.h.

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

◆ m_channel_sample_rate_isSet

bool SWGSDRangel::SWGWFMModReport::m_channel_sample_rate_isSet
private

Definition at line 64 of file SWGWFMModReport.h.

Referenced by asJsonObject(), init(), isSet(), setChannelSampleRate(), and SWGWFMModReport().


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