00001
00002 #ifndef TEST_ROSCPP_SERIALIZATION_MESSAGE_ARRAYOFVARIABLELENGTH_H
00003 #define TEST_ROSCPP_SERIALIZATION_MESSAGE_ARRAYOFVARIABLELENGTH_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 #include "test_roscpp_serialization/VariableLength.h"
00014
00015 namespace test_roscpp_serialization
00016 {
00017 template <class ContainerAllocator>
00018 struct ArrayOfVariableLength_ : public ros::Message
00019 {
00020 typedef ArrayOfVariableLength_<ContainerAllocator> Type;
00021
00022 ArrayOfVariableLength_()
00023 : a()
00024 {
00025 }
00026
00027 ArrayOfVariableLength_(const ContainerAllocator& _alloc)
00028 : a()
00029 {
00030 a.assign( ::test_roscpp_serialization::VariableLength_<ContainerAllocator> (_alloc));
00031 }
00032
00033 typedef boost::array< ::test_roscpp_serialization::VariableLength_<ContainerAllocator> , 4> _a_type;
00034 boost::array< ::test_roscpp_serialization::VariableLength_<ContainerAllocator> , 4> a;
00035
00036
00037 ROS_DEPRECATED uint32_t get_a_size() const { return (uint32_t)a.size(); }
00038 private:
00039 static const char* __s_getDataType_() { return "test_roscpp_serialization/ArrayOfVariableLength"; }
00040 public:
00041 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00042
00043 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00044
00045 private:
00046 static const char* __s_getMD5Sum_() { return "e7404d454a50b82c426a3a2c76fbcefd"; }
00047 public:
00048 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00049
00050 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00051
00052 private:
00053 static const char* __s_getMessageDefinition_() { return "VariableLength[4] a\n\
00054 ================================================================================\n\
00055 MSG: test_roscpp_serialization/VariableLength\n\
00056 uint32[] a\n\
00057 \n\
00058 "; }
00059 public:
00060 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00061
00062 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00063
00064 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00065 {
00066 ros::serialization::OStream stream(write_ptr, 1000000000);
00067 ros::serialization::serialize(stream, a);
00068 return stream.getData();
00069 }
00070
00071 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00072 {
00073 ros::serialization::IStream stream(read_ptr, 1000000000);
00074 ros::serialization::deserialize(stream, a);
00075 return stream.getData();
00076 }
00077
00078 ROS_DEPRECATED virtual uint32_t serializationLength() const
00079 {
00080 uint32_t size = 0;
00081 size += ros::serialization::serializationLength(a);
00082 return size;
00083 }
00084
00085 typedef boost::shared_ptr< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> > Ptr;
00086 typedef boost::shared_ptr< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> const> ConstPtr;
00087 };
00088 typedef ::test_roscpp_serialization::ArrayOfVariableLength_<std::allocator<void> > ArrayOfVariableLength;
00089
00090 typedef boost::shared_ptr< ::test_roscpp_serialization::ArrayOfVariableLength> ArrayOfVariableLengthPtr;
00091 typedef boost::shared_ptr< ::test_roscpp_serialization::ArrayOfVariableLength const> ArrayOfVariableLengthConstPtr;
00092
00093
00094 template<typename ContainerAllocator>
00095 std::ostream& operator<<(std::ostream& s, const ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> & v)
00096 {
00097 ros::message_operations::Printer< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> >::stream(s, "", v);
00098 return s;}
00099
00100 }
00101
00102 namespace ros
00103 {
00104 namespace message_traits
00105 {
00106 template<class ContainerAllocator>
00107 struct MD5Sum< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> > {
00108 static const char* value()
00109 {
00110 return "e7404d454a50b82c426a3a2c76fbcefd";
00111 }
00112
00113 static const char* value(const ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> &) { return value(); }
00114 static const uint64_t static_value1 = 0xe7404d454a50b82cULL;
00115 static const uint64_t static_value2 = 0x426a3a2c76fbcefdULL;
00116 };
00117
00118 template<class ContainerAllocator>
00119 struct DataType< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> > {
00120 static const char* value()
00121 {
00122 return "test_roscpp_serialization/ArrayOfVariableLength";
00123 }
00124
00125 static const char* value(const ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> &) { return value(); }
00126 };
00127
00128 template<class ContainerAllocator>
00129 struct Definition< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> > {
00130 static const char* value()
00131 {
00132 return "VariableLength[4] a\n\
00133 ================================================================================\n\
00134 MSG: test_roscpp_serialization/VariableLength\n\
00135 uint32[] a\n\
00136 \n\
00137 ";
00138 }
00139
00140 static const char* value(const ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> &) { return value(); }
00141 };
00142
00143 }
00144 }
00145
00146 namespace ros
00147 {
00148 namespace serialization
00149 {
00150
00151 template<class ContainerAllocator> struct Serializer< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> >
00152 {
00153 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00154 {
00155 stream.next(m.a);
00156 }
00157
00158 ROS_DECLARE_ALLINONE_SERIALIZER;
00159 };
00160 }
00161 }
00162
00163 namespace ros
00164 {
00165 namespace message_operations
00166 {
00167
00168 template<class ContainerAllocator>
00169 struct Printer< ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> >
00170 {
00171 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_roscpp_serialization::ArrayOfVariableLength_<ContainerAllocator> & v)
00172 {
00173 s << indent << "a[]" << std::endl;
00174 for (size_t i = 0; i < v.a.size(); ++i)
00175 {
00176 s << indent << " a[" << i << "]: ";
00177 s << std::endl;
00178 s << indent;
00179 Printer< ::test_roscpp_serialization::VariableLength_<ContainerAllocator> >::stream(s, indent + " ", v.a[i]);
00180 }
00181 }
00182 };
00183
00184
00185 }
00186 }
00187
00188 #endif // TEST_ROSCPP_SERIALIZATION_MESSAGE_ARRAYOFVARIABLELENGTH_H
00189