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

#include <SWGBladeRF2OutputReport.h>

+ Inheritance diagram for SWGSDRangel::SWGBladeRF2OutputReport:
+ Collaboration diagram for SWGSDRangel::SWGBladeRF2OutputReport:

Public Member Functions

 SWGBladeRF2OutputReport ()
 
 SWGBladeRF2OutputReport (QString *json)
 
virtual ~SWGBladeRF2OutputReport ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGBladeRF2OutputReportfromJson (QString &jsonString) override
 
SWGFrequencyRangegetFrequencyRange ()
 
void setFrequencyRange (SWGFrequencyRange *frequency_range)
 
SWGRangegetSampleRateRange ()
 
void setSampleRateRange (SWGRange *sample_rate_range)
 
SWGRangegetBandwidthRange ()
 
void setBandwidthRange (SWGRange *bandwidth_range)
 
SWGRangegetGlobalGainRange ()
 
void setGlobalGainRange (SWGRange *global_gain_range)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

SWGFrequencyRangefrequency_range
 
bool m_frequency_range_isSet
 
SWGRangesample_rate_range
 
bool m_sample_rate_range_isSet
 
SWGRangebandwidth_range
 
bool m_bandwidth_range_isSet
 
SWGRangeglobal_gain_range
 
bool m_global_gain_range_isSet
 

Detailed Description

Definition at line 33 of file SWGBladeRF2OutputReport.h.

Constructor & Destructor Documentation

◆ SWGBladeRF2OutputReport() [1/2]

SWGSDRangel::SWGBladeRF2OutputReport::SWGBladeRF2OutputReport ( )

Definition at line 30 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, m_bandwidth_range_isSet, m_frequency_range_isSet, m_global_gain_range_isSet, m_sample_rate_range_isSet, and sample_rate_range.

◆ SWGBladeRF2OutputReport() [2/2]

SWGSDRangel::SWGBladeRF2OutputReport::SWGBladeRF2OutputReport ( QString *  json)

Definition at line 25 of file SWGBladeRF2OutputReport.cpp.

References fromJson(), and init().

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

◆ ~SWGBladeRF2OutputReport()

SWGSDRangel::SWGBladeRF2OutputReport::~SWGBladeRF2OutputReport ( )
virtual

Definition at line 41 of file SWGBladeRF2OutputReport.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGBladeRF2OutputReport::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 95 of file SWGBladeRF2OutputReport.cpp.

References asJsonObject().

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

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 106 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, SWGSDRangel::SWGRange::isSet(), SWGSDRangel::SWGFrequencyRange::isSet(), sample_rate_range, and SWGSDRangel::toJsonValue().

Referenced by asJson().

106  {
107  QJsonObject* obj = new QJsonObject();
108  if((frequency_range != nullptr) && (frequency_range->isSet())){
109  toJsonValue(QString("frequencyRange"), frequency_range, obj, QString("SWGFrequencyRange"));
110  }
111  if((sample_rate_range != nullptr) && (sample_rate_range->isSet())){
112  toJsonValue(QString("sampleRateRange"), sample_rate_range, obj, QString("SWGRange"));
113  }
114  if((bandwidth_range != nullptr) && (bandwidth_range->isSet())){
115  toJsonValue(QString("bandwidthRange"), bandwidth_range, obj, QString("SWGRange"));
116  }
117  if((global_gain_range != nullptr) && (global_gain_range->isSet())){
118  toJsonValue(QString("globalGainRange"), global_gain_range, obj, QString("SWGRange"));
119  }
120 
121  return obj;
122 }
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
Definition: SWGHelpers.cpp:383
virtual bool isSet() override
Definition: SWGRange.cpp:138
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGBladeRF2OutputReport::cleanup ( )

Definition at line 58 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, and sample_rate_range.

Referenced by ~SWGBladeRF2OutputReport().

