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

#include <filesinksettings.h>

Public Member Functions

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

Public Attributes

quint64 m_centerFrequency
 
quint64 m_sampleRate
 
quint32 m_log2Interp
 

Detailed Description

Definition at line 23 of file filesinksettings.h.

Constructor & Destructor Documentation

◆ FileSinkSettings()

FileSinkSettings::FileSinkSettings ( )

Definition at line 21 of file filesinksettings.cpp.

References resetToDefaults().

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

Member Function Documentation

◆ deserialize()

bool FileSinkSettings::deserialize ( const QByteArray &  data)

Definition at line 43 of file filesinksettings.cpp.

References SimpleDeserializer::getVersion(), SimpleDeserializer::isValid(), m_log2Interp, m_sampleRate, SimpleDeserializer::readU32(), SimpleDeserializer::readU64(), and resetToDefaults().

Referenced by FileSinkGui::deserialize(), and FileSinkOutput::deserialize().

44 {
45  SimpleDeserializer d(data);
46 
47  if (!d.isValid())
48  {
50  return false;
51  }
52 
53  if (d.getVersion() == 1)
54  {
55  d.readU64(1, &m_sampleRate, 48000);
56  d.readU32(2, &m_log2Interp, 0);
57  return true;
58  }
59  else
60  {
62  return false;
63  }
64 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resetToDefaults()

void FileSinkSettings::resetToDefaults ( )

Definition at line 26 of file filesinksettings.cpp.

References m_centerFrequency, m_log2Interp, and m_sampleRate.

Referenced by deserialize(), FileSinkOutput::deserialize(), FileSinkSettings(), and FileSinkGui::resetToDefaults().

27 {
28  m_centerFrequency = 435000*1000;
29  m_sampleRate = 48000;
30  m_log2Interp = 0;
31 }
+ Here is the caller graph for this function:

◆ serialize()

QByteArray FileSinkSettings::serialize ( ) const

Definition at line 33 of file filesinksettings.cpp.

References SimpleSerializer::final(), m_log2Interp, m_sampleRate, SimpleSerializer::writeU32(), and SimpleSerializer::writeU64().

Referenced by FileSinkGui::serialize(), and FileSinkOutput::serialize().

34 {
35  SimpleSerializer s(1);
36 
37  s.writeU64(1, m_sampleRate);
38  s.writeU32(2, m_log2Interp);
39 
40  return s.final();
41 }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_centerFrequency

quint64 FileSinkSettings::m_centerFrequency

◆ m_log2Interp

quint32 FileSinkSettings::m_log2Interp

◆ m_sampleRate

quint64 FileSinkSettings::m_sampleRate

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