This class is a bulk sequence of bytes with MultiThread (MT)-safe read and write operations.
Definition at line 25 of file MT_buffer.h.
#include <mrpt/synch/MT_buffer.h>
Public Member Functions | |
MT_buffer () | |
Default constructor. More... | |
virtual | ~MT_buffer () |
Destructor. More... | |
void | clear () |
Empty the buffer. More... | |
size_t | size () |
Return the number of available bytes at this moment. More... | |
void | appendData (const vector_byte &d) |
Append new data to the stream. More... | |
void | readAndClear (vector_byte &d) |
Read the whole buffer and empty it. More... | |
void | read (vector_byte &d) |
Read the whole buffer. More... | |
Private Attributes | |
vector_byte | m_data |
std::mutex | m_cs |
|
inline |
Default constructor.
Definition at line 33 of file MT_buffer.h.
|
inlinevirtual |
Destructor.
Definition at line 35 of file MT_buffer.h.
|
inline |
Append new data to the stream.
Definition at line 55 of file MT_buffer.h.
Referenced by mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread(), and mrpt::hwdrivers::CNTRIPClient::sendBackToServer().
|
inline |
Empty the buffer.
Definition at line 37 of file MT_buffer.h.
Referenced by mrpt::hwdrivers::CNTRIPClient::close(), and mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread().
|
inline |
|
inline |
Read the whole buffer and empty it.
Definition at line 63 of file MT_buffer.h.
Referenced by mrpt::hwdrivers::CNTRIPEmitter::doProcess(), and mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread().
|
inline |
Return the number of available bytes at this moment.
Definition at line 45 of file MT_buffer.h.
Referenced by mrpt::hwdrivers::CNTRIPClient::private_ntrip_thread().
|
private |
Definition at line 29 of file MT_buffer.h.
Referenced by appendData(), clear(), read(), readAndClear(), and size().
|
private |
Definition at line 28 of file MT_buffer.h.
Referenced by appendData(), clear(), read(), readAndClear(), and size().
Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019 |