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

#include <SWGLocalSinkSettings.h>

+ Inheritance diagram for SWGSDRangel::SWGLocalSinkSettings:
+ Collaboration diagram for SWGSDRangel::SWGLocalSinkSettings:

Public Member Functions

 SWGLocalSinkSettings ()
 
 SWGLocalSinkSettings (QString *json)
 
virtual ~SWGLocalSinkSettings ()
 
void init ()
 
void cleanup ()
 
virtual QString asJson () override
 
virtual QJsonObject * asJsonObject () override
 
virtual void fromJsonObject (QJsonObject &json) override
 
virtual SWGLocalSinkSettingsfromJson (QString &jsonString) override
 
qint32 getLocalDeviceIndex ()
 
void setLocalDeviceIndex (qint32 local_device_index)
 
qint32 getRgbColor ()
 
void setRgbColor (qint32 rgb_color)
 
QString * getTitle ()
 
void setTitle (QString *title)
 
qint32 getLog2Decim ()
 
void setLog2Decim (qint32 log2_decim)
 
qint32 getFilterChainHash ()
 
void setFilterChainHash (qint32 filter_chain_hash)
 
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)
 
qint32 getReverseApiChannelIndex ()
 
void setReverseApiChannelIndex (qint32 reverse_api_channel_index)
 
virtual bool isSet () override
 
- Public Member Functions inherited from SWGSDRangel::SWGObject
virtual ~SWGObject ()
 

Private Attributes

qint32 local_device_index
 
bool m_local_device_index_isSet
 
qint32 rgb_color
 
bool m_rgb_color_isSet
 
QString * title
 
bool m_title_isSet
 
qint32 log2_decim
 
bool m_log2_decim_isSet
 
qint32 filter_chain_hash
 
bool m_filter_chain_hash_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
 
qint32 reverse_api_channel_index
 
bool m_reverse_api_channel_index_isSet
 

Detailed Description

Definition at line 32 of file SWGLocalSinkSettings.h.

Constructor & Destructor Documentation

◆ SWGLocalSinkSettings() [1/2]

SWGSDRangel::SWGLocalSinkSettings::SWGLocalSinkSettings ( )

Definition at line 30 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash, local_device_index, log2_decim, m_filter_chain_hash_isSet, m_local_device_index_isSet, m_log2_decim_isSet, m_reverse_api_address_isSet, m_reverse_api_channel_index_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_rgb_color_isSet, m_title_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_channel_index, reverse_api_device_index, reverse_api_port, rgb_color, title, and use_reverse_api.

30  {
33  rgb_color = 0;
34  m_rgb_color_isSet = false;
35  title = nullptr;
36  m_title_isSet = false;
37  log2_decim = 0;
38  m_log2_decim_isSet = false;
41  use_reverse_api = 0;
43  reverse_api_address = nullptr;
45  reverse_api_port = 0;
51 }

◆ SWGLocalSinkSettings() [2/2]

SWGSDRangel::SWGLocalSinkSettings::SWGLocalSinkSettings ( QString *  json)

Definition at line 25 of file SWGLocalSinkSettings.cpp.

References fromJson(), and init().

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

◆ ~SWGLocalSinkSettings()

SWGSDRangel::SWGLocalSinkSettings::~SWGLocalSinkSettings ( )
virtual

Definition at line 53 of file SWGLocalSinkSettings.cpp.

References cleanup().

53  {
54  this->cleanup();
55 }
+ Here is the call graph for this function:

Member Function Documentation

◆ asJson()

QString SWGSDRangel::SWGLocalSinkSettings::asJson ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 133 of file SWGLocalSinkSettings.cpp.

References asJsonObject().

134 {
135  QJsonObject* obj = this->asJsonObject();
136 
137  QJsonDocument doc(*obj);
138  QByteArray bytes = doc.toJson();
139  delete obj;
140  return QString(bytes);
141 }
virtual QJsonObject * asJsonObject() override
+ Here is the call graph for this function:

