kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
TestRequestGoal.h
Go to the documentation of this file.
1 #ifndef _ROS_actionlib_TestRequestGoal_h
2 #define _ROS_actionlib_TestRequestGoal_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 #include "ros/duration.h"
9 
10 namespace actionlib
11 {
12 
13  class TestRequestGoal : public ros::Msg
14  {
15  public:
18  const char* result_text;
19  int32_t the_result;
24  enum { TERMINATE_SUCCESS = 0 };
25  enum { TERMINATE_ABORTED = 1 };
26  enum { TERMINATE_REJECTED = 2 };
27  enum { TERMINATE_LOSE = 3 };
28  enum { TERMINATE_DROP = 4 };
29  enum { TERMINATE_EXCEPTION = 5 };
30 
33  ignore_cancel(0),
34  result_text(""),
35  the_result(0),
37  delay_accept(),
39  pause_status()
40  {
41  }
42 
43  virtual int serialize(unsigned char *outbuffer) const
44  {
45  int offset = 0;
46  union {
47  int32_t real;
48  uint32_t base;
49  } u_terminate_status;
50  u_terminate_status.real = this->terminate_status;
51  *(outbuffer + offset + 0) = (u_terminate_status.base >> (8 * 0)) & 0xFF;
52  *(outbuffer + offset + 1) = (u_terminate_status.base >> (8 * 1)) & 0xFF;
53  *(outbuffer + offset + 2) = (u_terminate_status.base >> (8 * 2)) & 0xFF;
54  *(outbuffer + offset + 3) = (u_terminate_status.base >> (8 * 3)) & 0xFF;
55  offset += sizeof(this->terminate_status);
56  union {
57  bool real;
58  uint8_t base;
59  } u_ignore_cancel;
60  u_ignore_cancel.real = this->ignore_cancel;
61  *(outbuffer + offset + 0) = (u_ignore_cancel.base >> (8 * 0)) & 0xFF;
62  offset += sizeof(this->ignore_cancel);
63  uint32_t length_result_text = strlen(this->result_text);
64  memcpy(outbuffer + offset, &length_result_text, sizeof(uint32_t));
65  offset += 4;
66  memcpy(outbuffer + offset, this->result_text, length_result_text);
67  offset += length_result_text;
68  union {
69  int32_t real;
70  uint32_t base;
71  } u_the_result;
72  u_the_result.real = this->the_result;
73  *(outbuffer + offset + 0) = (u_the_result.base >> (8 * 0)) & 0xFF;
74  *(outbuffer + offset + 1) = (u_the_result.base >> (8 * 1)) & 0xFF;
75  *(outbuffer + offset + 2) = (u_the_result.base >> (8 * 2)) & 0xFF;
76  *(outbuffer + offset + 3) = (u_the_result.base >> (8 * 3)) & 0xFF;
77  offset += sizeof(this->the_result);
78  union {
79  bool real;
80  uint8_t base;
81  } u_is_simple_client;
82  u_is_simple_client.real = this->is_simple_client;
83  *(outbuffer + offset + 0) = (u_is_simple_client.base >> (8 * 0)) & 0xFF;
84  offset += sizeof(this->is_simple_client);
85  *(outbuffer + offset + 0) = (this->delay_accept.sec >> (8 * 0)) & 0xFF;
86  *(outbuffer + offset + 1) = (this->delay_accept.sec >> (8 * 1)) & 0xFF;
87  *(outbuffer + offset + 2) = (this->delay_accept.sec >> (8 * 2)) & 0xFF;
88  *(outbuffer + offset + 3) = (this->delay_accept.sec >> (8 * 3)) & 0xFF;
89  offset += sizeof(this->delay_accept.sec);
90  *(outbuffer + offset + 0) = (this->delay_accept.nsec >> (8 * 0)) & 0xFF;
91  *(outbuffer + offset + 1) = (this->delay_accept.nsec >> (8 * 1)) & 0xFF;
92  *(outbuffer + offset + 2) = (this->delay_accept.nsec >> (8 * 2)) & 0xFF;
93  *(outbuffer + offset + 3) = (this->delay_accept.nsec >> (8 * 3)) & 0xFF;
94  offset += sizeof(this->delay_accept.nsec);
95  *(outbuffer + offset + 0) = (this->delay_terminate.sec >> (8 * 0)) & 0xFF;
96  *(outbuffer + offset + 1) = (this->delay_terminate.sec >> (8 * 1)) & 0xFF;
97  *(outbuffer + offset + 2) = (this->delay_terminate.sec >> (8 * 2)) & 0xFF;
98  *(outbuffer + offset + 3) = (this->delay_terminate.sec >> (8 * 3)) & 0xFF;
99  offset += sizeof(this->delay_terminate.sec);
100  *(outbuffer + offset + 0) = (this->delay_terminate.nsec >> (8 * 0)) & 0xFF;
101  *(outbuffer + offset + 1) = (this->delay_terminate.nsec >> (8 * 1)) & 0xFF;
102  *(outbuffer + offset + 2) = (this->delay_terminate.nsec >> (8 * 2)) & 0xFF;
103  *(outbuffer + offset + 3) = (this->delay_terminate.nsec >> (8 * 3)) & 0xFF;
104  offset += sizeof(this->delay_terminate.nsec);
105  *(outbuffer + offset + 0) = (this->pause_status.sec >> (8 * 0)) & 0xFF;
106  *(outbuffer + offset + 1) = (this->pause_status.sec >> (8 * 1)) & 0xFF;
107  *(outbuffer + offset + 2) = (this->pause_status.sec >> (8 * 2)) & 0xFF;
108  *(outbuffer + offset + 3) = (this->pause_status.sec >> (8 * 3)) & 0xFF;
109  offset += sizeof(this->pause_status.sec);
110  *(outbuffer + offset + 0) = (this->pause_status.nsec >> (8 * 0)) & 0xFF;
111  *(outbuffer + offset + 1) = (this->pause_status.nsec >> (8 * 1)) & 0xFF;
112  *(outbuffer + offset + 2) = (this->pause_status.nsec >> (8 * 2)) & 0xFF;
113  *(outbuffer + offset + 3) = (this->pause_status.nsec >> (8 * 3)) & 0xFF;
114  offset += sizeof(this->pause_status.nsec);
115  return offset;
116  }
117 
118  virtual int deserialize(unsigned char *inbuffer)
119  {
120  int offset = 0;
121  union {
122  int32_t real;
123  uint32_t base;
124  } u_terminate_status;
125  u_terminate_status.base = 0;
126  u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
127  u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
128  u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
129  u_terminate_status.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
130  this->terminate_status = u_terminate_status.real;
131  offset += sizeof(this->terminate_status);
132  union {
133  bool real;
134  uint8_t base;
135  } u_ignore_cancel;
136  u_ignore_cancel.base = 0;
137  u_ignore_cancel.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
138  this->ignore_cancel = u_ignore_cancel.real;
139  offset += sizeof(this->ignore_cancel);
140  uint32_t length_result_text;
141  memcpy(&length_result_text, (inbuffer + offset), sizeof(uint32_t));
142  offset += 4;
143  for(unsigned int k= offset; k< offset+length_result_text; ++k){
144  inbuffer[k-1]=inbuffer[k];
145  }
146  inbuffer[offset+length_result_text-1]=0;
147  this->result_text = (char *)(inbuffer + offset-1);
148  offset += length_result_text;
149  union {
150  int32_t real;
151  uint32_t base;
152  } u_the_result;
153  u_the_result.base = 0;
154  u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
155  u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
156  u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
157  u_the_result.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
158  this->the_result = u_the_result.real;
159  offset += sizeof(this->the_result);
160  union {
161  bool real;
162  uint8_t base;
163  } u_is_simple_client;
164  u_is_simple_client.base = 0;
165  u_is_simple_client.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
166  this->is_simple_client = u_is_simple_client.real;
167  offset += sizeof(this->is_simple_client);
168  this->delay_accept.sec = ((uint32_t) (*(inbuffer + offset)));
169  this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
170  this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
171  this->delay_accept.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
172  offset += sizeof(this->delay_accept.sec);
173  this->delay_accept.nsec = ((uint32_t) (*(inbuffer + offset)));
174  this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
175  this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
176  this->delay_accept.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
177  offset += sizeof(this->delay_accept.nsec);
178  this->delay_terminate.sec = ((uint32_t) (*(inbuffer + offset)));
179  this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
180  this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
181  this->delay_terminate.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
182  offset += sizeof(this->delay_terminate.sec);
183  this->delay_terminate.nsec = ((uint32_t) (*(inbuffer + offset)));
184  this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
185  this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
186  this->delay_terminate.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
187  offset += sizeof(this->delay_terminate.nsec);
188  this->pause_status.sec = ((uint32_t) (*(inbuffer + offset)));
189  this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
190  this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
191  this->pause_status.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
192  offset += sizeof(this->pause_status.sec);
193  this->pause_status.nsec = ((uint32_t) (*(inbuffer + offset)));
194  this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
195  this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
196  this->pause_status.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
197  offset += sizeof(this->pause_status.nsec);
198  return offset;
199  }
200 
201  const char * getType(){ return "actionlib/TestRequestGoal"; };
202  const char * getMD5(){ return "db5d00ba98302d6c6dd3737e9a03ceea"; };
203 
204  };
205 
206 }
207 #endif
ros::Duration delay_accept
Definition: TestRequestGoal.h:21
Definition: TestRequestGoal.h:26
bool ignore_cancel
Definition: TestRequestGoal.h:17
int32_t sec
Definition: duration.h:48
int32_t terminate_status
Definition: TestRequestGoal.h:16
int32_t the_result
Definition: TestRequestGoal.h:19
const char * getType()
Definition: TestRequestGoal.h:201
const char * getMD5()
Definition: TestRequestGoal.h:202
bool is_simple_client
Definition: TestRequestGoal.h:20
Definition: TestRequestGoal.h:25
ros::Duration pause_status
Definition: TestRequestGoal.h:23
Definition: TestRequestGoal.h:29
Definition: duration.h:45
Definition: TestRequestGoal.h:24
ros::Duration delay_terminate
Definition: TestRequestGoal.h:22
virtual int serialize(unsigned char *outbuffer) const
Definition: TestRequestGoal.h:43
int32_t nsec
Definition: duration.h:48
Definition: TestRequestGoal.h:13
Definition: msg.h:43
Definition: TestRequestGoal.h:27
virtual int deserialize(unsigned char *inbuffer)
Definition: TestRequestGoal.h:118
TestRequestGoal()
Definition: TestRequestGoal.h:31
Definition: TestRequestGoal.h:28
const char * result_text
Definition: TestRequestGoal.h:18