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

Dependencies:   BufferedSerial

Dependents:   mbed-os-example-blinky

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

Who changed what in which revision?

UserRevisionLine numberNew contents of line
garyservin 0:9e9b7db60fd5 1 #ifndef _ROS_sensor_msgs_CameraInfo_h
garyservin 0:9e9b7db60fd5 2 #define _ROS_sensor_msgs_CameraInfo_h
garyservin 0:9e9b7db60fd5 3
garyservin 0:9e9b7db60fd5 4 #include <stdint.h>
garyservin 0:9e9b7db60fd5 5 #include <string.h>
garyservin 0:9e9b7db60fd5 6 #include <stdlib.h>
garyservin 0:9e9b7db60fd5 7 #include "ros/msg.h"
garyservin 0:9e9b7db60fd5 8 #include "std_msgs/Header.h"
garyservin 0:9e9b7db60fd5 9 #include "sensor_msgs/RegionOfInterest.h"
garyservin 0:9e9b7db60fd5 10
garyservin 0:9e9b7db60fd5 11 namespace sensor_msgs
garyservin 0:9e9b7db60fd5 12 {
garyservin 0:9e9b7db60fd5 13
garyservin 0:9e9b7db60fd5 14 class CameraInfo : public ros::Msg
garyservin 0:9e9b7db60fd5 15 {
garyservin 0:9e9b7db60fd5 16 public:
garyservin 0:9e9b7db60fd5 17 typedef std_msgs::Header _header_type;
garyservin 0:9e9b7db60fd5 18 _header_type header;
garyservin 0:9e9b7db60fd5 19 typedef uint32_t _height_type;
garyservin 0:9e9b7db60fd5 20 _height_type height;
garyservin 0:9e9b7db60fd5 21 typedef uint32_t _width_type;
garyservin 0:9e9b7db60fd5 22 _width_type width;
garyservin 0:9e9b7db60fd5 23 typedef const char* _distortion_model_type;
garyservin 0:9e9b7db60fd5 24 _distortion_model_type distortion_model;
garyservin 0:9e9b7db60fd5 25 uint32_t D_length;
garyservin 0:9e9b7db60fd5 26 typedef double _D_type;
garyservin 0:9e9b7db60fd5 27 _D_type st_D;
garyservin 0:9e9b7db60fd5 28 _D_type * D;
garyservin 0:9e9b7db60fd5 29 double K[9];
garyservin 0:9e9b7db60fd5 30 double R[9];
garyservin 0:9e9b7db60fd5 31 double P[12];
garyservin 0:9e9b7db60fd5 32 typedef uint32_t _binning_x_type;
garyservin 0:9e9b7db60fd5 33 _binning_x_type binning_x;
garyservin 0:9e9b7db60fd5 34 typedef uint32_t _binning_y_type;
garyservin 0:9e9b7db60fd5 35 _binning_y_type binning_y;
garyservin 0:9e9b7db60fd5 36 typedef sensor_msgs::RegionOfInterest _roi_type;
garyservin 0:9e9b7db60fd5 37 _roi_type roi;
garyservin 0:9e9b7db60fd5 38
garyservin 0:9e9b7db60fd5 39 CameraInfo():
garyservin 0:9e9b7db60fd5 40 header(),
garyservin 0:9e9b7db60fd5 41 height(0),
garyservin 0:9e9b7db60fd5 42 width(0),
garyservin 0:9e9b7db60fd5 43 distortion_model(""),
garyservin 0:9e9b7db60fd5 44 D_length(0), D(NULL),
garyservin 0:9e9b7db60fd5 45 K(),
garyservin 0:9e9b7db60fd5 46 R(),
garyservin 0:9e9b7db60fd5 47 P(),
garyservin 0:9e9b7db60fd5 48 binning_x(0),
garyservin 0:9e9b7db60fd5 49 binning_y(0),
garyservin 0:9e9b7db60fd5 50 roi()
garyservin 0:9e9b7db60fd5 51 {
garyservin 0:9e9b7db60fd5 52 }
garyservin 0:9e9b7db60fd5 53
garyservin 0:9e9b7db60fd5 54 virtual int serialize(unsigned char *outbuffer) const
garyservin 0:9e9b7db60fd5 55 {
garyservin 0:9e9b7db60fd5 56 int offset = 0;
garyservin 0:9e9b7db60fd5 57 offset += this->header.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 58 *(outbuffer + offset + 0) = (this->height >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 59 *(outbuffer + offset + 1) = (this->height >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 60 *(outbuffer + offset + 2) = (this->height >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 61 *(outbuffer + offset + 3) = (this->height >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 62 offset += sizeof(this->height);
garyservin 0:9e9b7db60fd5 63 *(outbuffer + offset + 0) = (this->width >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 64 *(outbuffer + offset + 1) = (this->width >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 65 *(outbuffer + offset + 2) = (this->width >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 66 *(outbuffer + offset + 3) = (this->width >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 67 offset += sizeof(this->width);
garyservin 0:9e9b7db60fd5 68 uint32_t length_distortion_model = strlen(this->distortion_model);
garyservin 0:9e9b7db60fd5 69 varToArr(outbuffer + offset, length_distortion_model);
garyservin 0:9e9b7db60fd5 70 offset += 4;
garyservin 0:9e9b7db60fd5 71 memcpy(outbuffer + offset, this->distortion_model, length_distortion_model);
garyservin 0:9e9b7db60fd5 72 offset += length_distortion_model;
garyservin 0:9e9b7db60fd5 73 *(outbuffer + offset + 0) = (this->D_length >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 74 *(outbuffer + offset + 1) = (this->D_length >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 75 *(outbuffer + offset + 2) = (this->D_length >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 76 *(outbuffer + offset + 3) = (this->D_length >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 77 offset += sizeof(this->D_length);
garyservin 0:9e9b7db60fd5 78 for( uint32_t i = 0; i < D_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_Di;
garyservin 0:9e9b7db60fd5 83 u_Di.real = this->D[i];
garyservin 0:9e9b7db60fd5 84 *(outbuffer + offset + 0) = (u_Di.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 85 *(outbuffer + offset + 1) = (u_Di.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 86 *(outbuffer + offset + 2) = (u_Di.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 87 *(outbuffer + offset + 3) = (u_Di.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 88 *(outbuffer + offset + 4) = (u_Di.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 89 *(outbuffer + offset + 5) = (u_Di.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 90 *(outbuffer + offset + 6) = (u_Di.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 91 *(outbuffer + offset + 7) = (u_Di.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 92 offset += sizeof(this->D[i]);
garyservin 0:9e9b7db60fd5 93 }
garyservin 0:9e9b7db60fd5 94 for( uint32_t i = 0; i < 9; i++){
garyservin 0:9e9b7db60fd5 95 union {
garyservin 0:9e9b7db60fd5 96 double real;
garyservin 0:9e9b7db60fd5 97 uint64_t base;
garyservin 0:9e9b7db60fd5 98 } u_Ki;
garyservin 0:9e9b7db60fd5 99 u_Ki.real = this->K[i];
garyservin 0:9e9b7db60fd5 100 *(outbuffer + offset + 0) = (u_Ki.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 101 *(outbuffer + offset + 1) = (u_Ki.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 102 *(outbuffer + offset + 2) = (u_Ki.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 103 *(outbuffer + offset + 3) = (u_Ki.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 104 *(outbuffer + offset + 4) = (u_Ki.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 105 *(outbuffer + offset + 5) = (u_Ki.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 106 *(outbuffer + offset + 6) = (u_Ki.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 107 *(outbuffer + offset + 7) = (u_Ki.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 108 offset += sizeof(this->K[i]);
garyservin 0:9e9b7db60fd5 109 }
garyservin 0:9e9b7db60fd5 110 for( uint32_t i = 0; i < 9; i++){
garyservin 0:9e9b7db60fd5 111 union {
garyservin 0:9e9b7db60fd5 112 double real;
garyservin 0:9e9b7db60fd5 113 uint64_t base;
garyservin 0:9e9b7db60fd5 114 } u_Ri;
garyservin 0:9e9b7db60fd5 115 u_Ri.real = this->R[i];
garyservin 0:9e9b7db60fd5 116 *(outbuffer + offset + 0) = (u_Ri.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 117 *(outbuffer + offset + 1) = (u_Ri.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 118 *(outbuffer + offset + 2) = (u_Ri.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 119 *(outbuffer + offset + 3) = (u_Ri.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 120 *(outbuffer + offset + 4) = (u_Ri.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 121 *(outbuffer + offset + 5) = (u_Ri.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 122 *(outbuffer + offset + 6) = (u_Ri.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 123 *(outbuffer + offset + 7) = (u_Ri.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 124 offset += sizeof(this->R[i]);
garyservin 0:9e9b7db60fd5 125 }
garyservin 0:9e9b7db60fd5 126 for( uint32_t i = 0; i < 12; i++){
garyservin 0:9e9b7db60fd5 127 union {
garyservin 0:9e9b7db60fd5 128 double real;
garyservin 0:9e9b7db60fd5 129 uint64_t base;
garyservin 0:9e9b7db60fd5 130 } u_Pi;
garyservin 0:9e9b7db60fd5 131 u_Pi.real = this->P[i];
garyservin 0:9e9b7db60fd5 132 *(outbuffer + offset + 0) = (u_Pi.base >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 133 *(outbuffer + offset + 1) = (u_Pi.base >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 134 *(outbuffer + offset + 2) = (u_Pi.base >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 135 *(outbuffer + offset + 3) = (u_Pi.base >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 136 *(outbuffer + offset + 4) = (u_Pi.base >> (8 * 4)) & 0xFF;
garyservin 0:9e9b7db60fd5 137 *(outbuffer + offset + 5) = (u_Pi.base >> (8 * 5)) & 0xFF;
garyservin 0:9e9b7db60fd5 138 *(outbuffer + offset + 6) = (u_Pi.base >> (8 * 6)) & 0xFF;
garyservin 0:9e9b7db60fd5 139 *(outbuffer + offset + 7) = (u_Pi.base >> (8 * 7)) & 0xFF;
garyservin 0:9e9b7db60fd5 140 offset += sizeof(this->P[i]);
garyservin 0:9e9b7db60fd5 141 }
garyservin 0:9e9b7db60fd5 142 *(outbuffer + offset + 0) = (this->binning_x >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 143 *(outbuffer + offset + 1) = (this->binning_x >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 144 *(outbuffer + offset + 2) = (this->binning_x >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 145 *(outbuffer + offset + 3) = (this->binning_x >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 146 offset += sizeof(this->binning_x);
garyservin 0:9e9b7db60fd5 147 *(outbuffer + offset + 0) = (this->binning_y >> (8 * 0)) & 0xFF;
garyservin 0:9e9b7db60fd5 148 *(outbuffer + offset + 1) = (this->binning_y >> (8 * 1)) & 0xFF;
garyservin 0:9e9b7db60fd5 149 *(outbuffer + offset + 2) = (this->binning_y >> (8 * 2)) & 0xFF;
garyservin 0:9e9b7db60fd5 150 *(outbuffer + offset + 3) = (this->binning_y >> (8 * 3)) & 0xFF;
garyservin 0:9e9b7db60fd5 151 offset += sizeof(this->binning_y);
garyservin 0:9e9b7db60fd5 152 offset += this->roi.serialize(outbuffer + offset);
garyservin 0:9e9b7db60fd5 153 return offset;
garyservin 0:9e9b7db60fd5 154 }
garyservin 0:9e9b7db60fd5 155
garyservin 0:9e9b7db60fd5 156 virtual int deserialize(unsigned char *inbuffer)
garyservin 0:9e9b7db60fd5 157 {
garyservin 0:9e9b7db60fd5 158 int offset = 0;
garyservin 0:9e9b7db60fd5 159 offset += this->header.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 160 this->height = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 161 this->height |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 162 this->height |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 163 this->height |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 164 offset += sizeof(this->height);
garyservin 0:9e9b7db60fd5 165 this->width = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 166 this->width |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 167 this->width |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 168 this->width |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 169 offset += sizeof(this->width);
garyservin 0:9e9b7db60fd5 170 uint32_t length_distortion_model;
garyservin 0:9e9b7db60fd5 171 arrToVar(length_distortion_model, (inbuffer + offset));
garyservin 0:9e9b7db60fd5 172 offset += 4;
garyservin 0:9e9b7db60fd5 173 for(unsigned int k= offset; k< offset+length_distortion_model; ++k){
garyservin 0:9e9b7db60fd5 174 inbuffer[k-1]=inbuffer[k];
garyservin 0:9e9b7db60fd5 175 }
garyservin 0:9e9b7db60fd5 176 inbuffer[offset+length_distortion_model-1]=0;
garyservin 0:9e9b7db60fd5 177 this->distortion_model = (char *)(inbuffer + offset-1);
garyservin 0:9e9b7db60fd5 178 offset += length_distortion_model;
garyservin 0:9e9b7db60fd5 179 uint32_t D_lengthT = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 180 D_lengthT |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 181 D_lengthT |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 182 D_lengthT |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 183 offset += sizeof(this->D_length);
garyservin 0:9e9b7db60fd5 184 if(D_lengthT > D_length)
garyservin 0:9e9b7db60fd5 185 this->D = (double*)realloc(this->D, D_lengthT * sizeof(double));
garyservin 0:9e9b7db60fd5 186 D_length = D_lengthT;
garyservin 0:9e9b7db60fd5 187 for( uint32_t i = 0; i < D_length; i++){
garyservin 0:9e9b7db60fd5 188 union {
garyservin 0:9e9b7db60fd5 189 double real;
garyservin 0:9e9b7db60fd5 190 uint64_t base;
garyservin 0:9e9b7db60fd5 191 } u_st_D;
garyservin 0:9e9b7db60fd5 192 u_st_D.base = 0;
garyservin 0:9e9b7db60fd5 193 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 194 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 195 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 196 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 197 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 198 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 199 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 200 u_st_D.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 201 this->st_D = u_st_D.real;
garyservin 0:9e9b7db60fd5 202 offset += sizeof(this->st_D);
garyservin 0:9e9b7db60fd5 203 memcpy( &(this->D[i]), &(this->st_D), sizeof(double));
garyservin 0:9e9b7db60fd5 204 }
garyservin 0:9e9b7db60fd5 205 for( uint32_t i = 0; i < 9; i++){
garyservin 0:9e9b7db60fd5 206 union {
garyservin 0:9e9b7db60fd5 207 double real;
garyservin 0:9e9b7db60fd5 208 uint64_t base;
garyservin 0:9e9b7db60fd5 209 } u_Ki;
garyservin 0:9e9b7db60fd5 210 u_Ki.base = 0;
garyservin 0:9e9b7db60fd5 211 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 212 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 213 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 214 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 215 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 216 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 217 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 218 u_Ki.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 219 this->K[i] = u_Ki.real;
garyservin 0:9e9b7db60fd5 220 offset += sizeof(this->K[i]);
garyservin 0:9e9b7db60fd5 221 }
garyservin 0:9e9b7db60fd5 222 for( uint32_t i = 0; i < 9; i++){
garyservin 0:9e9b7db60fd5 223 union {
garyservin 0:9e9b7db60fd5 224 double real;
garyservin 0:9e9b7db60fd5 225 uint64_t base;
garyservin 0:9e9b7db60fd5 226 } u_Ri;
garyservin 0:9e9b7db60fd5 227 u_Ri.base = 0;
garyservin 0:9e9b7db60fd5 228 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 229 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 230 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 231 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 232 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 233 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 234 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 235 u_Ri.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 236 this->R[i] = u_Ri.real;
garyservin 0:9e9b7db60fd5 237 offset += sizeof(this->R[i]);
garyservin 0:9e9b7db60fd5 238 }
garyservin 0:9e9b7db60fd5 239 for( uint32_t i = 0; i < 12; i++){
garyservin 0:9e9b7db60fd5 240 union {
garyservin 0:9e9b7db60fd5 241 double real;
garyservin 0:9e9b7db60fd5 242 uint64_t base;
garyservin 0:9e9b7db60fd5 243 } u_Pi;
garyservin 0:9e9b7db60fd5 244 u_Pi.base = 0;
garyservin 0:9e9b7db60fd5 245 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 0))) << (8 * 0);
garyservin 0:9e9b7db60fd5 246 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 247 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 248 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 249 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 4))) << (8 * 4);
garyservin 0:9e9b7db60fd5 250 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 5))) << (8 * 5);
garyservin 0:9e9b7db60fd5 251 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 6))) << (8 * 6);
garyservin 0:9e9b7db60fd5 252 u_Pi.base |= ((uint64_t) (*(inbuffer + offset + 7))) << (8 * 7);
garyservin 0:9e9b7db60fd5 253 this->P[i] = u_Pi.real;
garyservin 0:9e9b7db60fd5 254 offset += sizeof(this->P[i]);
garyservin 0:9e9b7db60fd5 255 }
garyservin 0:9e9b7db60fd5 256 this->binning_x = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 257 this->binning_x |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 258 this->binning_x |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 259 this->binning_x |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 260 offset += sizeof(this->binning_x);
garyservin 0:9e9b7db60fd5 261 this->binning_y = ((uint32_t) (*(inbuffer + offset)));
garyservin 0:9e9b7db60fd5 262 this->binning_y |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
garyservin 0:9e9b7db60fd5 263 this->binning_y |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
garyservin 0:9e9b7db60fd5 264 this->binning_y |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
garyservin 0:9e9b7db60fd5 265 offset += sizeof(this->binning_y);
garyservin 0:9e9b7db60fd5 266 offset += this->roi.deserialize(inbuffer + offset);
garyservin 0:9e9b7db60fd5 267 return offset;
garyservin 0:9e9b7db60fd5 268 }
garyservin 0:9e9b7db60fd5 269
garyservin 0:9e9b7db60fd5 270 const char * getType(){ return "sensor_msgs/CameraInfo"; };
garyservin 0:9e9b7db60fd5 271 const char * getMD5(){ return "c9a58c1b0b154e0e6da7578cb991d214"; };
garyservin 0:9e9b7db60fd5 272
garyservin 0:9e9b7db60fd5 273 };
garyservin 0:9e9b7db60fd5 274
garyservin 0:9e9b7db60fd5 275 }
garyservin 0:9e9b7db60fd5 276 #endif