45 #define termios asmtermios
46 #include <asm/termios.h>
52 extern int ioctl(
int __fd,
unsigned long int __request, ...)
throw();
57 int fd = open(serial, O_RDWR | O_NOCTTY | O_SYNC);
59 struct termios2 options
62 ioctl(fd, TCGETS2, &options);
66 ROS_ERROR(
"[rt_dbus] Unable to open dbus\n");
70 options.c_cflag &= ~CBAUD;
71 options.c_cflag |= BOTHER;
73 options.c_cflag |= PARENB;
74 options.c_cflag &= ~PARODD;
75 options.c_cflag &= ~CSTOPB;
76 options.c_cflag &= ~CSIZE;
77 options.c_cflag |= CS8;
79 options.c_ispeed = 100000;
80 options.c_ospeed = 100000;
81 options.c_iflag &= ~(IXON | IXOFF | IXANY);
82 options.c_iflag &= ~IGNBRK;
86 options.c_cc[VTIME] = 0;
87 options.c_cc[VMIN] = 0;
90 options.c_cflag |= (CLOCAL | CREAD);
91 ioctl(fd, TCSETS2, &options);
104 size_t n =
::read(
port_, &read_byte,
sizeof(read_byte));
112 for (
int i = 0; i < 17; i++)
116 buff_[17] = read_byte;
179 d_bus_data.m_x =
static_cast<double>(
d_bus_data_.
x / 1600.0);
180 d_bus_data.m_y =
static_cast<double>(
d_bus_data_.
y / 1600.0);
181 d_bus_data.m_z =
static_cast<double>(
d_bus_data_.
z / 1600.0);