00001
00002 #ifndef TEST_ROS_MESSAGE_TESTARRAYS_H
00003 #define TEST_ROS_MESSAGE_TESTARRAYS_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_ros/TestString.h"
00014
00015 namespace test_ros
00016 {
00017 template <class ContainerAllocator>
00018 struct TestArrays_ : public ros::Message
00019 {
00020 typedef TestArrays_<ContainerAllocator> Type;
00021
00022 TestArrays_()
00023 : caller_id()
00024 , orig_caller_id()
00025 , int32_array()
00026 , float32_array()
00027 , time_array()
00028 , test_string_array()
00029 {
00030 }
00031
00032 TestArrays_(const ContainerAllocator& _alloc)
00033 : caller_id(_alloc)
00034 , orig_caller_id(_alloc)
00035 , int32_array(_alloc)
00036 , float32_array(_alloc)
00037 , time_array(_alloc)
00038 , test_string_array(_alloc)
00039 {
00040 }
00041
00042 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _caller_id_type;
00043 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > caller_id;
00044
00045 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _orig_caller_id_type;
00046 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > orig_caller_id;
00047
00048 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _int32_array_type;
00049 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > int32_array;
00050
00051 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _float32_array_type;
00052 std::vector<float, typename ContainerAllocator::template rebind<float>::other > float32_array;
00053
00054 typedef std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > _time_array_type;
00055 std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > time_array;
00056
00057 typedef std::vector< ::test_ros::TestString_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_ros::TestString_<ContainerAllocator> >::other > _test_string_array_type;
00058 std::vector< ::test_ros::TestString_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_ros::TestString_<ContainerAllocator> >::other > test_string_array;
00059
00060
00061 ROS_DEPRECATED uint32_t get_int32_array_size() const { return (uint32_t)int32_array.size(); }
00062 ROS_DEPRECATED void set_int32_array_size(uint32_t size) { int32_array.resize((size_t)size); }
00063 ROS_DEPRECATED void get_int32_array_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->int32_array; }
00064 ROS_DEPRECATED void set_int32_array_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->int32_array = vec; }
00065 ROS_DEPRECATED uint32_t get_float32_array_size() const { return (uint32_t)float32_array.size(); }
00066 ROS_DEPRECATED void set_float32_array_size(uint32_t size) { float32_array.resize((size_t)size); }
00067 ROS_DEPRECATED void get_float32_array_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->float32_array; }
00068 ROS_DEPRECATED void set_float32_array_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->float32_array = vec; }
00069 ROS_DEPRECATED uint32_t get_time_array_size() const { return (uint32_t)time_array.size(); }
00070 ROS_DEPRECATED void set_time_array_size(uint32_t size) { time_array.resize((size_t)size); }
00071 ROS_DEPRECATED void get_time_array_vec(std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > & vec) const { vec = this->time_array; }
00072 ROS_DEPRECATED void set_time_array_vec(const std::vector<ros::Time, typename ContainerAllocator::template rebind<ros::Time>::other > & vec) { this->time_array = vec; }
00073 ROS_DEPRECATED uint32_t get_test_string_array_size() const { return (uint32_t)test_string_array.size(); }
00074 ROS_DEPRECATED void set_test_string_array_size(uint32_t size) { test_string_array.resize((size_t)size); }
00075 ROS_DEPRECATED void get_test_string_array_vec(std::vector< ::test_ros::TestString_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_ros::TestString_<ContainerAllocator> >::other > & vec) const { vec = this->test_string_array; }
00076 ROS_DEPRECATED void set_test_string_array_vec(const std::vector< ::test_ros::TestString_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::test_ros::TestString_<ContainerAllocator> >::other > & vec) { this->test_string_array = vec; }
00077 private:
00078 static const char* __s_getDataType_() { return "test_ros/TestArrays"; }
00079 public:
00080 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00081
00082 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00083
00084 private:
00085 static const char* __s_getMD5Sum_() { return "4cc9b5e2cebe791aa3e994f5bc159eb6"; }
00086 public:
00087 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00088
00089 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00090
00091 private:
00092 static const char* __s_getMessageDefinition_() { return "# caller_id of most recent node to send this message\n\
00093 string caller_id\n\
00094 # caller_id of the original node to send this message\n\
00095 string orig_caller_id\n\
00096 \n\
00097 int32[] int32_array\n\
00098 float32[] float32_array\n\
00099 time[] time_array\n\
00100 TestString[] test_string_array\n\
00101 # TODO: array of arrays\n\
00102 \n\
00103 ================================================================================\n\
00104 MSG: test_ros/TestString\n\
00105 # Integration test message\n\
00106 # caller_id of most recent node to send this message\n\
00107 string caller_id\n\
00108 # caller_id of the original node to send this message\n\
00109 string orig_caller_id\n\
00110 string data\n\
00111 \n\
00112 "; }
00113 public:
00114 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00115
00116 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00117
00118 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00119 {
00120 ros::serialization::OStream stream(write_ptr, 1000000000);
00121 ros::serialization::serialize(stream, caller_id);
00122 ros::serialization::serialize(stream, orig_caller_id);
00123 ros::serialization::serialize(stream, int32_array);
00124 ros::serialization::serialize(stream, float32_array);
00125 ros::serialization::serialize(stream, time_array);
00126 ros::serialization::serialize(stream, test_string_array);
00127 return stream.getData();
00128 }
00129
00130 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00131 {
00132 ros::serialization::IStream stream(read_ptr, 1000000000);
00133 ros::serialization::deserialize(stream, caller_id);
00134 ros::serialization::deserialize(stream, orig_caller_id);
00135 ros::serialization::deserialize(stream, int32_array);
00136 ros::serialization::deserialize(stream, float32_array);
00137 ros::serialization::deserialize(stream, time_array);
00138 ros::serialization::deserialize(stream, test_string_array);
00139 return stream.getData();
00140 }
00141
00142 ROS_DEPRECATED virtual uint32_t serializationLength() const
00143 {
00144 uint32_t size = 0;
00145 size += ros::serialization::serializationLength(caller_id);
00146 size += ros::serialization::serializationLength(orig_caller_id);
00147 size += ros::serialization::serializationLength(int32_array);
00148 size += ros::serialization::serializationLength(float32_array);
00149 size += ros::serialization::serializationLength(time_array);
00150 size += ros::serialization::serializationLength(test_string_array);
00151 return size;
00152 }
00153
00154 typedef boost::shared_ptr< ::test_ros::TestArrays_<ContainerAllocator> > Ptr;
00155 typedef boost::shared_ptr< ::test_ros::TestArrays_<ContainerAllocator> const> ConstPtr;
00156 };
00157 typedef ::test_ros::TestArrays_<std::allocator<void> > TestArrays;
00158
00159 typedef boost::shared_ptr< ::test_ros::TestArrays> TestArraysPtr;
00160 typedef boost::shared_ptr< ::test_ros::TestArrays const> TestArraysConstPtr;
00161
00162
00163 template<typename ContainerAllocator>
00164 std::ostream& operator<<(std::ostream& s, const ::test_ros::TestArrays_<ContainerAllocator> & v)
00165 {
00166 ros::message_operations::Printer< ::test_ros::TestArrays_<ContainerAllocator> >::stream(s, "", v);
00167 return s;}
00168
00169 }
00170
00171 namespace ros
00172 {
00173 namespace message_traits
00174 {
00175 template<class ContainerAllocator>
00176 struct MD5Sum< ::test_ros::TestArrays_<ContainerAllocator> > {
00177 static const char* value()
00178 {
00179 return "4cc9b5e2cebe791aa3e994f5bc159eb6";
00180 }
00181
00182 static const char* value(const ::test_ros::TestArrays_<ContainerAllocator> &) { return value(); }
00183 static const uint64_t static_value1 = 0x4cc9b5e2cebe791aULL;
00184 static const uint64_t static_value2 = 0xa3e994f5bc159eb6ULL;
00185 };
00186
00187 template<class ContainerAllocator>
00188 struct DataType< ::test_ros::TestArrays_<ContainerAllocator> > {
00189 static const char* value()
00190 {
00191 return "test_ros/TestArrays";
00192 }
00193
00194 static const char* value(const ::test_ros::TestArrays_<ContainerAllocator> &) { return value(); }
00195 };
00196
00197 template<class ContainerAllocator>
00198 struct Definition< ::test_ros::TestArrays_<ContainerAllocator> > {
00199 static const char* value()
00200 {
00201 return "# caller_id of most recent node to send this message\n\
00202 string caller_id\n\
00203 # caller_id of the original node to send this message\n\
00204 string orig_caller_id\n\
00205 \n\
00206 int32[] int32_array\n\
00207 float32[] float32_array\n\
00208 time[] time_array\n\
00209 TestString[] test_string_array\n\
00210 # TODO: array of arrays\n\
00211 \n\
00212 ================================================================================\n\
00213 MSG: test_ros/TestString\n\
00214 # Integration test message\n\
00215 # caller_id of most recent node to send this message\n\
00216 string caller_id\n\
00217 # caller_id of the original node to send this message\n\
00218 string orig_caller_id\n\
00219 string data\n\
00220 \n\
00221 ";
00222 }
00223
00224 static const char* value(const ::test_ros::TestArrays_<ContainerAllocator> &) { return value(); }
00225 };
00226
00227 }
00228 }
00229
00230 namespace ros
00231 {
00232 namespace serialization
00233 {
00234
00235 template<class ContainerAllocator> struct Serializer< ::test_ros::TestArrays_<ContainerAllocator> >
00236 {
00237 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00238 {
00239 stream.next(m.caller_id);
00240 stream.next(m.orig_caller_id);
00241 stream.next(m.int32_array);
00242 stream.next(m.float32_array);
00243 stream.next(m.time_array);
00244 stream.next(m.test_string_array);
00245 }
00246
00247 ROS_DECLARE_ALLINONE_SERIALIZER;
00248 };
00249 }
00250 }
00251
00252 namespace ros
00253 {
00254 namespace message_operations
00255 {
00256
00257 template<class ContainerAllocator>
00258 struct Printer< ::test_ros::TestArrays_<ContainerAllocator> >
00259 {
00260 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::test_ros::TestArrays_<ContainerAllocator> & v)
00261 {
00262 s << indent << "caller_id: ";
00263 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.caller_id);
00264 s << indent << "orig_caller_id: ";
00265 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.orig_caller_id);
00266 s << indent << "int32_array[]" << std::endl;
00267 for (size_t i = 0; i < v.int32_array.size(); ++i)
00268 {
00269 s << indent << " int32_array[" << i << "]: ";
00270 Printer<int32_t>::stream(s, indent + " ", v.int32_array[i]);
00271 }
00272 s << indent << "float32_array[]" << std::endl;
00273 for (size_t i = 0; i < v.float32_array.size(); ++i)
00274 {
00275 s << indent << " float32_array[" << i << "]: ";
00276 Printer<float>::stream(s, indent + " ", v.float32_array[i]);
00277 }
00278 s << indent << "time_array[]" << std::endl;
00279 for (size_t i = 0; i < v.time_array.size(); ++i)
00280 {
00281 s << indent << " time_array[" << i << "]: ";
00282 Printer<ros::Time>::stream(s, indent + " ", v.time_array[i]);
00283 }
00284 s << indent << "test_string_array[]" << std::endl;
00285 for (size_t i = 0; i < v.test_string_array.size(); ++i)
00286 {
00287 s << indent << " test_string_array[" << i << "]: ";
00288 s << std::endl;
00289 s << indent;
00290 Printer< ::test_ros::TestString_<ContainerAllocator> >::stream(s, indent + " ", v.test_string_array[i]);
00291 }
00292 }
00293 };
00294
00295
00296 }
00297 }
00298
00299 #endif // TEST_ROS_MESSAGE_TESTARRAYS_H
00300