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

Dependencies:   BufferedSerial

Committer:
krogedal
Date:
Thu May 27 19:25:46 2021 +0000
Revision:
2:fa426560b283
Parent:
0:04ac6be8229a
no change

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Gary Servin 0:04ac6be8229a 1 #ifndef _ROS_gazebo_msgs_ODEJointProperties_h
Gary Servin 0:04ac6be8229a 2 #define _ROS_gazebo_msgs_ODEJointProperties_h
Gary Servin 0:04ac6be8229a 3
Gary Servin 0:04ac6be8229a 4 #include <stdint.h>
Gary Servin 0:04ac6be8229a 5 #include <string.h>
Gary Servin 0:04ac6be8229a 6 #include <stdlib.h>
Gary Servin 0:04ac6be8229a 7 #include "ros/msg.h"
Gary Servin 0:04ac6be8229a 8
Gary Servin 0:04ac6be8229a 9 namespace gazebo_msgs
Gary Servin 0:04ac6be8229a 10 {
Gary Servin 0:04ac6be8229a 11
Gary Servin 0:04ac6be8229a 12 class ODEJointProperties : public ros::Msg
Gary Servin 0:04ac6be8229a 13 {
Gary Servin 0:04ac6be8229a 14 public:
Gary Servin 0:04ac6be8229a 15 uint32_t damping_length;
Gary Servin 0:04ac6be8229a 16 typedef double _damping_type;
Gary Servin 0:04ac6be8229a 17 _damping_type st_damping;
Gary Servin 0:04ac6be8229a 18 _damping_type * damping;
Gary Servin 0:04ac6be8229a 19 uint32_t hiStop_length;
Gary Servin 0:04ac6be8229a 20 typedef double _hiStop_type;
Gary Servin 0:04ac6be8229a 21 _hiStop_type st_hiStop;
Gary Servin 0:04ac6be8229a 22 _hiStop_type * hiStop;
Gary Servin 0:04ac6be8229a 23 uint32_t loStop_length;
Gary Servin 0:04ac6be8229a 24 typedef double _loStop_type;
Gary Servin 0:04ac6be8229a 25 _loStop_type st_loStop;
Gary Servin 0:04ac6be8229a 26 _loStop_type * loStop;
Gary Servin 0:04ac6be8229a 27 uint32_t erp_length;
Gary Servin 0:04ac6be8229a 28 typedef double _erp_type;
Gary Servin 0:04ac6be8229a 29 _erp_type st_erp;
Gary Servin 0:04ac6be8229a 30 _erp_type * erp;
Gary Servin 0:04ac6be8229a 31 uint32_t cfm_length;
Gary Servin 0:04ac6be8229a 32 typedef double _cfm_type;
Gary Servin 0:04ac6be8229a 33 _cfm_type st_cfm;
Gary Servin 0:04ac6be8229a 34 _cfm_type * cfm;
Gary Servin 0:04ac6be8229a 35 uint32_t stop_erp_length;
Gary Servin 0:04ac6be8229a 36 typedef double _stop_erp_type;
Gary Servin 0:04ac6be8229a 37 _stop_erp_type st_stop_erp;
Gary Servin 0:04ac6be8229a 38 _stop_erp_type * stop_erp;
Gary Servin 0:04ac6be8229a 39 uint32_t stop_cfm_length;
Gary Servin 0:04ac6be8229a 40 typedef double _stop_cfm_type;
Gary Servin 0:04ac6be8229a 41 _stop_cfm_type st_stop_cfm;
Gary Servin 0:04ac6be8229a 42 _stop_cfm_type * stop_cfm;
Gary Servin 0:04ac6be8229a 43 uint32_t fudge_factor_length;
Gary Servin 0:04ac6be8229a 44 typedef double _fudge_factor_type;
Gary Servin 0:04ac6be8229a 45 _fudge_factor_type st_fudge_factor;
Gary Servin 0:04ac6be8229a 46 _fudge_factor_type * fudge_factor;
Gary Servin 0:04ac6be8229a 47 uint32_t fmax_length;
Gary Servin 0:04ac6be8229a 48 typedef double _fmax_type;
Gary Servin 0:04ac6be8229a 49 _fmax_type st_fmax;
Gary Servin 0:04ac6be8229a 50 _fmax_type * fmax;
Gary Servin 0:04ac6be8229a 51 uint32_t vel_length;
Gary Servin 0:04ac6be8229a 52 typedef double _vel_type;
Gary Servin 0:04ac6be8229a 53 _vel_type st_vel;
Gary Servin 0:04ac6be8229a 54 _vel_type * vel;
Gary Servin 0:04ac6be8229a 55
Gary Servin 0:04ac6be8229a 56 ODEJointProperties():
Gary Servin 0:04ac6be8229a 57 damping_length(0), damping(NULL),
Gary Servin 0:04ac6be8229a 58 hiStop_length(0), hiStop(NULL),
Gary Servin 0:04ac6be8229a 59 loStop_length(0), loStop(NULL),
Gary Servin 0:04ac6be8229a 60 erp_length(0), erp(NULL),
Gary Servin 0:04ac6be8229a 61 cfm_length(0), cfm(NULL),
Gary Servin 0:04ac6be8229a 62 stop_erp_length(0), stop_erp(NULL),
Gary Servin 0:04ac6be8229a 63 stop_cfm_length(0), stop_cfm(NULL),
Gary Servin 0:04ac6be8229a 64 fudge_factor_length(0), fudge_factor(NULL),
Gary Servin 0:04ac6be8229a 65 fmax_length(0), fmax(NULL),
Gary Servin 0:04ac6be8229a 66 vel_length(0), vel(NULL)
Gary Servin 0:04ac6be8229a 67 {
Gary Servin 0:04ac6be8229a 68 }
Gary Servin 0:04ac6be8229a 69
Gary Servin 0:04ac6be8229a 70 virtual int serialize(unsigned char *outbuffer) const
Gary Servin 0:04ac6be8229a 71 {
Gary Servin 0:04ac6be8229a 72 int offset = 0;
Gary Servin 0:04ac6be8229a 73 *(outbuffer + offset + 0) = (this->damping_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 74 *(outbuffer + offset + 1) = (this->damping_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 75 *(outbuffer + offset + 2) = (this->damping_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 76 *(outbuffer + offset + 3) = (this->damping_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 77 offset += sizeof(this->damping_length);
Gary Servin 0:04ac6be8229a 78 for( uint32_t i = 0; i < damping_length; i++){
Gary Servin 0:04ac6be8229a 79 union {
Gary Servin 0:04ac6be8229a 80 double real;
Gary Servin 0:04ac6be8229a 81 uint64_t base;
Gary Servin 0:04ac6be8229a 82 } u_dampingi;
Gary Servin 0:04ac6be8229a 83 u_dampingi.real = this->damping[i];
Gary Servin 0:04ac6be8229a 84 *(outbuffer + offset + 0) = (u_dampingi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 85 *(outbuffer + offset + 1) = (u_dampingi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 86 *(outbuffer + offset + 2) = (u_dampingi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 87 *(outbuffer + offset + 3) = (u_dampingi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 88 *(outbuffer + offset + 4) = (u_dampingi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 89 *(outbuffer + offset + 5) = (u_dampingi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 90 *(outbuffer + offset + 6) = (u_dampingi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 91 *(outbuffer + offset + 7) = (u_dampingi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 92 offset += sizeof(this->damping[i]);
Gary Servin 0:04ac6be8229a 93 }
Gary Servin 0:04ac6be8229a 94 *(outbuffer + offset + 0) = (this->hiStop_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 95 *(outbuffer + offset + 1) = (this->hiStop_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 96 *(outbuffer + offset + 2) = (this->hiStop_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 97 *(outbuffer + offset + 3) = (this->hiStop_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 98 offset += sizeof(this->hiStop_length);
Gary Servin 0:04ac6be8229a 99 for( uint32_t i = 0; i < hiStop_length; i++){
Gary Servin 0:04ac6be8229a 100 union {
Gary Servin 0:04ac6be8229a 101 double real;
Gary Servin 0:04ac6be8229a 102 uint64_t base;
Gary Servin 0:04ac6be8229a 103 } u_hiStopi;
Gary Servin 0:04ac6be8229a 104 u_hiStopi.real = this->hiStop[i];
Gary Servin 0:04ac6be8229a 105 *(outbuffer + offset + 0) = (u_hiStopi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 106 *(outbuffer + offset + 1) = (u_hiStopi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 107 *(outbuffer + offset + 2) = (u_hiStopi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 108 *(outbuffer + offset + 3) = (u_hiStopi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 109 *(outbuffer + offset + 4) = (u_hiStopi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 110 *(outbuffer + offset + 5) = (u_hiStopi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 111 *(outbuffer + offset + 6) = (u_hiStopi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 112 *(outbuffer + offset + 7) = (u_hiStopi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 113 offset += sizeof(this->hiStop[i]);
Gary Servin 0:04ac6be8229a 114 }
Gary Servin 0:04ac6be8229a 115 *(outbuffer + offset + 0) = (this->loStop_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 116 *(outbuffer + offset + 1) = (this->loStop_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 117 *(outbuffer + offset + 2) = (this->loStop_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 118 *(outbuffer + offset + 3) = (this->loStop_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 119 offset += sizeof(this->loStop_length);
Gary Servin 0:04ac6be8229a 120 for( uint32_t i = 0; i < loStop_length; i++){
Gary Servin 0:04ac6be8229a 121 union {
Gary Servin 0:04ac6be8229a 122 double real;
Gary Servin 0:04ac6be8229a 123 uint64_t base;
Gary Servin 0:04ac6be8229a 124 } u_loStopi;
Gary Servin 0:04ac6be8229a 125 u_loStopi.real = this->loStop[i];
Gary Servin 0:04ac6be8229a 126 *(outbuffer + offset + 0) = (u_loStopi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 127 *(outbuffer + offset + 1) = (u_loStopi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 128 *(outbuffer + offset + 2) = (u_loStopi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 129 *(outbuffer + offset + 3) = (u_loStopi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 130 *(outbuffer + offset + 4) = (u_loStopi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 131 *(outbuffer + offset + 5) = (u_loStopi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 132 *(outbuffer + offset + 6) = (u_loStopi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 133 *(outbuffer + offset + 7) = (u_loStopi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 134 offset += sizeof(this->loStop[i]);
Gary Servin 0:04ac6be8229a 135 }
Gary Servin 0:04ac6be8229a 136 *(outbuffer + offset + 0) = (this->erp_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 137 *(outbuffer + offset + 1) = (this->erp_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 138 *(outbuffer + offset + 2) = (this->erp_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 139 *(outbuffer + offset + 3) = (this->erp_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 140 offset += sizeof(this->erp_length);
Gary Servin 0:04ac6be8229a 141 for( uint32_t i = 0; i < erp_length; i++){
Gary Servin 0:04ac6be8229a 142 union {
Gary Servin 0:04ac6be8229a 143 double real;
Gary Servin 0:04ac6be8229a 144 uint64_t base;
Gary Servin 0:04ac6be8229a 145 } u_erpi;
Gary Servin 0:04ac6be8229a 146 u_erpi.real = this->erp[i];
Gary Servin 0:04ac6be8229a 147 *(outbuffer + offset + 0) = (u_erpi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 148 *(outbuffer + offset + 1) = (u_erpi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 149 *(outbuffer + offset + 2) = (u_erpi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 150 *(outbuffer + offset + 3) = (u_erpi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 151 *(outbuffer + offset + 4) = (u_erpi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 152 *(outbuffer + offset + 5) = (u_erpi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 153 *(outbuffer + offset + 6) = (u_erpi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 154 *(outbuffer + offset + 7) = (u_erpi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 155 offset += sizeof(this->erp[i]);
Gary Servin 0:04ac6be8229a 156 }
Gary Servin 0:04ac6be8229a 157 *(outbuffer + offset + 0) = (this->cfm_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 158 *(outbuffer + offset + 1) = (this->cfm_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 159 *(outbuffer + offset + 2) = (this->cfm_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 160 *(outbuffer + offset + 3) = (this->cfm_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 161 offset += sizeof(this->cfm_length);
Gary Servin 0:04ac6be8229a 162 for( uint32_t i = 0; i < cfm_length; i++){
Gary Servin 0:04ac6be8229a 163 union {
Gary Servin 0:04ac6be8229a 164 double real;
Gary Servin 0:04ac6be8229a 165 uint64_t base;
Gary Servin 0:04ac6be8229a 166 } u_cfmi;
Gary Servin 0:04ac6be8229a 167 u_cfmi.real = this->cfm[i];
Gary Servin 0:04ac6be8229a 168 *(outbuffer + offset + 0) = (u_cfmi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 169 *(outbuffer + offset + 1) = (u_cfmi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 170 *(outbuffer + offset + 2) = (u_cfmi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 171 *(outbuffer + offset + 3) = (u_cfmi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 172 *(outbuffer + offset + 4) = (u_cfmi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 173 *(outbuffer + offset + 5) = (u_cfmi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 174 *(outbuffer + offset + 6) = (u_cfmi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 175 *(outbuffer + offset + 7) = (u_cfmi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 176 offset += sizeof(this->cfm[i]);
Gary Servin 0:04ac6be8229a 177 }
Gary Servin 0:04ac6be8229a 178 *(outbuffer + offset + 0) = (this->stop_erp_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 179 *(outbuffer + offset + 1) = (this->stop_erp_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 180 *(outbuffer + offset + 2) = (this->stop_erp_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 181 *(outbuffer + offset + 3) = (this->stop_erp_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 182 offset += sizeof(this->stop_erp_length);
Gary Servin 0:04ac6be8229a 183 for( uint32_t i = 0; i < stop_erp_length; i++){
Gary Servin 0:04ac6be8229a 184 union {
Gary Servin 0:04ac6be8229a 185 double real;
Gary Servin 0:04ac6be8229a 186 uint64_t base;
Gary Servin 0:04ac6be8229a 187 } u_stop_erpi;
Gary Servin 0:04ac6be8229a 188 u_stop_erpi.real = this->stop_erp[i];
Gary Servin 0:04ac6be8229a 189 *(outbuffer + offset + 0) = (u_stop_erpi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 190 *(outbuffer + offset + 1) = (u_stop_erpi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 191 *(outbuffer + offset + 2) = (u_stop_erpi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 192 *(outbuffer + offset + 3) = (u_stop_erpi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 193 *(outbuffer + offset + 4) = (u_stop_erpi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 194 *(outbuffer + offset + 5) = (u_stop_erpi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 195 *(outbuffer + offset + 6) = (u_stop_erpi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 196 *(outbuffer + offset + 7) = (u_stop_erpi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 197 offset += sizeof(this->stop_erp[i]);
Gary Servin 0:04ac6be8229a 198 }
Gary Servin 0:04ac6be8229a 199 *(outbuffer + offset + 0) = (this->stop_cfm_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 200 *(outbuffer + offset + 1) = (this->stop_cfm_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 201 *(outbuffer + offset + 2) = (this->stop_cfm_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 202 *(outbuffer + offset + 3) = (this->stop_cfm_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 203 offset += sizeof(this->stop_cfm_length);
Gary Servin 0:04ac6be8229a 204 for( uint32_t i = 0; i < stop_cfm_length; i++){
Gary Servin 0:04ac6be8229a 205 union {
Gary Servin 0:04ac6be8229a 206 double real;
Gary Servin 0:04ac6be8229a 207 uint64_t base;
Gary Servin 0:04ac6be8229a 208 } u_stop_cfmi;
Gary Servin 0:04ac6be8229a 209 u_stop_cfmi.real = this->stop_cfm[i];
Gary Servin 0:04ac6be8229a 210 *(outbuffer + offset + 0) = (u_stop_cfmi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 211 *(outbuffer + offset + 1) = (u_stop_cfmi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 212 *(outbuffer + offset + 2) = (u_stop_cfmi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 213 *(outbuffer + offset + 3) = (u_stop_cfmi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 214 *(outbuffer + offset + 4) = (u_stop_cfmi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 215 *(outbuffer + offset + 5) = (u_stop_cfmi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 216 *(outbuffer + offset + 6) = (u_stop_cfmi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 217 *(outbuffer + offset + 7) = (u_stop_cfmi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 218 offset += sizeof(this->stop_cfm[i]);
Gary Servin 0:04ac6be8229a 219 }
Gary Servin 0:04ac6be8229a 220 *(outbuffer + offset + 0) = (this->fudge_factor_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 221 *(outbuffer + offset + 1) = (this->fudge_factor_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 222 *(outbuffer + offset + 2) = (this->fudge_factor_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 223 *(outbuffer + offset + 3) = (this->fudge_factor_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 224 offset += sizeof(this->fudge_factor_length);
Gary Servin 0:04ac6be8229a 225 for( uint32_t i = 0; i < fudge_factor_length; i++){
Gary Servin 0:04ac6be8229a 226 union {
Gary Servin 0:04ac6be8229a 227 double real;
Gary Servin 0:04ac6be8229a 228 uint64_t base;
Gary Servin 0:04ac6be8229a 229 } u_fudge_factori;
Gary Servin 0:04ac6be8229a 230 u_fudge_factori.real = this->fudge_factor[i];
Gary Servin 0:04ac6be8229a 231 *(outbuffer + offset + 0) = (u_fudge_factori.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 232 *(outbuffer + offset + 1) = (u_fudge_factori.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 233 *(outbuffer + offset + 2) = (u_fudge_factori.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 234 *(outbuffer + offset + 3) = (u_fudge_factori.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 235 *(outbuffer + offset + 4) = (u_fudge_factori.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 236 *(outbuffer + offset + 5) = (u_fudge_factori.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 237 *(outbuffer + offset + 6) = (u_fudge_factori.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 238 *(outbuffer + offset + 7) = (u_fudge_factori.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 239 offset += sizeof(this->fudge_factor[i]);
Gary Servin 0:04ac6be8229a 240 }
Gary Servin 0:04ac6be8229a 241 *(outbuffer + offset + 0) = (this->fmax_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 242 *(outbuffer + offset + 1) = (this->fmax_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 243 *(outbuffer + offset + 2) = (this->fmax_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 244 *(outbuffer + offset + 3) = (this->fmax_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 245 offset += sizeof(this->fmax_length);
Gary Servin 0:04ac6be8229a 246 for( uint32_t i = 0; i < fmax_length; i++){
Gary Servin 0:04ac6be8229a 247 union {
Gary Servin 0:04ac6be8229a 248 double real;
Gary Servin 0:04ac6be8229a 249 uint64_t base;
Gary Servin 0:04ac6be8229a 250 } u_fmaxi;
Gary Servin 0:04ac6be8229a 251 u_fmaxi.real = this->fmax[i];
Gary Servin 0:04ac6be8229a 252 *(outbuffer + offset + 0) = (u_fmaxi.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 253 *(outbuffer + offset + 1) = (u_fmaxi.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 254 *(outbuffer + offset + 2) = (u_fmaxi.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 255 *(outbuffer + offset + 3) = (u_fmaxi.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 256 *(outbuffer + offset + 4) = (u_fmaxi.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 257 *(outbuffer + offset + 5) = (u_fmaxi.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 258 *(outbuffer + offset + 6) = (u_fmaxi.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 259 *(outbuffer + offset + 7) = (u_fmaxi.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 260 offset += sizeof(this->fmax[i]);
Gary Servin 0:04ac6be8229a 261 }
Gary Servin 0:04ac6be8229a 262 *(outbuffer + offset + 0) = (this->vel_length >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 263 *(outbuffer + offset + 1) = (this->vel_length >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 264 *(outbuffer + offset + 2) = (this->vel_length >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 265 *(outbuffer + offset + 3) = (this->vel_length >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 266 offset += sizeof(this->vel_length);
Gary Servin 0:04ac6be8229a 267 for( uint32_t i = 0; i < vel_length; i++){
Gary Servin 0:04ac6be8229a 268 union {
Gary Servin 0:04ac6be8229a 269 double real;
Gary Servin 0:04ac6be8229a 270 uint64_t base;
Gary Servin 0:04ac6be8229a 271 } u_veli;
Gary Servin 0:04ac6be8229a 272 u_veli.real = this->vel[i];
Gary Servin 0:04ac6be8229a 273 *(outbuffer + offset + 0) = (u_veli.base >> (8 * 0)) & 0xFF;
Gary Servin 0:04ac6be8229a 274 *(outbuffer + offset + 1) = (u_veli.base >> (8 * 1)) & 0xFF;
Gary Servin 0:04ac6be8229a 275 *(outbuffer + offset + 2) = (u_veli.base >> (8 * 2)) & 0xFF;
Gary Servin 0:04ac6be8229a 276 *(outbuffer + offset + 3) = (u_veli.base >> (8 * 3)) & 0xFF;
Gary Servin 0:04ac6be8229a 277 *(outbuffer + offset + 4) = (u_veli.base >> (8 * 4)) & 0xFF;
Gary Servin 0:04ac6be8229a 278 *(outbuffer + offset + 5) = (u_veli.base >> (8 * 5)) & 0xFF;
Gary Servin 0:04ac6be8229a 279 *(outbuffer + offset + 6) = (u_veli.base >> (8 * 6)) & 0xFF;
Gary Servin 0:04ac6be8229a 280 *(outbuffer + offset + 7) = (u_veli.base >> (8 * 7)) & 0xFF;
Gary Servin 0:04ac6be8229a 281 offset += sizeof(this->vel[i]);
Gary Servin 0:04ac6be8229a 282 }
Gary Servin 0:04ac6be8229a 283 return offset;
Gary Servin 0:04ac6be8229a 284 }
Gary Servin 0:04ac6be8229a 285
Gary Servin 0:04ac6be8229a 286 virtual int deserialize(unsigned char *inbuffer)
Gary Servin 0:04ac6be8229a 287 {
Gary Servin 0:04ac6be8229a 288 int offset = 0;
Gary Servin 0:04ac6be8229a 289 uint32_t damping_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 290 damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 291 damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 292 damping_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 293 offset += sizeof(this->damping_length);
Gary Servin 0:04ac6be8229a 294 if(damping_lengthT > damping_length)
Gary Servin 0:04ac6be8229a 295 this->damping = (double*)realloc(this->damping, damping_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 296 damping_length = damping_lengthT;
Gary Servin 0:04ac6be8229a 297 for( uint32_t i = 0; i < damping_length; i++){
Gary Servin 0:04ac6be8229a 298 union {
Gary Servin 0:04ac6be8229a 299 double real;
Gary Servin 0:04ac6be8229a 300 uint64_t base;
Gary Servin 0:04ac6be8229a 301 } u_st_damping;
Gary Servin 0:04ac6be8229a 302 u_st_damping.base = 0;
Gary Servin 0:04ac6be8229a 303 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 304 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 305 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 306 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 307 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 308 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 309 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 310 u_st_damping.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 311 this->st_damping = u_st_damping.real;
Gary Servin 0:04ac6be8229a 312 offset += sizeof(this->st_damping);
Gary Servin 0:04ac6be8229a 313 memcpy( &(this->damping[i]), &(this->st_damping), sizeof(double));
Gary Servin 0:04ac6be8229a 314 }
Gary Servin 0:04ac6be8229a 315 uint32_t hiStop_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 316 hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 317 hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 318 hiStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 319 offset += sizeof(this->hiStop_length);
Gary Servin 0:04ac6be8229a 320 if(hiStop_lengthT > hiStop_length)
Gary Servin 0:04ac6be8229a 321 this->hiStop = (double*)realloc(this->hiStop, hiStop_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 322 hiStop_length = hiStop_lengthT;
Gary Servin 0:04ac6be8229a 323 for( uint32_t i = 0; i < hiStop_length; i++){
Gary Servin 0:04ac6be8229a 324 union {
Gary Servin 0:04ac6be8229a 325 double real;
Gary Servin 0:04ac6be8229a 326 uint64_t base;
Gary Servin 0:04ac6be8229a 327 } u_st_hiStop;
Gary Servin 0:04ac6be8229a 328 u_st_hiStop.base = 0;
Gary Servin 0:04ac6be8229a 329 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 330 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 331 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 332 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 333 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 334 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 335 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 336 u_st_hiStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 337 this->st_hiStop = u_st_hiStop.real;
Gary Servin 0:04ac6be8229a 338 offset += sizeof(this->st_hiStop);
Gary Servin 0:04ac6be8229a 339 memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(double));
Gary Servin 0:04ac6be8229a 340 }
Gary Servin 0:04ac6be8229a 341 uint32_t loStop_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 342 loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 343 loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 344 loStop_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 345 offset += sizeof(this->loStop_length);
Gary Servin 0:04ac6be8229a 346 if(loStop_lengthT > loStop_length)
Gary Servin 0:04ac6be8229a 347 this->loStop = (double*)realloc(this->loStop, loStop_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 348 loStop_length = loStop_lengthT;
Gary Servin 0:04ac6be8229a 349 for( uint32_t i = 0; i < loStop_length; i++){
Gary Servin 0:04ac6be8229a 350 union {
Gary Servin 0:04ac6be8229a 351 double real;
Gary Servin 0:04ac6be8229a 352 uint64_t base;
Gary Servin 0:04ac6be8229a 353 } u_st_loStop;
Gary Servin 0:04ac6be8229a 354 u_st_loStop.base = 0;
Gary Servin 0:04ac6be8229a 355 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 356 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 357 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 358 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 359 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 360 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 361 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 362 u_st_loStop.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 363 this->st_loStop = u_st_loStop.real;
Gary Servin 0:04ac6be8229a 364 offset += sizeof(this->st_loStop);
Gary Servin 0:04ac6be8229a 365 memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(double));
Gary Servin 0:04ac6be8229a 366 }
Gary Servin 0:04ac6be8229a 367 uint32_t erp_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 368 erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 369 erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 370 erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 371 offset += sizeof(this->erp_length);
Gary Servin 0:04ac6be8229a 372 if(erp_lengthT > erp_length)
Gary Servin 0:04ac6be8229a 373 this->erp = (double*)realloc(this->erp, erp_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 374 erp_length = erp_lengthT;
Gary Servin 0:04ac6be8229a 375 for( uint32_t i = 0; i < erp_length; i++){
Gary Servin 0:04ac6be8229a 376 union {
Gary Servin 0:04ac6be8229a 377 double real;
Gary Servin 0:04ac6be8229a 378 uint64_t base;
Gary Servin 0:04ac6be8229a 379 } u_st_erp;
Gary Servin 0:04ac6be8229a 380 u_st_erp.base = 0;
Gary Servin 0:04ac6be8229a 381 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 382 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 383 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 384 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 385 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 386 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 387 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 388 u_st_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 389 this->st_erp = u_st_erp.real;
Gary Servin 0:04ac6be8229a 390 offset += sizeof(this->st_erp);
Gary Servin 0:04ac6be8229a 391 memcpy( &(this->erp[i]), &(this->st_erp), sizeof(double));
Gary Servin 0:04ac6be8229a 392 }
Gary Servin 0:04ac6be8229a 393 uint32_t cfm_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 394 cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 395 cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 396 cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 397 offset += sizeof(this->cfm_length);
Gary Servin 0:04ac6be8229a 398 if(cfm_lengthT > cfm_length)
Gary Servin 0:04ac6be8229a 399 this->cfm = (double*)realloc(this->cfm, cfm_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 400 cfm_length = cfm_lengthT;
Gary Servin 0:04ac6be8229a 401 for( uint32_t i = 0; i < cfm_length; i++){
Gary Servin 0:04ac6be8229a 402 union {
Gary Servin 0:04ac6be8229a 403 double real;
Gary Servin 0:04ac6be8229a 404 uint64_t base;
Gary Servin 0:04ac6be8229a 405 } u_st_cfm;
Gary Servin 0:04ac6be8229a 406 u_st_cfm.base = 0;
Gary Servin 0:04ac6be8229a 407 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 408 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 409 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 410 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 411 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 412 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 413 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 414 u_st_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 415 this->st_cfm = u_st_cfm.real;
Gary Servin 0:04ac6be8229a 416 offset += sizeof(this->st_cfm);
Gary Servin 0:04ac6be8229a 417 memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(double));
Gary Servin 0:04ac6be8229a 418 }
Gary Servin 0:04ac6be8229a 419 uint32_t stop_erp_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 420 stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 421 stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 422 stop_erp_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 423 offset += sizeof(this->stop_erp_length);
Gary Servin 0:04ac6be8229a 424 if(stop_erp_lengthT > stop_erp_length)
Gary Servin 0:04ac6be8229a 425 this->stop_erp = (double*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 426 stop_erp_length = stop_erp_lengthT;
Gary Servin 0:04ac6be8229a 427 for( uint32_t i = 0; i < stop_erp_length; i++){
Gary Servin 0:04ac6be8229a 428 union {
Gary Servin 0:04ac6be8229a 429 double real;
Gary Servin 0:04ac6be8229a 430 uint64_t base;
Gary Servin 0:04ac6be8229a 431 } u_st_stop_erp;
Gary Servin 0:04ac6be8229a 432 u_st_stop_erp.base = 0;
Gary Servin 0:04ac6be8229a 433 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 434 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 435 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 436 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 437 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 438 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 439 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 440 u_st_stop_erp.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 441 this->st_stop_erp = u_st_stop_erp.real;
Gary Servin 0:04ac6be8229a 442 offset += sizeof(this->st_stop_erp);
Gary Servin 0:04ac6be8229a 443 memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(double));
Gary Servin 0:04ac6be8229a 444 }
Gary Servin 0:04ac6be8229a 445 uint32_t stop_cfm_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 446 stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 447 stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 448 stop_cfm_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 449 offset += sizeof(this->stop_cfm_length);
Gary Servin 0:04ac6be8229a 450 if(stop_cfm_lengthT > stop_cfm_length)
Gary Servin 0:04ac6be8229a 451 this->stop_cfm = (double*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 452 stop_cfm_length = stop_cfm_lengthT;
Gary Servin 0:04ac6be8229a 453 for( uint32_t i = 0; i < stop_cfm_length; i++){
Gary Servin 0:04ac6be8229a 454 union {
Gary Servin 0:04ac6be8229a 455 double real;
Gary Servin 0:04ac6be8229a 456 uint64_t base;
Gary Servin 0:04ac6be8229a 457 } u_st_stop_cfm;
Gary Servin 0:04ac6be8229a 458 u_st_stop_cfm.base = 0;
Gary Servin 0:04ac6be8229a 459 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 460 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 461 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 462 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 463 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 464 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 465 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 466 u_st_stop_cfm.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 467 this->st_stop_cfm = u_st_stop_cfm.real;
Gary Servin 0:04ac6be8229a 468 offset += sizeof(this->st_stop_cfm);
Gary Servin 0:04ac6be8229a 469 memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(double));
Gary Servin 0:04ac6be8229a 470 }
Gary Servin 0:04ac6be8229a 471 uint32_t fudge_factor_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 472 fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 473 fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 474 fudge_factor_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 475 offset += sizeof(this->fudge_factor_length);
Gary Servin 0:04ac6be8229a 476 if(fudge_factor_lengthT > fudge_factor_length)
Gary Servin 0:04ac6be8229a 477 this->fudge_factor = (double*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 478 fudge_factor_length = fudge_factor_lengthT;
Gary Servin 0:04ac6be8229a 479 for( uint32_t i = 0; i < fudge_factor_length; i++){
Gary Servin 0:04ac6be8229a 480 union {
Gary Servin 0:04ac6be8229a 481 double real;
Gary Servin 0:04ac6be8229a 482 uint64_t base;
Gary Servin 0:04ac6be8229a 483 } u_st_fudge_factor;
Gary Servin 0:04ac6be8229a 484 u_st_fudge_factor.base = 0;
Gary Servin 0:04ac6be8229a 485 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 486 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 487 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 488 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 489 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 490 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 491 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 492 u_st_fudge_factor.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 493 this->st_fudge_factor = u_st_fudge_factor.real;
Gary Servin 0:04ac6be8229a 494 offset += sizeof(this->st_fudge_factor);
Gary Servin 0:04ac6be8229a 495 memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(double));
Gary Servin 0:04ac6be8229a 496 }
Gary Servin 0:04ac6be8229a 497 uint32_t fmax_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 498 fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 499 fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 500 fmax_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 501 offset += sizeof(this->fmax_length);
Gary Servin 0:04ac6be8229a 502 if(fmax_lengthT > fmax_length)
Gary Servin 0:04ac6be8229a 503 this->fmax = (double*)realloc(this->fmax, fmax_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 504 fmax_length = fmax_lengthT;
Gary Servin 0:04ac6be8229a 505 for( uint32_t i = 0; i < fmax_length; i++){
Gary Servin 0:04ac6be8229a 506 union {
Gary Servin 0:04ac6be8229a 507 double real;
Gary Servin 0:04ac6be8229a 508 uint64_t base;
Gary Servin 0:04ac6be8229a 509 } u_st_fmax;
Gary Servin 0:04ac6be8229a 510 u_st_fmax.base = 0;
Gary Servin 0:04ac6be8229a 511 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 512 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 513 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 514 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 515 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 516 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 517 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 518 u_st_fmax.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 519 this->st_fmax = u_st_fmax.real;
Gary Servin 0:04ac6be8229a 520 offset += sizeof(this->st_fmax);
Gary Servin 0:04ac6be8229a 521 memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(double));
Gary Servin 0:04ac6be8229a 522 }
Gary Servin 0:04ac6be8229a 523 uint32_t vel_lengthT = ((uint32_t) (*(inbuffer + offset)));
Gary Servin 0:04ac6be8229a 524 vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 525 vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 526 vel_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 527 offset += sizeof(this->vel_length);
Gary Servin 0:04ac6be8229a 528 if(vel_lengthT > vel_length)
Gary Servin 0:04ac6be8229a 529 this->vel = (double*)realloc(this->vel, vel_lengthT * sizeof(double));
Gary Servin 0:04ac6be8229a 530 vel_length = vel_lengthT;
Gary Servin 0:04ac6be8229a 531 for( uint32_t i = 0; i < vel_length; i++){
Gary Servin 0:04ac6be8229a 532 union {
Gary Servin 0:04ac6be8229a 533 double real;
Gary Servin 0:04ac6be8229a 534 uint64_t base;
Gary Servin 0:04ac6be8229a 535 } u_st_vel;
Gary Servin 0:04ac6be8229a 536 u_st_vel.base = 0;
Gary Servin 0:04ac6be8229a 537 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
Gary Servin 0:04ac6be8229a 538 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
Gary Servin 0:04ac6be8229a 539 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
Gary Servin 0:04ac6be8229a 540 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
Gary Servin 0:04ac6be8229a 541 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
Gary Servin 0:04ac6be8229a 542 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
Gary Servin 0:04ac6be8229a 543 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
Gary Servin 0:04ac6be8229a 544 u_st_vel.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
Gary Servin 0:04ac6be8229a 545 this->st_vel = u_st_vel.real;
Gary Servin 0:04ac6be8229a 546 offset += sizeof(this->st_vel);
Gary Servin 0:04ac6be8229a 547 memcpy( &(this->vel[i]), &(this->st_vel), sizeof(double));
Gary Servin 0:04ac6be8229a 548 }
Gary Servin 0:04ac6be8229a 549 return offset;
Gary Servin 0:04ac6be8229a 550 }
Gary Servin 0:04ac6be8229a 551
Gary Servin 0:04ac6be8229a 552 const char * getType(){ return "gazebo_msgs/ODEJointProperties"; };
Gary Servin 0:04ac6be8229a 553 const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; };
Gary Servin 0:04ac6be8229a 554
Gary Servin 0:04ac6be8229a 555 };
Gary Servin 0:04ac6be8229a 556
Gary Servin 0:04ac6be8229a 557 }
Gary Servin 0:04ac6be8229a 558 #endif