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/actionlib/TwoIntsGoal.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_actionlib_TwoIntsGoal_h |
irfantitok | 0:8f3710bfd298 | 2 | #define _ROS_actionlib_TwoIntsGoal_h |
irfantitok | 0:8f3710bfd298 | 3 | |
irfantitok | 0:8f3710bfd298 | 4 | #include <stdint.h> |
irfantitok | 0:8f3710bfd298 | 5 | #include <string.h> |
irfantitok | 0:8f3710bfd298 | 6 | #include <stdlib.h> |
irfantitok | 0:8f3710bfd298 | 7 | #include "ros/msg.h" |
irfantitok | 0:8f3710bfd298 | 8 | |
irfantitok | 0:8f3710bfd298 | 9 | namespace actionlib |
irfantitok | 0:8f3710bfd298 | 10 | { |
irfantitok | 0:8f3710bfd298 | 11 | |
irfantitok | 0:8f3710bfd298 | 12 | class TwoIntsGoal : public ros::Msg |
irfantitok | 0:8f3710bfd298 | 13 | { |
irfantitok | 0:8f3710bfd298 | 14 | public: |
irfantitok | 0:8f3710bfd298 | 15 | typedef int64_t _a_type; |
irfantitok | 0:8f3710bfd298 | 16 | _a_type a; |
irfantitok | 0:8f3710bfd298 | 17 | typedef int64_t _b_type; |
irfantitok | 0:8f3710bfd298 | 18 | _b_type b; |
irfantitok | 0:8f3710bfd298 | 19 | |
irfantitok | 0:8f3710bfd298 | 20 | TwoIntsGoal(): |
irfantitok | 0:8f3710bfd298 | 21 | a(0), |
irfantitok | 0:8f3710bfd298 | 22 | b(0) |
irfantitok | 0:8f3710bfd298 | 23 | { |
irfantitok | 0:8f3710bfd298 | 24 | } |
irfantitok | 0:8f3710bfd298 | 25 | |
irfantitok | 0:8f3710bfd298 | 26 | virtual int serialize(unsigned char *outbuffer) const |
irfantitok | 0:8f3710bfd298 | 27 | { |
irfantitok | 0:8f3710bfd298 | 28 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 29 | union { |
irfantitok | 0:8f3710bfd298 | 30 | int64_t real; |
irfantitok | 0:8f3710bfd298 | 31 | uint64_t base; |
irfantitok | 0:8f3710bfd298 | 32 | } u_a; |
irfantitok | 0:8f3710bfd298 | 33 | u_a.real = this->a; |
irfantitok | 0:8f3710bfd298 | 34 | *(outbuffer + offset + 0) = (u_a.base >> (8 * 0)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 35 | *(outbuffer + offset + 1) = (u_a.base >> (8 * 1)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 36 | *(outbuffer + offset + 2) = (u_a.base >> (8 * 2)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 37 | *(outbuffer + offset + 3) = (u_a.base >> (8 * 3)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 38 | *(outbuffer + offset + 4) = (u_a.base >> (8 * 4)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 39 | *(outbuffer + offset + 5) = (u_a.base >> (8 * 5)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 40 | *(outbuffer + offset + 6) = (u_a.base >> (8 * 6)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 41 | *(outbuffer + offset + 7) = (u_a.base >> (8 * 7)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 42 | offset += sizeof(this->a); |
irfantitok | 0:8f3710bfd298 | 43 | union { |
irfantitok | 0:8f3710bfd298 | 44 | int64_t real; |
irfantitok | 0:8f3710bfd298 | 45 | uint64_t base; |
irfantitok | 0:8f3710bfd298 | 46 | } u_b; |
irfantitok | 0:8f3710bfd298 | 47 | u_b.real = this->b; |
irfantitok | 0:8f3710bfd298 | 48 | *(outbuffer + offset + 0) = (u_b.base >> (8 * 0)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 49 | *(outbuffer + offset + 1) = (u_b.base >> (8 * 1)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 50 | *(outbuffer + offset + 2) = (u_b.base >> (8 * 2)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 51 | *(outbuffer + offset + 3) = (u_b.base >> (8 * 3)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 52 | *(outbuffer + offset + 4) = (u_b.base >> (8 * 4)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 53 | *(outbuffer + offset + 5) = (u_b.base >> (8 * 5)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 54 | *(outbuffer + offset + 6) = (u_b.base >> (8 * 6)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 55 | *(outbuffer + offset + 7) = (u_b.base >> (8 * 7)) & 0xFF; |
irfantitok | 0:8f3710bfd298 | 56 | offset += sizeof(this->b); |
irfantitok | 0:8f3710bfd298 | 57 | return offset; |
irfantitok | 0:8f3710bfd298 | 58 | } |
irfantitok | 0:8f3710bfd298 | 59 | |
irfantitok | 0:8f3710bfd298 | 60 | virtual int deserialize(unsigned char *inbuffer) |
irfantitok | 0:8f3710bfd298 | 61 | { |
irfantitok | 0:8f3710bfd298 | 62 | int offset = 0; |
irfantitok | 0:8f3710bfd298 | 63 | union { |
irfantitok | 0:8f3710bfd298 | 64 | int64_t real; |
irfantitok | 0:8f3710bfd298 | 65 | uint64_t base; |
irfantitok | 0:8f3710bfd298 | 66 | } u_a; |
irfantitok | 0:8f3710bfd298 | 67 | u_a.base = 0; |
irfantitok | 0:8f3710bfd298 | 68 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
irfantitok | 0:8f3710bfd298 | 69 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
irfantitok | 0:8f3710bfd298 | 70 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
irfantitok | 0:8f3710bfd298 | 71 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
irfantitok | 0:8f3710bfd298 | 72 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
irfantitok | 0:8f3710bfd298 | 73 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
irfantitok | 0:8f3710bfd298 | 74 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
irfantitok | 0:8f3710bfd298 | 75 | u_a.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
irfantitok | 0:8f3710bfd298 | 76 | this->a = u_a.real; |
irfantitok | 0:8f3710bfd298 | 77 | offset += sizeof(this->a); |
irfantitok | 0:8f3710bfd298 | 78 | union { |
irfantitok | 0:8f3710bfd298 | 79 | int64_t real; |
irfantitok | 0:8f3710bfd298 | 80 | uint64_t base; |
irfantitok | 0:8f3710bfd298 | 81 | } u_b; |
irfantitok | 0:8f3710bfd298 | 82 | u_b.base = 0; |
irfantitok | 0:8f3710bfd298 | 83 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); |
irfantitok | 0:8f3710bfd298 | 84 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); |
irfantitok | 0:8f3710bfd298 | 85 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); |
irfantitok | 0:8f3710bfd298 | 86 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); |
irfantitok | 0:8f3710bfd298 | 87 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); |
irfantitok | 0:8f3710bfd298 | 88 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); |
irfantitok | 0:8f3710bfd298 | 89 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); |
irfantitok | 0:8f3710bfd298 | 90 | u_b.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); |
irfantitok | 0:8f3710bfd298 | 91 | this->b = u_b.real; |
irfantitok | 0:8f3710bfd298 | 92 | offset += sizeof(this->b); |
irfantitok | 0:8f3710bfd298 | 93 | return offset; |
irfantitok | 0:8f3710bfd298 | 94 | } |
irfantitok | 0:8f3710bfd298 | 95 | |
irfantitok | 0:8f3710bfd298 | 96 | const char * getType(){ return "actionlib/TwoIntsGoal"; }; |
irfantitok | 0:8f3710bfd298 | 97 | const char * getMD5(){ return "36d09b846be0b371c5f190354dd3153e"; }; |
irfantitok | 0:8f3710bfd298 | 98 | |
irfantitok | 0:8f3710bfd298 | 99 | }; |
irfantitok | 0:8f3710bfd298 | 100 | |
irfantitok | 0:8f3710bfd298 | 101 | } |
irfantitok | 0:8f3710bfd298 | 102 | #endif |