#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <stdlib.h>#include <unistd.h>#include <termios.h>#include <sys/time.h>#include <stdio.h>#include <ctype.h>#include <string.h>#include <sys/ioctl.h>#include <errno.h>#include "rcx_comm.h"Go to the source code of this file.
Defines | |
| #define | BUFFERSIZE 4096 |
| #define | tvupdate(tv) gettimeofday(tv,NULL) |
| #define | tvsec(tv) ((tv)->tv_sec) |
| #define | tvmsec(tv) ((tv)->tv_usec * 1e-3) |
| #define | LINE_SIZE 16 |
| #define | GROUP_SIZE 4 |
| #define | UNPRINTABLE '.' |
Typedefs | |
| typedef timeval | timeval_t |
Functions | |
| float | timer_reset (timeval_t *timer) |
| float | timer_read (timeval_t *timer) |
| void | myperror (char *str) |
| perror() wrapper | |
| int | nbread (FILEDESCR fd, void *buf, int maxlen, int timeout) |
| void | rx_flush (FILEDESCR fd) |
| int | mywrite (FILEDESCR fd, const void *buf, size_t len) |
| write() wrapper | |
| FILEDESCR | rcx_init (char *tty, int is_fast) |
| void | rcx_close (FILEDESCR fd) |
| int | rcx_wakeup_tower (FILEDESCR fd, int timeout) |
| void | hexdump (char *prefix, void *buf, int len) |
| int | rcx_send (FILEDESCR fd, void *buf, int len, int use_comp) |
| int | rcx_recv (FILEDESCR fd, void *buf, int maxlen, int timeout, int use_comp) |
| int | rcx_sendrecv (FILEDESCR fd, void *send, int slen, void *recv, int rlen, int timeout, int retries, int use_comp) |
| int | rcx_is_alive (FILEDESCR fd, int use_comp) |
| char * | rcx_strerror (int error) |
Variables | |
| int | __comm_debug = 0 |
| int | tty_usb |
|
|
Definition at line 61 of file rcx_comm.c. |
|
|
Definition at line 399 of file rcx_comm.c. Referenced by hexdump(). |
|
|
Definition at line 398 of file rcx_comm.c. |
|
|
Definition at line 74 of file rcx_comm.c. Referenced by timer_read(). |
|
|
Definition at line 73 of file rcx_comm.c. Referenced by timer_read(). |
|
|
Definition at line 72 of file rcx_comm.c. Referenced by timer_read(), and timer_reset(). |
|
|
Definition at line 400 of file rcx_comm.c. |
|
|
Definition at line 70 of file rcx_comm.c. Referenced by rcx_wakeup_tower(), and timer_read(). |
|
||||||||||||||||
|
Definition at line 402 of file rcx_comm.c. References GROUP_SIZE. Referenced by rcx_recv(), rcx_send(), and rcx_wakeup_tower(). |
|
|
perror() wrapper
Definition at line 91 of file rcx_comm.c. Referenced by keepaliveSend(), LNPinit(), nbread(), rcx_init(), rcx_send(), rcx_wakeup_tower(), and rcxInit(). |
|
||||||||||||||||
|
write() wrapper
Definition at line 230 of file rcx_comm.c. References NULL. Referenced by keepaliveSend(), lnp_logical_write(), rcx_send(), and rcx_wakeup_tower(). |
|
||||||||||||||||||||
|
Definition at line 101 of file rcx_comm.c. References exit(), myperror(), NULL, and tty_usb. Referenced by rcx_recv(), rcx_send(), rcx_wakeup_tower(), and rx_flush(). |
|
|
Definition at line 346 of file rcx_comm.c. Referenced by main(). |
|
||||||||||||
|
Definition at line 266 of file rcx_comm.c. References B2400, B4800, exit(), FILEDESCR, memset(), myperror(), NULL, and tty_usb. Referenced by main(). |
|
||||||||||||
|
Definition at line 621 of file rcx_comm.c. References rcx_sendrecv(). Referenced by main(). |
|
||||||||||||||||||||||||
|
Definition at line 492 of file rcx_comm.c. References BUFFERSIZE, hexdump(), and nbread(). Referenced by rcx_sendrecv(). |
|
||||||||||||||||||||
|
Definition at line 424 of file rcx_comm.c. References exit(), hexdump(), myperror(), mywrite(), nbread(), rx_flush(), and tty_usb. Referenced by rcx_sendrecv(). |
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 592 of file rcx_comm.c. References rcx_recv(), rcx_send(), and rcx_strerror(). Referenced by image_dl(), and rcx_is_alive(). |
|
|
Definition at line 629 of file rcx_comm.c. References RCX_BAD_ECHO, RCX_BAD_LINK, RCX_BAD_RESPONSE, RCX_NO_RESPONSE, RCX_NO_TOWER, and RCX_OK. Referenced by main(), and rcx_sendrecv(). |
|
||||||||||||
|
Definition at line 355 of file rcx_comm.c. References BUFFERSIZE, exit(), hexdump(), myperror(), mywrite(), nbread(), rx_flush(), timer_read(), timer_reset(), and timeval_t. Referenced by main(). |
|
|
Definition at line 215 of file rcx_comm.c. References BUFFERSIZE, nbread(), and tty_usb. Referenced by rcx_send(), and rcx_wakeup_tower(). |
|
|
Definition at line 84 of file rcx_comm.c. References timeval_t, tvmsec, tvsec, and tvupdate. Referenced by rcx_wakeup_tower(). |
|
|
Definition at line 77 of file rcx_comm.c. References tvupdate. Referenced by rcx_wakeup_tower(). |
|
|
Definition at line 65 of file rcx_comm.c. Referenced by main(). |
|
|
|
1.3.9.1