Go to the documentation of this file.
19 class CPipeReadEndPoint;
20 class CPipeWriteEndPoint;
53 template <
typename ReadPtr,
typename WritePtr>
54 static void createPipe(ReadPtr& outReadPipe, WritePtr& outWritePipe);
107 virtual size_t Read(
void* Buffer,
size_t Count)
override;
108 virtual size_t Write(
const void* Buffer,
size_t Count)
override;
138 size_t Write(
const void* Buffer,
size_t Count)
140 throw std::runtime_error(
"CPipeReadEndPoint::Write() cant be called.");
161 size_t Read(
void* Buffer,
size_t Count)
163 throw std::runtime_error(
"CPipeWriteEndPoint::Read() cant be called.");
171 template <
typename ReadPtr,
typename WritePtr>
TSeekOrigin
Used in CStream::Seek.
unsigned int timeout_read_start_us
(Default=0) Timeout for read operations: microseconds (us) to wait for the first byte.
std::string serialize()
Converts the end-point into a string suitable for reconstruction at a child process.
size_t Write(const void *Buffer, size_t Count)
Read-only pipe, don't call this method.
void close()
Closes the pipe (normally not needed to be called by users, automatically done at destructor)
The read end-point in a pipe created with mrpt::synch::CPipe.
virtual uint64_t Seek(int64_t of, CStream::TSeekOrigin o=sFromBeginning) override
Without effect in this class.
CPipeBaseEndPoint & operator=(const CPipeBaseEndPoint &)=delete
bool isOpen() const
Returns false if the pipe was closed due to some error.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Common interface of read & write pipe end-points.
A pipe, portable across different OS.
unsigned int timeout_read_between_us
(Default=0) Timeout between burst reads operations: microseconds (us) to wait between two partial rea...
unsigned __int64 uint64_t
static void createPipe(ReadPtr &outReadPipe, WritePtr &outWritePipe)
Creates a new pipe and returns the read & write end-points as newly allocated objects.
virtual ~CPipeBaseEndPoint()
static void initializePipe(CPipeReadEndPoint &outReadPipe, CPipeWriteEndPoint &outWritePipe)
Creates a new pipe and returns the read & write end-points as newly allocated objects.
CPipe()=delete
Create via createPipe() instead.
The write end-point in a pipe created with mrpt::synch::CPipe.
size_t Read(void *Buffer, size_t Count)
Write-only pipe: read launches exception.
virtual uint64_t getPosition() const override
Without effect in this class.
GLsizei const GLfloat * value
GLsizei const GLchar ** string
virtual size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
virtual size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
virtual uint64_t getTotalBytesCount() const override
Without effect in this class.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |