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

#include <SWGRemoteOutputReport.h>

+ Inheritance diagram for SWGSDRangel::SWGRemoteOutputReport:
+ Collaboration diagram for SWGSDRangel::SWGRemoteOutputReport:

Public Member Functions

 SWGRemoteOutputReport ()
 
 SWGRemoteOutputReport (QString *json)
 
virtual ~SWGRemoteOutputReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGRemoteOutputReportfromJson (QString &jsonString) override
 
float getBufferRwBalance ()
 
void setBufferRwBalance (float buffer_rw_balance)
 
qint32 getSampleCount ()
 
void setSampleCount (qint32 sample_count)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

float buffer_rw_balance
 
bool m_buffer_rw_balance_isSet
 
qint32 sample_count
 
bool m_sample_count_isSet
 

Detailed Description

Definition at line 31 of file SWGRemoteOutputReport.h.

Constructor & Destructor Documentation

◆ SWGRemoteOutputReport() [1/2]

SWGSDRangel::SWGRemoteOutputReport::SWGRemoteOutputReport ( )

◆ SWGRemoteOutputReport() [2/2]

SWGSDRangel::SWGRemoteOutputReport::SWGRemoteOutputReport ( QString *  json)

Definition at line 25 of file SWGRemoteOutputReport.cpp.

References fromJson(), and init().

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

◆ ~SWGRemoteOutputReport()

SWGSDRangel::SWGRemoteOutputReport::~SWGRemoteOutputReport ( )
virtual

Definition at line 37 of file SWGRemoteOutputReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGRemoteOutputReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 73 of file SWGRemoteOutputReport.cpp.

References asJsonObject().

74 {
75  QJsonObject* obj = this->asJsonObject();
76 
77  QJsonDocument doc(*obj);
78  QByteArray bytes = doc.toJson();
79  delete obj;
80  return QString(bytes);
81 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 84 of file SWGRemoteOutputReport.cpp.

References buffer_rw_balance, m_buffer_rw_balance_isSet, m_sample_count_isSet, and sample_count.

Referenced by asJson().

84  {
85  QJsonObject* obj = new QJsonObject();
87  obj->insert("bufferRWBalance", QJsonValue(buffer_rw_balance));
88  }
90  obj->insert("sampleCount", QJsonValue(sample_count));
91  }
92 
93  return obj;
94 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGRemoteOutputReport::cleanup ( )

Definition at line 50 of file SWGRemoteOutputReport.cpp.

Referenced by ~SWGRemoteOutputReport().

50  {
51 
52 
53 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 56 of file SWGRemoteOutputReport.cpp.

References fromJsonObject().

Referenced by SWGRemoteOutputReport().

56  {
57  QByteArray array (json.toStdString().c_str());
58  QJsonDocument doc = QJsonDocument::fromJson(array);
59  QJsonObject jsonObject = doc.object();
60  this->fromJsonObject(jsonObject);
61  return this;
62 }
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::SWGRemoteOutputReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 65 of file SWGRemoteOutputReport.cpp.

References buffer_rw_balance, sample_count, and SWGSDRangel::setValue().

Referenced by fromJson().

65  {
66  ::SWGSDRangel::setValue(&buffer_rw_balance, pJson["bufferRWBalance"], "float", "");
67 
68  ::SWGSDRangel::setValue(&sample_count, pJson["sampleCount"], "qint32", "");
69 
70 }
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:

◆ getBufferRwBalance()

float SWGSDRangel::SWGRemoteOutputReport::getBufferRwBalance ( )

Definition at line 97 of file SWGRemoteOutputReport.cpp.

References buffer_rw_balance.

◆ getSampleCount()

qint32 SWGSDRangel::SWGRemoteOutputReport::getSampleCount ( )

Definition at line 107 of file SWGRemoteOutputReport.cpp.

References sample_count.

107  {
108  return sample_count;
109 }

◆ init()

void SWGSDRangel::SWGRemoteOutputReport::init ( )

◆ isSet()

bool SWGSDRangel::SWGRemoteOutputReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 118 of file SWGRemoteOutputReport.cpp.

References m_buffer_rw_balance_isSet, and m_sample_count_isSet.

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

118  {
119  bool isObjectUpdated = false;
120  do{
121  if(m_buffer_rw_balance_isSet){ isObjectUpdated = true; break;}
122  if(m_sample_count_isSet){ isObjectUpdated = true; break;}
123  }while(false);
124  return isObjectUpdated;
125 }
+ Here is the caller graph for this function:

◆ setBufferRwBalance()

void SWGSDRangel::SWGRemoteOutputReport::setBufferRwBalance ( float  buffer_rw_balance)

Definition at line 101 of file SWGRemoteOutputReport.cpp.

References buffer_rw_balance, and m_buffer_rw_balance_isSet.

Referenced by RemoteOutput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setSampleCount()

void SWGSDRangel::SWGRemoteOutputReport::setSampleCount ( qint32  sample_count)

Definition at line 111 of file SWGRemoteOutputReport.cpp.

References m_sample_count_isSet, and sample_count.

Referenced by RemoteOutput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ buffer_rw_balance

float SWGSDRangel::SWGRemoteOutputReport::buffer_rw_balance
private

◆ m_buffer_rw_balance_isSet

bool SWGSDRangel::SWGRemoteOutputReport::m_buffer_rw_balance_isSet
private

◆ m_sample_count_isSet

bool SWGSDRangel::SWGRemoteOutputReport::m_sample_count_isSet
private

◆ sample_count

qint32 SWGSDRangel::SWGRemoteOutputReport::sample_count
private

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