Go to the documentation of this file.
29 #ifndef __LOGREADERPORT_H
30 #define __LOGREADERPORT_H
93 ssize_t
Read (
void *
const buffer,
size_t count);
95 ssize_t
ReadFull (
void *
const buffer,
size_t count);
101 ssize_t
Write (
const void *
const buffer,
size_t count);
119 std::string _logFileName;
120 unsigned int _strictness;
125 bool ProcessOption (
const std::string &option,
const std::string &value);
126 void CheckPort (
bool read);
133 #endif // __LOGREADERPORT_H
ssize_t ReadFull(void *const buffer, size_t count)
Read the requested quantity of data from the port.
Simulated port using a log file.
ssize_t BytesAvailable()
Get the number of bytes waiting to be read at the port. Returns immediatly.
void SetCanRead(bool canRead)
Set the read permissions of the port.
std::string GetStatus() const
Get the status of the port (type, device, etc).
void Open()
Open the port.
void SetTimeout(Timeout timeout)
Set the timeout value in milliseconds.
void Flush()
Flush the port's input and output buffers, discarding all data.
LogReaderPort(std::map< std::string, std::string > options)
ssize_t Read(void *const buffer, size_t count)
Read from the port.
void SetCanWrite(bool canWrite)
Set the write permissions of the port.
ssize_t BytesAvailableWait()
Get the number of bytes waiting after blocking for the timeout.
ssize_t Write(const void *const buffer, size_t count)
Write data to the port.
bool IsOpen() const
Check if the port is open.
void Close()
Close the port.
An object used to represent timeouts.
void Drain()
Drain the port's input and output buffers.