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