serial_communication.h
Go to the documentation of this file.
00001 #ifndef __SERIAL_COMM_H__
00002 #define __SERIAL_COMM_H__
00003 
00029 #include <termios.h>
00030 #include <sys/types.h>
00031 #include <sys/stat.h>
00032 #include <fcntl.h>
00033 #include <ros/ros.h>
00034 #include "serial_communication_interface.h"
00035 
00036 class SerialCommunication : public SerialCommunicationInterface {
00037     public:
00041         SerialCommunication();
00042 
00046         ~SerialCommunication();
00047 
00053         void set_serial_device(std::string serial_device);
00054 
00060         int open_port(struct termios *oldtio);
00061 
00067         int close_port(struct termios *oldtio);
00068 
00074         int send_character(unsigned char *str);
00075 
00076     private:
00077         std::string _serial_device;
00078 
00079         struct termios _oldtio;
00080         int _file_descriptor;
00081 };
00082 
00083 #endif


serial_comm_drivers
Author(s): Raul Perula-Martinez
autogenerated on Thu Apr 2 2015 03:06:03