00001
00002 #ifndef TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHDURATION_H
00003 #define TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHDURATION_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 WithDuration_ : public ros::Message
00018 {
00019 typedef WithDuration_<ContainerAllocator> Type;
00020
00021 WithDuration_()
00022 : my_duration()
00023 {
00024 }
00025
00026 WithDuration_(const ContainerAllocator& _alloc)
00027 : my_duration()
00028 {
00029 }
00030
00031 typedef ros::Duration _my_duration_type;
00032 ros::Duration my_duration;
00033
00034
00035 private:
00036 static const char* __s_getDataType_() { return "test_roscpp_serialization/WithDuration"; }
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 "7ad52ba9d0229ba8b9c032400c77c367"; }
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 "duration my_duration\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_duration);
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_duration);
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_duration);
00075 return size;
00076 }
00077
00078 typedef boost::shared_ptr< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> > Ptr;
00079 typedef boost::shared_ptr< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> const> ConstPtr;
00080 };
00081 typedef ::test_roscpp_serialization::WithDuration_<std::allocator<void> > WithDuration;
00082
00083 typedef boost::shared_ptr< ::test_roscpp_serialization::WithDuration> WithDurationPtr;
00084 typedef boost::shared_ptr< ::test_roscpp_serialization::WithDuration const> WithDurationConstPtr;
00085
00086
00087 template<typename ContainerAllocator>
00088 std::ostream& operator<<(std::ostream& s, const ::test_roscpp_serialization::WithDuration_<ContainerAllocator> & v)
00089 {
00090 ros::message_operations::Printer< ::test_roscpp_serialization::WithDuration_<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::WithDuration_<ContainerAllocator> > {
00101 static const char* value()
00102 {
00103 return "7ad52ba9d0229ba8b9c032400c77c367";
00104 }
00105
00106 static const char* value(const ::test_roscpp_serialization::WithDuration_<ContainerAllocator> &) { return value(); }
00107 static const uint64_t static_value1 = 0x7ad52ba9d0229ba8ULL;
00108 static const uint64_t static_value2 = 0xb9c032400c77c367ULL;
00109 };
00110
00111 template<class ContainerAllocator>
00112 struct DataType< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> > {
00113 static const char* value()
00114 {
00115 return "test_roscpp_serialization/WithDuration";
00116 }
00117
00118 static const char* value(const ::test_roscpp_serialization::WithDuration_<ContainerAllocator> &) { return value(); }
00119 };
00120
00121 template<class ContainerAllocator>
00122 struct Definition< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> > {
00123 static const char* value()
00124 {
00125 return "duration my_duration\n\
00126 ";
00127 }
00128
00129 static const char* value(const ::test_roscpp_serialization::WithDuration_<ContainerAllocator> &) { return value(); }
00130 };
00131
00132 template<class ContainerAllocator> struct IsFixedSize< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> > : public TrueType {};
00133 }
00134 }
00135
00136 namespace ros
00137 {
00138 namespace serialization
00139 {
00140
00141 template<class ContainerAllocator> struct Serializer< ::test_roscpp_serialization::WithDuration_<ContainerAllocator> >
00142 {
00143 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00144 {
00145 stream.next(m.my_duration);
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::WithDuration_<ContainerAllocator> >
00160 {
00161 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_roscpp_serialization::WithDuration_<ContainerAllocator> & v)
00162 {
00163 s << indent << "my_duration: ";
00164 Printer<ros::Duration>::stream(s, indent + " ", v.my_duration);
00165 }
00166 };
00167
00168
00169 }
00170 }
00171
00172 #endif // TEST_ROSCPP_SERIALIZATION_MESSAGE_WITHDURATION_H
00173