Just changed OUTPUT_SIZE and INPUT_SIZE in ros/node_handle.h

Dependencies:   BufferedSerial

Dependents:   WRS2020_mecanum_node

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NavSatStatus.h Source File

NavSatStatus.h

00001 #ifndef _ROS_sensor_msgs_NavSatStatus_h
00002 #define _ROS_sensor_msgs_NavSatStatus_h
00003 
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008 
00009 namespace sensor_msgs
00010 {
00011 
00012   class NavSatStatus : public ros::Msg
00013   {
00014     public:
00015       typedef int8_t _status_type;
00016       _status_type status;
00017       typedef uint16_t _service_type;
00018       _service_type service;
00019       enum { STATUS_NO_FIX =   -1         };
00020       enum { STATUS_FIX =       0         };
00021       enum { STATUS_SBAS_FIX =  1         };
00022       enum { STATUS_GBAS_FIX =  2         };
00023       enum { SERVICE_GPS =      1 };
00024       enum { SERVICE_GLONASS =  2 };
00025       enum { SERVICE_COMPASS =  4       };
00026       enum { SERVICE_GALILEO =  8 };
00027 
00028     NavSatStatus():
00029       status(0),
00030       service(0)
00031     {
00032     }
00033 
00034     virtual int serialize(unsigned char *outbuffer) const
00035     {
00036       int offset = 0;
00037       union {
00038         int8_t real;
00039         uint8_t base;
00040       } u_status;
00041       u_status.real = this->status;
00042       *(outbuffer + offset + 0) = (u_status.base >> (8 * 0)) & 0xFF;
00043       offset += sizeof(this->status);
00044       *(outbuffer + offset + 0) = (this->service >> (8 * 0)) & 0xFF;
00045       *(outbuffer + offset + 1) = (this->service >> (8 * 1)) & 0xFF;
00046       offset += sizeof(this->service);
00047       return offset;
00048     }
00049 
00050     virtual int deserialize(unsigned char *inbuffer)
00051     {
00052       int offset = 0;
00053       union {
00054         int8_t real;
00055         uint8_t base;
00056       } u_status;
00057       u_status.base = 0;
00058       u_status.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00059       this->status = u_status.real;
00060       offset += sizeof(this->status);
00061       this->service =  ((uint16_t) (*(inbuffer + offset)));
00062       this->service |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00063       offset += sizeof(this->service);
00064      return offset;
00065     }
00066 
00067     const char * getType(){ return "sensor_msgs/NavSatStatus"; };
00068     const char * getMD5(){ return "331cdbddfa4bc96ffc3b9ad98900a54c"; };
00069 
00070   };
00071 
00072 }
00073 #endif