MNE-CPP  beta 1.0
collectorsocket.h
Go to the documentation of this file.
1 //=============================================================================================================
36 #ifndef COLLECTORSOCKET_H
37 #define COLLECTORSOCKET_H
38 
39 //*************************************************************************************************************
40 //=============================================================================================================
41 // INCLUDES
42 //=============================================================================================================
43 
44 #include "types_definitions.h"
45 
46 
47 //*************************************************************************************************************
48 //=============================================================================================================
49 // QT INCLUDES
50 //=============================================================================================================
51 
52 #include <QTcpSocket>
53 
54 
55 //*************************************************************************************************************
56 //=============================================================================================================
57 // DEFINE NAMESPACE NeuromagPlugin
58 //=============================================================================================================
59 
60 namespace NeuromagPlugin
61 {
62 
63 
64 //=============================================================================================================
70 class CollectorSocket : public QTcpSocket
71 {
72  Q_OBJECT
73 
74 public:
75 
76  //=========================================================================================================
80  CollectorSocket(QObject *parent = 0);
81 
82  //=========================================================================================================
88  bool open();
89 
90  //=========================================================================================================
96 // int close();
97 
98 
99  inline bool isMeasuring()
100  {
101  return m_bIsMeasuring;
102  }
103 
104  //=========================================================================================================
110  int getMaxBuflen();
111 
112 
113  //=========================================================================================================
119  int setMaxBuflen(int maxbuflen);
120 
121 
122  // new client.c to qt functions
123  //=========================================================================================================
129  bool server_command(const QString& p_sCommand);
130 
131 
132  //=========================================================================================================
138  bool server_login(const QString& p_sCollectorPass, const QString& p_sMyName);
139 
140 
141  //=========================================================================================================
147  bool server_send(QString& p_sDataSend, QByteArray& p_dataOut, int p_iInputFlag = DACQ_DRAIN_INPUT);
148 
149 
150  //=========================================================================================================
156  bool server_start();
157 
158 
159  //=========================================================================================================
165  bool server_stop();
166 
167 
168 
169 private:
170 
171  QString m_sCollectorHost;
172 
173  bool m_bIsMeasuring;
174 
175 
176 };
177 
178 } // NAMESPACE
179 
180 #endif // COLLECTORSOCKET_H
bool server_send(QString &p_sDataSend, QByteArray &p_dataOut, int p_iInputFlag=DACQ_DRAIN_INPUT)
The CollectorSocket class provides ....
Neuromag Types and Defines.
bool server_command(const QString &p_sCommand)
bool server_login(const QString &p_sCollectorPass, const QString &p_sMyName)