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

#include <SWGLocalInputSettings.h>

+ Inheritance diagram for SWGSDRangel::SWGLocalInputSettings:
+ Collaboration diagram for SWGSDRangel::SWGLocalInputSettings:

Public Member Functions

 SWGLocalInputSettings ()
 
 SWGLocalInputSettings (QString *json)
 
virtual ~SWGLocalInputSettings ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGLocalInputSettingsfromJson (QString &jsonString) override
 
qint32 getDcBlock ()
 
void setDcBlock (qint32 dc_block)
 
qint32 getIqCorrection ()
 
void setIqCorrection (qint32 iq_correction)
 
QString * getFileRecordName ()
 
void setFileRecordName (QString *file_record_name)
 
qint32 getUseReverseApi ()
 
void setUseReverseApi (qint32 use_reverse_api)
 
QString * getReverseApiAddress ()
 
void setReverseApiAddress (QString *reverse_api_address)
 
qint32 getReverseApiPort ()
 
void setReverseApiPort (qint32 reverse_api_port)
 
qint32 getReverseApiDeviceIndex ()
 
void setReverseApiDeviceIndex (qint32 reverse_api_device_index)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

qint32 dc_block
 
bool m_dc_block_isSet
 
qint32 iq_correction
 
bool m_iq_correction_isSet
 
QString * file_record_name
 
bool m_file_record_name_isSet
 
qint32 use_reverse_api
 
bool m_use_reverse_api_isSet
 
QString * reverse_api_address
 
bool m_reverse_api_address_isSet
 
qint32 reverse_api_port
 
bool m_reverse_api_port_isSet
 
qint32 reverse_api_device_index
 
bool m_reverse_api_device_index_isSet
 

Detailed Description

Definition at line 32 of file SWGLocalInputSettings.h.

Constructor & Destructor Documentation

◆ SWGLocalInputSettings() [1/2]

SWGSDRangel::SWGLocalInputSettings::SWGLocalInputSettings ( )

Definition at line 30 of file SWGLocalInputSettings.cpp.

References dc_block, file_record_name, iq_correction, m_dc_block_isSet, m_file_record_name_isSet, m_iq_correction_isSet, m_reverse_api_address_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_device_index, reverse_api_port, and use_reverse_api.

30  {
31  dc_block = 0;
32  m_dc_block_isSet = false;
33  iq_correction = 0;
34  m_iq_correction_isSet = false;
35  file_record_name = nullptr;
37  use_reverse_api = 0;
39  reverse_api_address = nullptr;
41  reverse_api_port = 0;
45 }

◆ SWGLocalInputSettings() [2/2]

SWGSDRangel::SWGLocalInputSettings::SWGLocalInputSettings ( QString *  json)

Definition at line 25 of file SWGLocalInputSettings.cpp.

References fromJson(), and init().

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

◆ ~SWGLocalInputSettings()

SWGSDRangel::SWGLocalInputSettings::~SWGLocalInputSettings ( )
virtual

Definition at line 47 of file SWGLocalInputSettings.cpp.

References cleanup().

47  {
48  this->cleanup();
49 }
+ Here is the call graph for this function:

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGLocalInputSettings::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 112 of file SWGLocalInputSettings.cpp.

References asJsonObject().

113 {
114  QJsonObject* obj = this->asJsonObject();
115 
116  QJsonDocument doc(*obj);
117  QByteArray bytes = doc.toJson();
118  delete obj;
119  return QString(bytes);
120 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 123 of file SWGLocalInputSettings.cpp.

References dc_block, file_record_name, iq_correction, m_dc_block_isSet, m_iq_correction_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_device_index, reverse_api_port, SWGSDRangel::toJsonValue(), and use_reverse_api.

Referenced by asJson().

123  {
124  QJsonObject* obj = new QJsonObject();
125  if(m_dc_block_isSet){
126  obj->insert("dcBlock", QJsonValue(dc_block));
127  }
129  obj->insert("iqCorrection", QJsonValue(iq_correction));
130  }
131  if(file_record_name != nullptr && *file_record_name != QString("")){
132  toJsonValue(QString("fileRecordName"), file_record_name, obj, QString("QString"));
133  }
135  obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
136  }
137  if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
138  toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
139  }
141  obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
142  }
144  obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
145  }
146 
147  return obj;
148 }
void toJsonValue(QString name, void *value, QJsonObject *output, QString type)
Definition: SWGHelpers.cpp:383
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cleanup()

void SWGSDRangel::SWGLocalInputSettings::cleanup ( )

Definition at line 70 of file SWGLocalInputSettings.cpp.

References file_record_name, and reverse_api_address.

Referenced by ~SWGLocalInputSettings().

