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

#include <SWGXtrxOutputReport.h>

+ Inheritance diagram for SWGSDRangel::SWGXtrxOutputReport:
+ Collaboration diagram for SWGSDRangel::SWGXtrxOutputReport:

Public Member Functions

 SWGXtrxOutputReport ()
 
 SWGXtrxOutputReport (QString *json)
 
virtual ~SWGXtrxOutputReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGXtrxOutputReportfromJson (QString &jsonString) override
 
qint32 getSuccess ()
 
void setSuccess (qint32 success)
 
qint32 getFifoSize ()
 
void setFifoSize (qint32 fifo_size)
 
qint32 getFifoFill ()
 
void setFifoFill (qint32 fifo_fill)
 
float getTemperature ()
 
void setTemperature (float temperature)
 
qint32 getGpsLock ()
 
void setGpsLock (qint32 gps_lock)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

qint32 success
 
bool m_success_isSet
 
qint32 fifo_size
 
bool m_fifo_size_isSet
 
qint32 fifo_fill
 
bool m_fifo_fill_isSet
 
float temperature
 
bool m_temperature_isSet
 
qint32 gps_lock
 
bool m_gps_lock_isSet
 

Detailed Description

Definition at line 31 of file SWGXtrxOutputReport.h.

Constructor & Destructor Documentation

◆ SWGXtrxOutputReport() [1/2]

SWGSDRangel::SWGXtrxOutputReport::SWGXtrxOutputReport ( )

Definition at line 30 of file SWGXtrxOutputReport.cpp.

References fifo_fill, fifo_size, gps_lock, m_fifo_fill_isSet, m_fifo_size_isSet, m_gps_lock_isSet, m_success_isSet, m_temperature_isSet, success, and temperature.

◆ SWGXtrxOutputReport() [2/2]

SWGSDRangel::SWGXtrxOutputReport::SWGXtrxOutputReport ( QString *  json)

Definition at line 25 of file SWGXtrxOutputReport.cpp.

References fromJson(), and init().

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

◆ ~SWGXtrxOutputReport()

SWGSDRangel::SWGXtrxOutputReport::~SWGXtrxOutputReport ( )
virtual

Definition at line 43 of file SWGXtrxOutputReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGXtrxOutputReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 94 of file SWGXtrxOutputReport.cpp.

References asJsonObject().

