Koala Library
|
This module is the low-level communication layer between the Koala Library and the Linux Operating System. More...
Go to the source code of this file.
Defines | |
#define | LineLength 256 |
Functions | |
koala_rs232_t * | koala_rs232_open (const char *name, int baudrate) |
void | koala_rs232_close (koala_rs232_t *rs232) |
int | koala_rs232_read (koala_rs232_t *rs232, char *buf, unsigned int len) |
int | koala_rs232_readLine_nowait (koala_rs232_t *rs232, char *buffer) |
int | koala_rs232_readLine (koala_rs232_t *rs232, char *buffer) |
int | koala_rs232_write (koala_rs232_t *rs232, const char *buf, unsigned int len) |
This module is the low-level communication layer between the Koala Library and the Linux Operating System.
RS-232 Communication
Definition in file koala_serial.c.
#define LineLength 256 |
Definition at line 49 of file koala_serial.c.
void koala_rs232_close | ( | koala_rs232_t * | rs232 | ) |
This function closes an RS-232 device.
rs232 | RS-232 device descriptor |
Definition at line 106 of file koala_serial.c.
References koala_rs232_s::fd.
Referenced by koala_robot_release().
koala_rs232_t* koala_rs232_open | ( | const char * | name, |
int | baudrate | ||
) |
This function opens a given device on the RS-232 Bus
name | RS-232 device name |
baudrate | baudrate (B115200,...) |
Definition at line 63 of file koala_serial.c.
References koala_rs232_s::fd, and koala_rs232_s::tios.
Referenced by koala_robot_init().
int koala_rs232_read | ( | koala_rs232_t * | rs232, |
char * | buf, | ||
unsigned int | len | ||
) |
This function reads data from an RS-232 device.
rs232 | RS-232 device descriptor |
buf | Pointer to the buffer that will receive the data |
len | Size of the buffer |
Definition at line 132 of file koala_serial.c.
References koala_rs232_s::fd.
Referenced by koala_getcommand().
int koala_rs232_readLine | ( | koala_rs232_t * | rs232, |
char * | buffer | ||
) |
Definition at line 210 of file koala_serial.c.
Referenced by koala_getcommand_line().
int koala_rs232_readLine_nowait | ( | koala_rs232_t * | rs232, |
char * | buffer | ||
) |
Definition at line 152 of file koala_serial.c.
Referenced by koala_getcommand_line_nowait().
int koala_rs232_write | ( | koala_rs232_t * | rs232, |
const char * | buf, | ||
unsigned int | len | ||
) |
This function writes data to an RS-232 device.
rs232 | RS-232 device descriptor |
buf | Pointer to the buffer that contains the data to be written |
len | Number of the bytes in the buffer |
Definition at line 271 of file koala_serial.c.
References koala_rs232_s::fd.
Referenced by koala_sendcommand().