Go to the documentation of this file.00001 #ifndef _ROS_household_objects_database_msgs_DatabaseReturnCode_h
00002 #define _ROS_household_objects_database_msgs_DatabaseReturnCode_h
00003
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "ros/msg.h"
00008
00009 namespace household_objects_database_msgs
00010 {
00011
00012 class DatabaseReturnCode : public ros::Msg
00013 {
00014 public:
00015 int32_t code;
00016 enum { UNKNOWN_ERROR = 1 };
00017 enum { DATABASE_NOT_CONNECTED = 2 };
00018 enum { DATABASE_QUERY_ERROR = 3 };
00019 enum { SUCCESS = -1 };
00020
00021 virtual int serialize(unsigned char *outbuffer) const
00022 {
00023 int offset = 0;
00024 union {
00025 int32_t real;
00026 uint32_t base;
00027 } u_code;
00028 u_code.real = this->code;
00029 *(outbuffer + offset + 0) = (u_code.base >> (8 * 0)) & 0xFF;
00030 *(outbuffer + offset + 1) = (u_code.base >> (8 * 1)) & 0xFF;
00031 *(outbuffer + offset + 2) = (u_code.base >> (8 * 2)) & 0xFF;
00032 *(outbuffer + offset + 3) = (u_code.base >> (8 * 3)) & 0xFF;
00033 offset += sizeof(this->code);
00034 return offset;
00035 }
00036
00037 virtual int deserialize(unsigned char *inbuffer)
00038 {
00039 int offset = 0;
00040 union {
00041 int32_t real;
00042 uint32_t base;
00043 } u_code;
00044 u_code.base = 0;
00045 u_code.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00046 u_code.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00047 u_code.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00048 u_code.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00049 this->code = u_code.real;
00050 offset += sizeof(this->code);
00051 return offset;
00052 }
00053
00054 const char * getType(){ return "household_objects_database_msgs/DatabaseReturnCode"; };
00055 const char * getMD5(){ return "b649fd6fa3a4e3bf8e3f4b4e648fa0f1"; };
00056
00057 };
00058
00059 }
00060 #endif