Time.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
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


cob_hand_bridge
Author(s): Mathias Lüdtke
autogenerated on Thu Jun 6 2019 20:43:57