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 signed char status;
00016 unsigned int 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)
00027 {
00028 int offset = 0;
00029 union {
00030 signed char real;
00031 unsigned char 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 union {
00037 unsigned int real;
00038 unsigned int base;
00039 } u_service;
00040 u_service.real = this->service;
00041 *(outbuffer + offset + 0) = (u_service.base >> (8 * 0)) & 0xFF;
00042 *(outbuffer + offset + 1) = (u_service.base >> (8 * 1)) & 0xFF;
00043 offset += sizeof(this->service);
00044 return offset;
00045 }
00046
00047 virtual int deserialize(unsigned char *inbuffer)
00048 {
00049 int offset = 0;
00050 union {
00051 signed char real;
00052 unsigned char base;
00053 } u_status;
00054 u_status.base = 0;
00055 u_status.base |= ((typeof(u_status.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00056 this->status = u_status.real;
00057 offset += sizeof(this->status);
00058 union {
00059 unsigned int real;
00060 unsigned int base;
00061 } u_service;
00062 u_service.base = 0;
00063 u_service.base |= ((typeof(u_service.base)) (*(inbuffer + offset + 0))) << (8 * 0);
00064 u_service.base |= ((typeof(u_service.base)) (*(inbuffer + offset + 1))) << (8 * 1);
00065 this->service = u_service.real;
00066 offset += sizeof(this->service);
00067 return offset;
00068 }
00069
00070 const char * getType(){ return "sensor_msgs/NavSatStatus"; };
00071
00072 };
00073
00074 }
00075 #endif