Go to the documentation of this file.00001 #ifndef ros_std_msgs_UInt64_h
00002 #define ros_std_msgs_UInt64_h
00003
00004 #include <stdint.h>
00005 #include <string.h>
00006 #include <stdlib.h>
00007 #include "../ros/msg.h"
00008
00009 namespace std_msgs
00010 {
00011
00012 class UInt64 : public ros::Msg
00013 {
00014 public:
00015 long data;
00016
00017 virtual int serialize(unsigned char *outbuffer)
00018 {
00019 int offset = 0;
00020 *(outbuffer + offset++) = (data >> (8 * 0)) & 0xFF;
00021 *(outbuffer + offset++) = (data >> (8 * 1)) & 0xFF;
00022 *(outbuffer + offset++) = (data >> (8 * 2)) & 0xFF;
00023 *(outbuffer + offset++) = (data >> (8 * 3)) & 0xFF;
00024 *(outbuffer + offset++) = (data > 0) ? 0: 255;
00025 *(outbuffer + offset++) = (data > 0) ? 0: 255;
00026 *(outbuffer + offset++) = (data > 0) ? 0: 255;
00027 *(outbuffer + offset++) = (data > 0) ? 0: 255;
00028 return offset;
00029 }
00030
00031 virtual int deserialize(unsigned char *inbuffer)
00032 {
00033 int offset = 0;
00034 data = 0;
00035 data += ((long)(*(inbuffer + offset++))) >> (8 * 0);
00036 data += ((long)(*(inbuffer + offset++))) >> (8 * 1);
00037 data += ((long)(*(inbuffer + offset++))) >> (8 * 2);
00038 data += ((long)(*(inbuffer + offset++))) >> (8 * 3);
00039 offset += 4;
00040 return offset;
00041 }
00042
00043 const char * getType(){ return "std_msgs/UInt64"; };
00044
00045 };
00046
00047 }
00048 #endif