TeleportRelative.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_TeleportRelative_h
00002 #define _ROS_SERVICE_TeleportRelative_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace turtlesim
00009 {
00010 
00011 static const char TELEPORTRELATIVE[] = "turtlesim/TeleportRelative";
00012 
00013   class TeleportRelativeRequest : public ros::Msg
00014   {
00015     public:
00016       float linear;
00017       float angular;
00018 
00019     virtual int serialize(unsigned char *outbuffer) const
00020     {
00021       int offset = 0;
00022       union {
00023         float real;
00024         uint32_t base;
00025       } u_linear;
00026       u_linear.real = this->linear;
00027       *(outbuffer + offset + 0) = (u_linear.base >> (8 * 0)) & 0xFF;
00028       *(outbuffer + offset + 1) = (u_linear.base >> (8 * 1)) & 0xFF;
00029       *(outbuffer + offset + 2) = (u_linear.base >> (8 * 2)) & 0xFF;
00030       *(outbuffer + offset + 3) = (u_linear.base >> (8 * 3)) & 0xFF;
00031       offset += sizeof(this->linear);
00032       union {
00033         float real;
00034         uint32_t base;
00035       } u_angular;
00036       u_angular.real = this->angular;
00037       *(outbuffer + offset + 0) = (u_angular.base >> (8 * 0)) & 0xFF;
00038       *(outbuffer + offset + 1) = (u_angular.base >> (8 * 1)) & 0xFF;
00039       *(outbuffer + offset + 2) = (u_angular.base >> (8 * 2)) & 0xFF;
00040       *(outbuffer + offset + 3) = (u_angular.base >> (8 * 3)) & 0xFF;
00041       offset += sizeof(this->angular);
00042       return offset;
00043     }
00044 
00045     virtual int deserialize(unsigned char *inbuffer)
00046     {
00047       int offset = 0;
00048       union {
00049         float real;
00050         uint32_t base;
00051       } u_linear;
00052       u_linear.base = 0;
00053       u_linear.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00054       u_linear.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00055       u_linear.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00056       u_linear.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00057       this->linear = u_linear.real;
00058       offset += sizeof(this->linear);
00059       union {
00060         float real;
00061         uint32_t base;
00062       } u_angular;
00063       u_angular.base = 0;
00064       u_angular.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00065       u_angular.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00066       u_angular.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00067       u_angular.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00068       this->angular = u_angular.real;
00069       offset += sizeof(this->angular);
00070      return offset;
00071     }
00072 
00073     const char * getType(){ return TELEPORTRELATIVE; };
00074     const char * getMD5(){ return "9d5c2dcd348ac8f76ce2a4307bd63a13"; };
00075 
00076   };
00077 
00078   class TeleportRelativeResponse : public ros::Msg
00079   {
00080     public:
00081 
00082     virtual int serialize(unsigned char *outbuffer) const
00083     {
00084       int offset = 0;
00085       return offset;
00086     }
00087 
00088     virtual int deserialize(unsigned char *inbuffer)
00089     {
00090       int offset = 0;
00091      return offset;
00092     }
00093 
00094     const char * getType(){ return TELEPORTRELATIVE; };
00095     const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00096 
00097   };
00098 
00099   class TeleportRelative {
00100     public:
00101     typedef TeleportRelativeRequest Request;
00102     typedef TeleportRelativeResponse Response;
00103   };
00104 
00105 }
00106 #endif


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