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.
ShapeGoal.h
00001 #ifndef _ROS_turtle_actionlib_ShapeGoal_h 00002 #define _ROS_turtle_actionlib_ShapeGoal_h 00003 00004 #include <stdint.h> 00005 #include <string.h> 00006 #include <stdlib.h> 00007 #include "ros/msg.h" 00008 00009 namespace turtle_actionlib 00010 { 00011 00012 class ShapeGoal : public ros::Msg 00013 { 00014 public: 00015 typedef int32_t _edges_type; 00016 _edges_type edges; 00017 typedef float _radius_type; 00018 _radius_type radius; 00019 00020 ShapeGoal(): 00021 edges(0), 00022 radius(0) 00023 { 00024 } 00025 00026 virtual int serialize(unsigned char *outbuffer) const 00027 { 00028 int offset = 0; 00029 union { 00030 int32_t real; 00031 uint32_t base; 00032 } u_edges; 00033 u_edges.real = this->edges; 00034 *(outbuffer + offset + 0) = (u_edges.base >> (8 * 0)) & 0xFF; 00035 *(outbuffer + offset + 1) = (u_edges.base >> (8 * 1)) & 0xFF; 00036 *(outbuffer + offset + 2) = (u_edges.base >> (8 * 2)) & 0xFF; 00037 *(outbuffer + offset + 3) = (u_edges.base >> (8 * 3)) & 0xFF; 00038 offset += sizeof(this->edges); 00039 union { 00040 float real; 00041 uint32_t base; 00042 } u_radius; 00043 u_radius.real = this->radius; 00044 *(outbuffer + offset + 0) = (u_radius.base >> (8 * 0)) & 0xFF; 00045 *(outbuffer + offset + 1) = (u_radius.base >> (8 * 1)) & 0xFF; 00046 *(outbuffer + offset + 2) = (u_radius.base >> (8 * 2)) & 0xFF; 00047 *(outbuffer + offset + 3) = (u_radius.base >> (8 * 3)) & 0xFF; 00048 offset += sizeof(this->radius); 00049 return offset; 00050 } 00051 00052 virtual int deserialize(unsigned char *inbuffer) 00053 { 00054 int offset = 0; 00055 union { 00056 int32_t real; 00057 uint32_t base; 00058 } u_edges; 00059 u_edges.base = 0; 00060 u_edges.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00061 u_edges.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00062 u_edges.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00063 u_edges.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00064 this->edges = u_edges.real; 00065 offset += sizeof(this->edges); 00066 union { 00067 float real; 00068 uint32_t base; 00069 } u_radius; 00070 u_radius.base = 0; 00071 u_radius.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0); 00072 u_radius.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00073 u_radius.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00074 u_radius.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00075 this->radius = u_radius.real; 00076 offset += sizeof(this->radius); 00077 return offset; 00078 } 00079 00080 const char * getType(){ return "turtle_actionlib/ShapeGoal"; }; 00081 const char * getMD5(){ return "3b9202ab7292cebe5a95ab2bf6b9c091"; }; 00082 00083 }; 00084 00085 } 00086 #endif
Generated on Wed Jul 13 2022 23:30:18 by
