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.
Dependencies: mbed
AllowedCollisionEntry.h
00001 #ifndef _ROS_moveit_msgs_AllowedCollisionEntry_h 00002 #define _ROS_moveit_msgs_AllowedCollisionEntry_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 AllowedCollisionEntry : public ros::Msg 00013 { 00014 public: 00015 uint32_t enabled_length; 00016 typedef bool _enabled_type; 00017 _enabled_type st_enabled; 00018 _enabled_type * enabled; 00019 00020 AllowedCollisionEntry(): 00021 enabled_length(0), enabled(NULL) 00022 { 00023 } 00024 00025 virtual int serialize(unsigned char *outbuffer) const 00026 { 00027 int offset = 0; 00028 *(outbuffer + offset + 0) = (this->enabled_length >> (8 * 0)) & 0xFF; 00029 *(outbuffer + offset + 1) = (this->enabled_length >> (8 * 1)) & 0xFF; 00030 *(outbuffer + offset + 2) = (this->enabled_length >> (8 * 2)) & 0xFF; 00031 *(outbuffer + offset + 3) = (this->enabled_length >> (8 * 3)) & 0xFF; 00032 offset += sizeof(this->enabled_length); 00033 for( uint32_t i = 0; i < enabled_length; i++){ 00034 union { 00035 bool real; 00036 uint8_t base; 00037 } u_enabledi; 00038 u_enabledi.real = this->enabled[i]; 00039 *(outbuffer + offset + 0) = (u_enabledi.base >> (8 * 0)) & 0xFF; 00040 offset += sizeof(this->enabled[i]); 00041 } 00042 return offset; 00043 } 00044 00045 virtual int deserialize(unsigned char *inbuffer) 00046 { 00047 int offset = 0; 00048 uint32_t enabled_lengthT = ((uint32_t) (*(inbuffer + offset))); 00049 enabled_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1); 00050 enabled_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2); 00051 enabled_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3); 00052 offset += sizeof(this->enabled_length); 00053 if(enabled_lengthT > enabled_length) 00054 this->enabled = (bool*)realloc(this->enabled, enabled_lengthT * sizeof(bool)); 00055 enabled_length = enabled_lengthT; 00056 for( uint32_t i = 0; i < enabled_length; i++){ 00057 union { 00058 bool real; 00059 uint8_t base; 00060 } u_st_enabled; 00061 u_st_enabled.base = 0; 00062 u_st_enabled.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); 00063 this->st_enabled = u_st_enabled.real; 00064 offset += sizeof(this->st_enabled); 00065 memcpy( &(this->enabled[i]), &(this->st_enabled), sizeof(bool)); 00066 } 00067 return offset; 00068 } 00069 00070 virtual const char * getType(){ return "moveit_msgs/AllowedCollisionEntry"; }; 00071 virtual const char * getMD5(){ return "90d1ae1850840724bb043562fe3285fc"; }; 00072 00073 }; 00074 00075 } 00076 #endif
Generated on Mon Sep 26 2022 13:46:59 by