58  {
59  if(frequency_range != nullptr) {
60  delete frequency_range;
61  }
62  if(sample_rate_range != nullptr) {
63  delete sample_rate_range;
64  }
65  if(bandwidth_range != nullptr) {
66  delete bandwidth_range;
67  }
68  if(global_gain_range != nullptr) {
69  delete global_gain_range;
70  }
71 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 74 of file SWGBladeRF2OutputReport.cpp.

References fromJsonObject().

Referenced by SWGBladeRF2OutputReport().

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 83 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, sample_rate_range, and SWGSDRangel::setValue().

Referenced by fromJson().

83  {
84  ::SWGSDRangel::setValue(&frequency_range, pJson["frequencyRange"], "SWGFrequencyRange", "SWGFrequencyRange");
85 
86  ::SWGSDRangel::setValue(&sample_rate_range, pJson["sampleRateRange"], "SWGRange", "SWGRange");
87 
88  ::SWGSDRangel::setValue(&bandwidth_range, pJson["bandwidthRange"], "SWGRange", "SWGRange");
89 
90  ::SWGSDRangel::setValue(&global_gain_range, pJson["globalGainRange"], "SWGRange", "SWGRange");
91 
92 }
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:

◆ getBandwidthRange()

SWGRange * SWGSDRangel::SWGBladeRF2OutputReport::getBandwidthRange ( )

Definition at line 145 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

145  {
146  return bandwidth_range;
147 }
+ Here is the caller graph for this function:

◆ getFrequencyRange()

SWGFrequencyRange * SWGSDRangel::SWGBladeRF2OutputReport::getFrequencyRange ( )

Definition at line 125 of file SWGBladeRF2OutputReport.cpp.

References frequency_range.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

125  {
126  return frequency_range;
127 }
+ Here is the caller graph for this function:

◆ getGlobalGainRange()

SWGRange * SWGSDRangel::SWGBladeRF2OutputReport::getGlobalGainRange ( )

Definition at line 155 of file SWGBladeRF2OutputReport.cpp.

References global_gain_range.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

155  {
156  return global_gain_range;
157 }
+ Here is the caller graph for this function:

◆ getSampleRateRange()

SWGRange * SWGSDRangel::SWGBladeRF2OutputReport::getSampleRateRange ( )

Definition at line 135 of file SWGBladeRF2OutputReport.cpp.

References sample_rate_range.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

135  {
136  return sample_rate_range;
137 }
+ Here is the caller graph for this function:

◆ init()

void SWGSDRangel::SWGBladeRF2OutputReport::init ( )

Definition at line 46 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, m_bandwidth_range_isSet, m_frequency_range_isSet, m_global_gain_range_isSet, m_sample_rate_range_isSet, and sample_rate_range.

Referenced by SWGBladeRF2OutputReport(), and BladeRF2Output::webapiReportGet().

+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGBladeRF2OutputReport::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 166 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, frequency_range, global_gain_range, SWGSDRangel::SWGRange::isSet(), SWGSDRangel::SWGFrequencyRange::isSet(), and sample_rate_range.

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

166  {
167  bool isObjectUpdated = false;
168  do{
169  if(frequency_range != nullptr && frequency_range->isSet()){ isObjectUpdated = true; break;}
170  if(sample_rate_range != nullptr && sample_rate_range->isSet()){ isObjectUpdated = true; break;}
171  if(bandwidth_range != nullptr && bandwidth_range->isSet()){ isObjectUpdated = true; break;}
172  if(global_gain_range != nullptr && global_gain_range->isSet()){ isObjectUpdated = true; break;}
173  }while(false);
174  return isObjectUpdated;
175 }
virtual bool isSet() override
Definition: SWGRange.cpp:138
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setBandwidthRange()

void SWGSDRangel::SWGBladeRF2OutputReport::setBandwidthRange ( SWGRange bandwidth_range)

Definition at line 149 of file SWGBladeRF2OutputReport.cpp.

References bandwidth_range, and m_bandwidth_range_isSet.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setFrequencyRange()

void SWGSDRangel::SWGBladeRF2OutputReport::setFrequencyRange ( SWGFrequencyRange frequency_range)

Definition at line 129 of file SWGBladeRF2OutputReport.cpp.

References frequency_range, and m_frequency_range_isSet.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setGlobalGainRange()

void SWGSDRangel::SWGBladeRF2OutputReport::setGlobalGainRange ( SWGRange global_gain_range)

Definition at line 159 of file SWGBladeRF2OutputReport.cpp.

References global_gain_range, and m_global_gain_range_isSet.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

◆ setSampleRateRange()

void SWGSDRangel::SWGBladeRF2OutputReport::setSampleRateRange ( SWGRange sample_rate_range)

Definition at line 139 of file SWGBladeRF2OutputReport.cpp.

References m_sample_rate_range_isSet, and sample_rate_range.

Referenced by BladeRF2Output::webapiFormatDeviceReport().

+ Here is the caller graph for this function:

Member Data Documentation

◆ bandwidth_range

SWGRange* SWGSDRangel::SWGBladeRF2OutputReport::bandwidth_range
private

◆ frequency_range

SWGFrequencyRange* SWGSDRangel::SWGBladeRF2OutputReport::frequency_range
private

◆ global_gain_range

SWGRange* SWGSDRangel::SWGBladeRF2OutputReport::global_gain_range
private

◆ m_bandwidth_range_isSet

bool SWGSDRangel::SWGBladeRF2OutputReport::m_bandwidth_range_isSet
private

Definition at line 69 of file SWGBladeRF2OutputReport.h.

Referenced by init(), setBandwidthRange(), and SWGBladeRF2OutputReport().

◆ m_frequency_range_isSet

bool SWGSDRangel::SWGBladeRF2OutputReport::m_frequency_range_isSet
private

Definition at line 63 of file SWGBladeRF2OutputReport.h.

Referenced by init(), setFrequencyRange(), and SWGBladeRF2OutputReport().

◆ m_global_gain_range_isSet

bool SWGSDRangel::SWGBladeRF2OutputReport::m_global_gain_range_isSet
private

Definition at line 72 of file SWGBladeRF2OutputReport.h.

Referenced by init(), setGlobalGainRange(), and SWGBladeRF2OutputReport().

◆ m_sample_rate_range_isSet

bool SWGSDRangel::SWGBladeRF2OutputReport::m_sample_rate_range_isSet
private

Definition at line 66 of file SWGBladeRF2OutputReport.h.

Referenced by init(), setSampleRateRange(), and SWGBladeRF2OutputReport().

◆ sample_rate_range

SWGRange* SWGSDRangel::SWGBladeRF2OutputReport::sample_rate_range
private

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