Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ROS_std_msgs_Time_h
00019 #define _ROS_std_msgs_Time_h
00020
00021 #include <stdint.h>
00022 #include <string.h>
00023 #include <stdlib.h>
00024 #include "ros/msg.h"
00025 #include "ros/time.h"
00026
00027 namespace std_msgs
00028 {
00029
00030 class Time : public ros::Msg
00031 {
00032 public:
00033 ros::Time data;
00034
00035 Time():
00036 data()
00037 {
00038 }
00039
00040 virtual int serialize(unsigned char *outbuffer) const
00041 {
00042 int offset = 0;
00043 *(outbuffer + offset + 0) = (this->data.sec >> (8 * 0)) & 0xFF;
00044 *(outbuffer + offset + 1) = (this->data.sec >> (8 * 1)) & 0xFF;
00045 *(outbuffer + offset + 2) = (this->data.sec >> (8 * 2)) & 0xFF;
00046 *(outbuffer + offset + 3) = (this->data.sec >> (8 * 3)) & 0xFF;
00047 offset += sizeof(this->data.sec);
00048 *(outbuffer + offset + 0) = (this->data.nsec >> (8 * 0)) & 0xFF;
00049 *(outbuffer + offset + 1) = (this->data.nsec >> (8 * 1)) & 0xFF;
00050 *(outbuffer + offset + 2) = (this->data.nsec >> (8 * 2)) & 0xFF;
00051 *(outbuffer + offset + 3) = (this->data.nsec >> (8 * 3)) & 0xFF;
00052 offset += sizeof(this->data.nsec);
00053 return offset;
00054 }
00055
00056 virtual int deserialize(unsigned char *inbuffer)
00057 {
00058 int offset = 0;
00059 this->data.sec = ((uint32_t) (*(inbuffer + offset)));
00060 this->data.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00061 this->data.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00062 this->data.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00063 offset += sizeof(this->data.sec);
00064 this->data.nsec = ((uint32_t) (*(inbuffer + offset)));
00065 this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00066 this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00067 this->data.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00068 offset += sizeof(this->data.nsec);
00069 return offset;
00070 }
00071
00072 const char * getType(){ return "std_msgs/Time"; };
00073 const char * getMD5(){ return "cd7166c74c552c311fbcc2fe5a7bc289"; };
00074
00075 };
00076
00077 }
00078 #endif