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.
SingleJointPositionFeedback.h
00001 #ifndef _ROS_control_msgs_SingleJointPositionFeedback_h 00002 #define _ROS_control_msgs_SingleJointPositionFeedback_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 00010 namespace control_msgs 00011 { 00012 00013 class SingleJointPositionFeedback : public ros::Msg 00014 { 00015 public: 00016 typedef std_msgs::Header _header_type; 00017 _header_type header; 00018 typedef double _position_type; 00019 _position_type position; 00020 typedef double _velocity_type; 00021 _velocity_type velocity; 00022 typedef double _error_type; 00023 _error_type error; 00024 00025 SingleJointPositionFeedback(): 00026 header(), 00027 position(0), 00028 velocity(0), 00029 error(0) 00030 { 00031 } 00032 00033 virtual int serialize(unsigned char *outbuffer) const 00034 { 00035 int offset = 0; 00036 offset += this->header.serialize(outbuffer + offset); 00037 union { 00038 double real; 00039 uint64_t base; 00040 } u_position; 00041 u_position.real = this->position; 00042 *(outbuffer + offset + 0) = (u_position.base >> (8 * 0)) & 0xFF; 00043 *(outbuffer + offset + 1) = (u_position.base >> (8 * 1)) & 0xFF; 00044 *(outbuffer + offset + 2) = (u_position.base >> (8 * 2)) & 0xFF; 00045 *(outbuffer + offset + 3) = (u_position.base >> (8 * 3)) & 0xFF; 00046 *(outbuffer + offset + 4) = (u_position.base >> (8 * 4)) & 0xFF; 00047 *(outbuffer + offset + 5) = (u_position.base >> (8 * 5)) & 0xFF; 00048 *(outbuffer + offset + 6) = (u_position.base >> (8 * 6)) & 0xFF; 00049 *(outbuffer + offset + 7) = (u_position.base >> (8 * 7)) & 0xFF; 00050 offset += sizeof(this->position); 00051 union { 00052 double real; 00053 uint64_t base; 00054 } u_velocity; 00055 u_velocity.real = this->velocity; 00056 *(outbuffer + offset + 0) = (u_velocity.base >> (8 * 0)) & 0xFF; 00057 *(outbuffer + offset + 1) = (u_velocity.base >> (8 * 1)) & 0xFF; 00058 *(outbuffer + offset + 2) = (u_velocity.base >> (8 * 2)) & 0xFF; 00059 *(outbuffer + offset + 3) = (u_velocity.base >> (8 * 3)) & 0xFF; 00060 *(outbuffer + offset + 4) = (u_velocity.base >> (8 * 4)) & 0xFF; 00061 *(outbuffer + offset + 5) = (u_velocity.base >> (8 * 5)) & 0xFF; 00062 *(outbuffer + offset + 6) = (u_velocity.base >> (8 * 6)) & 0xFF; 00063 *(outbuffer + offset + 7) = (u_velocity.base >> (8 * 7)) & 0xFF; 00064 offset += sizeof(this->velocity); 00065 union { 00066 double real; 00067 uint64_t base; 00068 } u_error; 00069 u_error.real = this->error; 00070 *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF; 00071 *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF; 00072 *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF; 00073 *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF; 00074 *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF; 00075 *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF; 00076 *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF; 00077 *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF; 00078 offset += sizeof(this->error); 00079 return offset; 00080 } 00081 00082 virtual int deserialize(unsigned char *inbuffer) 00083 { 00084 int offset = 0; 00085 offset += this->header.deserialize(inbuffer + offset); 00086 union { 00087 double real; 00088 uint64_t base; 00089 } u_position; 00090 u_position.base = 0; 00091 u_position.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00092 u_position.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00093 u_position.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00094 u_position.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00095 u_position.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00096 u_position.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00097 u_position.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00098 u_position.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00099 this->position = u_position.real; 00100 offset += sizeof(this->position); 00101 union { 00102 double real; 00103 uint64_t base; 00104 } u_velocity; 00105 u_velocity.base = 0; 00106 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00107 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00108 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00109 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00110 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00111 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00112 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00113 u_velocity.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00114 this->velocity = u_velocity.real; 00115 offset += sizeof(this->velocity); 00116 union { 00117 double real; 00118 uint64_t base; 00119 } u_error; 00120 u_error.base = 0; 00121 u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0); 00122 u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1); 00123 u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2); 00124 u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3); 00125 u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4); 00126 u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5); 00127 u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6); 00128 u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7); 00129 this->error = u_error.real; 00130 offset += sizeof(this->error); 00131 return offset; 00132 } 00133 00134 const char * getType(){ return "control_msgs/SingleJointPositionFeedback"; }; 00135 const char * getMD5(){ return "8cee65610a3d08e0a1bded82f146f1fd"; }; 00136 00137 }; 00138 00139 } 00140 #endif
Generated on Wed Jul 13 2022 23:30:18 by
