Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: ros_lib/mav_planning_msgs/PolygonWithHolesStamped.h
- Revision:
- 0:8f3710bfd298
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros_lib/mav_planning_msgs/PolygonWithHolesStamped.h Wed Sep 02 13:51:31 2020 +0000 @@ -0,0 +1,82 @@ +#ifndef _ROS_mav_planning_msgs_PolygonWithHolesStamped_h +#define _ROS_mav_planning_msgs_PolygonWithHolesStamped_h + +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" +#include "mav_planning_msgs/PolygonWithHoles.h" + +namespace mav_planning_msgs +{ + + class PolygonWithHolesStamped : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef double _altitude_type; + _altitude_type altitude; + typedef mav_planning_msgs::PolygonWithHoles _polygon_type; + _polygon_type polygon; + + PolygonWithHolesStamped(): + header(), + altitude(0), + polygon() + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.real = this->altitude; + *(outbuffer + offset + 0) = (u_altitude.base >> (8 * 0)) & 0xFF; + *(outbuffer + offset + 1) = (u_altitude.base >> (8 * 1)) & 0xFF; + *(outbuffer + offset + 2) = (u_altitude.base >> (8 * 2)) & 0xFF; + *(outbuffer + offset + 3) = (u_altitude.base >> (8 * 3)) & 0xFF; + *(outbuffer + offset + 4) = (u_altitude.base >> (8 * 4)) & 0xFF; + *(outbuffer + offset + 5) = (u_altitude.base >> (8 * 5)) & 0xFF; + *(outbuffer + offset + 6) = (u_altitude.base >> (8 * 6)) & 0xFF; + *(outbuffer + offset + 7) = (u_altitude.base >> (8 * 7)) & 0xFF; + offset += sizeof(this->altitude); + offset += this->polygon.serialize(outbuffer + offset); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + union { + double real; + uint64_t base; + } u_altitude; + u_altitude.base = 0; + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); + u_altitude.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); + this->altitude = u_altitude.real; + offset += sizeof(this->altitude); + offset += this->polygon.deserialize(inbuffer + offset); + return offset; + } + + const char * getType(){ return "mav_planning_msgs/PolygonWithHolesStamped"; }; + const char * getMD5(){ return "75e2ac63509c016edab7c5a5ed67059b"; }; + + }; + +} +#endif