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.
Dependents: mbed_roshydro_test
LinkScale.h
00001 #ifndef _ROS_moveit_msgs_LinkScale_h 00002 #define _ROS_moveit_msgs_LinkScale_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 00009 namespace moveit_msgs 00010 { 00011 00012 class LinkScale : public ros::Msg 00013 { 00014 public: 00015 const char* link_name; 00016 float scale; 00017 00018 LinkScale(): 00019 link_name(""), 00020 scale(0) 00021 { 00022 } 00023 00024 virtual int serialize(unsigned char *outbuffer) const 00025 { 00026 int offset = 0; 00027 uint32_t length_link_name = strlen(this->link_name); 00028 memcpy(outbuffer + offset, &length_link_name, sizeof(uint32_t)); 00029 offset += 4; 00030 memcpy(outbuffer + offset, this->link_name, length_link_name); 00031 offset += length_link_name; 00032 offset += serializeAvrFloat64(outbuffer + offset, this->scale); 00033 return offset; 00034 } 00035 00036 virtual int deserialize(unsigned char *inbuffer) 00037 { 00038 int offset = 0; 00039 uint32_t length_link_name; 00040 memcpy(&length_link_name, (inbuffer + offset), sizeof(uint32_t)); 00041 offset += 4; 00042 for(unsigned int k= offset; k< offset+length_link_name; ++k){ 00043 inbuffer[k-1]=inbuffer[k]; 00044 } 00045 inbuffer[offset+length_link_name-1]=0; 00046 this->link_name = (char *)(inbuffer + offset-1); 00047 offset += length_link_name; 00048 offset += deserializeAvrFloat64(inbuffer + offset, &(this->scale)); 00049 return offset; 00050 } 00051 00052 const char * getType(){ return "moveit_msgs/LinkScale"; }; 00053 const char * getMD5(){ return "19faf226446bfb2f645a4da6f2a56166"; }; 00054 00055 }; 00056 00057 } 00058 #endif
Generated on Wed Jul 13 2022 01:02:31 by
