6#ifndef FAKESERIALPORT_H
7#define FAKESERIALPORT_H
44 bool close()
override;
47 bool send(
const char *msg,
size_t size)
override;
50 int receiveBytes(
unsigned char* bytes,
const int size)
override;
52 bool setDTR(
bool value)
override;
This class is the parameters parser for class FakeSerialPort.
fakeSerialPort: A fake basic Serial Communications Link (RS232, USB).
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
int receiveBytes(unsigned char *bytes, const int size) override
Gets an array of bytes (unsigned char) with size <= 'size' parameter.
virtual ~FakeSerialPort()
int flush() override
Flushes the internal buffer.
bool receive(Bottle &msg) override
Gets the existing chars in the receive queue.
int receiveLine(char *line, const int MaxLineLength) override
Gets one line (a sequence of chars with a ending '\n' or '\r') from the receive queue.
bool send(const Bottle &msg) override
Sends a string of chars to the serial communications channel.
bool close() override
Close the DeviceDriver.
bool setDTR(bool value) override
Enable/Disable DTR protocol.
int receiveChar(char &chr) override
Gets one single char from the receive queue.
Interface implemented by all device drivers.
A generic interface to serial port devices.
A simple collection of objects that can be described and transmitted in a portable way.
A mini-server for performing network communication in the background.
A base class for nested structures that can be searched.
An interface to the operating system, including Port based communication.