95 {
96  QJsonObject* obj = this->asJsonObject();
97 
98  QJsonDocument doc(*obj);
99  QByteArray bytes = doc.toJson();
100  delete obj;
101  return QString(bytes);
102 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 105 of file SWGXtrxOutputReport.cpp.

References fifo_fill, fifo_size, gps_lock, m_fifo_fill_isSet, m_fifo_size_isSet, m_gps_lock_isSet, m_success_isSet, m_temperature_isSet, success, and temperature.

Referenced by asJson().

105  {
106  QJsonObject* obj = new QJsonObject();
107  if(m_success_isSet){
108  obj->insert("success", QJsonValue(success));
109  }
110  if(m_fifo_size_isSet){
111  obj->insert("fifoSize", QJsonValue(fifo_size));
112  }
113  if(m_fifo_fill_isSet){
114  obj->insert("fifoFill", QJsonValue(fifo_fill));
115  }
117  obj->insert("temperature", QJsonValue(temperature));
118  }
119  if(m_gps_lock_isSet){
120  obj->insert("gpsLock", QJsonValue(gps_lock));
121  }
122 
123  return obj;
124 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGXtrxOutputReport::cleanup ( )

Definition at line 62 of file SWGXtrxOutputReport.cpp.

Referenced by ~SWGXtrxOutputReport().

62  {
63 
64 
65 
66 
67 
68 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 71 of file SWGXtrxOutputReport.cpp.

References fromJsonObject().

Referenced by SWGXtrxOutputReport().

71  {
72  QByteArray array (json.toStdString().c_str());
73  QJsonDocument doc = QJsonDocument::fromJson(array);
74  QJsonObject jsonObject = doc.object();
75  this->fromJsonObject(jsonObject);
76  return this;
77 }
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::SWGXtrxOutputReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 80 of file SWGXtrxOutputReport.cpp.

References fifo_fill, fifo_size, gps_lock, SWGSDRangel::setValue(), success, and temperature.

Referenced by fromJson().

80  {
81  ::SWGSDRangel::setValue(&success, pJson["success"], "qint32", "");
82 
83  ::SWGSDRangel::setValue(&fifo_size, pJson["fifoSize"], "qint32", "");
84 
85  ::SWGSDRangel::setValue(&fifo_fill, pJson["fifoFill"], "qint32", "");
86 
87  ::SWGSDRangel::setValue(&temperature, pJson["temperature"], "float", "");
88 
89  ::SWGSDRangel::setValue(&gps_lock, pJson["gpsLock"], "qint32", "");
90 
91 }
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:

◆ getFifoFill()

qint32 SWGSDRangel::SWGXtrxOutputReport::getFifoFill ( )

Definition at line 147 of file SWGXtrxOutputReport.cpp.

References fifo_fill.

147  {
148  return fifo_fill;
149 }

◆ getFifoSize()

qint32 SWGSDRangel::SWGXtrxOutputReport::getFifoSize ( )

Definition at line 137 of file SWGXtrxOutputReport.cpp.

References fifo_size.

137  {
138  return fifo_size;
139 }

◆ getGpsLock()

qint32 SWGSDRangel::SWGXtrxOutputReport::getGpsLock ( )

Definition at line 167 of file SWGXtrxOutputReport.cpp.

References gps_lock.

167  {
168  return gps_lock;
169 }

◆ getSuccess()

qint32 SWGSDRangel::SWGXtrxOutputReport::getSuccess ( )

Definition at line 127 of file SWGXtrxOutputReport.cpp.

References success.

127  {
128  return success;
129 }

◆ getTemperature()

float SWGSDRangel::SWGXtrxOutputReport::getTemperature ( )

Definition at line 157 of file SWGXtrxOutputReport.cpp.

References temperature.

157  {
158  return temperature;
159 }

◆ init()

void SWGSDRangel::SWGXtrxOutputReport::init ( )

Definition at line 48 of file SWGXtrxOutputReport.cpp.

References fifo_fill, fifo_size, gps_lock, m_fifo_fill_isSet, m_fifo_size_isSet, m_gps_lock_isSet, m_success_isSet, m_temperature_isSet, success, and temperature.

Referenced by SWGXtrxOutputReport(), and XTRXOutput::webapiReportGet().

+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGXtrxOutputReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 178 of file SWGXtrxOutputReport.cpp.

References m_fifo_fill_isSet, m_fifo_size_isSet, m_gps_lock_isSet, m_success_isSet, and m_temperature_isSet.

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

178  {
179  bool isObjectUpdated = false;
180  do{
181  if(m_success_isSet){ isObjectUpdated = true; break;}
182  if(m_fifo_size_isSet){ isObjectUpdated = true; break;}
183  if(m_fifo_fill_isSet){ isObjectUpdated = true; break;}
184  if(m_temperature_isSet){ isObjectUpdated = true; break;}
185  if(m_gps_lock_isSet){ isObjectUpdated = true; break;}
186  }while(false);
187  return isObjectUpdated;
188 }
+ Here is the caller graph for this function:

◆ setFifoFill()

void SWGSDRangel::SWGXtrxOutputReport::setFifoFill ( qint32  fifo_fill)

Definition at line 151 of file SWGXtrxOutputReport.cpp.

References fifo_fill, and m_fifo_fill_isSet.

Referenced by XTRXOutput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setFifoSize()

void SWGSDRangel::SWGXtrxOutputReport::setFifoSize ( qint32  fifo_size)

Definition at line 141 of file SWGXtrxOutputReport.cpp.

References fifo_size, and m_fifo_size_isSet.

Referenced by XTRXOutput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setGpsLock()

void SWGSDRangel::SWGXtrxOutputReport::setGpsLock ( qint32  gps_lock)

Definition at line 171 of file SWGXtrxOutputReport.cpp.

References gps_lock, and m_gps_lock_isSet.

Referenced by XTRXOutput::webapiFormatDeviceReport().

171  {
172  this->gps_lock = gps_lock;
173  this->m_gps_lock_isSet = true;
174 }
+ Here is the caller graph for this function:

◆ setSuccess()

void SWGSDRangel::SWGXtrxOutputReport::setSuccess ( qint32  success)

Definition at line 131 of file SWGXtrxOutputReport.cpp.

References m_success_isSet, and success.

Referenced by XTRXOutput::webapiFormatDeviceReport().

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

◆ setTemperature()

void SWGSDRangel::SWGXtrxOutputReport::setTemperature ( float  temperature)

Definition at line 161 of file SWGXtrxOutputReport.cpp.

References m_temperature_isSet, and temperature.

Referenced by XTRXOutput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ fifo_fill

qint32 SWGSDRangel::SWGXtrxOutputReport::fifo_fill
private

◆ fifo_size

qint32 SWGSDRangel::SWGXtrxOutputReport::fifo_size
private

◆ gps_lock

qint32 SWGSDRangel::SWGXtrxOutputReport::gps_lock
private

◆ m_fifo_fill_isSet

bool SWGSDRangel::SWGXtrxOutputReport::m_fifo_fill_isSet
private

Definition at line 70 of file SWGXtrxOutputReport.h.

Referenced by asJsonObject(), init(), isSet(), setFifoFill(), and SWGXtrxOutputReport().

◆ m_fifo_size_isSet

bool SWGSDRangel::SWGXtrxOutputReport::m_fifo_size_isSet
private

Definition at line 67 of file SWGXtrxOutputReport.h.

Referenced by asJsonObject(), init(), isSet(), setFifoSize(), and SWGXtrxOutputReport().

◆ m_gps_lock_isSet

bool SWGSDRangel::SWGXtrxOutputReport::m_gps_lock_isSet
private

Definition at line 76 of file SWGXtrxOutputReport.h.

Referenced by asJsonObject(), init(), isSet(), setGpsLock(), and SWGXtrxOutputReport().

◆ m_success_isSet

bool SWGSDRangel::SWGXtrxOutputReport::m_success_isSet
private

Definition at line 64 of file SWGXtrxOutputReport.h.

Referenced by asJsonObject(), init(), isSet(), setSuccess(), and SWGXtrxOutputReport().

◆ m_temperature_isSet

bool SWGSDRangel::SWGXtrxOutputReport::m_temperature_isSet
private

Definition at line 73 of file SWGXtrxOutputReport.h.

Referenced by asJsonObject(), init(), isSet(), setTemperature(), and SWGXtrxOutputReport().

◆ success

qint32 SWGSDRangel::SWGXtrxOutputReport::success
private

◆ temperature

float SWGSDRangel::SWGXtrxOutputReport::temperature
private

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