AddTwoInts.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_AddTwoInts_h
00002 #define _ROS_SERVICE_AddTwoInts_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace rospy_tutorials
00009 {
00010 
00011 static const char ADDTWOINTS[] = "rospy_tutorials/AddTwoInts";
00012 
00013   class AddTwoIntsRequest : public ros::Msg
00014   {
00015     public:
00016       int64_t a;
00017       int64_t b;
00018 
00019     virtual int serialize(unsigned char *outbuffer) const
00020     {
00021       int offset = 0;
00022       union {
00023         int64_t real;
00024         uint64_t base;
00025       } u_a;
00026       u_a.real = this->a;
00027       *(outbuffer + offset + 0) = (u_a.base >> (8 * 0)) & 0xFF;
00028       *(outbuffer + offset + 1) = (u_a.base >> (8 * 1)) & 0xFF;
00029       *(outbuffer + offset + 2) = (u_a.base >> (8 * 2)) & 0xFF;
00030       *(outbuffer + offset + 3) = (u_a.base >> (8 * 3)) & 0xFF;
00031       *(outbuffer + offset + 4) = (u_a.base >> (8 * 4)) & 0xFF;
00032       *(outbuffer + offset + 5) = (u_a.base >> (8 * 5)) & 0xFF;
00033       *(outbuffer + offset + 6) = (u_a.base >> (8 * 6)) & 0xFF;
00034       *(outbuffer + offset + 7) = (u_a.base >> (8 * 7)) & 0xFF;
00035       offset += sizeof(this->a);
00036       union {
00037         int64_t real;
00038         uint64_t base;
00039       } u_b;
00040       u_b.real = this->b;
00041       *(outbuffer + offset + 0) = (u_b.base >> (8 * 0)) & 0xFF;
00042       *(outbuffer + offset + 1) = (u_b.base >> (8 * 1)) & 0xFF;
00043       *(outbuffer + offset + 2) = (u_b.base >> (8 * 2)) & 0xFF;
00044       *(outbuffer + offset + 3) = (u_b.base >> (8 * 3)) & 0xFF;
00045       *(outbuffer + offset + 4) = (u_b.base >> (8 * 4)) & 0xFF;
00046       *(outbuffer + offset + 5) = (u_b.base >> (8 * 5)) & 0xFF;
00047       *(outbuffer + offset + 6) = (u_b.base >> (8 * 6)) & 0xFF;
00048       *(outbuffer + offset + 7) = (u_b.base >> (8 * 7)) & 0xFF;
00049       offset += sizeof(this->b);
00050       return offset;
00051     }
00052 
00053     virtual int deserialize(unsigned char *inbuffer)
00054     {
00055       int offset = 0;
00056       union {
00057         int64_t real;
00058         uint64_t base;
00059       } u_a;
00060       u_a.base = 0;
00061       u_a.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
00062       u_a.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
00063       u_a.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
00064       u_a.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
00065       u_a.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
00066       u_a.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
00067       u_a.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
00068       u_a.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
00069       this->a = u_a.real;
00070       offset += sizeof(this->a);
00071       union {
00072         int64_t real;
00073         uint64_t base;
00074       } u_b;
00075       u_b.base = 0;
00076       u_b.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
00077       u_b.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
00078       u_b.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
00079       u_b.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
00080       u_b.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
00081       u_b.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
00082       u_b.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
00083       u_b.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
00084       this->b = u_b.real;
00085       offset += sizeof(this->b);
00086      return offset;
00087     }
00088 
00089     const char * getType(){ return ADDTWOINTS; };
00090     const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; };
00091 
00092   };
00093 
00094   class AddTwoIntsResponse : public ros::Msg
00095   {
00096     public:
00097       int64_t sum;
00098 
00099     virtual int serialize(unsigned char *outbuffer) const
00100     {
00101       int offset = 0;
00102       union {
00103         int64_t real;
00104         uint64_t base;
00105       } u_sum;
00106       u_sum.real = this->sum;
00107       *(outbuffer + offset + 0) = (u_sum.base >> (8 * 0)) & 0xFF;
00108       *(outbuffer + offset + 1) = (u_sum.base >> (8 * 1)) & 0xFF;
00109       *(outbuffer + offset + 2) = (u_sum.base >> (8 * 2)) & 0xFF;
00110       *(outbuffer + offset + 3) = (u_sum.base >> (8 * 3)) & 0xFF;
00111       *(outbuffer + offset + 4) = (u_sum.base >> (8 * 4)) & 0xFF;
00112       *(outbuffer + offset + 5) = (u_sum.base >> (8 * 5)) & 0xFF;
00113       *(outbuffer + offset + 6) = (u_sum.base >> (8 * 6)) & 0xFF;
00114       *(outbuffer + offset + 7) = (u_sum.base >> (8 * 7)) & 0xFF;
00115       offset += sizeof(this->sum);
00116       return offset;
00117     }
00118 
00119     virtual int deserialize(unsigned char *inbuffer)
00120     {
00121       int offset = 0;
00122       union {
00123         int64_t real;
00124         uint64_t base;
00125       } u_sum;
00126       u_sum.base = 0;
00127       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
00128       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
00129       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
00130       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
00131       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
00132       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
00133       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
00134       u_sum.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
00135       this->sum = u_sum.real;
00136       offset += sizeof(this->sum);
00137      return offset;
00138     }
00139 
00140     const char * getType(){ return ADDTWOINTS; };
00141     const char * getMD5(){ return "b88405221c77b1878a3cbbfff53428d7"; };
00142 
00143   };
00144 
00145   class AddTwoInts {
00146     public:
00147     typedef AddTwoIntsRequest Request;
00148     typedef AddTwoIntsResponse Response;
00149   };
00150 
00151 }
00152 #endif


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