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


asr_flock_of_birds
Author(s): Bernhardt Andre, Engelmann Stephan, Giesler Björn, Heller Florian, Jäkel Rainer, Nguyen Trung, Pardowitz Michael, Weckesser Peter, Yi Xie, Zöllner Raoul
autogenerated on Mon Jun 10 2019 12:44:40