ROS Serial library for Mbed platforms for ROS Indigo Igloo. Check http://wiki.ros.org/rosserial_mbed/ for more information
Dependents: rosserial_mbed_hello_world_publisher rtos_base_control rosserial_mbed_F64MA ROS-RTOS ... more
InteractiveMarkerPose.h
00001 #ifndef _ROS_visualization_msgs_InteractiveMarkerPose_h 00002 #define _ROS_visualization_msgs_InteractiveMarkerPose_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 #include "std_msgs/Header.h" 00009 #include "geometry_msgs/Pose.h" 00010 00011 namespace visualization_msgs 00012 { 00013 00014 class InteractiveMarkerPose : public ros::Msg 00015 { 00016 public: 00017 std_msgs::Header header; 00018 geometry_msgs::Pose pose; 00019 const char* name; 00020 00021 InteractiveMarkerPose(): 00022 header(), 00023 pose(), 00024 name("") 00025 { 00026 } 00027 00028 virtual int serialize(unsigned char *outbuffer) const 00029 { 00030 int offset = 0; 00031 offset += this->header.serialize(outbuffer + offset); 00032 offset += this->pose.serialize(outbuffer + offset); 00033 uint32_t length_name = strlen(this->name); 00034 memcpy(outbuffer + offset, &length_name, sizeof(uint32_t)); 00035 offset += 4; 00036 memcpy(outbuffer + offset, this->name, length_name); 00037 offset += length_name; 00038 return offset; 00039 } 00040 00041 virtual int deserialize(unsigned char *inbuffer) 00042 { 00043 int offset = 0; 00044 offset += this->header.deserialize(inbuffer + offset); 00045 offset += this->pose.deserialize(inbuffer + offset); 00046 uint32_t length_name; 00047 memcpy(&length_name, (inbuffer + offset), sizeof(uint32_t)); 00048 offset += 4; 00049 for(unsigned int k= offset; k< offset+length_name; ++k){ 00050 inbuffer[k-1]=inbuffer[k]; 00051 } 00052 inbuffer[offset+length_name-1]=0; 00053 this->name = (char *)(inbuffer + offset-1); 00054 offset += length_name; 00055 return offset; 00056 } 00057 00058 const char * getType(){ return "visualization_msgs/InteractiveMarkerPose"; }; 00059 const char * getMD5(){ return "a6e6833209a196a38d798dadb02c81f8"; }; 00060 00061 }; 00062 00063 } 00064 #endif
Generated on Tue Jul 12 2022 18:39:39 by 1.7.2