Go to the documentation of this file.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 int8_t status;
00016 uint16_t service;
00017 enum { STATUS_NO_FIX = -1 };
00018 enum { STATUS_FIX = 0 };
00019 enum { STATUS_SBAS_FIX = 1 };
00020 enum { STATUS_GBAS_FIX = 2 };
00021 enum { SERVICE_GPS = 1 };
00022 enum { SERVICE_GLONASS = 2 };
00023 enum { SERVICE_COMPASS = 4 };
00024 enum { SERVICE_GALILEO = 8 };
00025
00026 virtual int serialize(unsigned char *outbuffer) const
00027 {
00028 int offset = 0;
00029 union {
00030 int8_t real;
00031 uint8_t base;
00032 } u_status;
00033 u_status.real = this->status;
00034 *(outbuffer + offset + 0) = (u_status.base >> (8 * 0)) & 0xFF;
00035 offset += sizeof(this->status);
00036 *(outbuffer + offset + 0) = (this->service >> (8 * 0)) & 0xFF;
00037 *(outbuffer + offset + 1) = (this->service >> (8 * 1)) & 0xFF;
00038 offset += sizeof(this->service);
00039 return offset;
00040 }
00041
00042 virtual int deserialize(unsigned char *inbuffer)
00043 {
00044 int offset = 0;
00045 union {
00046 int8_t real;
00047 uint8_t base;
00048 } u_status;
00049 u_status.base = 0;
00050 u_status.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00051 this->status = u_status.real;
00052 offset += sizeof(this->status);
00053 this->service = ((uint16_t) (*(inbuffer + offset)));
00054 this->service |= ((uint16_t) (*(inbuffer + offset + 1))) << (8 * 1);
00055 offset += sizeof(this->service);
00056 return offset;
00057 }
00058
00059 const char * getType(){ return "sensor_msgs/NavSatStatus"; };
00060 const char * getMD5(){ return "331cdbddfa4bc96ffc3b9ad98900a54c"; };
00061
00062 };
00063
00064 }
00065 #endif