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 | Protected Slots | Protected Attributes | List of all members
DeviceSampleMIMO Class Referenceabstract

#include <devicesamplemimo.h>

+ Inheritance diagram for DeviceSampleMIMO:
+ Collaboration diagram for DeviceSampleMIMO:

Public Types

enum  fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER }
 

Public Member Functions

 DeviceSampleMIMO ()
 
virtual ~DeviceSampleMIMO ()
 
virtual void destroy ()=0
 
virtual void init ()=0
 initializations to be done when all collaborating objects are created and possibly connected More...
 
virtual bool start ()=0
 
virtual void stop ()=0
 
virtual QByteArray serialize () const =0
 
virtual bool deserialize (const QByteArray &data)=0
 
virtual const QString & getDeviceDescription () const =0
 
virtual int getSinkSampleRate (int index) const =0
 Sample rate exposed by the sink at index. More...
 
virtual void setSinkSampleRate (int sampleRate, int index)=0
 For when the sink sample rate is set externally. More...
 
virtual quint64 getSinkCenterFrequency (int index) const =0
 Center frequency exposed by the sink at index. More...
 
virtual void setSinkCenterFrequency (qint64 centerFrequency, int index)=0
 
virtual int getSourceSampleRate (int index) const =0
 Sample rate exposed by the source at index. More...
 
virtual void setSourceSampleRate (int sampleRate, int index)=0
 For when the source sample rate is set externally. More...
 
virtual quint64 getSourceCenterFrequency (int index) const =0
 Center frequency exposed by the source at index. More...
 
virtual void setSourceCenterFrequency (qint64 centerFrequency, int index)=0
 
virtual bool handleMessage (const Message &message)=0
 
virtual int webapiSettingsGet (SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
 
virtual int webapiSettingsPutPatch (bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage)
 
virtual int webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
 
virtual int webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage)
 
virtual int webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage)
 
MessageQueuegetInputMessageQueue ()
 
virtual void setMessageQueueToGUI (MessageQueue *queue)=0
 
MessageQueuegetMessageQueueToGUI ()
 
unsigned int getNbSourceFifos () const
 Get the number of Tx FIFOs. More...
 
unsigned int getNbSinkFifos () const
 Get the number of Rx FIFOs. More...
 
SampleSourceFifogetSampleSourceFifo (unsigned int index)
 Get Tx FIFO at index. More...
 
SampleSinkFifogetSampleSinkFifo (unsigned int index)
 Get Rx FIFO at index. More...
 
unsigned int getNbSourceStreams () const
 Commodity function same as getNbSinkFifos (Rx or source streams) More...
 
unsigned int getNbSinkStreams () const
 Commodity function same as getNbSourceFifos (Tx or sink streams) More...
 

Protected Slots

void handleInputMessages ()
 

Protected Attributes

std::vector< SampleSourceFifom_sampleSourceFifos
 Tx FIFOs. More...
 
std::vector< SampleSinkFifom_sampleSinkFifos
 Rx FIFOs. More...
 
MessageQueue m_inputMessageQueue
 Input queue to the sink. More...
 
MessageQueuem_guiMessageQueue
 Input message queue to the GUI. More...
 

Detailed Description

Definition at line 37 of file devicesamplemimo.h.

Member Enumeration Documentation

◆ fcPos_t

Enumerator
FC_POS_INFRA 
FC_POS_SUPRA 
FC_POS_CENTER 

Definition at line 40 of file devicesamplemimo.h.

Constructor & Destructor Documentation

◆ DeviceSampleMIMO()

DeviceSampleMIMO::DeviceSampleMIMO ( )

Definition at line 23 of file devicesamplemimo.cpp.

References handleInputMessages(), and m_inputMessageQueue.

23  :
25 {
26  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
27 }
MessageQueue * m_guiMessageQueue
Input message queue to the GUI.
MessageQueue m_inputMessageQueue
Input queue to the sink.
+ Here is the call graph for this function:

◆ ~DeviceSampleMIMO()

DeviceSampleMIMO::~DeviceSampleMIMO ( )
virtual

Definition at line 29 of file devicesamplemimo.cpp.

30 {
31 }

Member Function Documentation

◆ deserialize()

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

Implemented in TestMI.

◆ destroy()

virtual void DeviceSampleMIMO::destroy ( )
pure virtual

Implemented in TestMI.

Referenced by PluginInterface::deleteSampleMIMOPluginInstanceMIMO().

+ Here is the caller graph for this function:

◆ getDeviceDescription()

virtual const QString& DeviceSampleMIMO::getDeviceDescription ( ) const
pure virtual

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::gotoInit(), and DSPDeviceMIMOEngine::handleSetMIMO().

+ Here is the caller graph for this function:

◆ getInputMessageQueue()

MessageQueue* DeviceSampleMIMO::getInputMessageQueue ( )
inline

Definition at line 121 of file devicesamplemimo.h.

Referenced by DeviceAPI::getSamplingDeviceInputMessageQueue(), TestMIGui::on_record_toggled(), TestMIGui::on_startStop_toggled(), and TestMIGui::updateHardware().

