00001
00002 #ifndef TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHTIME_H
00003 #define TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHTIME_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013
00014 namespace test_roscpp_serialization
00015 {
00016 template <class ContainerAllocator>
00017 struct WithTime_ : public ros::Message
00018 {
00019 typedef WithTime_<ContainerAllocator> Type;
00020
00021 WithTime_()
00022 : my_time()
00023 {
00024 }
00025
00026 WithTime_(const ContainerAllocator& _alloc)
00027 : my_time()
00028 {
00029 }
00030
00031 typedef ros::Time _my_time_type;
00032 ros::Time my_time;
00033
00034
00035 private:
00036 static const char* __s_getDataType_() { return "test_roscpp_serialization/WithTime"; }
00037 public:
00038 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00039
00040 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00041
00042 private:
00043 static const char* __s_getMD5Sum_() { return "60f189e40cfeaefbc79e6cdbd1605364"; }
00044 public:
00045 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00046
00047 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00048
00049 private:
00050 static const char* __s_getMessageDefinition_() { return "time my_time\n\
00051 "; }
00052 public:
00053 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00054
00055 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00056
00057 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00058 {
00059 ros::serialization::OStream stream(write_ptr, 1000000000);
00060 ros::serialization::serialize(stream, my_time);
00061 return stream.getData();
00062 }
00063
00064 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00065 {
00066 ros::serialization::IStream stream(read_ptr, 1000000000);
00067 ros::serialization::deserialize(stream, my_time);
00068 return stream.getData();
00069 }
00070
00071 ROS_DEPRECATED virtual uint32_t serializationLength() const
00072 {
00073 uint32_t size = 0;
00074 size += ros::serialization::serializationLength(my_time);
00075 return size;
00076 }
00077
00078 typedef boost::shared_ptr< ::test_roscpp_serialization::WithTime_<ContainerAllocator> > Ptr;
00079 typedef boost::shared_ptr< ::test_roscpp_serialization::WithTime_<ContainerAllocator> const> ConstPtr;
00080 };
00081 typedef ::test_roscpp_serialization::WithTime_<std::allocator<void> > WithTime;
00082
00083 typedef boost::shared_ptr< ::test_roscpp_serialization::WithTime> WithTimePtr;
00084 typedef boost::shared_ptr< ::test_roscpp_serialization::WithTime const> WithTimeConstPtr;
00085
00086
00087 template<typename ContainerAllocator>
00088 std::ostream& operator<<(std::ostream& s, const ::test_roscpp_serialization::WithTime_<ContainerAllocator> & v)
00089 {
00090 ros::message_operations::Printer< ::test_roscpp_serialization::WithTime_<ContainerAllocator> >::stream(s, "", v);
00091 return s;}
00092
00093 }
00094
00095 namespace ros
00096 {
00097 namespace message_traits
00098 {
00099 template<class ContainerAllocator>
00100 struct MD5Sum< ::test_roscpp_serialization::WithTime_<ContainerAllocator> > {
00101 static const char* value()
00102 {
00103 return "60f189e40cfeaefbc79e6cdbd1605364";
00104 }
00105
00106 static const char* value(const ::test_roscpp_serialization::WithTime_<ContainerAllocator> &) { return value(); }
00107 static const uint64_t static_value1 = 0x60f189e40cfeaefbULL;
00108 static const uint64_t static_value2 = 0xc79e6cdbd1605364ULL;
00109 };
00110
00111 template<class ContainerAllocator>
00112 struct DataType< ::test_roscpp_serialization::WithTime_<ContainerAllocator> > {
00113 static const char* value()
00114 {
00115 return "test_roscpp_serialization/WithTime";
00116 }
00117
00118 static const char* value(const ::test_roscpp_serialization::WithTime_<ContainerAllocator> &) { return value(); }
00119 };
00120
00121 template<class ContainerAllocator>
00122 struct Definition< ::test_roscpp_serialization::WithTime_<ContainerAllocator> > {
00123 static const char* value()
00124 {
00125 return "time my_time\n\
00126 ";
00127 }
00128
00129 static const char* value(const ::test_roscpp_serialization::WithTime_<ContainerAllocator> &) { return value(); }
00130 };
00131
00132 template<class ContainerAllocator> struct IsFixedSize< ::test_roscpp_serialization::WithTime_<ContainerAllocator> > : public TrueType {};
00133 }
00134 }
00135
00136 namespace ros
00137 {
00138 namespace serialization
00139 {
00140
00141 template<class ContainerAllocator> struct Serializer< ::test_roscpp_serialization::WithTime_<ContainerAllocator> >
00142 {
00143 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00144 {
00145 stream.next(m.my_time);
00146 }
00147
00148 ROS_DECLARE_ALLINONE_SERIALIZER;
00149 };
00150 }
00151 }
00152
00153 namespace ros
00154 {
00155 namespace message_operations
00156 {
00157
00158 template<class ContainerAllocator>
00159 struct Printer< ::test_roscpp_serialization::WithTime_<ContainerAllocator> >
00160 {
00161 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_roscpp_serialization::WithTime_<ContainerAllocator> & v)
00162 {
00163 s << indent << "my_time: ";
00164 Printer<ros::Time>::stream(s, indent + " ", v.my_time);
00165 }
00166 };
00167
00168
00169 }
00170 }
00171
00172 #endif // TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHTIME_H
00173