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
LocalInputSettings Struct Reference

#include <localinputsettings.h>

Public Member Functions

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

Public Attributes

bool m_dcBlock
 
bool m_iqCorrection
 
QString m_fileRecordName
 
bool m_useReverseAPI
 
QString m_reverseAPIAddress
 
uint16_t m_reverseAPIPort
 
uint16_t m_reverseAPIDeviceIndex
 

Detailed Description

Definition at line 24 of file localinputsettings.h.

Constructor & Destructor Documentation

◆ LocalInputSettings()

LocalInputSettings::LocalInputSettings ( )

Definition at line 21 of file localinputsettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool LocalInputSettings::deserialize ( const QByteArray &  data)

Definition at line 51 of file localinputsettings.cpp.

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

Referenced by LocalInputGui::deserialize(), and LocalInput::deserialize().

52 {
53  SimpleDeserializer d(data);
54 
55  if (!d.isValid())
56  {
58  return false;
59  }
60 
61  if (d.getVersion() == 1)
62  {
63  quint32 uintval;
64 
65  d.readBool(1, &m_dcBlock, false);
66  d.readBool(2, &m_iqCorrection, false);
67  d.readBool(3, &m_useReverseAPI, false);
68  d.readString(4, &m_reverseAPIAddress, "127.0.0.1");
69  d.readU32(5, &uintval, 0);
70 
71  if ((uintval > 1023) && (uintval < 65535)) {
72  m_reverseAPIPort = uintval;
73  } else {
74  m_reverseAPIPort = 8888;
75  }
76 
77  d.readU32(6, &uintval, 0);
78  m_reverseAPIDeviceIndex = uintval > 99 ? 99 : uintval;
79  return true;
80  }
81  else
82  {
84  return false;
85  }
86 }
uint16_t m_reverseAPIDeviceIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LocalInputSettings::resetToDefaults ( )

◆ serialize()

QByteArray LocalInputSettings::serialize ( ) const

Definition at line 37 of file localinputsettings.cpp.

References SimpleSerializer::final(), m_dcBlock, m_iqCorrection, m_reverseAPIAddress, m_reverseAPIDeviceIndex, m_reverseAPIPort, m_useReverseAPI, SimpleSerializer::writeBool(), SimpleSerializer::writeString(), and SimpleSerializer::writeU32().

Referenced by LocalInputGui::serialize(), and LocalInput::serialize().

38 {
39  SimpleSerializer s(1);
40 
41  s.writeBool(1, m_dcBlock);
42  s.writeBool(2, m_iqCorrection);
43  s.writeBool(3, m_useReverseAPI);
44  s.writeString(4, m_reverseAPIAddress);
45  s.writeU32(5, m_reverseAPIPort);
46  s.writeU32(6, m_reverseAPIDeviceIndex);
47 
48  return s.final();
49 }
uint16_t m_reverseAPIDeviceIndex
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_dcBlock

bool LocalInputSettings::m_dcBlock

◆ m_fileRecordName

QString LocalInputSettings::m_fileRecordName

◆ m_iqCorrection

bool LocalInputSettings::m_iqCorrection

◆ m_reverseAPIAddress

QString LocalInputSettings::m_reverseAPIAddress

◆ m_reverseAPIDeviceIndex

uint16_t LocalInputSettings::m_reverseAPIDeviceIndex

◆ m_reverseAPIPort

uint16_t LocalInputSettings::m_reverseAPIPort

◆ m_useReverseAPI

bool LocalInputSettings::m_useReverseAPI

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