kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
Int64.h
Go to the documentation of this file.
1 #ifndef _ROS_std_msgs_Int64_h
2 #define _ROS_std_msgs_Int64_h
3 
4 #include <stdint.h>
5 #include <string.h>
6 #include <stdlib.h>
7 #include "ros/msg.h"
8 
9 namespace std_msgs
10 {
11 
12  class Int64 : public ros::Msg
13  {
14  public:
15  int64_t data;
16 
17  Int64():
18  data(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_data;
29  u_data.real = this->data;
30  *(outbuffer + offset + 0) = (u_data.base >> (8 * 0)) & 0xFF;
31  *(outbuffer + offset + 1) = (u_data.base >> (8 * 1)) & 0xFF;
32  *(outbuffer + offset + 2) = (u_data.base >> (8 * 2)) & 0xFF;
33  *(outbuffer + offset + 3) = (u_data.base >> (8 * 3)) & 0xFF;
34  *(outbuffer + offset + 4) = (u_data.base >> (8 * 4)) & 0xFF;
35  *(outbuffer + offset + 5) = (u_data.base >> (8 * 5)) & 0xFF;
36  *(outbuffer + offset + 6) = (u_data.base >> (8 * 6)) & 0xFF;
37  *(outbuffer + offset + 7) = (u_data.base >> (8 * 7)) & 0xFF;
38  offset += sizeof(this->data);
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_data;
49  u_data.base = 0;
50  u_data.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
51  u_data.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
52  u_data.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
53  u_data.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
54  u_data.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
55  u_data.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
56  u_data.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
57  u_data.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
58  this->data = u_data.real;
59  offset += sizeof(this->data);
60  return offset;
61  }
62 
63  const char * getType(){ return "std_msgs/Int64"; };
64  const char * getMD5(){ return "34add168574510e6e17f5d23ecc077ef"; };
65 
66  };
67 
68 }
69 #endif
const char * getType()
Definition: Int64.h:63
int64_t data
Definition: Int64.h:15
const char * getMD5()
Definition: Int64.h:64
virtual int deserialize(unsigned char *inbuffer)
Definition: Int64.h:42
virtual int serialize(unsigned char *outbuffer) const
Definition: Int64.h:22
Int64()
Definition: Int64.h:17
Definition: Int64.h:12
Definition: msg.h:43