serial.h
Go to the documentation of this file.
1 
18 #ifndef SERIAL_H
19 #define SERIAL_H
20 
21 /******************************************************************************
22  *** INCLUDES
23  ******************************************************************************
24  */
25 
26 #include <termio.h>
27 #include <sys/termios.h>
28 
29 /******************************************************************************
30  *** PROTOTYPES der von sick.c verwendeten Funktionen
31  ******************************************************************************
32  */
33 
34 /******************************************************************************
35  *** MY DEFINES
36  ******************************************************************************
37  */
38 #define STATUS_OK 1
39 #define STATUS_ERROR 0
40 
41 
43 {
45  char device_name[255];
46 
47  public:
48  SerialDevice();
49  ~SerialDevice();
50 
51  int open_serial (const char *p_tty_name);
52  long change_baud_serial (int tty_fd, speed_t speed);
53  long write_serial(int tty_fd, unsigned char *p_buffer, long nb_byte);
54  long read_serial(int tty_fd, unsigned char *p_buffer, long nb_bytes_max);
55  long wait_for_serial (int tty_fd, long max_time_secs);
56  void close_serial (int tty_fd);
57  long empty_serial (int tty_fd);
58 
59  protected:
60 
61 };
62 #endif
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
74 
75 
long empty_serial(int tty_fd)
Definition: serial.cc:275
SerialDevice()
Definition: serial.cc:34
long write_serial(int tty_fd, unsigned char *p_buffer, long nb_byte)
Definition: serial.cc:141
int tty_fd_slot
Definition: serial.h:44
void close_serial(int tty_fd)
Definition: serial.cc:220
char device_name[255]
Definition: serial.h:45
long change_baud_serial(int tty_fd, speed_t speed)
Definition: serial.cc:104
~SerialDevice()
Definition: serial.cc:28
long wait_for_serial(int tty_fd, long max_time_secs)
Definition: serial.cc:239
int open_serial(const char *p_tty_name)
Definition: serial.cc:53
long read_serial(int tty_fd, unsigned char *p_buffer, long nb_bytes_max)
Definition: serial.cc:172


asr_cyberglove_lib
Author(s): Heller Florian, Meißner Pascal, Nguyen Trung, Yi Xie
autogenerated on Mon Jun 10 2019 12:40:38