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

#include <SWGXtrxInputReport.h>

+ Inheritance diagram for SWGSDRangel::SWGXtrxInputReport:
+ Collaboration diagram for SWGSDRangel::SWGXtrxInputReport:

Public Member Functions

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

Constructor & Destructor Documentation

◆ SWGXtrxInputReport() [1/2]

SWGSDRangel::SWGXtrxInputReport::SWGXtrxInputReport ( )

◆ SWGXtrxInputReport() [2/2]

SWGSDRangel::SWGXtrxInputReport::SWGXtrxInputReport ( QString *  json)

Definition at line 25 of file SWGXtrxInputReport.cpp.

References fromJson(), and init().

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

◆ ~SWGXtrxInputReport()

SWGSDRangel::SWGXtrxInputReport::~SWGXtrxInputReport ( )
virtual

Definition at line 43 of file SWGXtrxInputReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGXtrxInputReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

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

Reimplemented from SWGSDRangel::SWGObject.

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

Definition at line 62 of file SWGXtrxInputReport.cpp.

Referenced by ~SWGXtrxInputReport().

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

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 71 of file SWGXtrxInputReport.cpp.

References fromJsonObject().

Referenced by SWGXtrxInputReport().

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 80 of file SWGXtrxInputReport.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::SWGXtrxInputReport::getFifoFill ( )

Definition at line 147 of file SWGXtrxInputReport.cpp.

References fifo_fill.

147  {
148  return fifo_fill;
149 }

◆ getFifoSize()

qint32 SWGSDRangel::SWGXtrxInputReport::getFifoSize ( )

Definition at line 137 of file SWGXtrxInputReport.cpp.

References fifo_size.

137  {
138  return fifo_size;
139 }

◆ getGpsLock()

qint32 SWGSDRangel::SWGXtrxInputReport::getGpsLock ( )

Definition at line 167 of file SWGXtrxInputReport.cpp.

References gps_lock.

167  {
168  return gps_lock;
169 }

◆ getSuccess()

qint32 SWGSDRangel::SWGXtrxInputReport::getSuccess ( )

Definition at line 127 of file SWGXtrxInputReport.cpp.

References success.

127  {
128  return success;
129 }

◆ getTemperature()

float SWGSDRangel::SWGXtrxInputReport::getTemperature ( )

Definition at line 157 of file SWGXtrxInputReport.cpp.

References temperature.

157  {
158  return temperature;
159 }

◆ init()

void SWGSDRangel::SWGXtrxInputReport::init ( )

Definition at line 48 of file SWGXtrxInputReport.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 SWGXtrxInputReport(), and XTRXInput::webapiReportGet().

+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGXtrxInputReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 178 of file SWGXtrxInputReport.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::SWGXtrxInputReport::setFifoFill ( qint32  fifo_fill)

Definition at line 151 of file SWGXtrxInputReport.cpp.

References fifo_fill, and m_fifo_fill_isSet.

Referenced by XTRXInput::webapiFormatDeviceReport().

151  {
152  this->fifo_fill = fifo_fill;
153  this->m_fifo_fill_isSet = true;
154 }
+ Here is the caller graph for this function:

◆ setFifoSize()

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

Definition at line 141 of file SWGXtrxInputReport.cpp.

References fifo_size, and m_fifo_size_isSet.

Referenced by XTRXInput::webapiFormatDeviceReport().

141  {
142  this->fifo_size = fifo_size;
143  this->m_fifo_size_isSet = true;
144 }
+ Here is the caller graph for this function:

◆ setGpsLock()

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

Definition at line 171 of file SWGXtrxInputReport.cpp.

References gps_lock, and m_gps_lock_isSet.

Referenced by XTRXInput::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::SWGXtrxInputReport::setSuccess ( qint32  success)

Definition at line 131 of file SWGXtrxInputReport.cpp.

References m_success_isSet, and success.

Referenced by XTRXInput::webapiFormatDeviceReport().

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

◆ setTemperature()

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

Definition at line 161 of file SWGXtrxInputReport.cpp.

References m_temperature_isSet, and temperature.

Referenced by XTRXInput::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ fifo_fill

qint32 SWGSDRangel::SWGXtrxInputReport::fifo_fill
private

◆ fifo_size

qint32 SWGSDRangel::SWGXtrxInputReport::fifo_size
private

◆ gps_lock

qint32 SWGSDRangel::SWGXtrxInputReport::gps_lock
private

◆ m_fifo_fill_isSet

bool SWGSDRangel::SWGXtrxInputReport::m_fifo_fill_isSet
private

Definition at line 70 of file SWGXtrxInputReport.h.

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

◆ m_fifo_size_isSet

bool SWGSDRangel::SWGXtrxInputReport::m_fifo_size_isSet
private

Definition at line 67 of file SWGXtrxInputReport.h.

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

◆ m_gps_lock_isSet

bool SWGSDRangel::SWGXtrxInputReport::m_gps_lock_isSet
private

Definition at line 76 of file SWGXtrxInputReport.h.

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

◆ m_success_isSet

bool SWGSDRangel::SWGXtrxInputReport::m_success_isSet
private

Definition at line 64 of file SWGXtrxInputReport.h.

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

◆ m_temperature_isSet

bool SWGSDRangel::SWGXtrxInputReport::m_temperature_isSet
private

Definition at line 73 of file SWGXtrxInputReport.h.

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

◆ success

qint32 SWGSDRangel::SWGXtrxInputReport::success
private

◆ temperature

float SWGSDRangel::SWGXtrxInputReport::temperature
private

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