◆ asJsonObject()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 144 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash, local_device_index, log2_decim, m_filter_chain_hash_isSet, m_local_device_index_isSet, m_log2_decim_isSet, m_reverse_api_channel_index_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_rgb_color_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_channel_index, reverse_api_device_index, reverse_api_port, rgb_color, title, SWGSDRangel::toJsonValue(), and use_reverse_api.

Referenced by asJson().

144  {
145  QJsonObject* obj = new QJsonObject();
147  obj->insert("localDeviceIndex", QJsonValue(local_device_index));
148  }
149  if(m_rgb_color_isSet){
150  obj->insert("rgbColor", QJsonValue(rgb_color));
151  }
152  if(title != nullptr && *title != QString("")){
153  toJsonValue(QString("title"), title, obj, QString("QString"));
154  }
155  if(m_log2_decim_isSet){
156  obj->insert("log2Decim", QJsonValue(log2_decim));
157  }
159  obj->insert("filterChainHash", QJsonValue(filter_chain_hash));
160  }
162  obj->insert("useReverseAPI", QJsonValue(use_reverse_api));
163  }
164  if(reverse_api_address != nullptr && *reverse_api_address != QString("")){
165  toJsonValue(QString("reverseAPIAddress"), reverse_api_address, obj, QString("QString"));
166  }
168  obj->insert("reverseAPIPort", QJsonValue(reverse_api_port));
169  }
171  obj->insert("reverseAPIDeviceIndex", QJsonValue(reverse_api_device_index));
172  }
174  obj->insert("reverseAPIChannelIndex", QJsonValue(reverse_api_channel_index));
175  }
176 
177  return obj;
178 }
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::SWGLocalSinkSettings::cleanup ( )

Definition at line 82 of file SWGLocalSinkSettings.cpp.

References reverse_api_address, and title.

Referenced by ~SWGLocalSinkSettings().

82  {
83 
84 
85  if(title != nullptr) {
86  delete title;
87  }
88 
89 
90 
91  if(reverse_api_address != nullptr) {
92  delete reverse_api_address;
93  }
94 
95 
96 
97 }
+ Here is the caller graph for this function:

◆ fromJson()

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

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 100 of file SWGLocalSinkSettings.cpp.

References fromJsonObject().

Referenced by SWGLocalSinkSettings().

100  {
101  QByteArray array (json.toStdString().c_str());
102  QJsonDocument doc = QJsonDocument::fromJson(array);
103  QJsonObject jsonObject = doc.object();
104  this->fromJsonObject(jsonObject);
105  return this;
106 }
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::SWGLocalSinkSettings::fromJsonObject ( QJsonObject &  json)
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 109 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash, local_device_index, log2_decim, reverse_api_address, reverse_api_channel_index, reverse_api_device_index, reverse_api_port, rgb_color, SWGSDRangel::setValue(), title, and use_reverse_api.

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

109  {
110  ::SWGSDRangel::setValue(&local_device_index, pJson["localDeviceIndex"], "qint32", "");
111 
112  ::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
113 
114  ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
115 
116  ::SWGSDRangel::setValue(&log2_decim, pJson["log2Decim"], "qint32", "");
117 
118  ::SWGSDRangel::setValue(&filter_chain_hash, pJson["filterChainHash"], "qint32", "");
119 
120  ::SWGSDRangel::setValue(&use_reverse_api, pJson["useReverseAPI"], "qint32", "");
121 
122  ::SWGSDRangel::setValue(&reverse_api_address, pJson["reverseAPIAddress"], "QString", "QString");
123 
124  ::SWGSDRangel::setValue(&reverse_api_port, pJson["reverseAPIPort"], "qint32", "");
125 
126  ::SWGSDRangel::setValue(&reverse_api_device_index, pJson["reverseAPIDeviceIndex"], "qint32", "");
127 
128  ::SWGSDRangel::setValue(&reverse_api_channel_index, pJson["reverseAPIChannelIndex"], "qint32", "");
129 
130 }
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:

