SetJointProperties.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_SetJointProperties_h
00002 #define _ROS_SERVICE_SetJointProperties_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 #include "gazebo_msgs/ODEJointProperties.h"
00008 
00009 namespace gazebo_msgs
00010 {
00011 
00012 static const char SETJOINTPROPERTIES[] = "gazebo_msgs/SetJointProperties";
00013 
00014   class SetJointPropertiesRequest : public ros::Msg
00015   {
00016     public:
00017       char * joint_name;
00018       gazebo_msgs::ODEJointProperties ode_joint_config;
00019 
00020     virtual int serialize(unsigned char *outbuffer) const
00021     {
00022       int offset = 0;
00023       uint32_t length_joint_name = strlen( (const char*) this->joint_name);
00024       memcpy(outbuffer + offset, &length_joint_name, sizeof(uint32_t));
00025       offset += 4;
00026       memcpy(outbuffer + offset, this->joint_name, length_joint_name);
00027       offset += length_joint_name;
00028       offset += this->ode_joint_config.serialize(outbuffer + offset);
00029       return offset;
00030     }
00031 
00032     virtual int deserialize(unsigned char *inbuffer)
00033     {
00034       int offset = 0;
00035       uint32_t length_joint_name;
00036       memcpy(&length_joint_name, (inbuffer + offset), sizeof(uint32_t));
00037       offset += 4;
00038       for(unsigned int k= offset; k< offset+length_joint_name; ++k){
00039           inbuffer[k-1]=inbuffer[k];
00040       }
00041       inbuffer[offset+length_joint_name-1]=0;
00042       this->joint_name = (char *)(inbuffer + offset-1);
00043       offset += length_joint_name;
00044       offset += this->ode_joint_config.deserialize(inbuffer + offset);
00045      return offset;
00046     }
00047 
00048     const char * getType(){ return SETJOINTPROPERTIES; };
00049     const char * getMD5(){ return "331fd8f35fd27e3c1421175590258e26"; };
00050 
00051   };
00052 
00053   class SetJointPropertiesResponse : public ros::Msg
00054   {
00055     public:
00056       bool success;
00057       char * status_message;
00058 
00059     virtual int serialize(unsigned char *outbuffer) const
00060     {
00061       int offset = 0;
00062       union {
00063         bool real;
00064         uint8_t base;
00065       } u_success;
00066       u_success.real = this->success;
00067       *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00068       offset += sizeof(this->success);
00069       uint32_t length_status_message = strlen( (const char*) this->status_message);
00070       memcpy(outbuffer + offset, &length_status_message, sizeof(uint32_t));
00071       offset += 4;
00072       memcpy(outbuffer + offset, this->status_message, length_status_message);
00073       offset += length_status_message;
00074       return offset;
00075     }
00076 
00077     virtual int deserialize(unsigned char *inbuffer)
00078     {
00079       int offset = 0;
00080       union {
00081         bool real;
00082         uint8_t base;
00083       } u_success;
00084       u_success.base = 0;
00085       u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00086       this->success = u_success.real;
00087       offset += sizeof(this->success);
00088       uint32_t length_status_message;
00089       memcpy(&length_status_message, (inbuffer + offset), sizeof(uint32_t));
00090       offset += 4;
00091       for(unsigned int k= offset; k< offset+length_status_message; ++k){
00092           inbuffer[k-1]=inbuffer[k];
00093       }
00094       inbuffer[offset+length_status_message-1]=0;
00095       this->status_message = (char *)(inbuffer + offset-1);
00096       offset += length_status_message;
00097      return offset;
00098     }
00099 
00100     const char * getType(){ return SETJOINTPROPERTIES; };
00101     const char * getMD5(){ return "2ec6f3eff0161f4257b808b12bc830c2"; };
00102 
00103   };
00104 
00105   class SetJointProperties {
00106     public:
00107     typedef SetJointPropertiesRequest Request;
00108     typedef SetJointPropertiesResponse Response;
00109   };
00110 
00111 }
00112 #endif


lizi_arduino
Author(s): RoboTiCan
autogenerated on Wed Aug 26 2015 12:24:22