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.
ros_lib/mavros_msgs/WaypointSetCurrent.h@0:8f3710bfd298, 2020-09-02 (annotated)
- Committer:
- irfantitok
- Date:
- Wed Sep 02 13:51:31 2020 +0000
- Revision:
- 0:8f3710bfd298
Resolved round not found
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
irfantitok | 0:8f3710bfd298 | 1 | #ifndef _ROS_SERVICE_WaypointSetCurrent_h |
irfantitok | 0:8f3710bfd298 | 2 | #define _ROS_SERVICE_WaypointSetCurrent_h |
irfantitok | 0:8f3710bfd298 | 3 | #include <stdint.h> |
irfantitok | 0:8f3710bfd298 | 4 | #include <string.h> |
irfantitok | 0:8f3710bfd298 | 5 | #include <stdlib.h> |
irfantitok | 0:8f3710bfd298 | 6 | #include "ros/msg.h" |
irfantitok | 0:8f3710bfd298 | 7 | |
irfantitok | 0:8f3710bfd298 | 8 | namespace mavros_msgs |
irfantitok | 0:8f3710bfd298 | 9 | { |
irfantitok | 0:8f3710bfd298 | 10 | |
irfantitok | 0:8f3710bfd298 | 11 | static const char WAYPOINTSETCURRENT[] = "mavros_msgs/WaypointSetCurrent"; |
irfantitok | 0:8f3710bfd298 | 12 | |
irfantitok | 0:8f3710bfd298 | 13 | class WaypointSetCurrentRequest : public ros::Msg |
irfantitok | 0:8f3710bfd298 | 14 | { |
irfantitok | 0:8f3710bfd298 | 15 | public: |
irfantitok | 0:8f3710bfd298 | 16 | typedef uint16_t _wp_seq_type; |
irfantitok | 0:8f3710bfd298 | 17 | _wp_seq_type wp_seq; |
irfantitok | 0:8f3710bfd298 | 18 | |
irfantitok | 0:8f3710bfd298 | 19 | WaypointSetCurrentRequest(): |
irfantitok | 0:8f3710bfd298 | 20 | wp_seq(0) |
irfantitok | 0:8f3710bfd298 | 21 | { |
irfantitok | 0:8f3710bfd298 | 22 | } |
irfantitok | 0:8f3710bfd298 | 23 | |
irfantitok | 0:8f3710bfd298 | 24 | virtual int serialize(unsigned char *outbuffer) const |
irfantitok | 0:8f3710bfd298 | 25 | { |
irfantitok | 0:8f3710bfd298 | 26 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 27 | *(outbuffer + offset + 0) = (this->wp_seq >> (8 * 0)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 28 | *(outbuffer + offset + 1) = (this->wp_seq >> (8 * 1)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 29 | offset += sizeof(this->wp_seq); |
irfantitok | 0:8f3710bfd298 | 30 | return offset; |
irfantitok | 0:8f3710bfd298 | 31 | } |
irfantitok | 0:8f3710bfd298 | 32 | |
irfantitok | 0:8f3710bfd298 | 33 | virtual int deserialize(unsigned char *inbuffer) |
irfantitok | 0:8f3710bfd298 | 34 | { |
irfantitok | 0:8f3710bfd298 | 35 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 36 | this->wp_seq = ((uint16_t) (*(inbuffer + offset))); |
irfantitok | 0:8f3710bfd298 | 37 | this->wp_seq |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1); |
irfantitok | 0:8f3710bfd298 | 38 | offset += sizeof(this->wp_seq); |
irfantitok | 0:8f3710bfd298 | 39 | return offset; |
irfantitok | 0:8f3710bfd298 | 40 | } |
irfantitok | 0:8f3710bfd298 | 41 | |
irfantitok | 0:8f3710bfd298 | 42 | const char * getType(){ return WAYPOINTSETCURRENT; }; |
irfantitok | 0:8f3710bfd298 | 43 | const char * getMD5(){ return "9541369175e0776b0fef1c988db6840f"; }; |
irfantitok | 0:8f3710bfd298 | 44 | |
irfantitok | 0:8f3710bfd298 | 45 | }; |
irfantitok | 0:8f3710bfd298 | 46 | |
irfantitok | 0:8f3710bfd298 | 47 | class WaypointSetCurrentResponse : public ros::Msg |
irfantitok | 0:8f3710bfd298 | 48 | { |
irfantitok | 0:8f3710bfd298 | 49 | public: |
irfantitok | 0:8f3710bfd298 | 50 | typedef bool _success_type; |
irfantitok | 0:8f3710bfd298 | 51 | _success_type success; |
irfantitok | 0:8f3710bfd298 | 52 | |
irfantitok | 0:8f3710bfd298 | 53 | WaypointSetCurrentResponse(): |
irfantitok | 0:8f3710bfd298 | 54 | success(0) |
irfantitok | 0:8f3710bfd298 | 55 | { |
irfantitok | 0:8f3710bfd298 | 56 | } |
irfantitok | 0:8f3710bfd298 | 57 | |
irfantitok | 0:8f3710bfd298 | 58 | virtual int serialize(unsigned char *outbuffer) const |
irfantitok | 0:8f3710bfd298 | 59 | { |
irfantitok | 0:8f3710bfd298 | 60 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 61 | union { |
irfantitok | 0:8f3710bfd298 | 62 | bool real; |
irfantitok | 0:8f3710bfd298 | 63 | uint8_t base; |
irfantitok | 0:8f3710bfd298 | 64 | } u_success; |
irfantitok | 0:8f3710bfd298 | 65 | u_success.real = this->success; |
irfantitok | 0:8f3710bfd298 | 66 | *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 67 | offset += sizeof(this->success); |
irfantitok | 0:8f3710bfd298 | 68 | return offset; |
irfantitok | 0:8f3710bfd298 | 69 | } |
irfantitok | 0:8f3710bfd298 | 70 | |
irfantitok | 0:8f3710bfd298 | 71 | virtual int deserialize(unsigned char *inbuffer) |
irfantitok | 0:8f3710bfd298 | 72 | { |
irfantitok | 0:8f3710bfd298 | 73 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 74 | union { |
irfantitok | 0:8f3710bfd298 | 75 | bool real; |
irfantitok | 0:8f3710bfd298 | 76 | uint8_t base; |
irfantitok | 0:8f3710bfd298 | 77 | } u_success; |
irfantitok | 0:8f3710bfd298 | 78 | u_success.base = 0; |
irfantitok | 0:8f3710bfd298 | 79 | u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0); |
irfantitok | 0:8f3710bfd298 | 80 | this->success = u_success.real; |
irfantitok | 0:8f3710bfd298 | 81 | offset += sizeof(this->success); |
irfantitok | 0:8f3710bfd298 | 82 | return offset; |
irfantitok | 0:8f3710bfd298 | 83 | } |
irfantitok | 0:8f3710bfd298 | 84 | |
irfantitok | 0:8f3710bfd298 | 85 | const char * getType(){ return WAYPOINTSETCURRENT; }; |
irfantitok | 0:8f3710bfd298 | 86 | const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; }; |
irfantitok | 0:8f3710bfd298 | 87 | |
irfantitok | 0:8f3710bfd298 | 88 | }; |
irfantitok | 0:8f3710bfd298 | 89 | |
irfantitok | 0:8f3710bfd298 | 90 | class WaypointSetCurrent { |
irfantitok | 0:8f3710bfd298 | 91 | public: |
irfantitok | 0:8f3710bfd298 | 92 | typedef WaypointSetCurrentRequest Request; |
irfantitok | 0:8f3710bfd298 | 93 | typedef WaypointSetCurrentResponse Response; |
irfantitok | 0:8f3710bfd298 | 94 | }; |
irfantitok | 0:8f3710bfd298 | 95 | |
irfantitok | 0:8f3710bfd298 | 96 | } |
irfantitok | 0:8f3710bfd298 | 97 | #endif |