◆ getFilterChainHash()

qint32 SWGSDRangel::SWGLocalSinkSettings::getFilterChainHash ( )

Definition at line 221 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash.

Referenced by LocalSink::webapiSettingsPutPatch().

221  {
222  return filter_chain_hash;
223 }
+ Here is the caller graph for this function:

◆ getLocalDeviceIndex()

qint32 SWGSDRangel::SWGLocalSinkSettings::getLocalDeviceIndex ( )

Definition at line 181 of file SWGLocalSinkSettings.cpp.

References local_device_index.

Referenced by LocalSink::webapiSettingsPutPatch().

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

◆ getLog2Decim()

qint32 SWGSDRangel::SWGLocalSinkSettings::getLog2Decim ( )

Definition at line 211 of file SWGLocalSinkSettings.cpp.

References log2_decim.

Referenced by LocalSink::webapiSettingsPutPatch().

211  {
212  return log2_decim;
213 }
+ Here is the caller graph for this function:

◆ getReverseApiAddress()

QString * SWGSDRangel::SWGLocalSinkSettings::getReverseApiAddress ( )

Definition at line 241 of file SWGLocalSinkSettings.cpp.

References reverse_api_address.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiSettingsPutPatch().

241  {
242  return reverse_api_address;
243 }
+ Here is the caller graph for this function:

◆ getReverseApiChannelIndex()

qint32 SWGSDRangel::SWGLocalSinkSettings::getReverseApiChannelIndex ( )

Definition at line 271 of file SWGLocalSinkSettings.cpp.

References reverse_api_channel_index.

Referenced by LocalSink::webapiSettingsPutPatch().

271  {
273 }
+ Here is the caller graph for this function:

◆ getReverseApiDeviceIndex()

qint32 SWGSDRangel::SWGLocalSinkSettings::getReverseApiDeviceIndex ( )

Definition at line 261 of file SWGLocalSinkSettings.cpp.

References reverse_api_device_index.

Referenced by LocalSink::webapiSettingsPutPatch().

261  {
263 }
+ Here is the caller graph for this function:

◆ getReverseApiPort()

qint32 SWGSDRangel::SWGLocalSinkSettings::getReverseApiPort ( )

Definition at line 251 of file SWGLocalSinkSettings.cpp.

References reverse_api_port.

Referenced by LocalSink::webapiSettingsPutPatch().

251  {
252  return reverse_api_port;
253 }
+ Here is the caller graph for this function:

◆ getRgbColor()

qint32 SWGSDRangel::SWGLocalSinkSettings::getRgbColor ( )

Definition at line 191 of file SWGLocalSinkSettings.cpp.

References rgb_color.

Referenced by LocalSink::webapiSettingsPutPatch().

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

◆ getTitle()

QString * SWGSDRangel::SWGLocalSinkSettings::getTitle ( )

Definition at line 201 of file SWGLocalSinkSettings.cpp.

References title.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiSettingsPutPatch().

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

◆ getUseReverseApi()

qint32 SWGSDRangel::SWGLocalSinkSettings::getUseReverseApi ( )

Definition at line 231 of file SWGLocalSinkSettings.cpp.

References use_reverse_api.

Referenced by LocalSink::webapiSettingsPutPatch().

231  {
232  return use_reverse_api;
233 }
+ Here is the caller graph for this function:

◆ init()

void SWGSDRangel::SWGLocalSinkSettings::init ( )

Definition at line 58 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash, local_device_index, log2_decim, m_filter_chain_hash_isSet, m_local_device_index_isSet, m_log2_decim_isSet, m_reverse_api_address_isSet, m_reverse_api_channel_index_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_rgb_color_isSet, m_title_isSet, m_use_reverse_api_isSet, reverse_api_address, reverse_api_channel_index, reverse_api_device_index, reverse_api_port, rgb_color, title, and use_reverse_api.

