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