serial.h
Go to the documentation of this file.
00001 
00018 #ifndef SERIAL_H
00019 #define SERIAL_H
00020 
00021 
00022 /******************************************************************************
00023  *** INCLUDES
00024  ******************************************************************************
00025  */
00026 
00027 #include <termio.h>
00028 #include <sys/termios.h>
00029 
00030 /******************************************************************************
00031  *** PROTOTYPES der von sick.c verwendeten Funktionen
00032  ******************************************************************************
00033  */
00034 
00035 /******************************************************************************
00036  *** MY DEFINES
00037  ******************************************************************************
00038  */
00039 #define STATUS_OK    1
00040 #define STATUS_ERROR 0
00041 
00042 
00043 class SerialDevice 
00044 { 
00045   int tty_fd_slot;
00046   char device_name[255];
00047 
00048  public:
00049   SerialDevice();
00050   ~SerialDevice();
00051 
00052   int  open_serial (const char *p_tty_name);
00053   long change_baud_serial (int tty_fd, speed_t speed);
00054   long write_serial(int tty_fd, unsigned char *p_buffer, long nb_byte);
00055   long read_serial(int tty_fd, unsigned char *p_buffer, long nb_bytes_max);
00056   long wait_for_serial (int tty_fd, long max_time_secs);
00057   void close_serial (int tty_fd);
00058   long empty_serial (int tty_fd);
00059   
00060  protected:
00061  
00062 };
00063 #endif
00064 
00065 
00066 
00067 
00068 
00069 
00070 
00071 
00072 
00073 
00074 
00075 
00076 


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 Sat Jun 8 2019 19:36:21