MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
rtclient.h
Go to the documentation of this file.
1//=============================================================================================================
37#ifndef RTCLIENT_H
38#define RTCLIENT_H
39
40//=============================================================================================================
41// INCLUDES
42//=============================================================================================================
43
44#include "../communication_global.h"
45
46#include <fiff/fiff_info.h>
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QMutex>
53#include <QSharedPointer>
54#include <QString>
55#include <QThread>
56
57//=============================================================================================================
58// EIGEN INCLUDES
59//=============================================================================================================
60
61#include <Eigen/Core>
62
63//=============================================================================================================
64// DEFINE NAMESPACE COMMUNICATIONLIB
65//=============================================================================================================
66
67namespace COMMUNICATIONLIB
68{
69
70//=============================================================================================================
71// FORWARD DECLARATIONS
72//=============================================================================================================
73
74//=============================================================================================================
81{
82 Q_OBJECT
83
84public:
85 typedef QSharedPointer<RtClient> SPtr;
86 typedef QSharedPointer<const RtClient> ConstSPtr;
88 //=========================================================================================================
96 explicit RtClient(QString p_sRtServerHostname, QString p_sClientAlias = "rtclient", QObject *parent = 0);
97
98 //=========================================================================================================
102 ~RtClient();
103
104 //=========================================================================================================
108 inline FIFFLIB::FiffInfo::SPtr& getFiffInfo();
109
110 //=========================================================================================================
116 bool getConnectionStatus();
117
118 //=========================================================================================================
124 virtual bool stop();
125
126protected:
127 //=========================================================================================================
133 virtual void run();
134
135private:
136 QMutex mutex;
137 bool m_bIsConnected;
138 bool m_bIsMeasuring;
139 bool m_bIsRunning;
140 QString m_sClientAlias;
141 QString m_sRtServerHostName;
142 FIFFLIB::FiffInfo::SPtr m_pFiffInfo;
143 quint16 m_iDefaultPort;
144signals:
145 //=========================================================================================================
151 void rawBufferReceived(Eigen::MatrixXf p_rawBuffer);
152
153 //=========================================================================================================
159 void connectionChanged(bool p_bStatus);
160};
161
162//=============================================================================================================
163// INLINE DEFINITIONS
164//=============================================================================================================
165
167{
168 return m_pFiffInfo;
169}
170} // NAMESPACE
171
172#ifndef metatype_matrixxf
173#define metatype_matrixxf
174Q_DECLARE_METATYPE(Eigen::MatrixXf);
175#endif
176
177#endif // RTCLIENT_H
FiffInfo class declaration.
#define COMMUNICATIONSHARED_EXPORT
Q_DECLARE_METATYPE(Eigen::MatrixXf)
Real-time client.
Definition rtclient.h:81
QSharedPointer< const RtClient > ConstSPtr
Definition rtclient.h:86
void rawBufferReceived(Eigen::MatrixXf p_rawBuffer)
FIFFLIB::FiffInfo::SPtr & getFiffInfo()
Definition rtclient.h:166
QSharedPointer< RtClient > SPtr
Definition rtclient.h:85
void connectionChanged(bool p_bStatus)
QSharedPointer< FiffInfo > SPtr
Definition fiff_info.h:87