Table.h
Go to the documentation of this file.
00001 #ifndef _ROS_object_recognition_msgs_Table_h
00002 #define _ROS_object_recognition_msgs_Table_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 #include "geometry_msgs/Point.h"
00011 
00012 namespace object_recognition_msgs
00013 {
00014 
00015   class Table : public ros::Msg
00016   {
00017     public:
00018       std_msgs::Header header;
00019       geometry_msgs::Pose pose;
00020       uint8_t convex_hull_length;
00021       geometry_msgs::Point st_convex_hull;
00022       geometry_msgs::Point * convex_hull;
00023 
00024     virtual int serialize(unsigned char *outbuffer) const
00025     {
00026       int offset = 0;
00027       offset += this->header.serialize(outbuffer + offset);
00028       offset += this->pose.serialize(outbuffer + offset);
00029       *(outbuffer + offset++) = convex_hull_length;
00030       *(outbuffer + offset++) = 0;
00031       *(outbuffer + offset++) = 0;
00032       *(outbuffer + offset++) = 0;
00033       for( uint8_t i = 0; i < convex_hull_length; i++){
00034       offset += this->convex_hull[i].serialize(outbuffer + offset);
00035       }
00036       return offset;
00037     }
00038 
00039     virtual int deserialize(unsigned char *inbuffer)
00040     {
00041       int offset = 0;
00042       offset += this->header.deserialize(inbuffer + offset);
00043       offset += this->pose.deserialize(inbuffer + offset);
00044       uint8_t convex_hull_lengthT = *(inbuffer + offset++);
00045       if(convex_hull_lengthT > convex_hull_length)
00046         this->convex_hull = (geometry_msgs::Point*)realloc(this->convex_hull, convex_hull_lengthT * sizeof(geometry_msgs::Point));
00047       offset += 3;
00048       convex_hull_length = convex_hull_lengthT;
00049       for( uint8_t i = 0; i < convex_hull_length; i++){
00050       offset += this->st_convex_hull.deserialize(inbuffer + offset);
00051         memcpy( &(this->convex_hull[i]), &(this->st_convex_hull), sizeof(geometry_msgs::Point));
00052       }
00053      return offset;
00054     }
00055 
00056     const char * getType(){ return "object_recognition_msgs/Table"; };
00057     const char * getMD5(){ return "39efebc7d51e44bd2d72f2df6c7823a2"; };
00058 
00059   };
00060 
00061 }
00062 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:56