MapMetaData.h
Go to the documentation of this file.
00001 #ifndef ros_nav_msgs_MapMetaData_h
00002 #define ros_nav_msgs_MapMetaData_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "../ros/msg.h"
00008 #include "ros/time.h"
00009 #include "geometry_msgs/Pose.h"
00010 
00011 namespace nav_msgs
00012 {
00013 
00014   class MapMetaData : public ros::Msg
00015   {
00016     public:
00017       ros::Time map_load_time;
00018       float resolution;
00019       unsigned long width;
00020       unsigned long height;
00021       geometry_msgs::Pose origin;
00022 
00023     virtual int serialize(unsigned char *outbuffer)
00024     {
00025       int offset = 0;
00026       union {
00027         unsigned long real;
00028         unsigned long base;
00029       } u_sec;
00030       u_sec.real = this->map_load_time.sec;
00031       *(outbuffer + offset + 0) = (u_sec.base >> (8 * 0)) & 0xFF;
00032       *(outbuffer + offset + 1) = (u_sec.base >> (8 * 1)) & 0xFF;
00033       *(outbuffer + offset + 2) = (u_sec.base >> (8 * 2)) & 0xFF;
00034       *(outbuffer + offset + 3) = (u_sec.base >> (8 * 3)) & 0xFF;
00035       offset += sizeof(this->map_load_time.sec);
00036       union {
00037         unsigned long real;
00038         unsigned long base;
00039       } u_nsec;
00040       u_nsec.real = this->map_load_time.nsec;
00041       *(outbuffer + offset + 0) = (u_nsec.base >> (8 * 0)) & 0xFF;
00042       *(outbuffer + offset + 1) = (u_nsec.base >> (8 * 1)) & 0xFF;
00043       *(outbuffer + offset + 2) = (u_nsec.base >> (8 * 2)) & 0xFF;
00044       *(outbuffer + offset + 3) = (u_nsec.base >> (8 * 3)) & 0xFF;
00045       offset += sizeof(this->map_load_time.nsec);
00046       union {
00047         float real;
00048         unsigned long base;
00049       } u_resolution;
00050       u_resolution.real = this->resolution;
00051       *(outbuffer + offset + 0) = (u_resolution.base >> (8 * 0)) & 0xFF;
00052       *(outbuffer + offset + 1) = (u_resolution.base >> (8 * 1)) & 0xFF;
00053       *(outbuffer + offset + 2) = (u_resolution.base >> (8 * 2)) & 0xFF;
00054       *(outbuffer + offset + 3) = (u_resolution.base >> (8 * 3)) & 0xFF;
00055       offset += sizeof(this->resolution);
00056       union {
00057         unsigned long real;
00058         unsigned long base;
00059       } u_width;
00060       u_width.real = this->width;
00061       *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF;
00062       *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF;
00063       *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF;
00064       *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF;
00065       offset += sizeof(this->width);
00066       union {
00067         unsigned long real;
00068         unsigned long base;
00069       } u_height;
00070       u_height.real = this->height;
00071       *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF;
00072       *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF;
00073       *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF;
00074       *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF;
00075       offset += sizeof(this->height);
00076       offset += this->origin.serialize(outbuffer + offset);
00077       return offset;
00078     }
00079 
00080     virtual int deserialize(unsigned char *inbuffer)
00081     {
00082       int offset = 0;
00083       union {
00084         unsigned long real;
00085         unsigned long base;
00086       } u_sec;
00087       u_sec.base = 0;
00088       u_sec.base |= ((typeof(u_sec.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00089       u_sec.base |= ((typeof(u_sec.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00090       u_sec.base |= ((typeof(u_sec.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00091       u_sec.base |= ((typeof(u_sec.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00092       this->map_load_time.sec = u_sec.real;
00093       offset += sizeof(this->map_load_time.sec);
00094       union {
00095         unsigned long real;
00096         unsigned long base;
00097       } u_nsec;
00098       u_nsec.base = 0;
00099       u_nsec.base |= ((typeof(u_nsec.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00100       u_nsec.base |= ((typeof(u_nsec.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00101       u_nsec.base |= ((typeof(u_nsec.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00102       u_nsec.base |= ((typeof(u_nsec.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00103       this->map_load_time.nsec = u_nsec.real;
00104       offset += sizeof(this->map_load_time.nsec);
00105       union {
00106         float real;
00107         unsigned long base;
00108       } u_resolution;
00109       u_resolution.base = 0;
00110       u_resolution.base |= ((typeof(u_resolution.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00111       u_resolution.base |= ((typeof(u_resolution.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00112       u_resolution.base |= ((typeof(u_resolution.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00113       u_resolution.base |= ((typeof(u_resolution.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00114       this->resolution = u_resolution.real;
00115       offset += sizeof(this->resolution);
00116       union {
00117         unsigned long real;
00118         unsigned long base;
00119       } u_width;
00120       u_width.base = 0;
00121       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00122       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00123       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00124       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00125       this->width = u_width.real;
00126       offset += sizeof(this->width);
00127       union {
00128         unsigned long real;
00129         unsigned long base;
00130       } u_height;
00131       u_height.base = 0;
00132       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00133       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00134       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00135       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00136       this->height = u_height.real;
00137       offset += sizeof(this->height);
00138       offset += this->origin.deserialize(inbuffer + offset);
00139      return offset;
00140     }
00141 
00142     const char * getType(){ return "nav_msgs/MapMetaData"; };
00143 
00144   };
00145 
00146 }
00147 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


traxbot_robot
Author(s): André Gonçalves Araújo
autogenerated on Fri Feb 1 2013 13:21:12