Irfan Tito Kurniawan / ros_lib
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers WaypointSetCurrent.h Source File

WaypointSetCurrent.h

00001 #ifndef _ROS_SERVICE_WaypointSetCurrent_h
00002 #define _ROS_SERVICE_WaypointSetCurrent_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace mavros_msgs
00009 {
00010 
00011 static const char WAYPOINTSETCURRENT[] = "mavros_msgs/WaypointSetCurrent";
00012 
00013   class WaypointSetCurrentRequest : public ros::Msg
00014   {
00015     public:
00016       typedef uint16_t _wp_seq_type;
00017       _wp_seq_type wp_seq;
00018 
00019     WaypointSetCurrentRequest():
00020       wp_seq(0)
00021     {
00022     }
00023 
00024     virtual int serialize(unsigned char *outbuffer) const
00025     {
00026       int offset = 0;
00027       *(outbuffer + offset + 0) = (this->wp_seq >> (8 * 0)) & 0xFF;
00028       *(outbuffer + offset + 1) = (this->wp_seq >> (8 * 1)) & 0xFF;
00029       offset += sizeof(this->wp_seq);
00030       return offset;
00031     }
00032 
00033     virtual int deserialize(unsigned char *inbuffer)
00034     {
00035       int offset = 0;
00036       this->wp_seq =  ((uint16_t) (*(inbuffer + offset)));
00037       this->wp_seq |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00038       offset += sizeof(this->wp_seq);
00039      return offset;
00040     }
00041 
00042     const char * getType(){ return WAYPOINTSETCURRENT; };
00043     const char * getMD5(){ return "9541369175e0776b0fef1c988db6840f"; };
00044 
00045   };
00046 
00047   class WaypointSetCurrentResponse : public ros::Msg
00048   {
00049     public:
00050       typedef bool _success_type;
00051       _success_type success;
00052 
00053     WaypointSetCurrentResponse():
00054       success(0)
00055     {
00056     }
00057 
00058     virtual int serialize(unsigned char *outbuffer) const
00059     {
00060       int offset = 0;
00061       union {
00062         bool real;
00063         uint8_t base;
00064       } u_success;
00065       u_success.real = this->success;
00066       *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00067       offset += sizeof(this->success);
00068       return offset;
00069     }
00070 
00071     virtual int deserialize(unsigned char *inbuffer)
00072     {
00073       int offset = 0;
00074       union {
00075         bool real;
00076         uint8_t base;
00077       } u_success;
00078       u_success.base = 0;
00079       u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00080       this->success = u_success.real;
00081       offset += sizeof(this->success);
00082      return offset;
00083     }
00084 
00085     const char * getType(){ return WAYPOINTSETCURRENT; };
00086     const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; };
00087 
00088   };
00089 
00090   class WaypointSetCurrent {
00091     public:
00092     typedef WaypointSetCurrentRequest Request;
00093     typedef WaypointSetCurrentResponse Response;
00094   };
00095 
00096 }
00097 #endif