MNE-CPP  beta 1.0
neuromag.h
1 //=============================================================================================================
36 #ifndef NEUROMAG_H
37 #define NEUROMAG_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "neuromag_global.h"
45 #include "../../mne_rt_server/IConnector.h"
46 
47 
48 //*************************************************************************************************************
49 //=============================================================================================================
50 // MNE INCLUDES
51 //=============================================================================================================
52 
53 #include <fiff/fiff_raw_data.h>
55 
56 #include <fiff/fiff_info.h>
57 
58 
59 //*************************************************************************************************************
60 //=============================================================================================================
61 // QT INCLUDES
62 //=============================================================================================================
63 
64 #include <QString>
65 #include <QMutex>
66 
67 
68 //*************************************************************************************************************
69 //=============================================================================================================
70 // DEFINE NAMESPACE NeuromagPlugin
71 //=============================================================================================================
72 
73 namespace NeuromagPlugin
74 {
75 
76 
77 //*************************************************************************************************************
78 //=============================================================================================================
79 // USED NAMESPACES
80 //=============================================================================================================
81 
82 using namespace RTSERVER;
83 using namespace IOBuffer;
84 
85 
86 //*************************************************************************************************************
87 //=============================================================================================================
88 // FORWARD DECLARATIONS
89 //=============================================================================================================
90 
91 class DacqServer;
92 
93 
94 //=============================================================================================================
100 class NEUROMAGSHARED_EXPORT Neuromag : public IConnector
101 {
102  Q_OBJECT
103  Q_PLUGIN_METADATA(IID "mne_rt_server/1.0" FILE "neuromag.json") //New Qt5 Plugin system replaces Q_EXPORT_PLUGIN2 macro
104  // Use the Q_INTERFACES() macro to tell Qt's meta-object system about the interfaces
105  Q_INTERFACES(RTSERVER::IConnector)
106 
107  friend class DacqServer;
108 
109 public:
110 
111  //=========================================================================================================
115  Neuromag();
116 
117 
118  //=========================================================================================================
123  virtual ~Neuromag();
124 
125  virtual void connectCommandManager();
126 
127  virtual ConnectorID getConnectorID() const;
128 
129  virtual const char* getName() const;
130 
131  virtual void info(qint32 ID);
132 
133  virtual bool start();
134 
135  virtual bool stop();
136 
137 
138  void releaseMeasInfo();
139 
140 //public slots: --> in Qt 5 not anymore declared as slot
141 
142 protected:
143  virtual void run();
144 
145 private:
146 
147  //Slots
148  //=========================================================================================================
154  void comBufsize(Command p_command);
155 
156  //=========================================================================================================
162  void comGetBufsize(Command p_command);
163 
164  //=========================================================================================================
168  void init();
169 
170 
171  QMutex mutex;
172 
173  DacqServer* m_pDacqServer;
174 
175  FiffInfo m_info;
176 
177  int m_iID;
178 
179  quint32 m_uiBufferSampleSize;
181  RawMatrixBuffer* m_pRawMatrixBuffer;
183  bool m_bIsRunning;
184 
185 };
186 
187 } // NAMESPACE
188 
189 #endif // NEUROMAG_H
FIFF measurement file information.
Definition: fiff_info.h:96
The Neuromag class provides an Elekta Neuromag connector.
Definition: neuromag.h:100
CircularMatrixBuffer class declaration.
The IConnector class is the interface class of all plugins.
Definition: IConnector.h:119
FiffInfo class declaration.
FiffRawData class declaration.
The DacqServer class provides a Neuromag MEG connector.
Definition: dacqserver.h:96