Working towards recieving twists
Fork of ros_lib_kinetic by
Embed:
(wiki syntax)
Show/hide line numbers
RequestMessageInfo.h
00001 #ifndef _ROS_SERVICE_RequestMessageInfo_h 00002 #define _ROS_SERVICE_RequestMessageInfo_h 00003 #include <stdint.h> 00004 #include <string.h> 00005 #include <stdlib.h> 00006 #include "ros/msg.h" 00007 00008 namespace rosserial_msgs 00009 { 00010 00011 static const char REQUESTMESSAGEINFO[] = "rosserial_msgs/RequestMessageInfo"; 00012 00013 class RequestMessageInfoRequest : public ros::Msg 00014 { 00015 public: 00016 typedef const char* _type_type; 00017 _type_type type; 00018 00019 RequestMessageInfoRequest(): 00020 type("") 00021 { 00022 } 00023 00024 virtual int serialize(unsigned char *outbuffer) const 00025 { 00026 int offset = 0; 00027 uint32_t length_type = strlen(this->type); 00028 varToArr(outbuffer + offset, length_type); 00029 offset += 4; 00030 memcpy(outbuffer + offset, this->type, length_type); 00031 offset += length_type; 00032 return offset; 00033 } 00034 00035 virtual int deserialize(unsigned char *inbuffer) 00036 { 00037 int offset = 0; 00038 uint32_t length_type; 00039 arrToVar(length_type, (inbuffer + offset)); 00040 offset += 4; 00041 for(unsigned int k= offset; k< offset+length_type; ++k){ 00042 inbuffer[k-1]=inbuffer[k]; 00043 } 00044 inbuffer[offset+length_type-1]=0; 00045 this->type = (char *)(inbuffer + offset-1); 00046 offset += length_type; 00047 return offset; 00048 } 00049 00050 const char * getType(){ return REQUESTMESSAGEINFO; }; 00051 const char * getMD5(){ return "dc67331de85cf97091b7d45e5c64ab75"; }; 00052 00053 }; 00054 00055 class RequestMessageInfoResponse : public ros::Msg 00056 { 00057 public: 00058 typedef const char* _md5_type; 00059 _md5_type md5; 00060 typedef const char* _definition_type; 00061 _definition_type definition; 00062 00063 RequestMessageInfoResponse(): 00064 md5(""), 00065 definition("") 00066 { 00067 } 00068 00069 virtual int serialize(unsigned char *outbuffer) const 00070 { 00071 int offset = 0; 00072 uint32_t length_md5 = strlen(this->md5); 00073 varToArr(outbuffer + offset, length_md5); 00074 offset += 4; 00075 memcpy(outbuffer + offset, this->md5, length_md5); 00076 offset += length_md5; 00077 uint32_t length_definition = strlen(this->definition); 00078 varToArr(outbuffer + offset, length_definition); 00079 offset += 4; 00080 memcpy(outbuffer + offset, this->definition, length_definition); 00081 offset += length_definition; 00082 return offset; 00083 } 00084 00085 virtual int deserialize(unsigned char *inbuffer) 00086 { 00087 int offset = 0; 00088 uint32_t length_md5; 00089 arrToVar(length_md5, (inbuffer + offset)); 00090 offset += 4; 00091 for(unsigned int k= offset; k< offset+length_md5; ++k){ 00092 inbuffer[k-1]=inbuffer[k]; 00093 } 00094 inbuffer[offset+length_md5-1]=0; 00095 this->md5 = (char *)(inbuffer + offset-1); 00096 offset += length_md5; 00097 uint32_t length_definition; 00098 arrToVar(length_definition, (inbuffer + offset)); 00099 offset += 4; 00100 for(unsigned int k= offset; k< offset+length_definition; ++k){ 00101 inbuffer[k-1]=inbuffer[k]; 00102 } 00103 inbuffer[offset+length_definition-1]=0; 00104 this->definition = (char *)(inbuffer + offset-1); 00105 offset += length_definition; 00106 return offset; 00107 } 00108 00109 const char * getType(){ return REQUESTMESSAGEINFO; }; 00110 const char * getMD5(){ return "fe452186a069bed40f09b8628fe5eac8"; }; 00111 00112 }; 00113 00114 class RequestMessageInfo { 00115 public: 00116 typedef RequestMessageInfoRequest Request; 00117 typedef RequestMessageInfoResponse Response; 00118 }; 00119 00120 } 00121 #endif
Generated on Tue Jul 12 2022 21:32:17 by 1.7.2