MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mnertclientproducer.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef MNERTCLIENTPRODUCER_H
37 #define MNERTCLIENTPRODUCER_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 MneRtClient;
89 
90 
91 //=============================================================================================================
97 class MneRtClientProducer : public QThread
98 {
99  Q_OBJECT
100 
101  friend class MneRtClient;
102 
103 public:
104  //=========================================================================================================
110  MneRtClientProducer(MneRtClient* p_pMneRtClient);
111 
112  //=========================================================================================================
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  MneRtClient* m_pMneRtClient;
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 // MNERTCLIENTPRODUCER_H
The MneRtClientProducer class provides a Rt Client data producer for a given sampling rate...
The MneRtClient class provides a RT server connection.
Definition: mnertclient.h:115
Contains the declaration of the CircularBuffer_old class.
declaration of the RtDataClient Class.