kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
RegionOfInterest.h
Go to the documentation of this file.
1 #ifndef _ROS_sensor_msgs_RegionOfInterest_h
2 #define _ROS_sensor_msgs_RegionOfInterest_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace sensor_msgs
10 {
11 
12  class RegionOfInterest : public ros::Msg
13  {
14  public:
15  uint32_t x_offset;
16  uint32_t y_offset;
17  uint32_t height;
18  uint32_t width;
19  bool do_rectify;
20 
22  x_offset(0),
23  y_offset(0),
24  height(0),
25  width(0),
26  do_rectify(0)
27  {
28  }
29 
30  virtual int serialize(unsigned char *outbuffer) const
31  {
32  int offset = 0;
33  *(outbuffer + offset + 0) = (this->x_offset >> (8 * 0)) & 0xFF;
34  *(outbuffer + offset + 1) = (this->x_offset >> (8 * 1)) & 0xFF;
35  *(outbuffer + offset + 2) = (this->x_offset >> (8 * 2)) & 0xFF;
36  *(outbuffer + offset + 3) = (this->x_offset >> (8 * 3)) & 0xFF;
37  offset += sizeof(this->x_offset);
38  *(outbuffer + offset + 0) = (this->y_offset >> (8 * 0)) & 0xFF;
39  *(outbuffer + offset + 1) = (this->y_offset >> (8 * 1)) & 0xFF;
40  *(outbuffer + offset + 2) = (this->y_offset >> (8 * 2)) & 0xFF;
41  *(outbuffer + offset + 3) = (this->y_offset >> (8 * 3)) & 0xFF;
42  offset += sizeof(this->y_offset);
43  *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF;
44  *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF;
45  *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF;
46  *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF;
47  offset += sizeof(this->height);
48  *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF;
49  *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF;
50  *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF;
51  *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF;
52  offset += sizeof(this->width);
53  union {
54  bool real;
55  uint8_t base;
56  } u_do_rectify;
57  u_do_rectify.real = this->do_rectify;
58  *(outbuffer + offset + 0) = (u_do_rectify.base >> (8 * 0)) & 0xFF;
59  offset += sizeof(this->do_rectify);
60  return offset;
61  }
62 
63  virtual int deserialize(unsigned char *inbuffer)
64  {
65  int offset = 0;
66  this->x_offset = ((uint32_t) (*(inbuffer + offset)));
67  this->x_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
68  this->x_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
69  this->x_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
70  offset += sizeof(this->x_offset);
71  this->y_offset = ((uint32_t) (*(inbuffer + offset)));
72  this->y_offset |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
73  this->y_offset |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
74  this->y_offset |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
75  offset += sizeof(this->y_offset);
76  this->height = ((uint32_t) (*(inbuffer + offset)));
77  this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
78  this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
79  this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
80  offset += sizeof(this->height);
81  this->width = ((uint32_t) (*(inbuffer + offset)));
82  this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
83  this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
84  this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
85  offset += sizeof(this->width);
86  union {
87  bool real;
88  uint8_t base;
89  } u_do_rectify;
90  u_do_rectify.base = 0;
91  u_do_rectify.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
92  this->do_rectify = u_do_rectify.real;
93  offset += sizeof(this->do_rectify);
94  return offset;
95  }
96 
97  const char * getType(){ return "sensor_msgs/RegionOfInterest"; };
98  const char * getMD5(){ return "bdb633039d588fcccb441a4d43ccfe09"; };
99 
100  };
101 
102 }
103 #endif
const char * getMD5()
Definition: RegionOfInterest.h:98
virtual int deserialize(unsigned char *inbuffer)
Definition: RegionOfInterest.h:63
uint32_t width
Definition: RegionOfInterest.h:18
const char * getType()
Definition: RegionOfInterest.h:97
Definition: RegionOfInterest.h:12
uint32_t height
Definition: RegionOfInterest.h:17
bool do_rectify
Definition: RegionOfInterest.h:19
virtual int serialize(unsigned char *outbuffer) const
Definition: RegionOfInterest.h:30
uint32_t y_offset
Definition: RegionOfInterest.h:16
Definition: msg.h:43
RegionOfInterest()
Definition: RegionOfInterest.h:21
uint32_t x_offset
Definition: RegionOfInterest.h:15