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 | Public Attributes | List of all members
LocalOutputSettings Struct Reference

#include <localoutputsettings.h>

Public Member Functions

 LocalOutputSettings ()
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 

Public Attributes

bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 24 of file localoutputsettings.h.

Constructor & Destructor Documentation

◆ LocalOutputSettings()

LocalOutputSettings::LocalOutputSettings ( )

Definition at line 21 of file localoutputsettings.cpp.

References resetToDefaults().

22 {
24 }
+ Here is the call graph for this function:

Member Function Documentation

◆ deserialize()

bool LocalOutputSettings::deserialize ( const QByteArray &  data)

Definition at line 45 of file localoutputsettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, SimpleDeserializer::readString(), SimpleDeserializer::readU32(), and resetToDefaults().

Referenced by LocalOutputGui::deserialize(), and LocalOutput::deserialize().

46 {
47  SimpleDeserializer d(data);
48 
49  if (!d.isValid())
50  {
52  return false;
53  }
54 
55  if (d.getVersion() == 1)
56  {
57  quint32 uintval;
58 
59  d.readString(4, &m_reverseAPIAddress, "127.0.0.1");
60  d.readU32(5, &uintval, 0);
61 
62  if ((uintval > 1023) && (uintval < 65535)) {
63  m_reverseAPIPort = uintval;
64  } else {
65  m_reverseAPIPort = 8888;
66  }
67 
68  d.readU32(6, &uintval, 0);
69  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
70  return true;
71  }
72  else
73  {
75  return false;
76  }
77 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LocalOutputSettings::resetToDefaults ( )

Definition at line 26 of file localoutputsettings.cpp.

References m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, and m_useReverseAPI.

Referenced by deserialize(), LocalOutput::deserialize(), LocalOutputSettings(), and LocalOutputGui::resetToDefaults().

27 {
28  m_useReverseAPI = false;
29  m_reverseAPIAddress = "127.0.0.1";
30  m_reverseAPIPort = 8888;
32 }
+ Here is the caller graph for this function:

◆ serialize()

QByteArray LocalOutputSettings::serialize ( ) const

Definition at line 34 of file localoutputsettings.cpp.

References SimpleSerializer::final(), m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by LocalOutputGui::serialize(), and LocalOutput::serialize().

35 {
36  SimpleSerializer s(1);
37 
38  s.writeString(4, m_reverseAPIAddress);
39  s.writeU32(5, m_reverseAPIPort);
40  s.writeU32(6, m_reverseAPIDeviceIndex);
41 
42  return s.final();
43 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_reverseAPIAddress

QString LocalOutputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t LocalOutputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t LocalOutputSettings::m_reverseAPIPort

◆ m_useReverseAPI

bool LocalOutputSettings::m_useReverseAPI

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