MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mnertclient.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef MNERTCLIENT_H
37 #define MNERTCLIENT_H
38 
39 
40 //*************************************************************************************************************
41 //=============================================================================================================
42 // INCLUDES
43 //=============================================================================================================
44 
45 #include "mnertclient_global.h"
46 
51 
52 
53 //*************************************************************************************************************
54 //=============================================================================================================
55 // FIFF INCLUDES
56 //=============================================================================================================
57 
58 #include <fiff/fiff_info.h>
59 
60 
61 //*************************************************************************************************************
62 //=============================================================================================================
63 // MNE INCLUDES
64 //=============================================================================================================
65 
66 #include <rtClient/rtcmdclient.h>
67 
68 
69 //*************************************************************************************************************
70 //=============================================================================================================
71 // QT INCLUDES
72 //=============================================================================================================
73 
74 #include <QtWidgets>
75 #include <QVector>
76 #include <QTimer>
77 
78 
79 //*************************************************************************************************************
80 //=============================================================================================================
81 // DEFINE NAMESPACE MneRtClientPlugin
82 //=============================================================================================================
83 
84 namespace MneRtClientPlugin
85 {
86 
87 
88 //*************************************************************************************************************
89 //=============================================================================================================
90 // USED NAMESPACES
91 //=============================================================================================================
92 
93 using namespace MNEX;
94 using namespace IOBuffer;
95 using namespace RTCLIENTLIB;
96 using namespace FIFFLIB;
97 using namespace XMEASLIB;
98 
99 
100 //*************************************************************************************************************
101 //=============================================================================================================
102 // FORWARD DECLARATIONS
103 //=============================================================================================================
104 
105 class MneRtClientProducer;
106 //class ECGChannel;
107 
108 
109 //=============================================================================================================
116 {
117  Q_OBJECT
118  Q_PLUGIN_METADATA(IID "mne_x/1.0" FILE "mnertclient.json") //NEw Qt5 Plugin system replaces Q_EXPORT_PLUGIN2 macro
119  // Use the Q_INTERFACES() macro to tell Qt's meta-object system about the interfaces
120  Q_INTERFACES(MNEX::ISensor)
121 
122  friend class MneRtClientProducer;
123  friend class MneRtClientSetupWidget;
124  friend class MneRtClientRunWidget;
125  friend class mnertclientSQUIDControlDgl;
126 
127 public:
128 
129  //=========================================================================================================
133  MneRtClient();
134 
135  //=========================================================================================================
139  virtual ~MneRtClient();
140 
141  //=========================================================================================================
145  void clear();
146 
147  //=========================================================================================================
151  virtual QSharedPointer<IPlugin> clone() const;
152 
153  //=========================================================================================================
157  void init();
158 
159  virtual bool start();
160  virtual bool stop();
161 
162  virtual IPlugin::PluginType getType() const;
163  virtual QString getName() const;
164 
165  virtual QWidget* setupWidget();
166 
167 //slots:
168  //=========================================================================================================
174  void changeConnector(qint32 p_iNewConnectorId);
175 
176  //=========================================================================================================
180  void connectCmdClient();
181 
182  //=========================================================================================================
186  void disconnectCmdClient();
187 
188  //=========================================================================================================
192  void requestInfo();
193 
194 signals:
195  //=========================================================================================================
201  void cmdConnectionChanged(bool p_bStatus);
202 
203  //=========================================================================================================
207  void fiffInfoAvailable();
208 
209 protected:
210  virtual void run();
211 
212 private:
213  //=========================================================================================================
217  void initConnector();
218 
219 
220  QMutex rtServerMutex;
221 
222 
223  QString m_sMneRtClientClientAlias;
225 // float m_fSamplingRate; /**< The sampling rate.*/
226 // int m_iDownsamplingFactor; /**< The down sampling factor.*/
227 
230  QSharedPointer<RtCmdClient> m_pRtCmdClient;
231  bool m_bCmdClientIsConnected;
233  QString m_sMneRtClientIP;
235  QSharedPointer<MneRtClientProducer> m_pMneRtClientProducer;
237  QMap<qint32, QString> m_qMapConnectors;
238  qint32 m_iActiveConnectorId;
240  FiffInfo::SPtr m_pFiffInfo;
241  qint32 m_iBufferSize;
243  QTimer m_cmdConnectionTimer;
245  QSharedPointer<RawMatrixBuffer> m_pRawMatrixBuffer_In;
246 };
247 
248 } // NAMESPACE
249 
250 #endif // MNERTCLIENT_H
Contains the RTServer library export/import macros.
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
CircularMatrixBuffer class declaration.
The mnertclientSQUIDControlDgl class provides the SQUID control dialog.
#define MNERTCLIENTSHARED_EXPORT
QSharedPointer< PluginOutputData< T > > SPtr
The ISensor class provides an interface for a sensor plugin.
Definition: ISensor.h:63
QSharedPointer< FiffInfo > SPtr
Definition: fiff_info.h:99
FiffInfo class declaration.
Contains the declaration of the CircularBuffer_old class.
The MneRtClientSetupWidget class provides the ECG configuration window.
Contains the declaration of the NewRealTimeMultiSampleArray class.
declaration of the RtCmdClient Class.
Contains declaration of IIinverseAlgorithm interface class.