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       unsigned long x_offset;
00016       unsigned long y_offset;
00017       unsigned long height;
00018       unsigned long width;
00019       bool do_rectify;
00020 
00021     virtual int serialize(unsigned char *outbuffer)
00022     {
00023       int offset = 0;
00024       union {
00025         unsigned long real;
00026         unsigned long base;
00027       } u_x_offset;
00028       u_x_offset.real = this->x_offset;
00029       *(outbuffer + offset + 0) = (u_x_offset.base >> (8 * 0)) & 0xFF;
00030       *(outbuffer + offset + 1) = (u_x_offset.base >> (8 * 1)) & 0xFF;
00031       *(outbuffer + offset + 2) = (u_x_offset.base >> (8 * 2)) & 0xFF;
00032       *(outbuffer + offset + 3) = (u_x_offset.base >> (8 * 3)) & 0xFF;
00033       offset += sizeof(this->x_offset);
00034       union {
00035         unsigned long real;
00036         unsigned long base;
00037       } u_y_offset;
00038       u_y_offset.real = this->y_offset;
00039       *(outbuffer + offset + 0) = (u_y_offset.base >> (8 * 0)) & 0xFF;
00040       *(outbuffer + offset + 1) = (u_y_offset.base >> (8 * 1)) & 0xFF;
00041       *(outbuffer + offset + 2) = (u_y_offset.base >> (8 * 2)) & 0xFF;
00042       *(outbuffer + offset + 3) = (u_y_offset.base >> (8 * 3)) & 0xFF;
00043       offset += sizeof(this->y_offset);
00044       union {
00045         unsigned long real;
00046         unsigned long base;
00047       } u_height;
00048       u_height.real = this->height;
00049       *(outbuffer + offset + 0) = (u_height.base >> (8 * 0)) & 0xFF;
00050       *(outbuffer + offset + 1) = (u_height.base >> (8 * 1)) & 0xFF;
00051       *(outbuffer + offset + 2) = (u_height.base >> (8 * 2)) & 0xFF;
00052       *(outbuffer + offset + 3) = (u_height.base >> (8 * 3)) & 0xFF;
00053       offset += sizeof(this->height);
00054       union {
00055         unsigned long real;
00056         unsigned long base;
00057       } u_width;
00058       u_width.real = this->width;
00059       *(outbuffer + offset + 0) = (u_width.base >> (8 * 0)) & 0xFF;
00060       *(outbuffer + offset + 1) = (u_width.base >> (8 * 1)) & 0xFF;
00061       *(outbuffer + offset + 2) = (u_width.base >> (8 * 2)) & 0xFF;
00062       *(outbuffer + offset + 3) = (u_width.base >> (8 * 3)) & 0xFF;
00063       offset += sizeof(this->width);
00064       union {
00065         bool real;
00066         unsigned char base;
00067       } u_do_rectify;
00068       u_do_rectify.real = this->do_rectify;
00069       *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF;
00070       offset += sizeof(this->do_rectify);
00071       return offset;
00072     }
00073 
00074     virtual int deserialize(unsigned char *inbuffer)
00075     {
00076       int offset = 0;
00077       union {
00078         unsigned long real;
00079         unsigned long base;
00080       } u_x_offset;
00081       u_x_offset.base = 0;
00082       u_x_offset.base |= ((typeof(u_x_offset.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00083       u_x_offset.base |= ((typeof(u_x_offset.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00084       u_x_offset.base |= ((typeof(u_x_offset.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00085       u_x_offset.base |= ((typeof(u_x_offset.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00086       this->x_offset = u_x_offset.real;
00087       offset += sizeof(this->x_offset);
00088       union {
00089         unsigned long real;
00090         unsigned long base;
00091       } u_y_offset;
00092       u_y_offset.base = 0;
00093       u_y_offset.base |= ((typeof(u_y_offset.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00094       u_y_offset.base |= ((typeof(u_y_offset.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00095       u_y_offset.base |= ((typeof(u_y_offset.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00096       u_y_offset.base |= ((typeof(u_y_offset.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00097       this->y_offset = u_y_offset.real;
00098       offset += sizeof(this->y_offset);
00099       union {
00100         unsigned long real;
00101         unsigned long base;
00102       } u_height;
00103       u_height.base = 0;
00104       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00105       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00106       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00107       u_height.base |= ((typeof(u_height.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00108       this->height = u_height.real;
00109       offset += sizeof(this->height);
00110       union {
00111         unsigned long real;
00112         unsigned long base;
00113       } u_width;
00114       u_width.base = 0;
00115       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00116       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00117       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 2))) << (8 * 2);
00118       u_width.base |= ((typeof(u_width.base)) (*(inbuffer + offset + 3))) << (8 * 3);
00119       this->width = u_width.real;
00120       offset += sizeof(this->width);
00121       union {
00122         bool real;
00123         unsigned char base;
00124       } u_do_rectify;
00125       u_do_rectify.base = 0;
00126       u_do_rectify.base |= ((typeof(u_do_rectify.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00127       this->do_rectify = u_do_rectify.real;
00128       offset += sizeof(this->do_rectify);
00129      return offset;
00130     }
00131 
00132     const char * getType(){ return "sensor_msgs/RegionOfInterest"; };
00133 
00134   };
00135 
00136 }
00137 #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