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