Irfan Tito Kurniawan / ros_lib
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HomePosition.h Source File

HomePosition.h

00001 #ifndef _ROS_mavros_msgs_HomePosition_h
00002 #define _ROS_mavros_msgs_HomePosition_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 #include "std_msgs/Header.h"
00009 #include "geographic_msgs/GeoPoint.h"
00010 #include "geometry_msgs/Point.h"
00011 #include "geometry_msgs/Quaternion.h"
00012 #include "geometry_msgs/Vector3.h"
00013 
00014 namespace mavros_msgs
00015 {
00016 
00017   class HomePosition : public ros::Msg
00018   {
00019     public:
00020       typedef std_msgs::Header _header_type;
00021       _header_type header;
00022       typedef geographic_msgs::GeoPoint _geo_type;
00023       _geo_type geo;
00024       typedef geometry_msgs::Point _position_type;
00025       _position_type position;
00026       typedef geometry_msgs::Quaternion _orientation_type;
00027       _orientation_type orientation;
00028       typedef geometry_msgs::Vector3 _approach_type;
00029       _approach_type approach;
00030 
00031     HomePosition():
00032       header(),
00033       geo(),
00034       position(),
00035       orientation(),
00036       approach()
00037     {
00038     }
00039 
00040     virtual int serialize(unsigned char *outbuffer) const
00041     {
00042       int offset = 0;
00043       offset += this->header.serialize(outbuffer + offset);
00044       offset += this->geo.serialize(outbuffer + offset);
00045       offset += this->position.serialize(outbuffer + offset);
00046       offset += this->orientation.serialize(outbuffer + offset);
00047       offset += this->approach.serialize(outbuffer + offset);
00048       return offset;
00049     }
00050 
00051     virtual int deserialize(unsigned char *inbuffer)
00052     {
00053       int offset = 0;
00054       offset += this->header.deserialize(inbuffer + offset);
00055       offset += this->geo.deserialize(inbuffer + offset);
00056       offset += this->position.deserialize(inbuffer + offset);
00057       offset += this->orientation.deserialize(inbuffer + offset);
00058       offset += this->approach.deserialize(inbuffer + offset);
00059      return offset;
00060     }
00061 
00062     const char * getType(){ return "mavros_msgs/HomePosition"; };
00063     const char * getMD5(){ return "c1167922de8c97acdb0ec714c1dba774"; };
00064 
00065   };
00066 
00067 }
00068 #endif