ROS Serial library for Mbed platforms for ROS Kinetic Kame. Check http://wiki.ros.org/rosserial_mbed/ for more information.

Dependencies:   BufferedSerial

Dependents:   mbed-os-example-blinky

Committer:
fllay
Date:
Thu Aug 01 17:08:55 2019 +0000
Revision:
2:f2240ad62eaf
Parent:
0:9e9b7db60fd5
fix time.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
garyservin 0:9e9b7db60fd5 1 #ifndef _ROS_control_msgs_PidState_h
garyservin 0:9e9b7db60fd5 2 #define _ROS_control_msgs_PidState_h
garyservin 0:9e9b7db60fd5 3
garyservin 0:9e9b7db60fd5 4 #include <stdint.h>
garyservin 0:9e9b7db60fd5 5 #include <string.h>
garyservin 0:9e9b7db60fd5 6 #include <stdlib.h>
garyservin 0:9e9b7db60fd5 7 #include "ros/msg.h"
garyservin 0:9e9b7db60fd5 8 #include "std_msgs/Header.h"
garyservin 0:9e9b7db60fd5 9 #include "ros/duration.h"
garyservin 0:9e9b7db60fd5 10
garyservin 0:9e9b7db60fd5 11 namespace control_msgs
garyservin 0:9e9b7db60fd5 12 {
garyservin 0:9e9b7db60fd5 13
garyservin 0:9e9b7db60fd5 14 class PidState : public ros::Msg
garyservin 0:9e9b7db60fd5 15 {
garyservin 0:9e9b7db60fd5 16 public:
garyservin 0:9e9b7db60fd5 17 typedef std_msgs::Header _header_type;
garyservin 0:9e9b7db60fd5 18 _header_type header;
garyservin 0:9e9b7db60fd5 19 typedef ros::Duration _timestep_type;
garyservin 0:9e9b7db60fd5 20 _timestep_type timestep;
garyservin 0:9e9b7db60fd5 21 typedef double _error_type;
garyservin 0:9e9b7db60fd5 22 _error_type error;
garyservin 0:9e9b7db60fd5 23 typedef double _error_dot_type;
garyservin 0:9e9b7db60fd5 24 _error_dot_type error_dot;
garyservin 0:9e9b7db60fd5 25 typedef double _p_error_type;
garyservin 0:9e9b7db60fd5 26 _p_error_type p_error;
garyservin 0:9e9b7db60fd5 27 typedef double _i_error_type;
garyservin 0:9e9b7db60fd5 28 _i_error_type i_error;
garyservin 0:9e9b7db60fd5 29 typedef double _d_error_type;
garyservin 0:9e9b7db60fd5 30 _d_error_type d_error;
garyservin 0:9e9b7db60fd5 31 typedef double _p_term_type;
garyservin 0:9e9b7db60fd5 32 _p_term_type p_term;
garyservin 0:9e9b7db60fd5 33 typedef double _i_term_type;
garyservin 0:9e9b7db60fd5 34 _i_term_type i_term;
garyservin 0:9e9b7db60fd5 35 typedef double _d_term_type;
garyservin 0:9e9b7db60fd5 36 _d_term_type d_term;
garyservin 0:9e9b7db60fd5 37 typedef double _i_max_type;
garyservin 0:9e9b7db60fd5 38 _i_max_type i_max;
garyservin 0:9e9b7db60fd5 39 typedef double _i_min_type;
garyservin 0:9e9b7db60fd5 40 _i_min_type i_min;
garyservin 0:9e9b7db60fd5 41 typedef double _output_type;
garyservin 0:9e9b7db60fd5 42 _output_type output;
garyservin 0:9e9b7db60fd5 43
garyservin 0:9e9b7db60fd5 44 PidState():
garyservin 0:9e9b7db60fd5 45 header(),
garyservin 0:9e9b7db60fd5 46 timestep(),
garyservin 0:9e9b7db60fd5 47 error(0),
garyservin 0:9e9b7db60fd5 48 error_dot(0),
garyservin 0:9e9b7db60fd5 49 p_error(0),
garyservin 0:9e9b7db60fd5 50 i_error(0),
garyservin 0:9e9b7db60fd5 51 d_error(0),
garyservin 0:9e9b7db60fd5 52 p_term(0),
garyservin 0:9e9b7db60fd5 53 i_term(0),
garyservin 0:9e9b7db60fd5 54 d_term(0),
garyservin 0:9e9b7db60fd5 55 i_max(0),
garyservin 0:9e9b7db60fd5 56 i_min(0),
garyservin 0:9e9b7db60fd5 57 output(0)
garyservin 0:9e9b7db60fd5 58 {
garyservin 0:9e9b7db60fd5 59 }
garyservin 0:9e9b7db60fd5 60
garyservin 0:9e9b7db60fd5 61 virtual int serialize(unsigned char *outbuffer) const
garyservin 0:9e9b7db60fd5 62 {
garyservin 0:9e9b7db60fd5 63 int offset = 0;
garyservin 0:9e9b7db60fd5 64 offset += this->header.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 65 *(outbuffer + offset + 0) = (this->timestep.sec >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 66 *(outbuffer + offset + 1) = (this->timestep.sec >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 67 *(outbuffer + offset + 2) = (this->timestep.sec >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 68 *(outbuffer + offset + 3) = (this->timestep.sec >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 69 offset += sizeof(this->timestep.sec);
garyservin 0:9e9b7db60fd5 70 *(outbuffer + offset + 0) = (this->timestep.nsec >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 71 *(outbuffer + offset + 1) = (this->timestep.nsec >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 72 *(outbuffer + offset + 2) = (this->timestep.nsec >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 73 *(outbuffer + offset + 3) = (this->timestep.nsec >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 74 offset += sizeof(this->timestep.nsec);
garyservin 0:9e9b7db60fd5 75 union {
garyservin 0:9e9b7db60fd5 76 double real;
garyservin 0:9e9b7db60fd5 77 uint64_t base;
garyservin 0:9e9b7db60fd5 78 } u_error;
garyservin 0:9e9b7db60fd5 79 u_error.real = this->error;
garyservin 0:9e9b7db60fd5 80 *(outbuffer + offset + 0) = (u_error.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 81 *(outbuffer + offset + 1) = (u_error.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 82 *(outbuffer + offset + 2) = (u_error.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 83 *(outbuffer + offset + 3) = (u_error.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 84 *(outbuffer + offset + 4) = (u_error.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 85 *(outbuffer + offset + 5) = (u_error.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 86 *(outbuffer + offset + 6) = (u_error.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 87 *(outbuffer + offset + 7) = (u_error.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 88 offset += sizeof(this->error);
garyservin 0:9e9b7db60fd5 89 union {
garyservin 0:9e9b7db60fd5 90 double real;
garyservin 0:9e9b7db60fd5 91 uint64_t base;
garyservin 0:9e9b7db60fd5 92 } u_error_dot;
garyservin 0:9e9b7db60fd5 93 u_error_dot.real = this->error_dot;
garyservin 0:9e9b7db60fd5 94 *(outbuffer + offset + 0) = (u_error_dot.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 95 *(outbuffer + offset + 1) = (u_error_dot.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 96 *(outbuffer + offset + 2) = (u_error_dot.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 97 *(outbuffer + offset + 3) = (u_error_dot.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 98 *(outbuffer + offset + 4) = (u_error_dot.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 99 *(outbuffer + offset + 5) = (u_error_dot.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 100 *(outbuffer + offset + 6) = (u_error_dot.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 101 *(outbuffer + offset + 7) = (u_error_dot.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 102 offset += sizeof(this->error_dot);
garyservin 0:9e9b7db60fd5 103 union {
garyservin 0:9e9b7db60fd5 104 double real;
garyservin 0:9e9b7db60fd5 105 uint64_t base;
garyservin 0:9e9b7db60fd5 106 } u_p_error;
garyservin 0:9e9b7db60fd5 107 u_p_error.real = this->p_error;
garyservin 0:9e9b7db60fd5 108 *(outbuffer + offset + 0) = (u_p_error.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 109 *(outbuffer + offset + 1) = (u_p_error.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 110 *(outbuffer + offset + 2) = (u_p_error.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 111 *(outbuffer + offset + 3) = (u_p_error.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 112 *(outbuffer + offset + 4) = (u_p_error.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 113 *(outbuffer + offset + 5) = (u_p_error.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 114 *(outbuffer + offset + 6) = (u_p_error.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 115 *(outbuffer + offset + 7) = (u_p_error.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 116 offset += sizeof(this->p_error);
garyservin 0:9e9b7db60fd5 117 union {
garyservin 0:9e9b7db60fd5 118 double real;
garyservin 0:9e9b7db60fd5 119 uint64_t base;
garyservin 0:9e9b7db60fd5 120 } u_i_error;
garyservin 0:9e9b7db60fd5 121 u_i_error.real = this->i_error;
garyservin 0:9e9b7db60fd5 122 *(outbuffer + offset + 0) = (u_i_error.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 123 *(outbuffer + offset + 1) = (u_i_error.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 124 *(outbuffer + offset + 2) = (u_i_error.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 125 *(outbuffer + offset + 3) = (u_i_error.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 126 *(outbuffer + offset + 4) = (u_i_error.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 127 *(outbuffer + offset + 5) = (u_i_error.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 128 *(outbuffer + offset + 6) = (u_i_error.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 129 *(outbuffer + offset + 7) = (u_i_error.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 130 offset += sizeof(this->i_error);
garyservin 0:9e9b7db60fd5 131 union {
garyservin 0:9e9b7db60fd5 132 double real;
garyservin 0:9e9b7db60fd5 133 uint64_t base;
garyservin 0:9e9b7db60fd5 134 } u_d_error;
garyservin 0:9e9b7db60fd5 135 u_d_error.real = this->d_error;
garyservin 0:9e9b7db60fd5 136 *(outbuffer + offset + 0) = (u_d_error.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 137 *(outbuffer + offset + 1) = (u_d_error.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 138 *(outbuffer + offset + 2) = (u_d_error.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 139 *(outbuffer + offset + 3) = (u_d_error.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 140 *(outbuffer + offset + 4) = (u_d_error.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 141 *(outbuffer + offset + 5) = (u_d_error.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 142 *(outbuffer + offset + 6) = (u_d_error.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 143 *(outbuffer + offset + 7) = (u_d_error.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 144 offset += sizeof(this->d_error);
garyservin 0:9e9b7db60fd5 145 union {
garyservin 0:9e9b7db60fd5 146 double real;
garyservin 0:9e9b7db60fd5 147 uint64_t base;
garyservin 0:9e9b7db60fd5 148 } u_p_term;
garyservin 0:9e9b7db60fd5 149 u_p_term.real = this->p_term;
garyservin 0:9e9b7db60fd5 150 *(outbuffer + offset + 0) = (u_p_term.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 151 *(outbuffer + offset + 1) = (u_p_term.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 152 *(outbuffer + offset + 2) = (u_p_term.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 153 *(outbuffer + offset + 3) = (u_p_term.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 154 *(outbuffer + offset + 4) = (u_p_term.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 155 *(outbuffer + offset + 5) = (u_p_term.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 156 *(outbuffer + offset + 6) = (u_p_term.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 157 *(outbuffer + offset + 7) = (u_p_term.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 158 offset += sizeof(this->p_term);
garyservin 0:9e9b7db60fd5 159 union {
garyservin 0:9e9b7db60fd5 160 double real;
garyservin 0:9e9b7db60fd5 161 uint64_t base;
garyservin 0:9e9b7db60fd5 162 } u_i_term;
garyservin 0:9e9b7db60fd5 163 u_i_term.real = this->i_term;
garyservin 0:9e9b7db60fd5 164 *(outbuffer + offset + 0) = (u_i_term.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 165 *(outbuffer + offset + 1) = (u_i_term.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 166 *(outbuffer + offset + 2) = (u_i_term.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 167 *(outbuffer + offset + 3) = (u_i_term.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 168 *(outbuffer + offset + 4) = (u_i_term.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 169 *(outbuffer + offset + 5) = (u_i_term.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 170 *(outbuffer + offset + 6) = (u_i_term.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 171 *(outbuffer + offset + 7) = (u_i_term.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 172 offset += sizeof(this->i_term);
garyservin 0:9e9b7db60fd5 173 union {
garyservin 0:9e9b7db60fd5 174 double real;
garyservin 0:9e9b7db60fd5 175 uint64_t base;
garyservin 0:9e9b7db60fd5 176 } u_d_term;
garyservin 0:9e9b7db60fd5 177 u_d_term.real = this->d_term;
garyservin 0:9e9b7db60fd5 178 *(outbuffer + offset + 0) = (u_d_term.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 179 *(outbuffer + offset + 1) = (u_d_term.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 180 *(outbuffer + offset + 2) = (u_d_term.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 181 *(outbuffer + offset + 3) = (u_d_term.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 182 *(outbuffer + offset + 4) = (u_d_term.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 183 *(outbuffer + offset + 5) = (u_d_term.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 184 *(outbuffer + offset + 6) = (u_d_term.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 185 *(outbuffer + offset + 7) = (u_d_term.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 186 offset += sizeof(this->d_term);
garyservin 0:9e9b7db60fd5 187 union {
garyservin 0:9e9b7db60fd5 188 double real;
garyservin 0:9e9b7db60fd5 189 uint64_t base;
garyservin 0:9e9b7db60fd5 190 } u_i_max;
garyservin 0:9e9b7db60fd5 191 u_i_max.real = this->i_max;
garyservin 0:9e9b7db60fd5 192 *(outbuffer + offset + 0) = (u_i_max.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 193 *(outbuffer + offset + 1) = (u_i_max.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 194 *(outbuffer + offset + 2) = (u_i_max.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 195 *(outbuffer + offset + 3) = (u_i_max.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 196 *(outbuffer + offset + 4) = (u_i_max.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 197 *(outbuffer + offset + 5) = (u_i_max.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 198 *(outbuffer + offset + 6) = (u_i_max.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 199 *(outbuffer + offset + 7) = (u_i_max.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 200 offset += sizeof(this->i_max);
garyservin 0:9e9b7db60fd5 201 union {
garyservin 0:9e9b7db60fd5 202 double real;
garyservin 0:9e9b7db60fd5 203 uint64_t base;
garyservin 0:9e9b7db60fd5 204 } u_i_min;
garyservin 0:9e9b7db60fd5 205 u_i_min.real = this->i_min;
garyservin 0:9e9b7db60fd5 206 *(outbuffer + offset + 0) = (u_i_min.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 207 *(outbuffer + offset + 1) = (u_i_min.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 208 *(outbuffer + offset + 2) = (u_i_min.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 209 *(outbuffer + offset + 3) = (u_i_min.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 210 *(outbuffer + offset + 4) = (u_i_min.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 211 *(outbuffer + offset + 5) = (u_i_min.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 212 *(outbuffer + offset + 6) = (u_i_min.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 213 *(outbuffer + offset + 7) = (u_i_min.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 214 offset += sizeof(this->i_min);
garyservin 0:9e9b7db60fd5 215 union {
garyservin 0:9e9b7db60fd5 216 double real;
garyservin 0:9e9b7db60fd5 217 uint64_t base;
garyservin 0:9e9b7db60fd5 218 } u_output;
garyservin 0:9e9b7db60fd5 219 u_output.real = this->output;
garyservin 0:9e9b7db60fd5 220 *(outbuffer + offset + 0) = (u_output.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 221 *(outbuffer + offset + 1) = (u_output.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 222 *(outbuffer + offset + 2) = (u_output.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 223 *(outbuffer + offset + 3) = (u_output.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 224 *(outbuffer + offset + 4) = (u_output.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 225 *(outbuffer + offset + 5) = (u_output.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 226 *(outbuffer + offset + 6) = (u_output.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 227 *(outbuffer + offset + 7) = (u_output.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 228 offset += sizeof(this->output);
garyservin 0:9e9b7db60fd5 229 return offset;
garyservin 0:9e9b7db60fd5 230 }
garyservin 0:9e9b7db60fd5 231
garyservin 0:9e9b7db60fd5 232 virtual int deserialize(unsigned char *inbuffer)
garyservin 0:9e9b7db60fd5 233 {
garyservin 0:9e9b7db60fd5 234 int offset = 0;
garyservin 0:9e9b7db60fd5 235 offset += this->header.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 236 this->timestep.sec = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 237 this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 238 this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 239 this->timestep.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 240 offset += sizeof(this->timestep.sec);
garyservin 0:9e9b7db60fd5 241 this->timestep.nsec = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 242 this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 243 this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 244 this->timestep.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 245 offset += sizeof(this->timestep.nsec);
garyservin 0:9e9b7db60fd5 246 union {
garyservin 0:9e9b7db60fd5 247 double real;
garyservin 0:9e9b7db60fd5 248 uint64_t base;
garyservin 0:9e9b7db60fd5 249 } u_error;
garyservin 0:9e9b7db60fd5 250 u_error.base = 0;
garyservin 0:9e9b7db60fd5 251 u_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 252 u_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 253 u_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 254 u_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 255 u_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 256 u_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 257 u_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 258 u_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 259 this->error = u_error.real;
garyservin 0:9e9b7db60fd5 260 offset += sizeof(this->error);
garyservin 0:9e9b7db60fd5 261 union {
garyservin 0:9e9b7db60fd5 262 double real;
garyservin 0:9e9b7db60fd5 263 uint64_t base;
garyservin 0:9e9b7db60fd5 264 } u_error_dot;
garyservin 0:9e9b7db60fd5 265 u_error_dot.base = 0;
garyservin 0:9e9b7db60fd5 266 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 267 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 268 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 269 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 270 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 271 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 272 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 273 u_error_dot.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 274 this->error_dot = u_error_dot.real;
garyservin 0:9e9b7db60fd5 275 offset += sizeof(this->error_dot);
garyservin 0:9e9b7db60fd5 276 union {
garyservin 0:9e9b7db60fd5 277 double real;
garyservin 0:9e9b7db60fd5 278 uint64_t base;
garyservin 0:9e9b7db60fd5 279 } u_p_error;
garyservin 0:9e9b7db60fd5 280 u_p_error.base = 0;
garyservin 0:9e9b7db60fd5 281 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 282 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 283 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 284 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 285 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 286 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 287 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 288 u_p_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 289 this->p_error = u_p_error.real;
garyservin 0:9e9b7db60fd5 290 offset += sizeof(this->p_error);
garyservin 0:9e9b7db60fd5 291 union {
garyservin 0:9e9b7db60fd5 292 double real;
garyservin 0:9e9b7db60fd5 293 uint64_t base;
garyservin 0:9e9b7db60fd5 294 } u_i_error;
garyservin 0:9e9b7db60fd5 295 u_i_error.base = 0;
garyservin 0:9e9b7db60fd5 296 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 297 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 298 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 299 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 300 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 301 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 302 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 303 u_i_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 304 this->i_error = u_i_error.real;
garyservin 0:9e9b7db60fd5 305 offset += sizeof(this->i_error);
garyservin 0:9e9b7db60fd5 306 union {
garyservin 0:9e9b7db60fd5 307 double real;
garyservin 0:9e9b7db60fd5 308 uint64_t base;
garyservin 0:9e9b7db60fd5 309 } u_d_error;
garyservin 0:9e9b7db60fd5 310 u_d_error.base = 0;
garyservin 0:9e9b7db60fd5 311 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 312 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 313 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 314 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 315 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 316 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 317 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 318 u_d_error.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 319 this->d_error = u_d_error.real;
garyservin 0:9e9b7db60fd5 320 offset += sizeof(this->d_error);
garyservin 0:9e9b7db60fd5 321 union {
garyservin 0:9e9b7db60fd5 322 double real;
garyservin 0:9e9b7db60fd5 323 uint64_t base;
garyservin 0:9e9b7db60fd5 324 } u_p_term;
garyservin 0:9e9b7db60fd5 325 u_p_term.base = 0;
garyservin 0:9e9b7db60fd5 326 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 327 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 328 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 329 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 330 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 331 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 332 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 333 u_p_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 334 this->p_term = u_p_term.real;
garyservin 0:9e9b7db60fd5 335 offset += sizeof(this->p_term);
garyservin 0:9e9b7db60fd5 336 union {
garyservin 0:9e9b7db60fd5 337 double real;
garyservin 0:9e9b7db60fd5 338 uint64_t base;
garyservin 0:9e9b7db60fd5 339 } u_i_term;
garyservin 0:9e9b7db60fd5 340 u_i_term.base = 0;
garyservin 0:9e9b7db60fd5 341 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 342 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 343 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 344 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 345 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 346 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 347 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 348 u_i_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 349 this->i_term = u_i_term.real;
garyservin 0:9e9b7db60fd5 350 offset += sizeof(this->i_term);
garyservin 0:9e9b7db60fd5 351 union {
garyservin 0:9e9b7db60fd5 352 double real;
garyservin 0:9e9b7db60fd5 353 uint64_t base;
garyservin 0:9e9b7db60fd5 354 } u_d_term;
garyservin 0:9e9b7db60fd5 355 u_d_term.base = 0;
garyservin 0:9e9b7db60fd5 356 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 357 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 358 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 359 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 360 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 361 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 362 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 363 u_d_term.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 364 this->d_term = u_d_term.real;
garyservin 0:9e9b7db60fd5 365 offset += sizeof(this->d_term);
garyservin 0:9e9b7db60fd5 366 union {
garyservin 0:9e9b7db60fd5 367 double real;
garyservin 0:9e9b7db60fd5 368 uint64_t base;
garyservin 0:9e9b7db60fd5 369 } u_i_max;
garyservin 0:9e9b7db60fd5 370 u_i_max.base = 0;
garyservin 0:9e9b7db60fd5 371 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 372 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 373 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 374 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 375 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 376 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 377 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 378 u_i_max.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 379 this->i_max = u_i_max.real;
garyservin 0:9e9b7db60fd5 380 offset += sizeof(this->i_max);
garyservin 0:9e9b7db60fd5 381 union {
garyservin 0:9e9b7db60fd5 382 double real;
garyservin 0:9e9b7db60fd5 383 uint64_t base;
garyservin 0:9e9b7db60fd5 384 } u_i_min;
garyservin 0:9e9b7db60fd5 385 u_i_min.base = 0;
garyservin 0:9e9b7db60fd5 386 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 387 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 388 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 389 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 390 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 391 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 392 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 393 u_i_min.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 394 this->i_min = u_i_min.real;
garyservin 0:9e9b7db60fd5 395 offset += sizeof(this->i_min);
garyservin 0:9e9b7db60fd5 396 union {
garyservin 0:9e9b7db60fd5 397 double real;
garyservin 0:9e9b7db60fd5 398 uint64_t base;
garyservin 0:9e9b7db60fd5 399 } u_output;
garyservin 0:9e9b7db60fd5 400 u_output.base = 0;
garyservin 0:9e9b7db60fd5 401 u_output.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 402 u_output.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 403 u_output.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 404 u_output.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 405 u_output.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 406 u_output.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 407 u_output.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 408 u_output.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 409 this->output = u_output.real;
garyservin 0:9e9b7db60fd5 410 offset += sizeof(this->output);
garyservin 0:9e9b7db60fd5 411 return offset;
garyservin 0:9e9b7db60fd5 412 }
garyservin 0:9e9b7db60fd5 413
garyservin 0:9e9b7db60fd5 414 const char * getType(){ return "control_msgs/PidState"; };
garyservin 0:9e9b7db60fd5 415 const char * getMD5(){ return "b138ec00e886c10e73f27e8712252ea6"; };
garyservin 0:9e9b7db60fd5 416
garyservin 0:9e9b7db60fd5 417 };
garyservin 0:9e9b7db60fd5 418
garyservin 0:9e9b7db60fd5 419 }
garyservin 0:9e9b7db60fd5 420 #endif