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.
devicesamplemimo.cpp
Go to the documentation of this file.
1 // Copyright (C) 2019 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #include <QDebug>
20 
21 #include "devicesamplemimo.h"
22 
24  m_guiMessageQueue(0)
25 {
26  connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
27 }
28 
30 {
31 }
32 
34 {
35  Message* message;
36 
37  while ((message = m_inputMessageQueue.pop()) != 0)
38  {
39  if (handleMessage(*message))
40  {
41  delete message;
42  }
43  }
44 }
45 
47 {
48  if (index >= m_sampleSourceFifos.size()) {
49  return nullptr;
50  } else {
51  return &m_sampleSourceFifos[index];
52  }
53 }
54 
56 {
57  if (index >= m_sampleSinkFifos.size()) {
58  return nullptr;
59  } else {
60  return &m_sampleSinkFifos[index];
61  }
62 }
Message * pop()
Pop message from queue.
std::vector< SampleSinkFifo > m_sampleSinkFifos
Rx FIFOs.
SampleSinkFifo * getSampleSinkFifo(unsigned int index)
Get Rx FIFO at index.
virtual bool handleMessage(const Message &message)=0
SampleSourceFifo * getSampleSourceFifo(unsigned int index)
Get Tx FIFO at index.
std::vector< SampleSourceFifo > m_sampleSourceFifos
Tx FIFOs.
MessageQueue m_inputMessageQueue
Input queue to the sink.
virtual ~DeviceSampleMIMO()