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
DeviceSet::ChannelInstanceRegistration Struct Reference
+ Collaboration diagram for DeviceSet::ChannelInstanceRegistration:

Public Member Functions

 ChannelInstanceRegistration ()
 
 ChannelInstanceRegistration (const QString &channelName, ChannelAPI *channelAPI)
 
bool operator< (const ChannelInstanceRegistration &other) const
 

Public Attributes

QString m_channelName
 
ChannelAPIm_channelSinkAPI
 
ChannelAPIm_channelSourceAPI
 

Detailed Description

Definition at line 60 of file deviceset.h.

Constructor & Destructor Documentation

◆ ChannelInstanceRegistration() [1/2]

DeviceSet::ChannelInstanceRegistration::ChannelInstanceRegistration ( )
inline

Definition at line 66 of file deviceset.h.

References operator<().

Referenced by DeviceSet::addRxChannel(), DeviceSet::addTxChannel(), DeviceSet::loadRxChannelSettings(), DeviceSet::loadTxChannelSettings(), DeviceSet::registerRxChannelInstance(), and DeviceSet::registerTxChannelInstance().

66  :
67  m_channelName(),
68  m_channelSinkAPI(nullptr),
69  m_channelSourceAPI(nullptr)
70  { }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ChannelInstanceRegistration() [2/2]

DeviceSet::ChannelInstanceRegistration::ChannelInstanceRegistration ( const QString &  channelName,
ChannelAPI channelAPI 
)

Definition at line 29 of file deviceset.cpp.

References ChannelAPI::getStreamType(), m_channelSinkAPI, m_channelSourceAPI, ChannelAPI::StreamSingleSink, and ChannelAPI::StreamSingleSource.

29  :
30  m_channelName(channelName),
31  m_channelSinkAPI(channelAPI),
33 {
34  if (channelAPI->getStreamType() == ChannelAPI::StreamSingleSink)
35  {
36  m_channelSinkAPI = channelAPI;
37  m_channelSourceAPI = nullptr;
38  }
39  else if (channelAPI->getStreamType() == ChannelAPI::StreamSingleSource)
40  {
41  m_channelSinkAPI = nullptr;
42  m_channelSourceAPI = channelAPI;
43  }
44  else
45  {
46  m_channelSinkAPI = nullptr;
47  m_channelSourceAPI = nullptr;
48  }
49 }
Exposes a single source stream (output, Tx)
Definition: channelapi.h:42
StreamType getStreamType() const
Definition: channelapi.h:96
Exposes a single sink stream (input, Rx)
Definition: channelapi.h:41
+ Here is the call graph for this function:

Member Function Documentation

◆ operator<()

bool DeviceSet::ChannelInstanceRegistration::operator< ( const ChannelInstanceRegistration other) const

Definition at line 365 of file deviceset.cpp.

References ChannelAPI::getCenterFrequency(), ChannelAPI::getName(), m_channelSinkAPI, and m_channelSourceAPI.

Referenced by ChannelInstanceRegistration().

366 {
367  if (m_channelSinkAPI && other.m_channelSinkAPI)
368  {
369  if (m_channelSinkAPI->getCenterFrequency() == other.m_channelSinkAPI->getCenterFrequency())
370  {
371  return m_channelSinkAPI->getName() < other.m_channelSinkAPI->getName();
372  }
373  else
374  {
375  return m_channelSinkAPI->getCenterFrequency() < other.m_channelSinkAPI->getCenterFrequency();
376  }
377  }
378  else if (m_channelSourceAPI && other.m_channelSourceAPI)
379  {
380  if (m_channelSourceAPI->getCenterFrequency() == other.m_channelSourceAPI->getCenterFrequency())
381  {
382  return m_channelSourceAPI->getName() < other.m_channelSourceAPI->getName();
383  }
384  else
385  {
386  return m_channelSourceAPI->getCenterFrequency() < other.m_channelSourceAPI->getCenterFrequency();
387  }
388  }
389  else
390  {
391  return false;
392  }
393 }
virtual const QString & getName() const
Definition: channelapi.h:53
virtual qint64 getCenterFrequency() const =0
Applies to a default stream.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelName

QString DeviceSet::ChannelInstanceRegistration::m_channelName

◆ m_channelSinkAPI

ChannelAPI* DeviceSet::ChannelInstanceRegistration::m_channelSinkAPI

◆ m_channelSourceAPI

ChannelAPI* DeviceSet::ChannelInstanceRegistration::m_channelSourceAPI

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