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

#include <SWGKiwiSDRReport.h>

+ Inheritance diagram for SWGSDRangel::SWGKiwiSDRReport:
+ Collaboration diagram for SWGSDRangel::SWGKiwiSDRReport:

Public Member Functions

 SWGKiwiSDRReport ()
 
 SWGKiwiSDRReport (QString *json)
 
virtual ~SWGKiwiSDRReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGKiwiSDRReportfromJson (QString &jsonString) override
 
qint32 getStatus ()
 
void setStatus (qint32 status)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

qint32 status
 
bool m_status_isSet
 

Detailed Description

Definition at line 31 of file SWGKiwiSDRReport.h.

Constructor & Destructor Documentation

◆ SWGKiwiSDRReport() [1/2]

SWGSDRangel::SWGKiwiSDRReport::SWGKiwiSDRReport ( )

Definition at line 30 of file SWGKiwiSDRReport.cpp.

References m_status_isSet, and status.

30  {
31  status = 0;
32  m_status_isSet = false;
33 }

◆ SWGKiwiSDRReport() [2/2]

SWGSDRangel::SWGKiwiSDRReport::SWGKiwiSDRReport ( QString *  json)

Definition at line 25 of file SWGKiwiSDRReport.cpp.

References fromJson(), and init().

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

◆ ~SWGKiwiSDRReport()

SWGSDRangel::SWGKiwiSDRReport::~SWGKiwiSDRReport ( )
virtual

Definition at line 35 of file SWGKiwiSDRReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGKiwiSDRReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 66 of file SWGKiwiSDRReport.cpp.

References asJsonObject().

67 {
68  QJsonObject* obj = this->asJsonObject();
69 
70  QJsonDocument doc(*obj);
71  QByteArray bytes = doc.toJson();
72  delete obj;
73  return QString(bytes);
74 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 77 of file SWGKiwiSDRReport.cpp.

References m_status_isSet, and status.

Referenced by asJson().

77  {
78  QJsonObject* obj = new QJsonObject();
79  if(m_status_isSet){
80  obj->insert("status", QJsonValue(status));
81  }
82 
83  return obj;
84 }
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGKiwiSDRReport::cleanup ( )

Definition at line 46 of file SWGKiwiSDRReport.cpp.

Referenced by ~SWGKiwiSDRReport().

46  {
47 
48 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 51 of file SWGKiwiSDRReport.cpp.

References fromJsonObject().

Referenced by SWGKiwiSDRReport().

51  {
52  QByteArray array (json.toStdString().c_str());
53  QJsonDocument doc = QJsonDocument::fromJson(array);
54  QJsonObject jsonObject = doc.object();
55  this->fromJsonObject(jsonObject);
56  return this;
57 }
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::SWGKiwiSDRReport::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 60 of file SWGKiwiSDRReport.cpp.

References SWGSDRangel::setValue(), and status.

Referenced by fromJson().

60  {
61  ::SWGSDRangel::setValue(&status, pJson["status"], "qint32", "");
62 
63 }
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:

◆ getStatus()

qint32 SWGSDRangel::SWGKiwiSDRReport::getStatus ( )

Definition at line 87 of file SWGKiwiSDRReport.cpp.

References status.

87  {
88  return status;
89 }

◆ init()

void SWGSDRangel::SWGKiwiSDRReport::init ( )

Definition at line 40 of file SWGKiwiSDRReport.cpp.

References m_status_isSet, and status.

Referenced by SWGKiwiSDRReport(), and KiwiSDRInput::webapiReportGet().

40  {
41  status = 0;
42  m_status_isSet = false;
43 }
+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGKiwiSDRReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 98 of file SWGKiwiSDRReport.cpp.

References m_status_isSet.

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

98  {
99  bool isObjectUpdated = false;
100  do{
101  if(m_status_isSet){ isObjectUpdated = true; break;}
102  }while(false);
103  return isObjectUpdated;
104 }
+ Here is the caller graph for this function:

◆ setStatus()

void SWGSDRangel::SWGKiwiSDRReport::setStatus ( qint32  status)

Definition at line 91 of file SWGKiwiSDRReport.cpp.

References m_status_isSet, and status.

Referenced by KiwiSDRInput::webapiFormatDeviceReport().

91  {
92  this->status = status;
93  this->m_status_isSet = true;
94 }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_status_isSet

bool SWGSDRangel::SWGKiwiSDRReport::m_status_isSet
private

Definition at line 52 of file SWGKiwiSDRReport.h.

Referenced by asJsonObject(), init(), isSet(), setStatus(), and SWGKiwiSDRReport().

◆ status

qint32 SWGSDRangel::SWGKiwiSDRReport::status
private

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