00001 // INCLUDE 00002 00003 #include <stdio.h> 00004 #include <stdlib.h> 00005 #include <errno.h> 00006 #include <unistd.h> // exit 00007 #include <signal.h> 00008 #include <string.h> 00009 #include <stdlib.h> // strtoul 00010 #include <fcntl.h> // O_RDWR 00011 #include "common.h" 00012 #include <ctype.h> 00013 #include "ros/ros.h" 00014 #include "std_msgs/String.h" 00015 #include <sstream> 00016 00017 00018 class pcan_receive 00019 { 00020 protected: 00021 HANDLE h; 00022 ros::NodeHandle n; 00023 ros::Publisher pcan_pub; 00024 std_msgs::String msg; 00025 std::stringstream ss; 00026 public: 00027 pcan_receive(); 00028 void hlpMsg(); 00029 void init(int argc, char **argv); 00030 void receive(); 00031 std_msgs::String TPCANRdMsgToString(TPCANRdMsg m); 00032 00033 00034 };