00001
00002 #ifndef PR2_SELF_TEST_MSGS_MESSAGE_PLOT_H
00003 #define PR2_SELF_TEST_MSGS_MESSAGE_PLOT_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 pr2_self_test_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct Plot_ : public ros::Message
00018 {
00019 typedef Plot_<ContainerAllocator> Type;
00020
00021 Plot_()
00022 : title()
00023 , image()
00024 , image_format()
00025 {
00026 }
00027
00028 Plot_(const ContainerAllocator& _alloc)
00029 : title(_alloc)
00030 , image(_alloc)
00031 , image_format(_alloc)
00032 {
00033 }
00034
00035 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _title_type;
00036 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > title;
00037
00038 typedef std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > _image_type;
00039 std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > image;
00040
00041 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _image_format_type;
00042 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > image_format;
00043
00044
00045 ROS_DEPRECATED uint32_t get_image_size() const { return (uint32_t)image.size(); }
00046 ROS_DEPRECATED void set_image_size(uint32_t size) { image.resize((size_t)size); }
00047 ROS_DEPRECATED void get_image_vec(std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) const { vec = this->image; }
00048 ROS_DEPRECATED void set_image_vec(const std::vector<int8_t, typename ContainerAllocator::template rebind<int8_t>::other > & vec) { this->image = vec; }
00049 private:
00050 static const char* __s_getDataType_() { return "pr2_self_test_msgs/Plot"; }
00051 public:
00052 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00053
00054 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00055
00056 private:
00057 static const char* __s_getMD5Sum_() { return "7b2b3d1ff7d1699544a2479e9175f3fb"; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00060
00061 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00062
00063 private:
00064 static const char* __s_getMessageDefinition_() { return "# Plot data, used for PR2 self tests\n\
00065 string title\n\
00066 byte[] image\n\
00067 string image_format\n\
00068 \n\
00069 "; }
00070 public:
00071 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00072
00073 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00074
00075 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00076 {
00077 ros::serialization::OStream stream(write_ptr, 1000000000);
00078 ros::serialization::serialize(stream, title);
00079 ros::serialization::serialize(stream, image);
00080 ros::serialization::serialize(stream, image_format);
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, title);
00088 ros::serialization::deserialize(stream, image);
00089 ros::serialization::deserialize(stream, image_format);
00090 return stream.getData();
00091 }
00092
00093 ROS_DEPRECATED virtual uint32_t serializationLength() const
00094 {
00095 uint32_t size = 0;
00096 size += ros::serialization::serializationLength(title);
00097 size += ros::serialization::serializationLength(image);
00098 size += ros::serialization::serializationLength(image_format);
00099 return size;
00100 }
00101
00102 typedef boost::shared_ptr< ::pr2_self_test_msgs::Plot_<ContainerAllocator> > Ptr;
00103 typedef boost::shared_ptr< ::pr2_self_test_msgs::Plot_<ContainerAllocator> const> ConstPtr;
00104 };
00105 typedef ::pr2_self_test_msgs::Plot_<std::allocator<void> > Plot;
00106
00107 typedef boost::shared_ptr< ::pr2_self_test_msgs::Plot> PlotPtr;
00108 typedef boost::shared_ptr< ::pr2_self_test_msgs::Plot const> PlotConstPtr;
00109
00110
00111 template<typename ContainerAllocator>
00112 std::ostream& operator<<(std::ostream& s, const ::pr2_self_test_msgs::Plot_<ContainerAllocator> & v)
00113 {
00114 ros::message_operations::Printer< ::pr2_self_test_msgs::Plot_<ContainerAllocator> >::stream(s, "", v);
00115 return s;}
00116
00117 }
00118
00119 namespace ros
00120 {
00121 namespace message_traits
00122 {
00123 template<class ContainerAllocator>
00124 struct MD5Sum< ::pr2_self_test_msgs::Plot_<ContainerAllocator> > {
00125 static const char* value()
00126 {
00127 return "7b2b3d1ff7d1699544a2479e9175f3fb";
00128 }
00129
00130 static const char* value(const ::pr2_self_test_msgs::Plot_<ContainerAllocator> &) { return value(); }
00131 static const uint64_t static_value1 = 0x7b2b3d1ff7d16995ULL;
00132 static const uint64_t static_value2 = 0x44a2479e9175f3fbULL;
00133 };
00134
00135 template<class ContainerAllocator>
00136 struct DataType< ::pr2_self_test_msgs::Plot_<ContainerAllocator> > {
00137 static const char* value()
00138 {
00139 return "pr2_self_test_msgs/Plot";
00140 }
00141
00142 static const char* value(const ::pr2_self_test_msgs::Plot_<ContainerAllocator> &) { return value(); }
00143 };
00144
00145 template<class ContainerAllocator>
00146 struct Definition< ::pr2_self_test_msgs::Plot_<ContainerAllocator> > {
00147 static const char* value()
00148 {
00149 return "# Plot data, used for PR2 self tests\n\
00150 string title\n\
00151 byte[] image\n\
00152 string image_format\n\
00153 \n\
00154 ";
00155 }
00156
00157 static const char* value(const ::pr2_self_test_msgs::Plot_<ContainerAllocator> &) { return value(); }
00158 };
00159
00160 }
00161 }
00162
00163 namespace ros
00164 {
00165 namespace serialization
00166 {
00167
00168 template<class ContainerAllocator> struct Serializer< ::pr2_self_test_msgs::Plot_<ContainerAllocator> >
00169 {
00170 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00171 {
00172 stream.next(m.title);
00173 stream.next(m.image);
00174 stream.next(m.image_format);
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< ::pr2_self_test_msgs::Plot_<ContainerAllocator> >
00189 {
00190 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::pr2_self_test_msgs::Plot_<ContainerAllocator> & v)
00191 {
00192 s << indent << "title: ";
00193 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.title);
00194 s << indent << "image[]" << std::endl;
00195 for (size_t i = 0; i < v.image.size(); ++i)
00196 {
00197 s << indent << " image[" << i << "]: ";
00198 Printer<int8_t>::stream(s, indent + " ", v.image[i]);
00199 }
00200 s << indent << "image_format: ";
00201 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.image_format);
00202 }
00203 };
00204
00205
00206 }
00207 }
00208
00209 #endif // PR2_SELF_TEST_MSGS_MESSAGE_PLOT_H
00210