catchrobo2022 / Mbed 2 deprecated catchrobo2022_mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MoveGroupFeedback.h Source File

MoveGroupFeedback.h

00001 #ifndef _ROS_moveit_msgs_MoveGroupFeedback_h
00002 #define _ROS_moveit_msgs_MoveGroupFeedback_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 MoveGroupFeedback : public ros::Msg
00013   {
00014     public:
00015       typedef const char* _state_type;
00016       _state_type state;
00017 
00018     MoveGroupFeedback():
00019       state("")
00020     {
00021     }
00022 
00023     virtual int serialize(unsigned char *outbuffer) const
00024     {
00025       int offset = 0;
00026       uint32_t length_state = strlen(this->state);
00027       varToArr(outbuffer + offset, length_state);
00028       offset += 4;
00029       memcpy(outbuffer + offset, this->state, length_state);
00030       offset += length_state;
00031       return offset;
00032     }
00033 
00034     virtual int deserialize(unsigned char *inbuffer)
00035     {
00036       int offset = 0;
00037       uint32_t length_state;
00038       arrToVar(length_state, (inbuffer + offset));
00039       offset += 4;
00040       for(unsigned int k= offset; k< offset+length_state; ++k){
00041           inbuffer[k-1]=inbuffer[k];
00042       }
00043       inbuffer[offset+length_state-1]=0;
00044       this->state = (char *)(inbuffer + offset-1);
00045       offset += length_state;
00046      return offset;
00047     }
00048 
00049     virtual const char * getType(){ return "moveit_msgs/MoveGroupFeedback"; };
00050     virtual const char * getMD5(){ return "af6d3a99f0fbeb66d3248fa4b3e675fb"; };
00051 
00052   };
00053 
00054 }
00055 #endif