kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
TestGoal.h
Go to the documentation of this file.
1 #ifndef _ROS_actionlib_TestGoal_h
2 #define _ROS_actionlib_TestGoal_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace actionlib
10 {
11 
12  class TestGoal : public ros::Msg
13  {
14  public:
15  int32_t goal;
16 
18  goal(0)
19  {
20  }
21 
22  virtual int serialize(unsigned char *outbuffer) const
23  {
24  int offset = 0;
25  union {
26  int32_t real;
27  uint32_t base;
28  } u_goal;
29  u_goal.real = this->goal;
30  *(outbuffer + offset + 0) = (u_goal.base >> (8 * 0)) & 0xFF;
31  *(outbuffer + offset + 1) = (u_goal.base >> (8 * 1)) & 0xFF;
32  *(outbuffer + offset + 2) = (u_goal.base >> (8 * 2)) & 0xFF;
33  *(outbuffer + offset + 3) = (u_goal.base >> (8 * 3)) & 0xFF;
34  offset += sizeof(this->goal);
35  return offset;
36  }
37 
38  virtual int deserialize(unsigned char *inbuffer)
39  {
40  int offset = 0;
41  union {
42  int32_t real;
43  uint32_t base;
44  } u_goal;
45  u_goal.base = 0;
46  u_goal.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
47  u_goal.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
48  u_goal.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
49  u_goal.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
50  this->goal = u_goal.real;
51  offset += sizeof(this->goal);
52  return offset;
53  }
54 
55  const char * getType(){ return "actionlib/TestGoal"; };
56  const char * getMD5(){ return "18df0149936b7aa95588e3862476ebde"; };
57 
58  };
59 
60 }
61 #endif
Definition: TestGoal.h:12
virtual int serialize(unsigned char *outbuffer) const
Definition: TestGoal.h:22
const char * getType()
Definition: TestGoal.h:55
int32_t goal
Definition: TestGoal.h:15
virtual int deserialize(unsigned char *inbuffer)
Definition: TestGoal.h:38
TestGoal()
Definition: TestGoal.h:17
const char * getMD5()
Definition: TestGoal.h:56
Definition: msg.h:43