00001
00002 #ifndef TEST_ROSTOPIC_MESSAGE_ARRAYS_H
00003 #define TEST_ROSTOPIC_MESSAGE_ARRAYS_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_rostopic
00015 {
00016 template <class ContainerAllocator>
00017 struct Arrays_ : public ros::Message
00018 {
00019 typedef Arrays_<ContainerAllocator> Type;
00020
00021 Arrays_()
00022 : int8_arr()
00023 , uint8_arr()
00024 , int32_arr()
00025 , uint32_arr()
00026 , string_arr()
00027 , time_arr()
00028 {
00029 }
00030
00031 Arrays_(const ContainerAllocator& _alloc)
00032 : int8_arr(_alloc)
00033 , uint8_arr(_alloc)
00034 , int32_arr(_alloc)
00035 , uint32_arr(_alloc)
00036 , string_arr(_alloc)
00037 , time_arr(_alloc)
00038 {
00039 }
00040
00041 typedef std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > _int8_arr_type;
00042 std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > int8_arr;
00043
00044 typedef std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > _uint8_arr_type;
00045 std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > uint8_arr;
00046
00047 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _int32_arr_type;
00048 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > int32_arr;
00049
00050 typedef std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > _uint32_arr_type;
00051 std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > uint32_arr;
00052
00053 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _string_arr_type;
00054 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > string_arr;
00055
00056 typedef std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > _time_arr_type;
00057 std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > time_arr;
00058
00059
00060 ROS_DEPRECATED uint32_t get_int8_arr_size() const { return (uint32_t)int8_arr.size(); }
00061 ROS_DEPRECATED void set_int8_arr_size(uint32_t size) { int8_arr.resize((size_t)size); }
00062 ROS_DEPRECATED void get_int8_arr_vec(std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) const { vec = this->int8_arr; }
00063 ROS_DEPRECATED void set_int8_arr_vec(const std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) { this->int8_arr = vec; }
00064 ROS_DEPRECATED uint32_t get_uint8_arr_size() const { return (uint32_t)uint8_arr.size(); }
00065 ROS_DEPRECATED void set_uint8_arr_size(uint32_t size) { uint8_arr.resize((size_t)size); }
00066 ROS_DEPRECATED void get_uint8_arr_vec(std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) const { vec = this->uint8_arr; }
00067 ROS_DEPRECATED void set_uint8_arr_vec(const std::vector<uint8_t, typename ContainerAllocator::template rebind<uint8_t>::other > & vec) { this->uint8_arr = vec; }
00068 ROS_DEPRECATED uint32_t get_int32_arr_size() const { return (uint32_t)int32_arr.size(); }
00069 ROS_DEPRECATED void set_int32_arr_size(uint32_t size) { int32_arr.resize((size_t)size); }
00070 ROS_DEPRECATED void get_int32_arr_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->int32_arr; }
00071 ROS_DEPRECATED void set_int32_arr_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->int32_arr = vec; }
00072 ROS_DEPRECATED uint32_t get_uint32_arr_size() const { return (uint32_t)uint32_arr.size(); }
00073 ROS_DEPRECATED void set_uint32_arr_size(uint32_t size) { uint32_arr.resize((size_t)size); }
00074 ROS_DEPRECATED void get_uint32_arr_vec(std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) const { vec = this->uint32_arr; }
00075 ROS_DEPRECATED void set_uint32_arr_vec(const std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) { this->uint32_arr = vec; }
00076 ROS_DEPRECATED uint32_t get_string_arr_size() const { return (uint32_t)string_arr.size(); }
00077 ROS_DEPRECATED void set_string_arr_size(uint32_t size) { string_arr.resize((size_t)size); }
00078 ROS_DEPRECATED void get_string_arr_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->string_arr; }
00079 ROS_DEPRECATED void set_string_arr_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->string_arr = vec; }
00080 ROS_DEPRECATED uint32_t get_time_arr_size() const { return (uint32_t)time_arr.size(); }
00081 ROS_DEPRECATED void set_time_arr_size(uint32_t size) { time_arr.resize((size_t)size); }
00082 ROS_DEPRECATED void get_time_arr_vec(std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > & vec) const { vec = this->time_arr; }
00083 ROS_DEPRECATED void set_time_arr_vec(const std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > & vec) { this->time_arr = vec; }
00084 private:
00085 static const char* __s_getDataType_() { return "test_rostopic/Arrays"; }
00086 public:
00087 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00088
00089 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00090
00091 private:
00092 static const char* __s_getMD5Sum_() { return "c5a1f18379b10bdd4df210944f6007a4"; }
00093 public:
00094 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00095
00096 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00097
00098 private:
00099 static const char* __s_getMessageDefinition_() { return "int8[] int8_arr\n\
00100 uint8[] uint8_arr\n\
00101 int32[] int32_arr\n\
00102 uint32[] uint32_arr\n\
00103 string[] string_arr\n\
00104 time[] time_arr\n\
00105 \n\
00106 "; }
00107 public:
00108 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00111
00112 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00113 {
00114 ros::serialization::OStream stream(write_ptr, 1000000000);
00115 ros::serialization::serialize(stream, int8_arr);
00116 ros::serialization::serialize(stream, uint8_arr);
00117 ros::serialization::serialize(stream, int32_arr);
00118 ros::serialization::serialize(stream, uint32_arr);
00119 ros::serialization::serialize(stream, string_arr);
00120 ros::serialization::serialize(stream, time_arr);
00121 return stream.getData();
00122 }
00123
00124 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00125 {
00126 ros::serialization::IStream stream(read_ptr, 1000000000);
00127 ros::serialization::deserialize(stream, int8_arr);
00128 ros::serialization::deserialize(stream, uint8_arr);
00129 ros::serialization::deserialize(stream, int32_arr);
00130 ros::serialization::deserialize(stream, uint32_arr);
00131 ros::serialization::deserialize(stream, string_arr);
00132 ros::serialization::deserialize(stream, time_arr);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint32_t serializationLength() const
00137 {
00138 uint32_t size = 0;
00139 size += ros::serialization::serializationLength(int8_arr);
00140 size += ros::serialization::serializationLength(uint8_arr);
00141 size += ros::serialization::serializationLength(int32_arr);
00142 size += ros::serialization::serializationLength(uint32_arr);
00143 size += ros::serialization::serializationLength(string_arr);
00144 size += ros::serialization::serializationLength(time_arr);
00145 return size;
00146 }
00147
00148 typedef boost::shared_ptr< ::test_rostopic::Arrays_<ContainerAllocator> > Ptr;
00149 typedef boost::shared_ptr< ::test_rostopic::Arrays_<ContainerAllocator> const> ConstPtr;
00150 };
00151 typedef ::test_rostopic::Arrays_<std::allocator<void> > Arrays;
00152
00153 typedef boost::shared_ptr< ::test_rostopic::Arrays> ArraysPtr;
00154 typedef boost::shared_ptr< ::test_rostopic::Arrays const> ArraysConstPtr;
00155
00156
00157 template<typename ContainerAllocator>
00158 std::ostream& operator<<(std::ostream& s, const ::test_rostopic::Arrays_<ContainerAllocator> & v)
00159 {
00160 ros::message_operations::Printer< ::test_rostopic::Arrays_<ContainerAllocator> >::stream(s, "", v);
00161 return s;}
00162
00163 }
00164
00165 namespace ros
00166 {
00167 namespace message_traits
00168 {
00169 template<class ContainerAllocator>
00170 struct MD5Sum< ::test_rostopic::Arrays_<ContainerAllocator> > {
00171 static const char* value()
00172 {
00173 return "c5a1f18379b10bdd4df210944f6007a4";
00174 }
00175
00176 static const char* value(const ::test_rostopic::Arrays_<ContainerAllocator> &) { return value(); }
00177 static const uint64_t static_value1 = 0xc5a1f18379b10bddULL;
00178 static const uint64_t static_value2 = 0x4df210944f6007a4ULL;
00179 };
00180
00181 template<class ContainerAllocator>
00182 struct DataType< ::test_rostopic::Arrays_<ContainerAllocator> > {
00183 static const char* value()
00184 {
00185 return "test_rostopic/Arrays";
00186 }
00187
00188 static const char* value(const ::test_rostopic::Arrays_<ContainerAllocator> &) { return value(); }
00189 };
00190
00191 template<class ContainerAllocator>
00192 struct Definition< ::test_rostopic::Arrays_<ContainerAllocator> > {
00193 static const char* value()
00194 {
00195 return "int8[] int8_arr\n\
00196 uint8[] uint8_arr\n\
00197 int32[] int32_arr\n\
00198 uint32[] uint32_arr\n\
00199 string[] string_arr\n\
00200 time[] time_arr\n\
00201 \n\
00202 ";
00203 }
00204
00205 static const char* value(const ::test_rostopic::Arrays_<ContainerAllocator> &) { return value(); }
00206 };
00207
00208 }
00209 }
00210
00211 namespace ros
00212 {
00213 namespace serialization
00214 {
00215
00216 template<class ContainerAllocator> struct Serializer< ::test_rostopic::Arrays_<ContainerAllocator> >
00217 {
00218 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00219 {
00220 stream.next(m.int8_arr);
00221 stream.next(m.uint8_arr);
00222 stream.next(m.int32_arr);
00223 stream.next(m.uint32_arr);
00224 stream.next(m.string_arr);
00225 stream.next(m.time_arr);
00226 }
00227
00228 ROS_DECLARE_ALLINONE_SERIALIZER;
00229 };
00230 }
00231 }
00232
00233 namespace ros
00234 {
00235 namespace message_operations
00236 {
00237
00238 template<class ContainerAllocator>
00239 struct Printer< ::test_rostopic::Arrays_<ContainerAllocator> >
00240 {
00241 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_rostopic::Arrays_<ContainerAllocator> & v)
00242 {
00243 s << indent << "int8_arr[]" << std::endl;
00244 for (size_t i = 0; i < v.int8_arr.size(); ++i)
00245 {
00246 s << indent << " int8_arr[" << i << "]: ";
00247 Printer<int8_t>::stream(s, indent + " ", v.int8_arr[i]);
00248 }
00249 s << indent << "uint8_arr[]" << std::endl;
00250 for (size_t i = 0; i < v.uint8_arr.size(); ++i)
00251 {
00252 s << indent << " uint8_arr[" << i << "]: ";
00253 Printer<uint8_t>::stream(s, indent + " ", v.uint8_arr[i]);
00254 }
00255 s << indent << "int32_arr[]" << std::endl;
00256 for (size_t i = 0; i < v.int32_arr.size(); ++i)
00257 {
00258 s << indent << " int32_arr[" << i << "]: ";
00259 Printer<int32_t>::stream(s, indent + " ", v.int32_arr[i]);
00260 }
00261 s << indent << "uint32_arr[]" << std::endl;
00262 for (size_t i = 0; i < v.uint32_arr.size(); ++i)
00263 {
00264 s << indent << " uint32_arr[" << i << "]: ";
00265 Printer<uint32_t>::stream(s, indent + " ", v.uint32_arr[i]);
00266 }
00267 s << indent << "string_arr[]" << std::endl;
00268 for (size_t i = 0; i < v.string_arr.size(); ++i)
00269 {
00270 s << indent << " string_arr[" << i << "]: ";
00271 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.string_arr[i]);
00272 }
00273 s << indent << "time_arr[]" << std::endl;
00274 for (size_t i = 0; i < v.time_arr.size(); ++i)
00275 {
00276 s << indent << " time_arr[" << i << "]: ";
00277 Printer<ros::Time>::stream(s, indent + " ", v.time_arr[i]);
00278 }
00279 }
00280 };
00281
00282
00283 }
00284 }
00285
00286 #endif // TEST_ROSTOPIC_MESSAGE_ARRAYS_H
00287