ODEJointProperties.h
Go to the documentation of this file.
00001 #ifndef _ROS_gazebo_msgs_ODEJointProperties_h
00002 #define _ROS_gazebo_msgs_ODEJointProperties_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace gazebo_msgs
00010 {
00011 
00012   class ODEJointProperties : public ros::Msg
00013   {
00014     public:
00015       uint8_t damping_length;
00016       float st_damping;
00017       float * damping;
00018       uint8_t hiStop_length;
00019       float st_hiStop;
00020       float * hiStop;
00021       uint8_t loStop_length;
00022       float st_loStop;
00023       float * loStop;
00024       uint8_t erp_length;
00025       float st_erp;
00026       float * erp;
00027       uint8_t cfm_length;
00028       float st_cfm;
00029       float * cfm;
00030       uint8_t stop_erp_length;
00031       float st_stop_erp;
00032       float * stop_erp;
00033       uint8_t stop_cfm_length;
00034       float st_stop_cfm;
00035       float * stop_cfm;
00036       uint8_t fudge_factor_length;
00037       float st_fudge_factor;
00038       float * fudge_factor;
00039       uint8_t fmax_length;
00040       float st_fmax;
00041       float * fmax;
00042       uint8_t vel_length;
00043       float st_vel;
00044       float * vel;
00045 
00046     virtual int serialize(unsigned char *outbuffer) const
00047     {
00048       int offset = 0;
00049       *(outbuffer + offset++) = damping_length;
00050       *(outbuffer + offset++) = 0;
00051       *(outbuffer + offset++) = 0;
00052       *(outbuffer + offset++) = 0;
00053       for( uint8_t i = 0; i < damping_length; i++){
00054       int32_t * val_dampingi = (int32_t *) &(this->damping[i]);
00055       int32_t exp_dampingi = (((*val_dampingi)>>23)&255);
00056       if(exp_dampingi != 0)
00057         exp_dampingi += 1023-127;
00058       int32_t sig_dampingi = *val_dampingi;
00059       *(outbuffer + offset++) = 0;
00060       *(outbuffer + offset++) = 0;
00061       *(outbuffer + offset++) = 0;
00062       *(outbuffer + offset++) = (sig_dampingi<<5) & 0xff;
00063       *(outbuffer + offset++) = (sig_dampingi>>3) & 0xff;
00064       *(outbuffer + offset++) = (sig_dampingi>>11) & 0xff;
00065       *(outbuffer + offset++) = ((exp_dampingi<<4) & 0xF0) | ((sig_dampingi>>19)&0x0F);
00066       *(outbuffer + offset++) = (exp_dampingi>>4) & 0x7F;
00067       if(this->damping[i] < 0) *(outbuffer + offset -1) |= 0x80;
00068       }
00069       *(outbuffer + offset++) = hiStop_length;
00070       *(outbuffer + offset++) = 0;
00071       *(outbuffer + offset++) = 0;
00072       *(outbuffer + offset++) = 0;
00073       for( uint8_t i = 0; i < hiStop_length; i++){
00074       int32_t * val_hiStopi = (int32_t *) &(this->hiStop[i]);
00075       int32_t exp_hiStopi = (((*val_hiStopi)>>23)&255);
00076       if(exp_hiStopi != 0)
00077         exp_hiStopi += 1023-127;
00078       int32_t sig_hiStopi = *val_hiStopi;
00079       *(outbuffer + offset++) = 0;
00080       *(outbuffer + offset++) = 0;
00081       *(outbuffer + offset++) = 0;
00082       *(outbuffer + offset++) = (sig_hiStopi<<5) & 0xff;
00083       *(outbuffer + offset++) = (sig_hiStopi>>3) & 0xff;
00084       *(outbuffer + offset++) = (sig_hiStopi>>11) & 0xff;
00085       *(outbuffer + offset++) = ((exp_hiStopi<<4) & 0xF0) | ((sig_hiStopi>>19)&0x0F);
00086       *(outbuffer + offset++) = (exp_hiStopi>>4) & 0x7F;
00087       if(this->hiStop[i] < 0) *(outbuffer + offset -1) |= 0x80;
00088       }
00089       *(outbuffer + offset++) = loStop_length;
00090       *(outbuffer + offset++) = 0;
00091       *(outbuffer + offset++) = 0;
00092       *(outbuffer + offset++) = 0;
00093       for( uint8_t i = 0; i < loStop_length; i++){
00094       int32_t * val_loStopi = (int32_t *) &(this->loStop[i]);
00095       int32_t exp_loStopi = (((*val_loStopi)>>23)&255);
00096       if(exp_loStopi != 0)
00097         exp_loStopi += 1023-127;
00098       int32_t sig_loStopi = *val_loStopi;
00099       *(outbuffer + offset++) = 0;
00100       *(outbuffer + offset++) = 0;
00101       *(outbuffer + offset++) = 0;
00102       *(outbuffer + offset++) = (sig_loStopi<<5) & 0xff;
00103       *(outbuffer + offset++) = (sig_loStopi>>3) & 0xff;
00104       *(outbuffer + offset++) = (sig_loStopi>>11) & 0xff;
00105       *(outbuffer + offset++) = ((exp_loStopi<<4) & 0xF0) | ((sig_loStopi>>19)&0x0F);
00106       *(outbuffer + offset++) = (exp_loStopi>>4) & 0x7F;
00107       if(this->loStop[i] < 0) *(outbuffer + offset -1) |= 0x80;
00108       }
00109       *(outbuffer + offset++) = erp_length;
00110       *(outbuffer + offset++) = 0;
00111       *(outbuffer + offset++) = 0;
00112       *(outbuffer + offset++) = 0;
00113       for( uint8_t i = 0; i < erp_length; i++){
00114       int32_t * val_erpi = (int32_t *) &(this->erp[i]);
00115       int32_t exp_erpi = (((*val_erpi)>>23)&255);
00116       if(exp_erpi != 0)
00117         exp_erpi += 1023-127;
00118       int32_t sig_erpi = *val_erpi;
00119       *(outbuffer + offset++) = 0;
00120       *(outbuffer + offset++) = 0;
00121       *(outbuffer + offset++) = 0;
00122       *(outbuffer + offset++) = (sig_erpi<<5) & 0xff;
00123       *(outbuffer + offset++) = (sig_erpi>>3) & 0xff;
00124       *(outbuffer + offset++) = (sig_erpi>>11) & 0xff;
00125       *(outbuffer + offset++) = ((exp_erpi<<4) & 0xF0) | ((sig_erpi>>19)&0x0F);
00126       *(outbuffer + offset++) = (exp_erpi>>4) & 0x7F;
00127       if(this->erp[i] < 0) *(outbuffer + offset -1) |= 0x80;
00128       }
00129       *(outbuffer + offset++) = cfm_length;
00130       *(outbuffer + offset++) = 0;
00131       *(outbuffer + offset++) = 0;
00132       *(outbuffer + offset++) = 0;
00133       for( uint8_t i = 0; i < cfm_length; i++){
00134       int32_t * val_cfmi = (int32_t *) &(this->cfm[i]);
00135       int32_t exp_cfmi = (((*val_cfmi)>>23)&255);
00136       if(exp_cfmi != 0)
00137         exp_cfmi += 1023-127;
00138       int32_t sig_cfmi = *val_cfmi;
00139       *(outbuffer + offset++) = 0;
00140       *(outbuffer + offset++) = 0;
00141       *(outbuffer + offset++) = 0;
00142       *(outbuffer + offset++) = (sig_cfmi<<5) & 0xff;
00143       *(outbuffer + offset++) = (sig_cfmi>>3) & 0xff;
00144       *(outbuffer + offset++) = (sig_cfmi>>11) & 0xff;
00145       *(outbuffer + offset++) = ((exp_cfmi<<4) & 0xF0) | ((sig_cfmi>>19)&0x0F);
00146       *(outbuffer + offset++) = (exp_cfmi>>4) & 0x7F;
00147       if(this->cfm[i] < 0) *(outbuffer + offset -1) |= 0x80;
00148       }
00149       *(outbuffer + offset++) = stop_erp_length;
00150       *(outbuffer + offset++) = 0;
00151       *(outbuffer + offset++) = 0;
00152       *(outbuffer + offset++) = 0;
00153       for( uint8_t i = 0; i < stop_erp_length; i++){
00154       int32_t * val_stop_erpi = (int32_t *) &(this->stop_erp[i]);
00155       int32_t exp_stop_erpi = (((*val_stop_erpi)>>23)&255);
00156       if(exp_stop_erpi != 0)
00157         exp_stop_erpi += 1023-127;
00158       int32_t sig_stop_erpi = *val_stop_erpi;
00159       *(outbuffer + offset++) = 0;
00160       *(outbuffer + offset++) = 0;
00161       *(outbuffer + offset++) = 0;
00162       *(outbuffer + offset++) = (sig_stop_erpi<<5) & 0xff;
00163       *(outbuffer + offset++) = (sig_stop_erpi>>3) & 0xff;
00164       *(outbuffer + offset++) = (sig_stop_erpi>>11) & 0xff;
00165       *(outbuffer + offset++) = ((exp_stop_erpi<<4) & 0xF0) | ((sig_stop_erpi>>19)&0x0F);
00166       *(outbuffer + offset++) = (exp_stop_erpi>>4) & 0x7F;
00167       if(this->stop_erp[i] < 0) *(outbuffer + offset -1) |= 0x80;
00168       }
00169       *(outbuffer + offset++) = stop_cfm_length;
00170       *(outbuffer + offset++) = 0;
00171       *(outbuffer + offset++) = 0;
00172       *(outbuffer + offset++) = 0;
00173       for( uint8_t i = 0; i < stop_cfm_length; i++){
00174       int32_t * val_stop_cfmi = (int32_t *) &(this->stop_cfm[i]);
00175       int32_t exp_stop_cfmi = (((*val_stop_cfmi)>>23)&255);
00176       if(exp_stop_cfmi != 0)
00177         exp_stop_cfmi += 1023-127;
00178       int32_t sig_stop_cfmi = *val_stop_cfmi;
00179       *(outbuffer + offset++) = 0;
00180       *(outbuffer + offset++) = 0;
00181       *(outbuffer + offset++) = 0;
00182       *(outbuffer + offset++) = (sig_stop_cfmi<<5) & 0xff;
00183       *(outbuffer + offset++) = (sig_stop_cfmi>>3) & 0xff;
00184       *(outbuffer + offset++) = (sig_stop_cfmi>>11) & 0xff;
00185       *(outbuffer + offset++) = ((exp_stop_cfmi<<4) & 0xF0) | ((sig_stop_cfmi>>19)&0x0F);
00186       *(outbuffer + offset++) = (exp_stop_cfmi>>4) & 0x7F;
00187       if(this->stop_cfm[i] < 0) *(outbuffer + offset -1) |= 0x80;
00188       }
00189       *(outbuffer + offset++) = fudge_factor_length;
00190       *(outbuffer + offset++) = 0;
00191       *(outbuffer + offset++) = 0;
00192       *(outbuffer + offset++) = 0;
00193       for( uint8_t i = 0; i < fudge_factor_length; i++){
00194       int32_t * val_fudge_factori = (int32_t *) &(this->fudge_factor[i]);
00195       int32_t exp_fudge_factori = (((*val_fudge_factori)>>23)&255);
00196       if(exp_fudge_factori != 0)
00197         exp_fudge_factori += 1023-127;
00198       int32_t sig_fudge_factori = *val_fudge_factori;
00199       *(outbuffer + offset++) = 0;
00200       *(outbuffer + offset++) = 0;
00201       *(outbuffer + offset++) = 0;
00202       *(outbuffer + offset++) = (sig_fudge_factori<<5) & 0xff;
00203       *(outbuffer + offset++) = (sig_fudge_factori>>3) & 0xff;
00204       *(outbuffer + offset++) = (sig_fudge_factori>>11) & 0xff;
00205       *(outbuffer + offset++) = ((exp_fudge_factori<<4) & 0xF0) | ((sig_fudge_factori>>19)&0x0F);
00206       *(outbuffer + offset++) = (exp_fudge_factori>>4) & 0x7F;
00207       if(this->fudge_factor[i] < 0) *(outbuffer + offset -1) |= 0x80;
00208       }
00209       *(outbuffer + offset++) = fmax_length;
00210       *(outbuffer + offset++) = 0;
00211       *(outbuffer + offset++) = 0;
00212       *(outbuffer + offset++) = 0;
00213       for( uint8_t i = 0; i < fmax_length; i++){
00214       int32_t * val_fmaxi = (int32_t *) &(this->fmax[i]);
00215       int32_t exp_fmaxi = (((*val_fmaxi)>>23)&255);
00216       if(exp_fmaxi != 0)
00217         exp_fmaxi += 1023-127;
00218       int32_t sig_fmaxi = *val_fmaxi;
00219       *(outbuffer + offset++) = 0;
00220       *(outbuffer + offset++) = 0;
00221       *(outbuffer + offset++) = 0;
00222       *(outbuffer + offset++) = (sig_fmaxi<<5) & 0xff;
00223       *(outbuffer + offset++) = (sig_fmaxi>>3) & 0xff;
00224       *(outbuffer + offset++) = (sig_fmaxi>>11) & 0xff;
00225       *(outbuffer + offset++) = ((exp_fmaxi<<4) & 0xF0) | ((sig_fmaxi>>19)&0x0F);
00226       *(outbuffer + offset++) = (exp_fmaxi>>4) & 0x7F;
00227       if(this->fmax[i] < 0) *(outbuffer + offset -1) |= 0x80;
00228       }
00229       *(outbuffer + offset++) = vel_length;
00230       *(outbuffer + offset++) = 0;
00231       *(outbuffer + offset++) = 0;
00232       *(outbuffer + offset++) = 0;
00233       for( uint8_t i = 0; i < vel_length; i++){
00234       int32_t * val_veli = (int32_t *) &(this->vel[i]);
00235       int32_t exp_veli = (((*val_veli)>>23)&255);
00236       if(exp_veli != 0)
00237         exp_veli += 1023-127;
00238       int32_t sig_veli = *val_veli;
00239       *(outbuffer + offset++) = 0;
00240       *(outbuffer + offset++) = 0;
00241       *(outbuffer + offset++) = 0;
00242       *(outbuffer + offset++) = (sig_veli<<5) & 0xff;
00243       *(outbuffer + offset++) = (sig_veli>>3) & 0xff;
00244       *(outbuffer + offset++) = (sig_veli>>11) & 0xff;
00245       *(outbuffer + offset++) = ((exp_veli<<4) & 0xF0) | ((sig_veli>>19)&0x0F);
00246       *(outbuffer + offset++) = (exp_veli>>4) & 0x7F;
00247       if(this->vel[i] < 0) *(outbuffer + offset -1) |= 0x80;
00248       }
00249       return offset;
00250     }
00251 
00252     virtual int deserialize(unsigned char *inbuffer)
00253     {
00254       int offset = 0;
00255       uint8_t damping_lengthT = *(inbuffer + offset++);
00256       if(damping_lengthT > damping_length)
00257         this->damping = (float*)realloc(this->damping, damping_lengthT * sizeof(float));
00258       offset += 3;
00259       damping_length = damping_lengthT;
00260       for( uint8_t i = 0; i < damping_length; i++){
00261       uint32_t * val_st_damping = (uint32_t*) &(this->st_damping);
00262       offset += 3;
00263       *val_st_damping = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00264       *val_st_damping |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00265       *val_st_damping |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00266       *val_st_damping |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00267       uint32_t exp_st_damping = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00268       exp_st_damping |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00269       if(exp_st_damping !=0)
00270         *val_st_damping |= ((exp_st_damping)-1023+127)<<23;
00271       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_damping = -this->st_damping;
00272         memcpy( &(this->damping[i]), &(this->st_damping), sizeof(float));
00273       }
00274       uint8_t hiStop_lengthT = *(inbuffer + offset++);
00275       if(hiStop_lengthT > hiStop_length)
00276         this->hiStop = (float*)realloc(this->hiStop, hiStop_lengthT * sizeof(float));
00277       offset += 3;
00278       hiStop_length = hiStop_lengthT;
00279       for( uint8_t i = 0; i < hiStop_length; i++){
00280       uint32_t * val_st_hiStop = (uint32_t*) &(this->st_hiStop);
00281       offset += 3;
00282       *val_st_hiStop = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00283       *val_st_hiStop |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00284       *val_st_hiStop |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00285       *val_st_hiStop |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00286       uint32_t exp_st_hiStop = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00287       exp_st_hiStop |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00288       if(exp_st_hiStop !=0)
00289         *val_st_hiStop |= ((exp_st_hiStop)-1023+127)<<23;
00290       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_hiStop = -this->st_hiStop;
00291         memcpy( &(this->hiStop[i]), &(this->st_hiStop), sizeof(float));
00292       }
00293       uint8_t loStop_lengthT = *(inbuffer + offset++);
00294       if(loStop_lengthT > loStop_length)
00295         this->loStop = (float*)realloc(this->loStop, loStop_lengthT * sizeof(float));
00296       offset += 3;
00297       loStop_length = loStop_lengthT;
00298       for( uint8_t i = 0; i < loStop_length; i++){
00299       uint32_t * val_st_loStop = (uint32_t*) &(this->st_loStop);
00300       offset += 3;
00301       *val_st_loStop = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00302       *val_st_loStop |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00303       *val_st_loStop |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00304       *val_st_loStop |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00305       uint32_t exp_st_loStop = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00306       exp_st_loStop |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00307       if(exp_st_loStop !=0)
00308         *val_st_loStop |= ((exp_st_loStop)-1023+127)<<23;
00309       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_loStop = -this->st_loStop;
00310         memcpy( &(this->loStop[i]), &(this->st_loStop), sizeof(float));
00311       }
00312       uint8_t erp_lengthT = *(inbuffer + offset++);
00313       if(erp_lengthT > erp_length)
00314         this->erp = (float*)realloc(this->erp, erp_lengthT * sizeof(float));
00315       offset += 3;
00316       erp_length = erp_lengthT;
00317       for( uint8_t i = 0; i < erp_length; i++){
00318       uint32_t * val_st_erp = (uint32_t*) &(this->st_erp);
00319       offset += 3;
00320       *val_st_erp = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00321       *val_st_erp |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00322       *val_st_erp |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00323       *val_st_erp |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00324       uint32_t exp_st_erp = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00325       exp_st_erp |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00326       if(exp_st_erp !=0)
00327         *val_st_erp |= ((exp_st_erp)-1023+127)<<23;
00328       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_erp = -this->st_erp;
00329         memcpy( &(this->erp[i]), &(this->st_erp), sizeof(float));
00330       }
00331       uint8_t cfm_lengthT = *(inbuffer + offset++);
00332       if(cfm_lengthT > cfm_length)
00333         this->cfm = (float*)realloc(this->cfm, cfm_lengthT * sizeof(float));
00334       offset += 3;
00335       cfm_length = cfm_lengthT;
00336       for( uint8_t i = 0; i < cfm_length; i++){
00337       uint32_t * val_st_cfm = (uint32_t*) &(this->st_cfm);
00338       offset += 3;
00339       *val_st_cfm = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00340       *val_st_cfm |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00341       *val_st_cfm |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00342       *val_st_cfm |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00343       uint32_t exp_st_cfm = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00344       exp_st_cfm |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00345       if(exp_st_cfm !=0)
00346         *val_st_cfm |= ((exp_st_cfm)-1023+127)<<23;
00347       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_cfm = -this->st_cfm;
00348         memcpy( &(this->cfm[i]), &(this->st_cfm), sizeof(float));
00349       }
00350       uint8_t stop_erp_lengthT = *(inbuffer + offset++);
00351       if(stop_erp_lengthT > stop_erp_length)
00352         this->stop_erp = (float*)realloc(this->stop_erp, stop_erp_lengthT * sizeof(float));
00353       offset += 3;
00354       stop_erp_length = stop_erp_lengthT;
00355       for( uint8_t i = 0; i < stop_erp_length; i++){
00356       uint32_t * val_st_stop_erp = (uint32_t*) &(this->st_stop_erp);
00357       offset += 3;
00358       *val_st_stop_erp = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00359       *val_st_stop_erp |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00360       *val_st_stop_erp |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00361       *val_st_stop_erp |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00362       uint32_t exp_st_stop_erp = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00363       exp_st_stop_erp |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00364       if(exp_st_stop_erp !=0)
00365         *val_st_stop_erp |= ((exp_st_stop_erp)-1023+127)<<23;
00366       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_stop_erp = -this->st_stop_erp;
00367         memcpy( &(this->stop_erp[i]), &(this->st_stop_erp), sizeof(float));
00368       }
00369       uint8_t stop_cfm_lengthT = *(inbuffer + offset++);
00370       if(stop_cfm_lengthT > stop_cfm_length)
00371         this->stop_cfm = (float*)realloc(this->stop_cfm, stop_cfm_lengthT * sizeof(float));
00372       offset += 3;
00373       stop_cfm_length = stop_cfm_lengthT;
00374       for( uint8_t i = 0; i < stop_cfm_length; i++){
00375       uint32_t * val_st_stop_cfm = (uint32_t*) &(this->st_stop_cfm);
00376       offset += 3;
00377       *val_st_stop_cfm = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00378       *val_st_stop_cfm |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00379       *val_st_stop_cfm |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00380       *val_st_stop_cfm |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00381       uint32_t exp_st_stop_cfm = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00382       exp_st_stop_cfm |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00383       if(exp_st_stop_cfm !=0)
00384         *val_st_stop_cfm |= ((exp_st_stop_cfm)-1023+127)<<23;
00385       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_stop_cfm = -this->st_stop_cfm;
00386         memcpy( &(this->stop_cfm[i]), &(this->st_stop_cfm), sizeof(float));
00387       }
00388       uint8_t fudge_factor_lengthT = *(inbuffer + offset++);
00389       if(fudge_factor_lengthT > fudge_factor_length)
00390         this->fudge_factor = (float*)realloc(this->fudge_factor, fudge_factor_lengthT * sizeof(float));
00391       offset += 3;
00392       fudge_factor_length = fudge_factor_lengthT;
00393       for( uint8_t i = 0; i < fudge_factor_length; i++){
00394       uint32_t * val_st_fudge_factor = (uint32_t*) &(this->st_fudge_factor);
00395       offset += 3;
00396       *val_st_fudge_factor = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00397       *val_st_fudge_factor |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00398       *val_st_fudge_factor |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00399       *val_st_fudge_factor |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00400       uint32_t exp_st_fudge_factor = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00401       exp_st_fudge_factor |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00402       if(exp_st_fudge_factor !=0)
00403         *val_st_fudge_factor |= ((exp_st_fudge_factor)-1023+127)<<23;
00404       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_fudge_factor = -this->st_fudge_factor;
00405         memcpy( &(this->fudge_factor[i]), &(this->st_fudge_factor), sizeof(float));
00406       }
00407       uint8_t fmax_lengthT = *(inbuffer + offset++);
00408       if(fmax_lengthT > fmax_length)
00409         this->fmax = (float*)realloc(this->fmax, fmax_lengthT * sizeof(float));
00410       offset += 3;
00411       fmax_length = fmax_lengthT;
00412       for( uint8_t i = 0; i < fmax_length; i++){
00413       uint32_t * val_st_fmax = (uint32_t*) &(this->st_fmax);
00414       offset += 3;
00415       *val_st_fmax = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00416       *val_st_fmax |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00417       *val_st_fmax |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00418       *val_st_fmax |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00419       uint32_t exp_st_fmax = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00420       exp_st_fmax |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00421       if(exp_st_fmax !=0)
00422         *val_st_fmax |= ((exp_st_fmax)-1023+127)<<23;
00423       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_fmax = -this->st_fmax;
00424         memcpy( &(this->fmax[i]), &(this->st_fmax), sizeof(float));
00425       }
00426       uint8_t vel_lengthT = *(inbuffer + offset++);
00427       if(vel_lengthT > vel_length)
00428         this->vel = (float*)realloc(this->vel, vel_lengthT * sizeof(float));
00429       offset += 3;
00430       vel_length = vel_lengthT;
00431       for( uint8_t i = 0; i < vel_length; i++){
00432       uint32_t * val_st_vel = (uint32_t*) &(this->st_vel);
00433       offset += 3;
00434       *val_st_vel = ((uint32_t)(*(inbuffer + offset++))>>5 & 0x07);
00435       *val_st_vel |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<3;
00436       *val_st_vel |= ((uint32_t)(*(inbuffer + offset++)) & 0xff)<<11;
00437       *val_st_vel |= ((uint32_t)(*(inbuffer + offset)) & 0x0f)<<19;
00438       uint32_t exp_st_vel = ((uint32_t)(*(inbuffer + offset++))&0xf0)>>4;
00439       exp_st_vel |= ((uint32_t)(*(inbuffer + offset)) & 0x7f)<<4;
00440       if(exp_st_vel !=0)
00441         *val_st_vel |= ((exp_st_vel)-1023+127)<<23;
00442       if( ((*(inbuffer+offset++)) & 0x80) > 0) this->st_vel = -this->st_vel;
00443         memcpy( &(this->vel[i]), &(this->st_vel), sizeof(float));
00444       }
00445      return offset;
00446     }
00447 
00448     const char * getType(){ return "gazebo_msgs/ODEJointProperties"; };
00449     const char * getMD5(){ return "1b744c32a920af979f53afe2f9c3511f"; };
00450 
00451   };
00452 
00453 }
00454 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:39:50