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

#include <SWGFileInputSettings.h>

+ Inheritance diagram for SWGSDRangel::SWGFileInputSettings:
+ Collaboration diagram for SWGSDRangel::SWGFileInputSettings:

Public Member Functions

 SWGFileInputSettings ()
 
 SWGFileInputSettings (QString *json)
 
virtual ~SWGFileInputSettings ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGFileInputSettingsfromJson (QString &jsonString) override
 
QString * getFileName ()
 
void setFileName (QString *file_name)
 
qint32 getAccelerationFactor ()
 
void setAccelerationFactor (qint32 acceleration_factor)
 
qint32 getLoop ()
 
void setLoop (qint32 loop)
 
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

QString * file_name
 
bool m_file_name_isSet
 
qint32 acceleration_factor
 
bool m_acceleration_factor_isSet
 
qint32 loop
 
bool m_loop_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 SWGFileInputSettings.h.

Constructor & Destructor Documentation

◆ SWGFileInputSettings() [1/2]

SWGSDRangel::SWGFileInputSettings::SWGFileInputSettings ( )

Definition at line 30 of file SWGFileInputSettings.cpp.

References acceleration_factor, file_name, loop, m_acceleration_factor_isSet, m_file_name_isSet, m_loop_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  file_name = nullptr;
32  m_file_name_isSet = false;
35  loop = 0;
36  m_loop_isSet = false;
37  use_reverse_api = 0;
39  reverse_api_address = nullptr;
41  reverse_api_port = 0;
45 }

◆ SWGFileInputSettings() [2/2]

SWGSDRangel::SWGFileInputSettings::SWGFileInputSettings ( QString *  json)

Definition at line 25 of file SWGFileInputSettings.cpp.

References fromJson(), and init().

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

◆ ~SWGFileInputSettings()

SWGSDRangel::SWGFileInputSettings::~SWGFileInputSettings ( )
virtual

Definition at line 47 of file SWGFileInputSettings.cpp.

References cleanup().

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

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGFileInputSettings::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 123 of file SWGFileInputSettings.cpp.