121 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
Input queue to the sink.
+ Here is the caller graph for this function:

◆ getMessageQueueToGUI()

MessageQueue* DeviceSampleMIMO::getMessageQueueToGUI ( )
inline

Definition at line 123 of file devicesamplemimo.h.

Referenced by DeviceAPI::getSamplingDeviceGUIMessageQueue(), and DSPDeviceMIMOEngine::handleInputMessages().

123 { return m_guiMessageQueue; }
MessageQueue * m_guiMessageQueue
Input message queue to the GUI.
+ Here is the caller graph for this function:

◆ getNbSinkFifos()

unsigned int DeviceSampleMIMO::getNbSinkFifos ( ) const
inline

Get the number of Rx FIFOs.

Definition at line 126 of file devicesamplemimo.h.

Referenced by DSPDeviceMIMOEngine::gotoInit().

+ Here is the caller graph for this function:

◆ getNbSinkStreams()

unsigned int DeviceSampleMIMO::getNbSinkStreams ( ) const
inline

Commodity function same as getNbSourceFifos (Tx or sink streams)

Definition at line 133 of file devicesamplemimo.h.

◆ getNbSourceFifos()

unsigned int DeviceSampleMIMO::getNbSourceFifos ( ) const
inline

Get the number of Tx FIFOs.

Definition at line 125 of file devicesamplemimo.h.

◆ getNbSourceStreams()

unsigned int DeviceSampleMIMO::getNbSourceStreams ( ) const
inline

Commodity function same as getNbSinkFifos (Rx or source streams)

Definition at line 132 of file devicesamplemimo.h.

Referenced by DSPDeviceMIMOEngine::work().

+ Here is the caller graph for this function:

◆ getSampleSinkFifo()

SampleSinkFifo * DeviceSampleMIMO::getSampleSinkFifo ( unsigned int  index)

Get Rx FIFO at index.

Definition at line 55 of file devicesamplemimo.cpp.

References m_sampleSinkFifos.

Referenced by DSPDeviceMIMOEngine::handleSetMIMO(), DSPDeviceMIMOEngine::work(), and DSPDeviceMIMOEngine::workSampleSink().

56 {
57  if (index >= m_sampleSinkFifos.size()) {
58  return nullptr;
59  } else {
60  return &m_sampleSinkFifos[index];
61  }
62 }
std::vector< SampleSinkFifo > m_sampleSinkFifos
Rx FIFOs.
+ Here is the caller graph for this function:

◆ getSampleSourceFifo()

SampleSourceFifo * DeviceSampleMIMO::getSampleSourceFifo ( unsigned int  index)

Get Tx FIFO at index.

Definition at line 46 of file devicesamplemimo.cpp.

References m_sampleSourceFifos.

Referenced by DSPDeviceMIMOEngine::handleForwardToSpectrumSink(), and DSPDeviceMIMOEngine::handleSynchronousMessages().

47 {
48  if (index >= m_sampleSourceFifos.size()) {
49  return nullptr;
50  } else {
51  return &m_sampleSourceFifos[index];
52  }
53 }
std::vector< SampleSourceFifo > m_sampleSourceFifos
Tx FIFOs.
+ Here is the caller graph for this function:

◆ getSinkCenterFrequency()

virtual quint64 DeviceSampleMIMO::getSinkCenterFrequency ( int  index) const
pure virtual

Center frequency exposed by the sink at index.

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::handleSynchronousMessages().

+ Here is the caller graph for this function:

◆ getSinkSampleRate()

virtual int DeviceSampleMIMO::getSinkSampleRate ( int  index) const
pure virtual

Sample rate exposed by the sink at index.

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::handleSynchronousMessages().

+ Here is the caller graph for this function:

◆ getSourceCenterFrequency()

virtual quint64 DeviceSampleMIMO::getSourceCenterFrequency ( int  index) const
pure virtual

Center frequency exposed by the source at index.

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::gotoInit(), and DSPDeviceMIMOEngine::handleSynchronousMessages().

+ Here is the caller graph for this function:

◆ getSourceSampleRate()

virtual int DeviceSampleMIMO::getSourceSampleRate ( int  index) const
pure virtual

Sample rate exposed by the source at index.

Implemented in TestMI.

Referenced by AMDemod::applySettings(), DSPDeviceMIMOEngine::gotoInit(), and DSPDeviceMIMOEngine::handleSynchronousMessages().

+ Here is the caller graph for this function:

◆ handleInputMessages

void DeviceSampleMIMO::handleInputMessages ( )
protectedslot

Definition at line 33 of file devicesamplemimo.cpp.

References handleMessage(), m_inputMessageQueue, and MessageQueue::pop().

Referenced by DeviceSampleMIMO().

34 {
35  Message* message;
36 
37  while ((message = m_inputMessageQueue.pop()) != 0)
38  {
39  if (handleMessage(*message))
40  {
41  delete message;
42  }
43  }
44 }
Message * pop()
Pop message from queue.
virtual bool handleMessage(const Message &message)=0
MessageQueue m_inputMessageQueue
Input queue to the sink.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleMessage()

