RegionOfInterest.h
Go to the documentation of this file.
00001 #ifndef _ROS_sensor_msgs_RegionOfInterest_h
00002 #define _ROS_sensor_msgs_RegionOfInterest_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace sensor_msgs
00010 {
00011 
00012   class RegionOfInterest : public ros::Msg
00013   {
00014     public:
00015       uint32_t x_offset;
00016       uint32_t y_offset;
00017       uint32_t height;
00018       uint32_t width;
00019       bool do_rectify;
00020 
00021     virtual int serialize(unsigned char *outbuffer) const
00022     {
00023       int offset = 0;
00024       *(outbuffer + offset + 0) = (this->x_offset >> (8 * 0)) & 0xFF;
00025       *(outbuffer + offset + 1) = (this->x_offset >> (8 * 1)) & 0xFF;
00026       *(outbuffer + offset + 2) = (this->x_offset >> (8 * 2)) & 0xFF;
00027       *(outbuffer + offset + 3) = (this->x_offset >> (8 * 3)) & 0xFF;
00028       offset += sizeof(this->x_offset);
00029       *(outbuffer + offset + 0) = (this->y_offset >> (8 * 0)) & 0xFF;
00030       *(outbuffer + offset + 1) = (this->y_offset >> (8 * 1)) & 0xFF;
00031       *(outbuffer + offset + 2) = (this->y_offset >> (8 * 2)) & 0xFF;
00032       *(outbuffer + offset + 3) = (this->y_offset >> (8 * 3)) & 0xFF;
00033       offset += sizeof(this->y_offset);
00034       *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF;
00035       *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF;
00036       *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF;
00037       *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF;
00038       offset += sizeof(this->height);
00039       *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF;
00040       *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF;
00041       *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF;
00042       *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF;
00043       offset += sizeof(this->width);
00044       union {
00045         bool real;
00046         uint8_t base;
00047       } u_do_rectify;
00048       u_do_rectify.real = this->do_rectify;
00049       *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF;
00050       offset += sizeof(this->do_rectify);
00051       return offset;
00052     }
00053 
00054     virtual int deserialize(unsigned char *inbuffer)
00055     {
00056       int offset = 0;
00057       this->x_offset =  ((uint32_t) (*(inbuffer + offset)));
00058       this->x_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00059       this->x_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00060       this->x_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00061       offset += sizeof(this->x_offset);
00062       this->y_offset =  ((uint32_t) (*(inbuffer + offset)));
00063       this->y_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00064       this->y_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00065       this->y_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00066       offset += sizeof(this->y_offset);
00067       this->height =  ((uint32_t) (*(inbuffer + offset)));
00068       this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00069       this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00070       this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00071       offset += sizeof(this->height);
00072       this->width =  ((uint32_t) (*(inbuffer + offset)));
00073       this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00074       this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00075       this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00076       offset += sizeof(this->width);
00077       union {
00078         bool real;
00079         uint8_t base;
00080       } u_do_rectify;
00081       u_do_rectify.base = 0;
00082       u_do_rectify.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00083       this->do_rectify = u_do_rectify.real;
00084       offset += sizeof(this->do_rectify);
00085      return offset;
00086     }
00087 
00088     const char * getType(){ return "sensor_msgs/RegionOfInterest"; };
00089     const char * getMD5(){ return "bdb633039d588fcccb441a4d43ccfe09"; };
00090 
00091   };
00092 
00093 }
00094 #endif


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