References acceleration_factor, file_name, loop, m_acceleration_factor_isSet, m_loop_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(file_name != nullptr && *file_name != QString("")){
126  toJsonValue(QString("fileName"), file_name, obj, QString("QString"));
127  }
129  obj->insert("accelerationFactor", QJsonValue(acceleration_factor));
130  }
131  if(m_loop_isSet){
132  obj->insert("loop", QJsonValue(loop));
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::SWGFileInputSettings::cleanup ( )

Definition at line 70 of file SWGFileInputSettings.cpp.

References file_name, and reverse_api_address.

Referenced by ~SWGFileInputSettings().

70  {
71  if(file_name != nullptr) {
72  delete file_name;
73  }
74 
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()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 85 of file SWGFileInputSettings.cpp.

References fromJsonObject().

Referenced by SWGFileInputSettings().

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 94 of file SWGFileInputSettings.cpp.

References acceleration_factor, file_name, loop, 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(&file_name, pJson["fileName"], "QString", "QString");
96 
97  ::SWGSDRangel::setValue(&acceleration_factor, pJson["accelerationFactor"], "qint32", "");
98 
99  ::SWGSDRangel::setValue(&loop, pJson["loop"], "qint32", "");
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:

◆ getAccelerationFactor()

qint32 SWGSDRangel::SWGFileInputSettings::getAccelerationFactor ( )

Definition at line 161 of file SWGFileInputSettings.cpp.

References acceleration_factor.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ getFileName()

QString * SWGSDRangel::SWGFileInputSettings::getFileName ( )

Definition at line 151 of file SWGFileInputSettings.cpp.

References file_name.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ getLoop()

qint32 SWGSDRangel::SWGFileInputSettings::getLoop ( )

Definition at line 171 of file SWGFileInputSettings.cpp.

References loop.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ getReverseApiAddress()

QString * SWGSDRangel::SWGFileInputSettings::getReverseApiAddress ( )

Definition at line 191 of file SWGFileInputSettings.cpp.

References reverse_api_address.

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

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

◆ getReverseApiDeviceIndex()

qint32 SWGSDRangel::SWGFileInputSettings::getReverseApiDeviceIndex ( )

Definition at line 211 of file SWGFileInputSettings.cpp.

References reverse_api_device_index.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ getReverseApiPort()

qint32 SWGSDRangel::SWGFileInputSettings::getReverseApiPort ( )

Definition at line 201 of file SWGFileInputSettings.cpp.

References reverse_api_port.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ getUseReverseApi()

qint32 SWGSDRangel::SWGFileInputSettings::getUseReverseApi ( )

Definition at line 181 of file SWGFileInputSettings.cpp.

References use_reverse_api.

Referenced by FileInput::webapiSettingsPutPatch().

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

◆ init()

void SWGSDRangel::SWGFileInputSettings::init ( )

Definition at line 52 of file SWGFileInputSettings.cpp.

References acceleration_factor, file_name, loop, m_acceleration_factor_isSet, m_file_name_isSet, m_loop_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 SWGFileInputSettings(), and FileInput::webapiSettingsGet().

52  {
53  file_name = new QString("");
54  m_file_name_isSet = false;
57  loop = 0;
58  m_loop_isSet = false;
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::SWGFileInputSettings::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 222 of file SWGFileInputSettings.cpp.

References file_name, m_acceleration_factor_isSet, m_loop_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(file_name != nullptr && *file_name != QString("")){ isObjectUpdated = true; break;}
226  if(m_acceleration_factor_isSet){ isObjectUpdated = true; break;}
227  if(m_loop_isSet){ 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:

◆ setAccelerationFactor()

void SWGSDRangel::SWGFileInputSettings::setAccelerationFactor ( qint32  acceleration_factor)

◆ setFileName()

void SWGSDRangel::SWGFileInputSettings::setFileName ( QString *  file_name)

Definition at line 155 of file SWGFileInputSettings.cpp.

References file_name, and m_file_name_isSet.

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

+ Here is the caller graph for this function:

◆ setLoop()

void SWGSDRangel::SWGFileInputSettings::setLoop ( qint32  loop)

Definition at line 175 of file SWGFileInputSettings.cpp.

References loop, and m_loop_isSet.

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

175  {
176  this->loop = loop;
177  this->m_loop_isSet = true;
178 }
+ Here is the caller graph for this function:

◆ setReverseApiAddress()

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

Definition at line 195 of file SWGFileInputSettings.cpp.

References m_reverse_api_address_isSet, and reverse_api_address.

Referenced by FileInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setReverseApiDeviceIndex()

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

Definition at line 215 of file SWGFileInputSettings.cpp.

References m_reverse_api_device_index_isSet, and reverse_api_device_index.

Referenced by FileInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setReverseApiPort()

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

Definition at line 205 of file SWGFileInputSettings.cpp.

References m_reverse_api_port_isSet, and reverse_api_port.

Referenced by FileInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

◆ setUseReverseApi()

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

Definition at line 185 of file SWGFileInputSettings.cpp.

References m_use_reverse_api_isSet, and use_reverse_api.

Referenced by FileInput::webapiFormatDeviceSettings().

+ Here is the caller graph for this function:

Member Data Documentation

◆ acceleration_factor

qint32 SWGSDRangel::SWGFileInputSettings::acceleration_factor
private

◆ file_name

QString* SWGSDRangel::SWGFileInputSettings::file_name
private

◆ loop

qint32 SWGSDRangel::SWGFileInputSettings::loop
private

◆ m_acceleration_factor_isSet

bool SWGSDRangel::SWGFileInputSettings::m_acceleration_factor_isSet
private

◆ m_file_name_isSet

bool SWGSDRangel::SWGFileInputSettings::m_file_name_isSet
private

Definition at line 71 of file SWGFileInputSettings.h.

Referenced by init(), setFileName(), and SWGFileInputSettings().

◆ m_loop_isSet

bool SWGSDRangel::SWGFileInputSettings::m_loop_isSet
private

Definition at line 77 of file SWGFileInputSettings.h.

Referenced by asJsonObject(), init(), isSet(), setLoop(), and SWGFileInputSettings().

◆ m_reverse_api_address_isSet

bool SWGSDRangel::SWGFileInputSettings::m_reverse_api_address_isSet
private

Definition at line 83 of file SWGFileInputSettings.h.

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

◆ m_reverse_api_device_index_isSet

bool SWGSDRangel::SWGFileInputSettings::m_reverse_api_device_index_isSet
private

◆ m_reverse_api_port_isSet

bool SWGSDRangel::SWGFileInputSettings::m_reverse_api_port_isSet
private

◆ m_use_reverse_api_isSet

bool SWGSDRangel::SWGFileInputSettings::m_use_reverse_api_isSet
private

◆ reverse_api_address

QString* SWGSDRangel::SWGFileInputSettings::reverse_api_address
private

◆ reverse_api_device_index

qint32 SWGSDRangel::SWGFileInputSettings::reverse_api_device_index
private

◆ reverse_api_port

qint32 SWGSDRangel::SWGFileInputSettings::reverse_api_port
private

◆ use_reverse_api

qint32 SWGSDRangel::SWGFileInputSettings::use_reverse_api
private

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