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 Types | Public Member Functions | Private Attributes | List of all members
ChannelAPI Class Referenceabstract

#include <channelapi.h>

+ Inheritance diagram for ChannelAPI:
+ Collaboration diagram for ChannelAPI:

Public Types

enum  StreamType { StreamSingleSink, StreamSingleSource, StreamMIMO }
 < This is the same enum as in PluginInterface More...
 

Public Member Functions

 ChannelAPI (const QString &name, StreamType streamType)
 
virtual ~ChannelAPI ()
 
virtual void destroy ()=0
 
virtual void getIdentifier (QString &id)=0
 
virtual void getTitle (QString &title)=0
 
virtual void setName (const QString &name)
 
virtual const QString & getName () const
 
virtual qint64 getCenterFrequency () const =0
 Applies to a default stream. More...
 
virtual QByteArray serialize () const =0
 
virtual bool deserialize (const QByteArray &data)=0
 
virtual int webapiSettingsGet (SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
 
virtual int webapiSettingsPutPatch (bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage)
 
virtual int webapiReportGet (SWGSDRangel::SWGChannelReport &response, QString &errorMessage)
 
int getIndexInDeviceSet () const
 
void setIndexInDeviceSet (int indexInDeviceSet)
 
int getDeviceSetIndex () const
 
void setDeviceSetIndex (int deviceSetIndex)
 
DeviceAPIgetDeviceAPI ()
 
void setDeviceAPI (DeviceAPI *deviceAPI)
 
uint64_t getUID () const
 
StreamType getStreamType () const
 
virtual int getNbSinkStreams () const =0
 
virtual int getNbSourceStreams () const =0
 
virtual qint64 getStreamCenterFrequency (int streamIndex, bool sinkElseSource) const =0
 

Private Attributes

StreamType m_streamType
 
QString m_name
 
int m_indexInDeviceSet
 
int m_deviceSetIndex
 
DeviceAPIm_deviceAPI
 
uint64_t m_uid
 

Detailed Description

Definition at line 37 of file channelapi.h.

Member Enumeration Documentation

◆ StreamType

< This is the same enum as in PluginInterface

Enumerator
StreamSingleSink 

Exposes a single sink stream (input, Rx)

StreamSingleSource 

Exposes a single source stream (output, Tx)

StreamMIMO 

May expose any number of sink and/or source streams.

Definition at line 39 of file channelapi.h.

40  {
43  StreamMIMO
44  };
Exposes a single source stream (output, Tx)
Definition: channelapi.h:42
Exposes a single sink stream (input, Rx)
Definition: channelapi.h:41
May expose any number of sink and/or source streams.
Definition: channelapi.h:43

Constructor & Destructor Documentation

◆ ChannelAPI()

ChannelAPI::ChannelAPI ( const QString &  name,
StreamType  streamType 
)

Definition at line 23 of file channelapi.cpp.

23  :
24  m_streamType(streamType),
25  m_name(name),
28  m_deviceAPI(0),
30 { }
StreamType m_streamType
Definition: channelapi.h:103
int m_deviceSetIndex
Definition: channelapi.h:110
DeviceAPI * m_deviceAPI
Definition: channelapi.h:111
int m_indexInDeviceSet
Definition: channelapi.h:109
static uint64_t getNewObjectId()
Definition: uid.cpp:35
uint64_t m_uid
Definition: channelapi.h:112
QString m_name
Definition: channelapi.h:107

◆ ~ChannelAPI()

virtual ChannelAPI::~ChannelAPI ( )
inlinevirtual

Definition at line 47 of file channelapi.h.

47 {}

Member Function Documentation

◆ deserialize()

virtual bool ChannelAPI::deserialize ( const QByteArray &  data)
pure virtual

◆ destroy()

virtual void ChannelAPI::destroy ( )
pure virtual

◆ getCenterFrequency()

virtual qint64 ChannelAPI::getCenterFrequency ( ) const
pure virtual

◆ getDeviceAPI()

DeviceAPI* ChannelAPI::getDeviceAPI ( )
inline

Definition at line 91 of file channelapi.h.

Referenced by LocalSink::getLocalDevice(), and LocalSource::getLocalDevice().

91 { return m_deviceAPI; }
DeviceAPI * m_deviceAPI
Definition: channelapi.h:111
+ Here is the caller graph for this function:

◆ getDeviceSetIndex()

int ChannelAPI::getDeviceSetIndex ( ) const
inline

◆ getIdentifier()

virtual void ChannelAPI::getIdentifier ( QString &  id)
pure virtual

◆ getIndexInDeviceSet()

int ChannelAPI::getIndexInDeviceSet ( ) const
inline

◆ getName()

virtual const QString& ChannelAPI::getName ( ) const
inlinevirtual

Definition at line 53 of file channelapi.h.

Referenced by DeviceSet::addRxChannel(), DeviceSet::addTxChannel(), and DeviceSet::ChannelInstanceRegistration::operator<().

53 { return m_name; }
QString m_name
Definition: channelapi.h:107
+ Here is the caller graph for this function:

◆ getNbSinkStreams()

virtual int ChannelAPI::getNbSinkStreams ( ) const
pure virtual

◆ getNbSourceStreams()

virtual int ChannelAPI::getNbSourceStreams ( ) const
pure virtual

◆ getStreamCenterFrequency()

virtual qint64 ChannelAPI::getStreamCenterFrequency ( int  streamIndex,
bool  sinkElseSource 
) const
pure virtual

◆ getStreamType()

StreamType ChannelAPI::getStreamType ( ) const
inline

Definition at line 96 of file channelapi.h.

Referenced by DeviceSet::ChannelInstanceRegistration::ChannelInstanceRegistration().

96 { return m_streamType; }
StreamType m_streamType
Definition: channelapi.h:103
+ Here is the caller graph for this function:

◆ getTitle()

virtual void ChannelAPI::getTitle ( QString &  title)
pure virtual

◆ getUID()

uint64_t ChannelAPI::getUID ( ) const
inline

Definition at line 93 of file channelapi.h.

Referenced by WebAPIAdapterGUI::getChannelsDetail(), WebAPIAdapterSrv::getChannelsDetail(), WebAPIAdapterGUI::getDeviceSet(), and WebAPIAdapterSrv::getDeviceSet().

93 { return m_uid; }
uint64_t m_uid
Definition: channelapi.h:112
+ Here is the caller graph for this function:

◆ serialize()

virtual QByteArray ChannelAPI::serialize ( ) const
pure virtual

◆ setDeviceAPI()

void ChannelAPI::setDeviceAPI ( DeviceAPI deviceAPI)
inline

Definition at line 92 of file channelapi.h.

92 { m_deviceAPI = deviceAPI; }
DeviceAPI * m_deviceAPI
Definition: channelapi.h:111

◆ setDeviceSetIndex()

void ChannelAPI::setDeviceSetIndex ( int  deviceSetIndex)
inline

Definition at line 90 of file channelapi.h.

90 { m_deviceSetIndex = deviceSetIndex; }
int m_deviceSetIndex
Definition: channelapi.h:110

◆ setIndexInDeviceSet()

void ChannelAPI::setIndexInDeviceSet ( int  indexInDeviceSet)
inline

Definition at line 88 of file channelapi.h.

Referenced by DeviceAPI::removeChannelSinkAPI(), and DeviceAPI::removeChannelSourceAPI().

88 { m_indexInDeviceSet = indexInDeviceSet; }
int m_indexInDeviceSet
Definition: channelapi.h:109
+ Here is the caller graph for this function:

◆ setName()

virtual void ChannelAPI::setName ( const QString &  name)
inlinevirtual

Definition at line 52 of file channelapi.h.

52 { m_name = name; }
QString m_name
Definition: channelapi.h:107

◆ webapiReportGet()

virtual int ChannelAPI::webapiReportGet ( SWGSDRangel::SWGChannelReport response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in ATVMod, FileSource, FreeDVMod, SSBMod, NFMMod, WFMMod, AMMod, RemoteSource, BFMDemod, FreeDVDemod, SSBDemod, DSDDemod, FreqTracker, NFMDemod, WFMDemod, UDPSink, AMDemod, and UDPSource.

Definition at line 79 of file channelapi.h.

Referenced by WebAPIAdapterGUI::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterGUI::getChannelsDetail(), and WebAPIAdapterSrv::getChannelsDetail().

82  {
83  (void) response;
84  errorMessage = "Not implemented"; return 501;
85  }
+ Here is the caller graph for this function:

◆ webapiSettingsGet()

virtual int ChannelAPI::webapiSettingsGet ( SWGSDRangel::SWGChannelSettings response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in ATVMod, FileSource, FreeDVMod, SSBMod, NFMMod, WFMMod, AMMod, RemoteSource, BFMDemod, FreeDVDemod, SSBDemod, DSDDemod, FreqTracker, NFMDemod, WFMDemod, RemoteSink, LocalSource, LocalSink, UDPSink, AMDemod, and UDPSource.

Definition at line 59 of file channelapi.h.

Referenced by WebAPIAdapterGUI::devicesetChannelSettingsGet(), and WebAPIAdapterSrv::devicesetChannelSettingsGet().

62  {
63  (void) response;
64  errorMessage = "Not implemented"; return 501;
65  }
+ Here is the caller graph for this function:

◆ webapiSettingsPutPatch()

virtual int ChannelAPI::webapiSettingsPutPatch ( bool  force,
const QStringList &  channelSettingsKeys,
SWGSDRangel::SWGChannelSettings response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in ATVMod, FileSource, FreeDVMod, SSBMod, NFMMod, WFMMod, AMMod, RemoteSource, BFMDemod, FreeDVDemod, SSBDemod, DSDDemod, FreqTracker, NFMDemod, WFMDemod, RemoteSink, LocalSource, LocalSink, UDPSink, AMDemod, and UDPSource.

Definition at line 67 of file channelapi.h.

Referenced by WebAPIAdapterGUI::devicesetChannelSettingsPutPatch(), and WebAPIAdapterSrv::devicesetChannelSettingsPutPatch().

72  {
73  (void) force;
74  (void) channelSettingsKeys;
75  (void) response;
76  errorMessage = "Not implemented"; return 501;
77  }
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_deviceAPI

DeviceAPI* ChannelAPI::m_deviceAPI
private

Definition at line 111 of file channelapi.h.

◆ m_deviceSetIndex

int ChannelAPI::m_deviceSetIndex
private

Definition at line 110 of file channelapi.h.

◆ m_indexInDeviceSet

int ChannelAPI::m_indexInDeviceSet
private

Definition at line 109 of file channelapi.h.

◆ m_name

QString ChannelAPI::m_name
private

Unique identifier in a device set used for sorting. Used when there is no GUI. In GUI version it is supported by GUI object name accessed through PluginInstanceGUI.

Definition at line 107 of file channelapi.h.

◆ m_streamType

StreamType ChannelAPI::m_streamType
private

Definition at line 103 of file channelapi.h.

◆ m_uid

uint64_t ChannelAPI::m_uid
private

Definition at line 112 of file channelapi.h.


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