v2.0.0
Loading...
Searching...
No Matches
LSLLIB::StreamInletPrivate Class Reference

Public Member Functions

 StreamInletPrivate (const stream_info &info)
 ~StreamInletPrivate ()
void openStream ()
void closeStream ()
bool readPending ()
std::vector< std::vector< float > > pullChunkFloat ()

Public Attributes

stream_info m_info
QTcpSocket * m_pSocket
bool m_bIsOpen
int m_iChannelCount
int m_iBytesPerSample
QByteArray m_rawBuffer

Detailed Description

Definition at line 63 of file lsl_stream_inlet.cpp.

Constructor & Destructor Documentation

◆ StreamInletPrivate()

LSLLIB::StreamInletPrivate::StreamInletPrivate ( const stream_info & info)
inline

Definition at line 66 of file lsl_stream_inlet.cpp.

◆ ~StreamInletPrivate()

LSLLIB::StreamInletPrivate::~StreamInletPrivate ( )
inline

Definition at line 75 of file lsl_stream_inlet.cpp.

Member Function Documentation

◆ closeStream()

void LSLLIB::StreamInletPrivate::closeStream ( )
inline

Close the TCP connection.

Definition at line 152 of file lsl_stream_inlet.cpp.

◆ openStream()

void LSLLIB::StreamInletPrivate::openStream ( )
inline

Open a TCP connection to the stream outlet.

Definition at line 84 of file lsl_stream_inlet.cpp.

◆ pullChunkFloat()

std::vector< std::vector< float > > LSLLIB::StreamInletPrivate::pullChunkFloat ( )
inline

Extract all complete samples from the byte buffer as a chunk.

Returns
Vector of samples, each sample is a vector of float channel values.

Definition at line 196 of file lsl_stream_inlet.cpp.

◆ readPending()

bool LSLLIB::StreamInletPrivate::readPending ( )
inline

Try to read pending data from the TCP socket into the raw byte buffer (non-blocking).

Returns
True if at least one complete sample is available in the buffer.

Definition at line 174 of file lsl_stream_inlet.cpp.

Member Data Documentation

◆ m_bIsOpen

bool LSLLIB::StreamInletPrivate::m_bIsOpen

Whether the stream is currently open.

Definition at line 235 of file lsl_stream_inlet.cpp.

◆ m_iBytesPerSample

int LSLLIB::StreamInletPrivate::m_iBytesPerSample

Bytes per sample (channels * sizeof(float)).

Definition at line 237 of file lsl_stream_inlet.cpp.

◆ m_iChannelCount

int LSLLIB::StreamInletPrivate::m_iChannelCount

Number of channels.

Definition at line 236 of file lsl_stream_inlet.cpp.

◆ m_info

stream_info LSLLIB::StreamInletPrivate::m_info

The stream info for this inlet.

Definition at line 233 of file lsl_stream_inlet.cpp.

◆ m_pSocket

QTcpSocket* LSLLIB::StreamInletPrivate::m_pSocket

TCP socket for data reception.

Definition at line 234 of file lsl_stream_inlet.cpp.

◆ m_rawBuffer

QByteArray LSLLIB::StreamInletPrivate::m_rawBuffer

Raw byte buffer for incoming TCP data.

Definition at line 238 of file lsl_stream_inlet.cpp.


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