MNE-CPP  beta 1.0
fiffsimulatorproducer.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef FIFFSIMULATORPRODUCER_H
37 #define FIFFSIMULATORPRODUCER_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 FiffSimulatorPlugin
68 //=============================================================================================================
69 
70 namespace FiffSimulatorPlugin
71 {
72 
73 
74 //*************************************************************************************************************
75 //=============================================================================================================
76 // USED NAMESPACES
77 //=============================================================================================================
78 
79 using namespace RTCLIENTLIB;
80 
81 
82 //*************************************************************************************************************
83 //=============================================================================================================
84 // FORWARD DECLARATIONS
85 //=============================================================================================================
86 
87 class FiffSimulator;
88 
89 
90 //=============================================================================================================
96 class FiffSimulatorProducer : public QThread
97 {
98  Q_OBJECT
99 
100  friend class FiffSimulator;
101 
102 public:
103  //=========================================================================================================
109  FiffSimulatorProducer(FiffSimulator* p_pFiffSimulator);
110 
111  //=========================================================================================================
116 
117  //=========================================================================================================
123  void connectDataClient(QString p_sRtSeverIP);
124 
125  //=========================================================================================================
129  void disconnectDataClient();
130 
131  //=========================================================================================================
135  void stop();
136 
137 signals:
138  //=========================================================================================================
144  void dataConnectionChanged(bool p_bStatus);
145 
146 protected:
147  //=========================================================================================================
153  virtual void run();
154 
155 private:
156 
157  QMutex producerMutex;
158 
159  FiffSimulator* m_pFiffSimulator;
160  bool m_bIsRunning;
162  QSharedPointer<RtDataClient> m_pRtDataClient;
163  bool m_bDataClientIsConnected;
165  qint32 m_iDataClientId;
166 
167  //Acquisition flags
168  bool m_bFlagInfoRequest;
169  bool m_bFlagMeasuring;
170 };
171 
172 } // NAMESPACE
173 
174 #endif // FIFFSIMULATORPRODUCER_H
Contains the declaration of the CircularBuffer_old class.
The FiffSimulator class provides a Fiff data simulator.
Definition: fiffsimulator.h:97
The FiffSimulatorProducer class provides a Fiff data producer for a given sampling rate...
declaration of the RtDataClient Class.