Referenced by SWGLocalSinkSettings(), and LocalSink::webapiSettingsGet().

58  {
61  rgb_color = 0;
62  m_rgb_color_isSet = false;
63  title = new QString("");
64  m_title_isSet = false;
65  log2_decim = 0;
66  m_log2_decim_isSet = false;
69  use_reverse_api = 0;
71  reverse_api_address = new QString("");
73  reverse_api_port = 0;
79 }
+ Here is the caller graph for this function:

◆ isSet()

bool SWGSDRangel::SWGLocalSinkSettings::isSet ( )
overridevirtual

Reimplemented from SWGSDRangel::SWGObject.

Definition at line 282 of file SWGLocalSinkSettings.cpp.

References m_filter_chain_hash_isSet, m_local_device_index_isSet, m_log2_decim_isSet, m_reverse_api_channel_index_isSet, m_reverse_api_device_index_isSet, m_reverse_api_port_isSet, m_rgb_color_isSet, m_use_reverse_api_isSet, reverse_api_address, and title.

Referenced by SWGSDRangel::SWGChannelSettings::asJsonObject(), SWGSDRangel::SWGChannelSettings_2::asJsonObject(), SWGSDRangel::SWGChannelSettings_2::isSet(), and SWGSDRangel::SWGChannelSettings::isSet().

282  {
283  bool isObjectUpdated = false;
284  do{
285  if(m_local_device_index_isSet){ isObjectUpdated = true; break;}
286  if(m_rgb_color_isSet){ isObjectUpdated = true; break;}
287  if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;}
288  if(m_log2_decim_isSet){ isObjectUpdated = true; break;}
289  if(m_filter_chain_hash_isSet){ isObjectUpdated = true; break;}
290  if(m_use_reverse_api_isSet){ isObjectUpdated = true; break;}
291  if(reverse_api_address != nullptr && *reverse_api_address != QString("")){ isObjectUpdated = true; break;}
292  if(m_reverse_api_port_isSet){ isObjectUpdated = true; break;}
293  if(m_reverse_api_device_index_isSet){ isObjectUpdated = true; break;}
294  if(m_reverse_api_channel_index_isSet){ isObjectUpdated = true; break;}
295  }while(false);
296  return isObjectUpdated;
297 }
+ Here is the caller graph for this function:

◆ setFilterChainHash()

void SWGSDRangel::SWGLocalSinkSettings::setFilterChainHash ( qint32  filter_chain_hash)

Definition at line 225 of file SWGLocalSinkSettings.cpp.

References filter_chain_hash, and m_filter_chain_hash_isSet.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setLocalDeviceIndex()

void SWGSDRangel::SWGLocalSinkSettings::setLocalDeviceIndex ( qint32  local_device_index)

Definition at line 185 of file SWGLocalSinkSettings.cpp.

References local_device_index, and m_local_device_index_isSet.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setLog2Decim()

void SWGSDRangel::SWGLocalSinkSettings::setLog2Decim ( qint32  log2_decim)

Definition at line 215 of file SWGLocalSinkSettings.cpp.

References log2_decim, and m_log2_decim_isSet.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setReverseApiAddress()

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

Definition at line 245 of file SWGLocalSinkSettings.cpp.

References m_reverse_api_address_isSet, and reverse_api_address.

Referenced by LocalSink::webapiFormatChannelSettings().

+ Here is the caller graph for this function:

◆ setReverseApiChannelIndex()

void SWGSDRangel::SWGLocalSinkSettings::setReverseApiChannelIndex ( qint32  reverse_api_channel_index)

◆ setReverseApiDeviceIndex()

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

Definition at line 265 of file SWGLocalSinkSettings.cpp.

References m_reverse_api_device_index_isSet, and reverse_api_device_index.

