v2.0.0
Loading...
Searching...
No Matches
COMLIB::RtClient Class Reference

Threaded façade that owns a paired command/data connection to mne_rt_server and re-emits streamed buffers. More...

#include <rt_client.h>

Public Types

typedef QSharedPointer< RtClientSPtr
typedef QSharedPointer< const RtClientConstSPtr

Signals

void rawBufferReceived (Eigen::MatrixXf p_rawBuffer)
void connectionChanged (bool p_bStatus)

Public Member Functions

 RtClient (QString p_sRtServerHostname, QString p_sClientAlias="rtclient", QObject *parent=0)
 ~RtClient ()
FIFFLIB::FiffInfo::SPtrgetFiffInfo ()
bool getConnectionStatus ()
virtual bool stop ()

Protected Member Functions

virtual void run ()

Detailed Description

Threaded façade that owns a paired command/data connection to mne_rt_server and re-emits streamed buffers.

Constructs and drives both RtCmdClient (port 4217) and RtDataClient (port 4218) from inside its own run() loop, handles the initial id/alias/info/buffer-size handshake, and surfaces each received raw buffer as rawBufferReceived(Eigen::MatrixXf) so consumers in the GUI / acquisition stack never touch the sockets directly. State changes on the underlying TCP connection are mirrored through connectionChanged(bool).

Definition at line 87 of file rt_client.h.

Inheritance diagram for COMLIB::RtClient:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

typedef QSharedPointer<const RtClient> COMLIB::RtClient::ConstSPtr

Const shared pointer type for MNERtClient.

Definition at line 93 of file rt_client.h.

◆ SPtr

typedef QSharedPointer<RtClient> COMLIB::RtClient::SPtr

Shared pointer type for MNERtClient.

Definition at line 92 of file rt_client.h.

Constructor & Destructor Documentation

◆ RtClient()

RtClient::RtClient ( QString p_sRtServerHostname,
QString p_sClientAlias = "rtclient",
QObject * parent = 0 )
explicit

Creates the real-time client.

Parameters
[in]p_sRtServerHostnameThe IP address of the mne_rt_server.
[in]p_sClientAliasThe client alias of the data client.
[in]parentParent QObject (optional).

Definition at line 41 of file rt_client.cpp.

◆ ~RtClient()

RtClient::~RtClient ( )

Destroys the real time client.

Definition at line 54 of file rt_client.cpp.

Member Function Documentation

◆ connectionChanged

void COMLIB::RtClient::connectionChanged ( bool p_bStatus)
signal

Emitted when connection status changed

Parameters
[in]p_bStatusconnection status.

◆ getConnectionStatus()

bool RtClient::getConnectionStatus ( )

Rt Server status, returns true when rt server is started.

Returns
true if started, false otherwise.

Definition at line 61 of file rt_client.cpp.

◆ getFiffInfo()

FIFFLIB::FiffInfo::SPtr & COMLIB::RtClient::getFiffInfo ( )
inline

Request Fiff Info

Definition at line 173 of file rt_client.h.

◆ rawBufferReceived

void COMLIB::RtClient::rawBufferReceived ( Eigen::MatrixXf p_rawBuffer)
signal

Emits a received raw buffer - ToDo change the emits to fiff raw data.

Parameters
[in]p_rawBufferthe received raw buffer.

◆ run()

void RtClient::run ( )
protectedvirtual

The starting point for the thread. After calling start(), the newly created thread calls this function. Returning from this method will end the execution of the thread. Pure virtual method inherited by QThread.

Definition at line 78 of file rt_client.cpp.

◆ stop()

bool RtClient::stop ( )
virtual

Stops the RtClient by stopping the producer's thread.

Returns
true if succeeded, false otherwise.

Definition at line 68 of file rt_client.cpp.


The documentation for this class was generated from the following files: