kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
TwoIntsResult.h
Go to the documentation of this file.
1 #ifndef _ROS_actionlib_TwoIntsResult_h
2 #define _ROS_actionlib_TwoIntsResult_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 TwoIntsResult : public ros::Msg
13  {
14  public:
15  int64_t sum;
16 
18  sum(0)
19  {
20  }
21 
22  virtual int serialize(unsigned char *outbuffer) const
23  {
24  int offset = 0;
25  union {
26  int64_t real;
27  uint64_t base;
28  } u_sum;
29  u_sum.real = this->sum;
30  *(outbuffer + offset + 0) = (u_sum.base >> (8 * 0)) & 0xFF;
31  *(outbuffer + offset + 1) = (u_sum.base >> (8 * 1)) & 0xFF;
32  *(outbuffer + offset + 2) = (u_sum.base >> (8 * 2)) & 0xFF;
33  *(outbuffer + offset + 3) = (u_sum.base >> (8 * 3)) & 0xFF;
34  *(outbuffer + offset + 4) = (u_sum.base >> (8 * 4)) & 0xFF;
35  *(outbuffer + offset + 5) = (u_sum.base >> (8 * 5)) & 0xFF;
36  *(outbuffer + offset + 6) = (u_sum.base >> (8 * 6)) & 0xFF;
37  *(outbuffer + offset + 7) = (u_sum.base >> (8 * 7)) & 0xFF;
38  offset += sizeof(this->sum);
39  return offset;
40  }
41 
42  virtual int deserialize(unsigned char *inbuffer)
43  {
44  int offset = 0;
45  union {
46  int64_t real;
47  uint64_t base;
48  } u_sum;
49  u_sum.base = 0;
50  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
51  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
52  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
53  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
54  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
55  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
56  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
57  u_sum.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
58  this->sum = u_sum.real;
59  offset += sizeof(this->sum);
60  return offset;
61  }
62 
63  const char * getType(){ return "actionlib/TwoIntsResult"; };
64  const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; };
65 
66  };
67 
68 }
69 #endif
const char * getMD5()
Definition: TwoIntsResult.h:64
int64_t sum
Definition: TwoIntsResult.h:15
virtual int deserialize(unsigned char *inbuffer)
Definition: TwoIntsResult.h:42
Definition: TwoIntsResult.h:12
const char * getType()
Definition: TwoIntsResult.h:63
virtual int serialize(unsigned char *outbuffer) const
Definition: TwoIntsResult.h:22
TwoIntsResult()
Definition: TwoIntsResult.h:17
Definition: msg.h:43