QTcpSocket subclass that talks the FIFF wire dialect of the mne_rt_server data port (default 4218).
More...
#include <rt_data_client.h>
Public Types | |
| typedef QSharedPointer< RtDataClient > | SPtr |
| typedef QSharedPointer< const RtDataClient > | ConstSPtr |
Public Member Functions | |
| RtDataClient (QObject *parent=nullptr) | |
| virtual void | disconnectFromHost () |
| qint32 | getClientId () |
| FIFFLIB::FiffInfo::SPtr | readInfo () |
| MetaData | readMetadata () |
| void | readRawBuffer (qint32 p_nChannels, Eigen::MatrixXf &data, FIFFLIB::fiff_int_t &kind) |
| void | setClientAlias (const QString &p_sAlias) |
QTcpSocket subclass that talks the FIFF wire dialect of the mne_rt_server data port (default 4218).
Negotiates the per-session client id with setClientAlias / getClientId, fetches the FiffInfo (and optionally the digitiser point set) via readInfo / readMetadata, and then blocks on readRawBuffer to deliver one Eigen::MatrixXf sample matrix at a time. Parsing is delegated to FIFFLIB::FiffStream / FiffTag so this class never re-implements the binary framing; the only socket state it owns beyond the QTcpSocket base is the assigned m_clientID.
Definition at line 101 of file rt_data_client.h.

| typedef QSharedPointer<const RtDataClient> COMLIB::RtDataClient::ConstSPtr |
Const shared pointer type for RtDataClient.
Definition at line 107 of file rt_data_client.h.
| typedef QSharedPointer<RtDataClient> COMLIB::RtDataClient::SPtr |
Shared pointer type for RtDataClient.
Definition at line 106 of file rt_data_client.h.
|
explicit |
Creates the real-time data client.
| [in] | parent | Parent QObject (optional). |
Definition at line 41 of file rt_data_client.cpp.
|
virtual |
Attempts to close the socket. If there is pending data waiting to be written, QAbstractSocket will enter ClosingState and wait until all data has been written. Eventually, it will enter UnconnectedState and emit the disconnected() signal.
Definition at line 50 of file rt_data_client.cpp.
| qint32 RtDataClient::getClientId | ( | ) |
Requests the ID at mne_rt_server and returns it
Definition at line 58 of file rt_data_client.cpp.
| FiffInfo::SPtr RtDataClient::readInfo | ( | ) |
Reads fiff measurement information of a data the connection
Definition at line 81 of file rt_data_client.cpp.
| MetaData RtDataClient::readMetadata | ( | ) |
Reads fiff metaata class from data connection
Definition at line 354 of file rt_data_client.cpp.
| void RtDataClient::readRawBuffer | ( | qint32 | p_nChannels, |
| Eigen::MatrixXf & | data, | ||
| FIFFLIB::fiff_int_t & | kind ) |
Reads fiff measurement information of a data the connection
| [in] | p_nChannels | Number of channels to reshape the received data. |
| [out] | data | The read data - ToDo change this to raw buffer data object. |
| [out] | kind | Data kind. |
Definition at line 641 of file rt_data_client.cpp.
| void RtDataClient::setClientAlias | ( | const QString & | p_sAlias | ) |
Sets the alias of the data client
| [in] | p_sAlias | The alias of the data client. |
Definition at line 666 of file rt_data_client.cpp.