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/mavros_msgs/CommandVtolTransition.h
- Revision:
- 0:8f3710bfd298
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ros_lib/mavros_msgs/CommandVtolTransition.h Wed Sep 02 13:51:31 2020 +0000 @@ -0,0 +1,110 @@ +#ifndef _ROS_SERVICE_CommandVtolTransition_h +#define _ROS_SERVICE_CommandVtolTransition_h +#include <stdint.h> +#include <string.h> +#include <stdlib.h> +#include "ros/msg.h" +#include "std_msgs/Header.h" + +namespace mavros_msgs +{ + +static const char COMMANDVTOLTRANSITION[] = "mavros_msgs/CommandVtolTransition"; + + class CommandVtolTransitionRequest : public ros::Msg + { + public: + typedef std_msgs::Header _header_type; + _header_type header; + typedef uint8_t _state_type; + _state_type state; + enum { STATE_MC = 3 }; + enum { STATE_FW = 4 }; + + CommandVtolTransitionRequest(): + header(), + state(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + offset += this->header.serialize(outbuffer + offset); + *(outbuffer + offset + 0) = (this->state >> (8 * 0)) & 0xFF; + offset += sizeof(this->state); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + offset += this->header.deserialize(inbuffer + offset); + this->state = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->state); + return offset; + } + + const char * getType(){ return COMMANDVTOLTRANSITION; }; + const char * getMD5(){ return "0f073c606cdf8c014b856a5033900f3e"; }; + + }; + + class CommandVtolTransitionResponse : public ros::Msg + { + public: + typedef bool _success_type; + _success_type success; + typedef uint8_t _result_type; + _result_type result; + + CommandVtolTransitionResponse(): + success(0), + result(0) + { + } + + virtual int serialize(unsigned char *outbuffer) const + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.real = this->success; + *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; + offset += sizeof(this->success); + *(outbuffer + offset + 0) = (this->result >> (8 * 0)) & 0xFF; + offset += sizeof(this->result); + return offset; + } + + virtual int deserialize(unsigned char *inbuffer) + { + int offset = 0; + union { + bool real; + uint8_t base; + } u_success; + u_success.base = 0; + u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); + this->success = u_success.real; + offset += sizeof(this->success); + this->result = ((uint8_t) (*(inbuffer + offset))); + offset += sizeof(this->result); + return offset; + } + + const char * getType(){ return COMMANDVTOLTRANSITION; }; + const char * getMD5(){ return "1cd894375e4e3d2861d2222772894fdb"; }; + + }; + + class CommandVtolTransition { + public: + typedef CommandVtolTransitionRequest Request; + typedef CommandVtolTransitionResponse Response; + }; + +} +#endif