TransformStamped.h
Go to the documentation of this file.
00001 #ifndef _ROS_geometry_msgs_TransformStamped_h
00002 #define _ROS_geometry_msgs_TransformStamped_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/Transform.h"
00010 
00011 namespace geometry_msgs
00012 {
00013 
00014   class TransformStamped : public ros::Msg
00015   {
00016     public:
00017       std_msgs::Header header;
00018       char * child_frame_id;
00019       geometry_msgs::Transform transform;
00020 
00021     virtual int serialize(unsigned char *outbuffer) const
00022     {
00023       int offset = 0;
00024       offset += this->header.serialize(outbuffer + offset);
00025       uint32_t length_child_frame_id = strlen( (const char*) this->child_frame_id);
00026       memcpy(outbuffer + offset, &length_child_frame_id, sizeof(uint32_t));
00027       offset += 4;
00028       memcpy(outbuffer + offset, this->child_frame_id, length_child_frame_id);
00029       offset += length_child_frame_id;
00030       offset += this->transform.serialize(outbuffer + offset);
00031       return offset;
00032     }
00033 
00034     virtual int deserialize(unsigned char *inbuffer)
00035     {
00036       int offset = 0;
00037       offset += this->header.deserialize(inbuffer + offset);
00038       uint32_t length_child_frame_id;
00039       memcpy(&length_child_frame_id, (inbuffer + offset), sizeof(uint32_t));
00040       offset += 4;
00041       for(unsigned int k= offset; k< offset+length_child_frame_id; ++k){
00042           inbuffer[k-1]=inbuffer[k];
00043       }
00044       inbuffer[offset+length_child_frame_id-1]=0;
00045       this->child_frame_id = (char *)(inbuffer + offset-1);
00046       offset += length_child_frame_id;
00047       offset += this->transform.deserialize(inbuffer + offset);
00048      return offset;
00049     }
00050 
00051     const char * getType(){ return "geometry_msgs/TransformStamped"; };
00052     const char * getMD5(){ return "b5764a33bfeb3588febc2682852579b0"; };
00053 
00054   };
00055 
00056 }
00057 #endif


lizi_arduino
Author(s): RoboTiCan
autogenerated on Wed Aug 26 2015 12:24:23