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