Class CPipeBaseEndPoint
Defined in File CPipe.h
Inheritance Relationships
Base Type
public mrpt::io::CStream(Class CStream)
Derived Types
public mrpt::io::CPipeReadEndPoint(Class CPipeReadEndPoint)public mrpt::io::CPipeWriteEndPoint(Class CPipeWriteEndPoint)
Class Documentation
-
class CPipeBaseEndPoint : public mrpt::io::CStream
Common interface of read & write pipe end-points
Subclassed by mrpt::io::CPipeReadEndPoint, mrpt::io::CPipeWriteEndPoint
Public Functions
-
CPipeBaseEndPoint()
-
CPipeBaseEndPoint(const CPipeBaseEndPoint&) = delete
-
CPipeBaseEndPoint &operator=(const CPipeBaseEndPoint&) = delete
-
~CPipeBaseEndPoint() override
-
explicit CPipeBaseEndPoint(const std::string &serialized)
De-serializes one end-point description, for example, from a parent process.
-
std::string serialize()
Converts the end-point into a string suitable for reconstruction at a child process. This invalidates this object, since only one real end-point can exist at once.
-
inline bool isOpen() const
Returns false if the pipe was closed due to some error.
-
void close()
Closes the pipe (normally not needed to be called by users, automatically done at destructor)
-
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. Write attempts to write up to Count bytes to Buffer, and returns the number of bytes actually written.
-
virtual uint64_t Seek(int64_t of, CStream::TSeekOrigin o = sFromBeginning) override
Without effect in this class
-
virtual uint64_t getTotalBytesCount() const override
Without effect in this class
-
virtual uint64_t getPosition() const override
Without effect in this class
Public Members
-
unsigned int timeout_read_start_us = {0}
(Default=0) Timeout for read operations: microseconds (us) to wait for the first byte. 0 means infinite timeout.
-
unsigned int timeout_read_between_us = {0}
(Default=0) Timeout between burst reads operations: microseconds (us) to wait between two partial reads inside one large read. 0 means infinite timeout.
Protected Attributes
-
int m_pipe_file = {0}
-
CPipeBaseEndPoint()