70  {
71 
72 
73  if(file_record_name != nullptr) {
74  delete file_record_name;
75  }
76 
77  if(reverse_api_address != nullptr) {
78  delete reverse_api_address;
79  }
80 
81 
82 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 85 of file SWGLocalInputSettings.cpp.

References fromJsonObject().

Referenced by SWGLocalInputSettings().

85  {
86  QByteArray array (json.toStdString().c_str());
87  QJsonDocument doc = QJsonDocument::fromJson(array);
88  QJsonObject jsonObject = doc.object();
89  this->fromJsonObject(jsonObject);
90  return this;
91 }
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::SWGLocalInputSettings::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 94 of file SWGLocalInputSettings.cpp.

References dc_block, file_record_name, iq_correction, reverse_api_address, reverse_api_device_index, reverse_api_port, SWGSDRangel::setValue(), and use_reverse_api.

Referenced by fromJson(), and WebAPIRequestMapper::validateDeviceSettings().

94  {
95  ::SWGSDRangel::setValue(&dc_block, pJson["dcBlock"], "qint32", "");
96 
97  ::SWGSDRangel::setValue(&iq_correction, pJson["iqCorrection"], "qint32", "");
98 
99  ::SWGSDRangel::setValue(&file_record_name, pJson["fileRecordName"], "QString", "QString");
100 
101  ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
102 
103  ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
104 
105  ::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
106 
107  ::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
108 
109 }
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:

◆ getDcBlock()

qint32 SWGSDRangel::SWGLocalInputSettings::getDcBlock ( )

Definition at line 151 of file SWGLocalInputSettings.cpp.

References dc_block.

Referenced by LocalInput::webapiSettingsPutPatch().

151  {
152  return dc_block;
153 }
+ Here is the caller graph for this function:

◆ getFileRecordName()

QString * SWGSDRangel::SWGLocalInputSettings::getFileRecordName ( )

Definition at line 171 of file SWGLocalInputSettings.cpp.

References file_record_name.

Referenced by LocalInput::webapiFormatDeviceSettings(), and LocalInput::webapiSettingsPutPatch().

171  {
172  return file_record_name;
173 }
+ Here is the caller graph for this function:

◆ getIqCorrection()

qint32 SWGSDRangel::SWGLocalInputSettings::getIqCorrection ( )

Definition at line 161 of file SWGLocalInputSettings.cpp.

References iq_correction.

Referenced by LocalInput::webapiSettingsPutPatch().

161  {
162  return iq_correction;
163 }
+ Here is the caller graph for this function:

◆ getReverseApiAddress()

QString * SWGSDRangel::SWGLocalInputSettings::getReverseApiAddress ( )

Definition at line 191 of file SWGLocalInputSettings.cpp.

References reverse_api_address.

Referenced by LocalInput::webapiFormatDeviceSettings(), and LocalInput::webapiSettingsPutPatch().

191  {
192  return reverse_api_address;
193 }
+ Here is the caller graph for this function:

◆ getReverseApiDeviceIndex()

qint32 SWGSDRangel::SWGLocalInputSettings::getReverseApiDeviceIndex ( )

Definition at line 211 of file SWGLocalInputSettings.cpp.

References reverse_api_device_index.

Referenced by LocalInput::webapiSettingsPutPatch().

211  {
213 }
+ Here is the caller graph for this function:

◆ getReverseApiPort()

qint32 SWGSDRangel::SWGLocalInputSettings::getReverseApiPort ( )

Definition at line 201 of file SWGLocalInputSettings.cpp.

References reverse_api_port.

Referenced by LocalInput::webapiSettingsPutPatch().

201  {
202  return reverse_api_port;
203 }
+ Here is the caller graph for this function:

◆ getUseReverseApi()

qint32 SWGSDRangel::SWGLocalInputSettings::getUseReverseApi ( )

Definition at line 181 of file SWGLocalInputSettings.cpp.

References use_reverse_api.

Referenced by LocalInput::webapiSettingsPutPatch().

181  {
182  return use_reverse_api;
183 }
+ Here is the caller graph for this function:

◆ init()

void SWGSDRangel::SWGLocalInputSettings::init ( )

Definition at line 52 of file SWGLocalInputSettings.cpp.

References dc_block, file_record_name, iq_correction, m_dc_block_isSet, m_file_record_name_isSet, m_iq_correction_isSet, m_reverse_api_address_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_device_index, reverse_api_port, and use_reverse_api.

Referenced by SWGLocalInputSettings(), and LocalInput::webapiSettingsGet().

52  {
53  dc_block = 0;
54  m_dc_block_isSet = false;
55  iq_correction = 0;
56  m_iq_correction_isSet = false;
57  file_record_name = new QString("");
59  use_reverse_api = 0;
61  reverse_api_address = new QString("");
63  reverse_api_port = 0;
67 }
+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGLocalInputSettings::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 222 of file SWGLocalInputSettings.cpp.

References file_record_name, m_dc_block_isSet, m_iq_correction_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_use_reverse_api_isSet, and reverse_api_address.

Referenced by SWGSDRangel::SWGDeviceSettings::asJsonObject(), SWGSDRangel::SWGDeviceSettings_2::asJsonObject(), SWGSDRangel::SWGDeviceSettings_2::isSet(), and SWGSDRangel::SWGDeviceSettings::isSet().

222  {
223  bool isObjectUpdated = false;
224  do{
225  if(m_dc_block_isSet){ isObjectUpdated = true; break;}
226  if(m_iq_correction_isSet){ isObjectUpdated = true; break;}
227  if(file_record_name != nullptr && *file_record_name != QString("")){ isObjectUpdated = true; break;}
228  if(m_use_reverse_api_isSet){ isObjectUpdated = true; break;}
229  if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ isObjectUpdated = true; break;}
230  if(m_reverse_api_port_isSet){ isObjectUpdated = true; break;}
231  if(m_reverse_api_device_index_isSet){ isObjectUpdated = true; break;}
232  }while(false);
233  return isObjectUpdated;
234 }
+ Here is the caller graph for this function:

◆ setDcBlock()

void SWGSDRangel::SWGLocalInputSettings::setDcBlock ( qint32  dc_block)

Definition at line 155 of file SWGLocalInputSettings.cpp.

References dc_block, and m_dc_block_isSet.

Referenced by LocalInput::webapiFormatDeviceSettings(), and LocalInput::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setFileRecordName()

void SWGSDRangel::SWGLocalInputSettings::setFileRecordName ( QString *  file_record_name)

Definition at line 175 of file SWGLocalInputSettings.cpp.

References file_record_name, and m_file_record_name_isSet.

Referenced by LocalInput::webapiFormatDeviceSettings(), and LocalInput::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setIqCorrection()

void SWGSDRangel::SWGLocalInputSettings::setIqCorrection ( qint32  iq_correction)

Definition at line 165 of file SWGLocalInputSettings.cpp.

References iq_correction, and m_iq_correction_isSet.

Referenced by LocalInput::webapiFormatDeviceSettings(), and LocalInput::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setReverseApiAddress()

void SWGSDRangel::SWGLocalInputSettings::setReverseApiAddress ( QString *  reverse_api_address)

Definition at line 195 of file SWGLocalInputSettings.cpp.

References m_reverse_api_address_isSet, and reverse_api_address.

Referenced by LocalInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setReverseApiDeviceIndex()

void SWGSDRangel::SWGLocalInputSettings::setReverseApiDeviceIndex ( qint32  reverse_api_device_index)

Definition at line 215 of file SWGLocalInputSettings.cpp.

References m_reverse_api_device_index_isSet, and reverse_api_device_index.

Referenced by LocalInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setReverseApiPort()

void SWGSDRangel::SWGLocalInputSettings::setReverseApiPort ( qint32  reverse_api_port)

Definition at line 205 of file SWGLocalInputSettings.cpp.

References m_reverse_api_port_isSet, and reverse_api_port.

Referenced by LocalInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setUseReverseApi()

void SWGSDRangel::SWGLocalInputSettings::setUseReverseApi ( qint32  use_reverse_api)

Definition at line 185 of file SWGLocalInputSettings.cpp.

References m_use_reverse_api_isSet, and use_reverse_api.

Referenced by LocalInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

Member Data Documentation

◆ dc_block

qint32 SWGSDRangel::SWGLocalInputSettings::dc_block
private

◆ file_record_name

QString* SWGSDRangel::SWGLocalInputSettings::file_record_name
private

◆ iq_correction

qint32 SWGSDRangel::SWGLocalInputSettings::iq_correction
private

◆ m_dc_block_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_dc_block_isSet
private

Definition at line 71 of file SWGLocalInputSettings.h.

Referenced by asJsonObject(), init(), isSet(), setDcBlock(), and SWGLocalInputSettings().

◆ m_file_record_name_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_file_record_name_isSet
private

Definition at line 77 of file SWGLocalInputSettings.h.

Referenced by init(), setFileRecordName(), and SWGLocalInputSettings().

◆ m_iq_correction_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_iq_correction_isSet
private

◆ m_reverse_api_address_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_reverse_api_address_isSet
private

Definition at line 83 of file SWGLocalInputSettings.h.

Referenced by init(), setReverseApiAddress(), and SWGLocalInputSettings().

◆ m_reverse_api_device_index_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_reverse_api_device_index_isSet
private

◆ m_reverse_api_port_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_reverse_api_port_isSet
private

◆ m_use_reverse_api_isSet

bool SWGSDRangel::SWGLocalInputSettings::m_use_reverse_api_isSet
private

◆ reverse_api_address

QString* SWGSDRangel::SWGLocalInputSettings::reverse_api_address
private

◆ reverse_api_device_index

qint32 SWGSDRangel::SWGLocalInputSettings::reverse_api_device_index
private

◆ reverse_api_port

qint32 SWGSDRangel::SWGLocalInputSettings::reverse_api_port
private

◆ use_reverse_api

qint32 SWGSDRangel::SWGLocalInputSettings::use_reverse_api
private

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