Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
RequestServiceInfo.h
00001 #ifndef _ROS_SERVICE_RequestServiceInfo_h 00002 #define _ROS_SERVICE_RequestServiceInfo_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 REQUESTSERVICEINFO[] = "rosserial_msgs/RequestServiceInfo"; 00012 00013 class RequestServiceInfoRequest : public ros::Msg 00014 { 00015 public: 00016 typedef const char* _service_type; 00017 _service_type service; 00018 00019 RequestServiceInfoRequest(): 00020 service("") 00021 { 00022 } 00023 00024 virtual int serialize(unsigned char *outbuffer) const 00025 { 00026 int offset = 0; 00027 uint32_t length_service = strlen(this->service); 00028 varToArr(outbuffer + offset, length_service); 00029 offset += 4; 00030 memcpy(outbuffer + offset, this->service, length_service); 00031 offset += length_service; 00032 return offset; 00033 } 00034 00035 virtual int deserialize(unsigned char *inbuffer) 00036 { 00037 int offset = 0; 00038 uint32_t length_service; 00039 arrToVar(length_service, (inbuffer + offset)); 00040 offset += 4; 00041 for(unsigned int k= offset; k< offset+length_service; ++k){ 00042 inbuffer[k-1]=inbuffer[k]; 00043 } 00044 inbuffer[offset+length_service-1]=0; 00045 this->service = (char *)(inbuffer + offset-1); 00046 offset += length_service; 00047 return offset; 00048 } 00049 00050 const char * getType(){ return REQUESTSERVICEINFO; }; 00051 const char * getMD5(){ return "1cbcfa13b08f6d36710b9af8741e6112"; }; 00052 00053 }; 00054 00055 class RequestServiceInfoResponse : public ros::Msg 00056 { 00057 public: 00058 typedef const char* _service_md5_type; 00059 _service_md5_type service_md5; 00060 typedef const char* _request_md5_type; 00061 _request_md5_type request_md5; 00062 typedef const char* _response_md5_type; 00063 _response_md5_type response_md5; 00064 00065 RequestServiceInfoResponse(): 00066 service_md5(""), 00067 request_md5(""), 00068 response_md5("") 00069 { 00070 } 00071 00072 virtual int serialize(unsigned char *outbuffer) const 00073 { 00074 int offset = 0; 00075 uint32_t length_service_md5 = strlen(this->service_md5); 00076 varToArr(outbuffer + offset, length_service_md5); 00077 offset += 4; 00078 memcpy(outbuffer + offset, this->service_md5, length_service_md5); 00079 offset += length_service_md5; 00080 uint32_t length_request_md5 = strlen(this->request_md5); 00081 varToArr(outbuffer + offset, length_request_md5); 00082 offset += 4; 00083 memcpy(outbuffer + offset, this->request_md5, length_request_md5); 00084 offset += length_request_md5; 00085 uint32_t length_response_md5 = strlen(this->response_md5); 00086 varToArr(outbuffer + offset, length_response_md5); 00087 offset += 4; 00088 memcpy(outbuffer + offset, this->response_md5, length_response_md5); 00089 offset += length_response_md5; 00090 return offset; 00091 } 00092 00093 virtual int deserialize(unsigned char *inbuffer) 00094 { 00095 int offset = 0; 00096 uint32_t length_service_md5; 00097 arrToVar(length_service_md5, (inbuffer + offset)); 00098 offset += 4; 00099 for(unsigned int k= offset; k< offset+length_service_md5; ++k){ 00100 inbuffer[k-1]=inbuffer[k]; 00101 } 00102 inbuffer[offset+length_service_md5-1]=0; 00103 this->service_md5 = (char *)(inbuffer + offset-1); 00104 offset += length_service_md5; 00105 uint32_t length_request_md5; 00106 arrToVar(length_request_md5, (inbuffer + offset)); 00107 offset += 4; 00108 for(unsigned int k= offset; k< offset+length_request_md5; ++k){ 00109 inbuffer[k-1]=inbuffer[k]; 00110 } 00111 inbuffer[offset+length_request_md5-1]=0; 00112 this->request_md5 = (char *)(inbuffer + offset-1); 00113 offset += length_request_md5; 00114 uint32_t length_response_md5; 00115 arrToVar(length_response_md5, (inbuffer + offset)); 00116 offset += 4; 00117 for(unsigned int k= offset; k< offset+length_response_md5; ++k){ 00118 inbuffer[k-1]=inbuffer[k]; 00119 } 00120 inbuffer[offset+length_response_md5-1]=0; 00121 this->response_md5 = (char *)(inbuffer + offset-1); 00122 offset += length_response_md5; 00123 return offset; 00124 } 00125 00126 const char * getType(){ return REQUESTSERVICEINFO; }; 00127 const char * getMD5(){ return "c3d6dd25b909596479fbbc6559fa6874"; }; 00128 00129 }; 00130 00131 class RequestServiceInfo { 00132 public: 00133 typedef RequestServiceInfoRequest Request; 00134 typedef RequestServiceInfoResponse Response; 00135 }; 00136 00137 } 00138 #endif
Generated on Tue Jul 12 2022 17:32:45 by
