49 using namespace COMMUNICATIONLIB;
50 using namespace FIFFLIB;
51 using namespace Eigen;
59 , m_bIsConnected(false)
60 , m_bIsMeasuring(false)
62 , m_sClientAlias(p_sClientAlias)
63 , m_sRtServerHostName(p_sRtServerHostname)
64 , m_iDefaultPort(4217)
79 return m_bIsConnected;
102 t_cmdClient.connectToHost(m_sRtServerHostName,m_iDefaultPort);
103 t_cmdClient.waitForConnected(1000);
105 while(t_cmdClient.state() != QTcpSocket::ConnectedState)
108 t_cmdClient.connectToHost(m_sRtServerHostName,m_iDefaultPort);
109 t_cmdClient.waitForConnected(1000);
113 t_dataClient.connectToHost(m_sRtServerHostName,m_iDefaultPort);
114 t_dataClient.waitForConnected();
117 m_bIsConnected =
true;
159 t_cmdClient[
"measinfo"].pValues()[0].setValue(clientId);
160 t_cmdClient[
"measinfo"].send();
162 m_pFiffInfo = t_dataClient.
readInfo();
165 t_cmdClient[
"start"].pValues()[0].setValue(clientId);
166 t_cmdClient[
"start"].send();
173 t_dataClient.
readRawBuffer(m_pFiffInfo->nchan, matData, kind);
177 to += matData.cols();
178 printf(
"Reading %d ... %d = %9.3f ... %9.3f secs...", from, to, ((
float)from)/m_pFiffInfo->sfreq, ((
float)to)/m_pFiffInfo->sfreq);
179 from += matData.cols();
184 m_bIsRunning =
false;
192 t_cmdClient.disconnectFromHost();
196 m_bIsConnected =
false;