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


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