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


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:56