63 , m_bIsConnected(false)
64 , m_bIsMeasuring(false)
66 , m_sClientAlias(p_sClientAlias)
67 , m_sRtServerHostName(p_sRtServerHostname)
84 return m_bIsConnected;
110 t_cmdClient.waitForConnected(1000);
112 while(t_cmdClient.state() != QTcpSocket::ConnectedState)
116 t_cmdClient.waitForConnected(1000);
121 t_dataClient.waitForConnected();
124 m_bIsConnected =
true;
144 MatrixXf t_matRawBuffer;
167 t_cmdClient[
"measinfo"].pValues()[0].setValue(clientId);
168 t_cmdClient[
"measinfo"].send();
170 m_pFiffInfo = t_dataClient.
readInfo();
173 t_cmdClient[
"start"].pValues()[0].setValue(clientId);
174 t_cmdClient[
"start"].send();
182 t_dataClient.
readRawBuffer(m_pFiffInfo->nchan, t_matRawBuffer, kind);
186 to += t_matRawBuffer.cols();
187 printf(
"Reading %d ... %d = %9.3f ... %9.3f secs...", from, to, ((
float)from)/m_pFiffInfo->sfreq, ((
float)to)/m_pFiffInfo->sfreq);
188 from += t_matRawBuffer.cols();
193 m_bIsRunning =
false;
201 t_cmdClient.disconnectFromHost();
205 m_bIsConnected =
false;
void readRawBuffer(qint32 p_nChannels, MatrixXf &data, fiff_int_t &kind)
void connectToHost(QString &p_sRtServerHostName)
void setClientAlias(const QString &p_sAlias)
Real-time command client.
bool getConnectionStatus()
void rawBufferReceived(Eigen::MatrixXf p_rawBuffer)
FiffInfo::SPtr readInfo()
declaration of the RtCmdClient Class.
RtClient(QString p_sRtServerHostname, QString p_sClientAlias="rtclient", QObject *parent=0)
void connectionChanged(bool p_bStatus)
declaration of the RtDataClient Class.
declaration of the RtClient Class.
void connectToHost(const QString &p_sRtServerHostName)
virtual void disconnectFromHost()