GripperTranslation.h
Go to the documentation of this file.
00001 #ifndef _ROS_moveit_msgs_GripperTranslation_h
00002 #define _ROS_moveit_msgs_GripperTranslation_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 #include "geometry_msgs/Vector3Stamped.h"
00009 
00010 namespace moveit_msgs
00011 {
00012 
00013   class GripperTranslation : public ros::Msg
00014   {
00015     public:
00016       geometry_msgs::Vector3Stamped direction;
00017       float desired_distance;
00018       float min_distance;
00019 
00020     virtual int serialize(unsigned char *outbuffer) const
00021     {
00022       int offset = 0;
00023       offset += this->direction.serialize(outbuffer + offset);
00024       union {
00025         float real;
00026         uint32_t base;
00027       } u_desired_distance;
00028       u_desired_distance.real = this->desired_distance;
00029       *(outbuffer + offset + 0) = (u_desired_distance.base >> (8 * 0)) & 0xFF;
00030       *(outbuffer + offset + 1) = (u_desired_distance.base >> (8 * 1)) & 0xFF;
00031       *(outbuffer + offset + 2) = (u_desired_distance.base >> (8 * 2)) & 0xFF;
00032       *(outbuffer + offset + 3) = (u_desired_distance.base >> (8 * 3)) & 0xFF;
00033       offset += sizeof(this->desired_distance);
00034       union {
00035         float real;
00036         uint32_t base;
00037       } u_min_distance;
00038       u_min_distance.real = this->min_distance;
00039       *(outbuffer + offset + 0) = (u_min_distance.base >> (8 * 0)) & 0xFF;
00040       *(outbuffer + offset + 1) = (u_min_distance.base >> (8 * 1)) & 0xFF;
00041       *(outbuffer + offset + 2) = (u_min_distance.base >> (8 * 2)) & 0xFF;
00042       *(outbuffer + offset + 3) = (u_min_distance.base >> (8 * 3)) & 0xFF;
00043       offset += sizeof(this->min_distance);
00044       return offset;
00045     }
00046 
00047     virtual int deserialize(unsigned char *inbuffer)
00048     {
00049       int offset = 0;
00050       offset += this->direction.deserialize(inbuffer + offset);
00051       union {
00052         float real;
00053         uint32_t base;
00054       } u_desired_distance;
00055       u_desired_distance.base = 0;
00056       u_desired_distance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00057       u_desired_distance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00058       u_desired_distance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00059       u_desired_distance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00060       this->desired_distance = u_desired_distance.real;
00061       offset += sizeof(this->desired_distance);
00062       union {
00063         float real;
00064         uint32_t base;
00065       } u_min_distance;
00066       u_min_distance.base = 0;
00067       u_min_distance.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00068       u_min_distance.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00069       u_min_distance.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00070       u_min_distance.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00071       this->min_distance = u_min_distance.real;
00072       offset += sizeof(this->min_distance);
00073      return offset;
00074     }
00075 
00076     const char * getType(){ return "moveit_msgs/GripperTranslation"; };
00077     const char * getMD5(){ return "b53bc0ad0f717cdec3b0e42dec300121"; };
00078 
00079   };
00080 
00081 }
00082 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:55