00001
00002 #ifndef ROSCPP_MESSAGE_LOGGER_H
00003 #define ROSCPP_MESSAGE_LOGGER_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace roscpp
00019 {
00020 template <class ContainerAllocator>
00021 struct Logger_ {
00022 typedef Logger_<ContainerAllocator> Type;
00023
00024 Logger_()
00025 : name()
00026 , level()
00027 {
00028 }
00029
00030 Logger_(const ContainerAllocator& _alloc)
00031 : name(_alloc)
00032 , level(_alloc)
00033 {
00034 }
00035
00036 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00037 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00038
00039 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _level_type;
00040 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > level;
00041
00042
00043 private:
00044 static const char* __s_getDataType_() { return "roscpp/Logger"; }
00045 public:
00046 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00047
00048 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00049
00050 private:
00051 static const char* __s_getMD5Sum_() { return "a6069a2ff40db7bd32143dd66e1f408e"; }
00052 public:
00053 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00054
00055 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00056
00057 private:
00058 static const char* __s_getMessageDefinition_() { return "string name\n\
00059 string level\n\
00060 \n\
00061 "; }
00062 public:
00063 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00064
00065 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00066
00067 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00068 {
00069 ros::serialization::OStream stream(write_ptr, 1000000000);
00070 ros::serialization::serialize(stream, name);
00071 ros::serialization::serialize(stream, level);
00072 return stream.getData();
00073 }
00074
00075 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00076 {
00077 ros::serialization::IStream stream(read_ptr, 1000000000);
00078 ros::serialization::deserialize(stream, name);
00079 ros::serialization::deserialize(stream, level);
00080 return stream.getData();
00081 }
00082
00083 ROS_DEPRECATED virtual uint32_t serializationLength() const
00084 {
00085 uint32_t size = 0;
00086 size += ros::serialization::serializationLength(name);
00087 size += ros::serialization::serializationLength(level);
00088 return size;
00089 }
00090
00091 typedef boost::shared_ptr< ::roscpp::Logger_<ContainerAllocator> > Ptr;
00092 typedef boost::shared_ptr< ::roscpp::Logger_<ContainerAllocator> const> ConstPtr;
00093 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00094 };
00095 typedef ::roscpp::Logger_<std::allocator<void> > Logger;
00096
00097 typedef boost::shared_ptr< ::roscpp::Logger> LoggerPtr;
00098 typedef boost::shared_ptr< ::roscpp::Logger const> LoggerConstPtr;
00099
00100
00101 template<typename ContainerAllocator>
00102 std::ostream& operator<<(std::ostream& s, const ::roscpp::Logger_<ContainerAllocator> & v)
00103 {
00104 ros::message_operations::Printer< ::roscpp::Logger_<ContainerAllocator> >::stream(s, "", v);
00105 return s;}
00106
00107 }
00108
00109 namespace ros
00110 {
00111 namespace message_traits
00112 {
00113 template<class ContainerAllocator> struct IsMessage< ::roscpp::Logger_<ContainerAllocator> > : public TrueType {};
00114 template<class ContainerAllocator> struct IsMessage< ::roscpp::Logger_<ContainerAllocator> const> : public TrueType {};
00115 template<class ContainerAllocator>
00116 struct MD5Sum< ::roscpp::Logger_<ContainerAllocator> > {
00117 static const char* value()
00118 {
00119 return "a6069a2ff40db7bd32143dd66e1f408e";
00120 }
00121
00122 static const char* value(const ::roscpp::Logger_<ContainerAllocator> &) { return value(); }
00123 static const uint64_t static_value1 = 0xa6069a2ff40db7bdULL;
00124 static const uint64_t static_value2 = 0x32143dd66e1f408eULL;
00125 };
00126
00127 template<class ContainerAllocator>
00128 struct DataType< ::roscpp::Logger_<ContainerAllocator> > {
00129 static const char* value()
00130 {
00131 return "roscpp/Logger";
00132 }
00133
00134 static const char* value(const ::roscpp::Logger_<ContainerAllocator> &) { return value(); }
00135 };
00136
00137 template<class ContainerAllocator>
00138 struct Definition< ::roscpp::Logger_<ContainerAllocator> > {
00139 static const char* value()
00140 {
00141 return "string name\n\
00142 string level\n\
00143 \n\
00144 ";
00145 }
00146
00147 static const char* value(const ::roscpp::Logger_<ContainerAllocator> &) { return value(); }
00148 };
00149
00150 }
00151 }
00152
00153 namespace ros
00154 {
00155 namespace serialization
00156 {
00157
00158 template<class ContainerAllocator> struct Serializer< ::roscpp::Logger_<ContainerAllocator> >
00159 {
00160 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00161 {
00162 stream.next(m.name);
00163 stream.next(m.level);
00164 }
00165
00166 ROS_DECLARE_ALLINONE_SERIALIZER;
00167 };
00168 }
00169 }
00170
00171 namespace ros
00172 {
00173 namespace message_operations
00174 {
00175
00176 template<class ContainerAllocator>
00177 struct Printer< ::roscpp::Logger_<ContainerAllocator> >
00178 {
00179 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::roscpp::Logger_<ContainerAllocator> & v)
00180 {
00181 s << indent << "name: ";
00182 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00183 s << indent << "level: ";
00184 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.level);
00185 }
00186 };
00187
00188
00189 }
00190 }
00191
00192 #endif // ROSCPP_MESSAGE_LOGGER_H
00193