Referenced by LocalSink::webapiFormatChannelSettings().

+ Here is the caller graph for this function:

◆ setReverseApiPort()

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

Definition at line 255 of file SWGLocalSinkSettings.cpp.

References m_reverse_api_port_isSet, and reverse_api_port.

Referenced by LocalSink::webapiFormatChannelSettings().

+ Here is the caller graph for this function:

◆ setRgbColor()

void SWGSDRangel::SWGLocalSinkSettings::setRgbColor ( qint32  rgb_color)

Definition at line 195 of file SWGLocalSinkSettings.cpp.

References m_rgb_color_isSet, and rgb_color.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiReverseSendSettings().

+ Here is the caller graph for this function:

◆ setTitle()

void SWGSDRangel::SWGLocalSinkSettings::setTitle ( QString *  title)

Definition at line 205 of file SWGLocalSinkSettings.cpp.

References m_title_isSet, and title.

Referenced by LocalSink::webapiFormatChannelSettings(), and LocalSink::webapiReverseSendSettings().

205  {
206  this->title = title;
207  this->m_title_isSet = true;
208 }
+ Here is the caller graph for this function:

◆ setUseReverseApi()

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

Definition at line 235 of file SWGLocalSinkSettings.cpp.

References m_use_reverse_api_isSet, and use_reverse_api.

Referenced by LocalSink::webapiFormatChannelSettings().

+ Here is the caller graph for this function:

Member Data Documentation

◆ filter_chain_hash

qint32 SWGSDRangel::SWGLocalSinkSettings::filter_chain_hash
private

◆ local_device_index

qint32 SWGSDRangel::SWGLocalSinkSettings::local_device_index
private

◆ log2_decim

qint32 SWGSDRangel::SWGLocalSinkSettings::log2_decim
private

◆ m_filter_chain_hash_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_filter_chain_hash_isSet
private

◆ m_local_device_index_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_local_device_index_isSet
private

◆ m_log2_decim_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_log2_decim_isSet
private

Definition at line 89 of file SWGLocalSinkSettings.h.

Referenced by asJsonObject(), init(), isSet(), setLog2Decim(), and SWGLocalSinkSettings().

◆ m_reverse_api_address_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_reverse_api_address_isSet
private

Definition at line 98 of file SWGLocalSinkSettings.h.

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

◆ m_reverse_api_channel_index_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_reverse_api_channel_index_isSet
private

◆ m_reverse_api_device_index_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_reverse_api_device_index_isSet
private

◆ m_reverse_api_port_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_reverse_api_port_isSet
private

◆ m_rgb_color_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_rgb_color_isSet
private

Definition at line 83 of file SWGLocalSinkSettings.h.

Referenced by asJsonObject(), init(), isSet(), setRgbColor(), and SWGLocalSinkSettings().

◆ m_title_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_title_isSet
private

Definition at line 86 of file SWGLocalSinkSettings.h.

Referenced by init(), setTitle(), and SWGLocalSinkSettings().

◆ m_use_reverse_api_isSet

bool SWGSDRangel::SWGLocalSinkSettings::m_use_reverse_api_isSet
private

◆ reverse_api_address

QString* SWGSDRangel::SWGLocalSinkSettings::reverse_api_address
private

◆ reverse_api_channel_index

qint32 SWGSDRangel::SWGLocalSinkSettings::reverse_api_channel_index
private

◆ reverse_api_device_index

qint32 SWGSDRangel::SWGLocalSinkSettings::reverse_api_device_index
private

◆ reverse_api_port

qint32 SWGSDRangel::SWGLocalSinkSettings::reverse_api_port
private

◆ rgb_color

qint32 SWGSDRangel::SWGLocalSinkSettings::rgb_color
private

◆ title

QString* SWGSDRangel::SWGLocalSinkSettings::title
private

◆ use_reverse_api

qint32 SWGSDRangel::SWGLocalSinkSettings::use_reverse_api
private

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