BadTwoInts.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_BadTwoInts_h
00002 #define _ROS_SERVICE_BadTwoInts_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 BADTWOINTS[] = "rospy_tutorials/BadTwoInts";
00012 
00013   class BadTwoIntsRequest : public ros::Msg
00014   {
00015     public:
00016       int64_t a;
00017       int32_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         int32_t real;
00038         uint32_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       offset += sizeof(this->b);
00046       return offset;
00047     }
00048 
00049     virtual int deserialize(unsigned char *inbuffer)
00050     {
00051       int offset = 0;
00052       union {
00053         int64_t real;
00054         uint64_t base;
00055       } u_a;
00056       u_a.base = 0;
00057       u_a.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
00058       u_a.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
00059       u_a.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
00060       u_a.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
00061       u_a.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
00062       u_a.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
00063       u_a.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
00064       u_a.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
00065       this->a = u_a.real;
00066       offset += sizeof(this->a);
00067       union {
00068         int32_t real;
00069         uint32_t base;
00070       } u_b;
00071       u_b.base = 0;
00072       u_b.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00073       u_b.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00074       u_b.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00075       u_b.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00076       this->b = u_b.real;
00077       offset += sizeof(this->b);
00078      return offset;
00079     }
00080 
00081     const char * getType(){ return BADTWOINTS; };
00082     const char * getMD5(){ return "29bb5c7dea8bf822f53e94b0ee5a3a56"; };
00083 
00084   };
00085 
00086   class BadTwoIntsResponse : public ros::Msg
00087   {
00088     public:
00089       int32_t sum;
00090 
00091     virtual int serialize(unsigned char *outbuffer) const
00092     {
00093       int offset = 0;
00094       union {
00095         int32_t real;
00096         uint32_t base;
00097       } u_sum;
00098       u_sum.real = this->sum;
00099       *(outbuffer + offset + 0) = (u_sum.base >> (8 * 0)) & 0xFF;
00100       *(outbuffer + offset + 1) = (u_sum.base >> (8 * 1)) & 0xFF;
00101       *(outbuffer + offset + 2) = (u_sum.base >> (8 * 2)) & 0xFF;
00102       *(outbuffer + offset + 3) = (u_sum.base >> (8 * 3)) & 0xFF;
00103       offset += sizeof(this->sum);
00104       return offset;
00105     }
00106 
00107     virtual int deserialize(unsigned char *inbuffer)
00108     {
00109       int offset = 0;
00110       union {
00111         int32_t real;
00112         uint32_t base;
00113       } u_sum;
00114       u_sum.base = 0;
00115       u_sum.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00116       u_sum.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00117       u_sum.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00118       u_sum.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00119       this->sum = u_sum.real;
00120       offset += sizeof(this->sum);
00121      return offset;
00122     }
00123 
00124     const char * getType(){ return BADTWOINTS; };
00125     const char * getMD5(){ return "0ba699c25c9418c0366f3595c0c8e8ec"; };
00126 
00127   };
00128 
00129   class BadTwoInts {
00130     public:
00131     typedef BadTwoIntsRequest Request;
00132     typedef BadTwoIntsResponse Response;
00133   };
00134 
00135 }
00136 #endif


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