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