MNE-CPP  beta 1.0
dacqserver.h
Go to the documentation of this file.
1 //=============================================================================================================
37 #ifndef DACQSERVER_H
38 #define DACQSERVER_H
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "types_definitions.h"
46 #include <fiff/fiff_info.h>
47 #include <fiff/fiff_tag.h>
48 
49 
50 //*************************************************************************************************************
51 //=============================================================================================================
52 // QT INCLUDES
53 //=============================================================================================================
54 
55 #include <QThread>
56 
57 #include <QTcpSocket>
58 
59 #include <QByteArray>
60 
61 
62 //*************************************************************************************************************
63 //=============================================================================================================
64 // DEFINE NAMESPACE NeuromagPlugin
65 //=============================================================================================================
66 
67 namespace NeuromagPlugin
68 {
69 
70 
71 //*************************************************************************************************************
72 //=============================================================================================================
73 // USED NAMESPACES
74 //=============================================================================================================
75 
76 using namespace FIFFLIB;
77 
78 
79 //*************************************************************************************************************
80 //=============================================================================================================
81 // FORWARD DECLARATIONS
82 //=============================================================================================================
83 
84 class Neuromag;
85 class CollectorSocket;
86 class ShmemSocket;
87 //class FiffInfo;
88 
89 
90 //=============================================================================================================
96 class DacqServer : public QThread
97 {
98  Q_OBJECT
99 
100  friend class Neuromag;
101 
102 public:
103 
104  //=========================================================================================================
108  explicit DacqServer(Neuromag* p_pNeuromag, QObject * parent = 0);
109 
110 
111  //=========================================================================================================
115  ~DacqServer();
116 
117 
118 public slots: //--> in Qt 5 not anymore declared as slot
119 
120  void readCollectorMsg();
121 
122 
123 signals:
124 
125  void measInfoAvailable();
126 
127 
128 protected:
129  //=========================================================================================================
135  virtual void run();
136 
137 private:
138 
139  //=========================================================================================================
145 // void clean_up();
146 
147 
148 
149  //newly written stuff ported to qt
150 // QString m_sCollectorHost;
151  CollectorSocket* m_pCollectorSock;
152 
153  ShmemSocket* m_pShmemSock;
154 
155 //dacqserver
156 
157  bool m_bIsRunning;
158 
159  bool m_bMeasInfoRequest;
160  bool m_bMeasRequest;
161  bool m_bMeasStopRequest;
162  bool m_bSetBuffersizeRequest;
163 
164  bool getMeasInfo(FiffInfo &p_FiffInfo);
165 
166  Neuromag* m_pNeuromag;
167 
168 };
169 
170 } // NAMESPACE
171 
172 
173 #endif // DACQSERVER_H
FIFF measurement file information.
Definition: fiff_info.h:96
The Neuromag class provides an Elekta Neuromag connector.
Definition: neuromag.h:100
The CollectorSocket class provides ....
Neuromag Types and Defines.
FiffInfo class declaration.
Definition: fiff.h:98
The ShmemSocket class provides...
Definition: shmemsocket.h:88
The DacqServer class provides a Neuromag MEG connector.
Definition: dacqserver.h:96
FiffTag class declaration, which provides fiff tag I/O and processing methods.