Working towards recieving twists

Dependencies:   BufferedSerial

Fork of ros_lib_kinetic by Gary Servin

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SetMapProjections.h Source File

SetMapProjections.h

00001 #ifndef _ROS_SERVICE_SetMapProjections_h
00002 #define _ROS_SERVICE_SetMapProjections_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 #include "map_msgs/ProjectedMapInfo.h"
00008 
00009 namespace map_msgs
00010 {
00011 
00012 static const char SETMAPPROJECTIONS[] = "map_msgs/SetMapProjections";
00013 
00014   class SetMapProjectionsRequest : public ros::Msg
00015   {
00016     public:
00017 
00018     SetMapProjectionsRequest()
00019     {
00020     }
00021 
00022     virtual int serialize(unsigned char *outbuffer) const
00023     {
00024       int offset = 0;
00025       return offset;
00026     }
00027 
00028     virtual int deserialize(unsigned char *inbuffer)
00029     {
00030       int offset = 0;
00031      return offset;
00032     }
00033 
00034     const char * getType(){ return SETMAPPROJECTIONS; };
00035     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00036 
00037   };
00038 
00039   class SetMapProjectionsResponse : public ros::Msg
00040   {
00041     public:
00042       uint32_t projected_maps_info_length;
00043       typedef map_msgs::ProjectedMapInfo _projected_maps_info_type;
00044       _projected_maps_info_type st_projected_maps_info;
00045       _projected_maps_info_type * projected_maps_info;
00046 
00047     SetMapProjectionsResponse():
00048       projected_maps_info_length(0), projected_maps_info(NULL)
00049     {
00050     }
00051 
00052     virtual int serialize(unsigned char *outbuffer) const
00053     {
00054       int offset = 0;
00055       *(outbuffer + offset + 0) = (this->projected_maps_info_length >> (8 * 0)) & 0xFF;
00056       *(outbuffer + offset + 1) = (this->projected_maps_info_length >> (8 * 1)) & 0xFF;
00057       *(outbuffer + offset + 2) = (this->projected_maps_info_length >> (8 * 2)) & 0xFF;
00058       *(outbuffer + offset + 3) = (this->projected_maps_info_length >> (8 * 3)) & 0xFF;
00059       offset += sizeof(this->projected_maps_info_length);
00060       for( uint32_t i = 0; i < projected_maps_info_length; i++){
00061       offset += this->projected_maps_info[i].serialize(outbuffer + offset);
00062       }
00063       return offset;
00064     }
00065 
00066     virtual int deserialize(unsigned char *inbuffer)
00067     {
00068       int offset = 0;
00069       uint32_t projected_maps_info_lengthT = ((uint32_t) (*(inbuffer + offset))); 
00070       projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 
00071       projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 
00072       projected_maps_info_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 
00073       offset += sizeof(this->projected_maps_info_length);
00074       if(projected_maps_info_lengthT > projected_maps_info_length)
00075         this->projected_maps_info = (map_msgs::ProjectedMapInfo*)realloc(this->projected_maps_info, projected_maps_info_lengthT * sizeof(map_msgs::ProjectedMapInfo));
00076       projected_maps_info_length = projected_maps_info_lengthT;
00077       for( uint32_t i = 0; i < projected_maps_info_length; i++){
00078       offset += this->st_projected_maps_info.deserialize(inbuffer + offset);
00079         memcpy( &(this->projected_maps_info[i]), &(this->st_projected_maps_info), sizeof(map_msgs::ProjectedMapInfo));
00080       }
00081      return offset;
00082     }
00083 
00084     const char * getType(){ return SETMAPPROJECTIONS; };
00085     const char * getMD5(){ return "d7980a33202421c8cd74565e57a4d229"; };
00086 
00087   };
00088 
00089   class SetMapProjections {
00090     public:
00091     typedef SetMapProjectionsRequest Request;
00092     typedef SetMapProjectionsResponse Response;
00093   };
00094 
00095 }
00096 #endif