Serial communications. More...
Go to the source code of this file.
Data Structures | |
struct | urg_serial_t |
Control information for serial connection. More... | |
Enumerations | |
enum | { RING_BUFFER_SIZE_SHIFT = 7, RING_BUFFER_SIZE = 1 << RING_BUFFER_SIZE_SHIFT, ERROR_MESSAGE_SIZE = 256 } |
Functions | |
int | serial_open (urg_serial_t *serial, const char *device, long baudrate) |
Opens the connection. | |
void | serial_close (urg_serial_t *serial) |
Closes the connection. | |
int | serial_set_baudrate (urg_serial_t *serial, long baudrate) |
Configures the baudrate. | |
int | serial_write (urg_serial_t *serial, const char *data, int size) |
Sends data over serial connection. | |
int | serial_read (urg_serial_t *serial, char *data, int max_size, int timeout) |
Gets data from serial connection. | |
int | serial_readline (urg_serial_t *serial, char *data, int max_size, int timeout) |
Gets data from serial connection until end-of-line. | |
int | serial_error (urg_serial_t *serial, char *error_message, int max_size) |
Stores the serial error message. |
Serial communications.