kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
SetCameraInfo.h
Go to the documentation of this file.
1 #ifndef _ROS_SERVICE_SetCameraInfo_h
2 #define _ROS_SERVICE_SetCameraInfo_h
3 #include <stdint.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #include "ros/msg.h"
8 
9 namespace sensor_msgs
10 {
11 
12 static const char SETCAMERAINFO[] = "sensor_msgs/SetCameraInfo";
13 
15  {
16  public:
18 
20  camera_info()
21  {
22  }
23 
24  virtual int serialize(unsigned char *outbuffer) const
25  {
26  int offset = 0;
27  offset += this->camera_info.serialize(outbuffer + offset);
28  return offset;
29  }
30 
31  virtual int deserialize(unsigned char *inbuffer)
32  {
33  int offset = 0;
34  offset += this->camera_info.deserialize(inbuffer + offset);
35  return offset;
36  }
37 
38  const char * getType(){ return SETCAMERAINFO; };
39  const char * getMD5(){ return "ee34be01fdeee563d0d99cd594d5581d"; };
40 
41  };
42 
44  {
45  public:
46  bool success;
47  const char* status_message;
48 
50  success(0),
51  status_message("")
52  {
53  }
54 
55  virtual int serialize(unsigned char *outbuffer) const
56  {
57  int offset = 0;
58  union {
59  bool real;
60  uint8_t base;
61  } u_success;
62  u_success.real = this->success;
63  *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
64  offset += sizeof(this->success);
65  uint32_t length_status_message = strlen(this->status_message);
66  memcpy(outbuffer + offset, &length_status_message, sizeof(uint32_t));
67  offset += 4;
68  memcpy(outbuffer + offset, this->status_message, length_status_message);
69  offset += length_status_message;
70  return offset;
71  }
72 
73  virtual int deserialize(unsigned char *inbuffer)
74  {
75  int offset = 0;
76  union {
77  bool real;
78  uint8_t base;
79  } u_success;
80  u_success.base = 0;
81  u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
82  this->success = u_success.real;
83  offset += sizeof(this->success);
84  uint32_t length_status_message;
85  memcpy(&length_status_message, (inbuffer + offset), sizeof(uint32_t));
86  offset += 4;
87  for(unsigned int k= offset; k< offset+length_status_message; ++k){
88  inbuffer[k-1]=inbuffer[k];
89  }
90  inbuffer[offset+length_status_message-1]=0;
91  this->status_message = (char *)(inbuffer + offset-1);
92  offset += length_status_message;
93  return offset;
94  }
95 
96  const char * getType(){ return SETCAMERAINFO; };
97  const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; };
98 
99  };
100 
102  public:
105  };
106 
107 }
108 #endif
Definition: SetCameraInfo.h:101
Definition: CameraInfo.h:14
SetCameraInfoRequest()
Definition: SetCameraInfo.h:19
virtual int deserialize(unsigned char *inbuffer)
Definition: CameraInfo.h:95
bool success
Definition: SetCameraInfo.h:46
Definition: SetCameraInfo.h:14
virtual int serialize(unsigned char *outbuffer) const
Definition: SetCameraInfo.h:24
const char * getMD5()
Definition: SetCameraInfo.h:39
static const char SETCAMERAINFO[]
Definition: SetCameraInfo.h:12
virtual int serialize(unsigned char *outbuffer) const
Definition: CameraInfo.h:46
sensor_msgs::CameraInfo camera_info
Definition: SetCameraInfo.h:17
SetCameraInfoRequest Request
Definition: SetCameraInfo.h:103
virtual int deserialize(unsigned char *inbuffer)
Definition: SetCameraInfo.h:73
const char * status_message
Definition: SetCameraInfo.h:47
const char * getMD5()
Definition: SetCameraInfo.h:97
const char * getType()
Definition: SetCameraInfo.h:96
Definition: SetCameraInfo.h:43
const char * getType()
Definition: SetCameraInfo.h:38
SetCameraInfoResponse Response
Definition: SetCameraInfo.h:104
virtual int serialize(unsigned char *outbuffer) const
Definition: SetCameraInfo.h:55
SetCameraInfoResponse()
Definition: SetCameraInfo.h:49
Definition: msg.h:43
virtual int deserialize(unsigned char *inbuffer)
Definition: SetCameraInfo.h:31