virtual bool DeviceSampleMIMO::handleMessage ( const Message message)
pure virtual

Implemented in TestMI.

Referenced by handleInputMessages().

+ Here is the caller graph for this function:

◆ init()

virtual void DeviceSampleMIMO::init ( )
pure virtual

initializations to be done when all collaborating objects are created and possibly connected

Implemented in TestMI.

◆ serialize()

virtual QByteArray DeviceSampleMIMO::serialize ( ) const
pure virtual

Implemented in TestMI.

◆ setMessageQueueToGUI()

virtual void DeviceSampleMIMO::setMessageQueueToGUI ( MessageQueue queue)
pure virtual

Implemented in TestMI.

Referenced by MainWindow::sampleMIMOChanged(), and TestMIGui::TestMIGui().

+ Here is the caller graph for this function:

◆ setSinkCenterFrequency()

virtual void DeviceSampleMIMO::setSinkCenterFrequency ( qint64  centerFrequency,
int  index 
)
pure virtual

Implemented in TestMI.

◆ setSinkSampleRate()

virtual void DeviceSampleMIMO::setSinkSampleRate ( int  sampleRate,
int  index 
)
pure virtual

For when the sink sample rate is set externally.

Implemented in TestMI.

◆ setSourceCenterFrequency()

virtual void DeviceSampleMIMO::setSourceCenterFrequency ( qint64  centerFrequency,
int  index 
)
pure virtual

Implemented in TestMI.

◆ setSourceSampleRate()

virtual void DeviceSampleMIMO::setSourceSampleRate ( int  sampleRate,
int  index 
)
pure virtual

For when the source sample rate is set externally.

Implemented in TestMI.

◆ start()

virtual bool DeviceSampleMIMO::start ( )
pure virtual

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::gotoRunning().

+ Here is the caller graph for this function:

◆ stop()

virtual void DeviceSampleMIMO::stop ( )
pure virtual

Implemented in TestMI.

Referenced by DSPDeviceMIMOEngine::gotoIdle().

+ Here is the caller graph for this function:

◆ webapiReportGet()

virtual int DeviceSampleMIMO::webapiReportGet ( SWGSDRangel::SWGDeviceReport response,
QString &  errorMessage 
)
inlinevirtual

Definition at line 112 of file devicesamplemimo.h.

115  {
116  (void) response;
117  errorMessage = "Not implemented";
118  return 501;
119  }

◆ webapiRun()

virtual int DeviceSampleMIMO::webapiRun ( bool  run,
SWGSDRangel::SWGDeviceState response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in TestMI.

Definition at line 102 of file devicesamplemimo.h.

105  {
106  (void) run;
107  (void) response;
108  errorMessage = "Not implemented";
109  return 501;
110  }

◆ webapiRunGet()

virtual int DeviceSampleMIMO::webapiRunGet ( SWGSDRangel::SWGDeviceState response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in TestMI.

Definition at line 93 of file devicesamplemimo.h.

96  {
97  (void) response;
98  errorMessage = "Not implemented";
99  return 501;
100  }

◆ webapiSettingsGet()

virtual int DeviceSampleMIMO::webapiSettingsGet ( SWGSDRangel::SWGDeviceSettings response,
QString &  errorMessage 
)
inlinevirtual

Reimplemented in TestMI.

Definition at line 71 of file devicesamplemimo.h.

74  {
75  (void) response;
76  errorMessage = "Not implemented";
77  return 501;
78  }

◆ webapiSettingsPutPatch()

virtual int DeviceSampleMIMO::webapiSettingsPutPatch ( bool  force,
const QStringList &  deviceSettingsKeys,
SWGSDRangel::SWGDeviceSettings response,
QString &  errorMessage 
)
inlinevirtual
Parameters
forcetrue to force settings = put

Reimplemented in TestMI.

Definition at line 80 of file devicesamplemimo.h.

85  {
86  (void) force;
87  (void) deviceSettingsKeys;
88  (void) response;
89  errorMessage = "Not implemented";
90  return 501;
91  }

Member Data Documentation

◆ m_guiMessageQueue

MessageQueue* DeviceSampleMIMO::m_guiMessageQueue
protected

◆ m_inputMessageQueue

MessageQueue DeviceSampleMIMO::m_inputMessageQueue
protected

◆ m_sampleSinkFifos

std::vector<SampleSinkFifo> DeviceSampleMIMO::m_sampleSinkFifos
protected

Rx FIFOs.

Definition at line 140 of file devicesamplemimo.h.

Referenced by getSampleSinkFifo(), and TestMI::start().

◆ m_sampleSourceFifos

std::vector<SampleSourceFifo> DeviceSampleMIMO::m_sampleSourceFifos
protected

Tx FIFOs.

Definition at line 139 of file devicesamplemimo.h.

Referenced by getSampleSourceFifo().


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