MNE-CPP  beta 1.0
neuromagproducer.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef NEUROMAGPRODUCER_H
37 #define NEUROMAGPRODUCER_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // MNE INCLUDES
51 //=============================================================================================================
52 
53 #include <rtClient/rtdataclient.h>
54 
55 
56 //*************************************************************************************************************
57 //=============================================================================================================
58 // QT INCLUDES
59 //=============================================================================================================
60 
61 #include <QThread>
62 #include <QMutex>
63 
64 
65 //*************************************************************************************************************
66 //=============================================================================================================
67 // DEFINE NAMESPACE MneRtClientPlugin
68 //=============================================================================================================
69 
70 namespace MneRtClientPlugin
71 {
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // USED NAMESPACES
77 //=============================================================================================================
78 
79 //using namespace IOBuffer;
80 using namespace RTCLIENTLIB;
81 
82 
83 //*************************************************************************************************************
84 //=============================================================================================================
85 // FORWARD DECLARATIONS
86 //=============================================================================================================
87 
88 class Neuromag;
89 
90 
91 //=============================================================================================================
97 class NeuromagProducer : public QThread
98 {
99  Q_OBJECT
100 
101  friend class Neuromag;
102 
103 public:
104  //=========================================================================================================
110  NeuromagProducer(Neuromag* p_pNeuromag);
111 
112  //=========================================================================================================
116  ~NeuromagProducer();
117 
118  //=========================================================================================================
124  void connectDataClient(QString p_sRtSeverIP);
125 
126  //=========================================================================================================
130  void disconnectDataClient();
131 
132  //=========================================================================================================
136  void stop();
137 
138 signals:
139  //=========================================================================================================
145  void dataConnectionChanged(bool p_bStatus);
146 
147 protected:
148  //=========================================================================================================
154  virtual void run();
155 
156 private:
157 
158  QMutex producerMutex;
159 
160  Neuromag* m_pNeuromag;
161  bool m_bIsRunning;
163  QSharedPointer<RtDataClient> m_pRtDataClient;
164  bool m_bDataClientIsConnected;
166  qint32 m_iDataClientId;
167 
168  //Acquisition flags
169  bool m_bFlagInfoRequest;
170  bool m_bFlagMeasuring;
171 };
172 
173 } // NAMESPACE
174 
175 #endif // NEUROMAGPRODUCER_H
Contains the declaration of the CircularBuffer_old class.
The Neuromag class provides a RT server connection.
Definition: neuromag.h:115
The NeuromagProducer class provides a Rt Client data producer for a given sampling rate...
declaration of the RtDataClient Class.