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

#include <SWGSSBModReport.h>

+ Inheritance diagram for SWGSDRangel::SWGSSBModReport:
+ Collaboration diagram for SWGSDRangel::SWGSSBModReport:

Public Member Functions

 SWGSSBModReport ()
 
 SWGSSBModReport (QString *json)
 
virtual ~SWGSSBModReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGSSBModReportfromJson (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 SWGSSBModReport.h.

Constructor & Destructor Documentation

◆ SWGSSBModReport() [1/2]

SWGSDRangel::SWGSSBModReport::SWGSSBModReport ( )

◆ SWGSSBModReport() [2/2]

SWGSDRangel::SWGSSBModReport::SWGSSBModReport ( QString *  json)

Definition at line 25 of file SWGSSBModReport.cpp.

References fromJson(), and init().

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

◆ ~SWGSSBModReport()

SWGSDRangel::SWGSSBModReport::~SWGSSBModReport ( )
virtual

Definition at line 39 of file SWGSSBModReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGSSBModReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 80 of file SWGSSBModReport.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::SWGSSBModReport::asJsonObject ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 91 of file SWGSSBModReport.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::SWGSSBModReport::cleanup ( )

Definition at line 54 of file SWGSSBModReport.cpp.

Referenced by ~SWGSSBModReport().

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

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 61 of file SWGSSBModReport.cpp.

References fromJsonObject().

Referenced by SWGSSBModReport().

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::SWGSSBModReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 70 of file SWGSSBModReport.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::SWGSSBModReport::getAudioSampleRate ( )

Definition at line 117 of file SWGSSBModReport.cpp.

References audio_sample_rate.

117  {
118  return audio_sample_rate;
119 }

◆ getChannelPowerDb()

float SWGSDRangel::SWGSSBModReport::getChannelPowerDb ( )

Definition at line 107 of file SWGSSBModReport.cpp.

References channel_power_db.

107  {
108  return channel_power_db;
109 }

◆ getChannelSampleRate()

qint32 SWGSDRangel::SWGSSBModReport::getChannelSampleRate ( )

Definition at line 127 of file SWGSSBModReport.cpp.

References channel_sample_rate.

127  {
128  return channel_sample_rate;
129 }

◆ init()

void SWGSDRangel::SWGSSBModReport::init ( )

◆ isSet()

bool SWGSDRangel::SWGSSBModReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 138 of file SWGSSBModReport.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::SWGSSBModReport::setAudioSampleRate ( qint32  audio_sample_rate)

Definition at line 121 of file SWGSSBModReport.cpp.

References audio_sample_rate, and m_audio_sample_rate_isSet.

Referenced by SSBMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelPowerDb()

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

Definition at line 111 of file SWGSSBModReport.cpp.

References channel_power_db, and m_channel_power_db_isSet.

Referenced by SSBMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

◆ setChannelSampleRate()

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

Definition at line 131 of file SWGSSBModReport.cpp.

References channel_sample_rate, and m_channel_sample_rate_isSet.

Referenced by SSBMod::webapiFormatChannelReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ audio_sample_rate

qint32 SWGSDRangel::SWGSSBModReport::audio_sample_rate
private

◆ channel_power_db

float SWGSDRangel::SWGSSBModReport::channel_power_db
private

◆ channel_sample_rate

qint32 SWGSDRangel::SWGSSBModReport::channel_sample_rate
private

◆ m_audio_sample_rate_isSet

bool SWGSDRangel::SWGSSBModReport::m_audio_sample_rate_isSet
private

Definition at line 61 of file SWGSSBModReport.h.

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

◆ m_channel_power_db_isSet

bool SWGSDRangel::SWGSSBModReport::m_channel_power_db_isSet
private

Definition at line 58 of file SWGSSBModReport.h.

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

◆ m_channel_sample_rate_isSet

bool SWGSDRangel::SWGSSBModReport::m_channel_sample_rate_isSet
private

Definition at line 64 of file SWGSSBModReport.h.

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


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