9#ifndef SerialDeviceDriverh
10#define SerialDeviceDriverh
18#include <ace/DEV_Connector.h>
19#include <ace/TTY_IO.h>
86 char line_terminator_char1;
87 char line_terminator_char2;
103 bool close()
override;
111 bool send(
const char *msg,
size_t size)
override;
132 int receiveBytes(
unsigned char* bytes,
const int size)
override;
147 bool setDTR(
bool value)
override;
153 int flush()
override;
ACE_TTY_IO::Serial_Params SerialParams
serialport: A basic Serial Communications Link (RS232, USB).
bool send(const Bottle &msg) override
Sends a string of chars to the serial communications channel.
bool close() override
Close the DeviceDriver.
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.
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 receive(Bottle &msg) override
Gets the existing chars in the receive queue.
int flush() override
Flushes the internal buffer.
bool setDTR(bool value) override
Enable/Disable DTR protocol.
int receiveChar(char &chr) override
Gets one single char from the receive queue.
virtual ~SerialDeviceDriver()
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.