kitt_platform
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros
MuxDelete.h
Go to the documentation of this file.
1 #ifndef _ROS_SERVICE_MuxDelete_h
2 #define _ROS_SERVICE_MuxDelete_h
3 #include <stdint.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #include "ros/msg.h"
7 
8 namespace topic_tools
9 {
10 
11 static const char MUXDELETE[] = "topic_tools/MuxDelete";
12 
13  class MuxDeleteRequest : public ros::Msg
14  {
15  public:
16  const char* topic;
17 
19  topic("")
20  {
21  }
22 
23  virtual int serialize(unsigned char *outbuffer) const
24  {
25  int offset = 0;
26  uint32_t length_topic = strlen(this->topic);
27  memcpy(outbuffer + offset, &length_topic, sizeof(uint32_t));
28  offset += 4;
29  memcpy(outbuffer + offset, this->topic, length_topic);
30  offset += length_topic;
31  return offset;
32  }
33 
34  virtual int deserialize(unsigned char *inbuffer)
35  {
36  int offset = 0;
37  uint32_t length_topic;
38  memcpy(&length_topic, (inbuffer + offset), sizeof(uint32_t));
39  offset += 4;
40  for(unsigned int k= offset; k< offset+length_topic; ++k){
41  inbuffer[k-1]=inbuffer[k];
42  }
43  inbuffer[offset+length_topic-1]=0;
44  this->topic = (char *)(inbuffer + offset-1);
45  offset += length_topic;
46  return offset;
47  }
48 
49  const char * getType(){ return MUXDELETE; };
50  const char * getMD5(){ return "d8f94bae31b356b24d0427f80426d0c3"; };
51 
52  };
53 
54  class MuxDeleteResponse : public ros::Msg
55  {
56  public:
57 
59  {
60  }
61 
62  virtual int serialize(unsigned char *outbuffer) const
63  {
64  int offset = 0;
65  return offset;
66  }
67 
68  virtual int deserialize(unsigned char *inbuffer)
69  {
70  int offset = 0;
71  return offset;
72  }
73 
74  const char * getType(){ return MUXDELETE; };
75  const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
76 
77  };
78 
79  class MuxDelete {
80  public:
83  };
84 
85 }
86 #endif
Definition: MuxDelete.h:79
MuxDeleteResponse()
Definition: MuxDelete.h:58
MuxDeleteRequest Request
Definition: MuxDelete.h:81
const char * getType()
Definition: MuxDelete.h:49
Definition: MuxDelete.h:54
const char * getType()
Definition: MuxDelete.h:74
const char * topic
Definition: MuxDelete.h:16
Definition: MuxDelete.h:13
const char * getMD5()
Definition: MuxDelete.h:75
const char * getMD5()
Definition: MuxDelete.h:50
virtual int serialize(unsigned char *outbuffer) const
Definition: MuxDelete.h:62
virtual int deserialize(unsigned char *inbuffer)
Definition: MuxDelete.h:68
virtual int serialize(unsigned char *outbuffer) const
Definition: MuxDelete.h:23
static const char MUXDELETE[]
Definition: MuxDelete.h:11
MuxDeleteResponse Response
Definition: MuxDelete.h:82
Definition: msg.h:43
MuxDeleteRequest()
Definition: MuxDelete.h:18
virtual int deserialize(unsigned char *inbuffer)
Definition: MuxDelete.h:34