8#ifndef YARP_DEV_ISERIALDEVICE_H
9#define YARP_DEV_ISERIALDEVICE_H
34 virtual bool send(
const char *msg,
size_t size) = 0;
57 virtual int receiveBytes(
unsigned char* bytes,
const int size) = 0;
66 virtual int receiveLine(
char* line,
const int MaxLineLength) = 0;
72 virtual bool setDTR(
bool enable) = 0;
contains the definition of a Vector type
A generic interface to serial port devices.
virtual bool send(const char *msg, size_t size)=0
virtual int receiveLine(char *line, const int MaxLineLength)=0
Gets one line (a sequence of chars with a ending '\n' or '\r') from the receive queue.
virtual bool setDTR(bool enable)=0
Enable/Disable DTR protocol.
virtual int flush()=0
Flushes the internal buffer.
virtual bool send(const yarp::os::Bottle &msg)=0
Sends a string of chars to the serial communications channel.
virtual int receiveChar(char &chr)=0
Gets one single char from the receive queue.
virtual bool receive(yarp::os::Bottle &msg)=0
Gets the existing chars in the receive queue.
virtual int receiveBytes(unsigned char *bytes, const int size)=0
Gets an array of bytes (unsigned char) with size <= 'size' parameter.
A simple collection of objects that can be described and transmitted in a portable way.
For streams capable of holding different kinds of content, check what they actually have.