00001
00002 #ifndef ROSSERIAL_MSGS_MESSAGE_LOG_H
00003 #define ROSSERIAL_MSGS_MESSAGE_LOG_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 rosserial_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct Log_ : public ros::Message
00018 {
00019 typedef Log_<ContainerAllocator> Type;
00020
00021 Log_()
00022 : level(0)
00023 , msg()
00024 {
00025 }
00026
00027 Log_(const ContainerAllocator& _alloc)
00028 : level(0)
00029 , msg(_alloc)
00030 {
00031 }
00032
00033 typedef uint8_t _level_type;
00034 uint8_t level;
00035
00036 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _msg_type;
00037 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > msg;
00038
00039 enum { DEBUG = 0 };
00040 enum { INFO = 1 };
00041 enum { WARN = 2 };
00042 enum { ERROR = 3 };
00043 enum { FATAL = 4 };
00044
00045 private:
00046 static const char* __s_getDataType_() { return "rosserial_msgs/Log"; }
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 "7170d5aec999754ba0d9f762bf49b913"; }
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 "\n\
00061 #ROS Logging Levels\n\
00062 uint8 DEBUG=0\n\
00063 uint8 INFO=1\n\
00064 uint8 WARN=2\n\
00065 uint8 ERROR=3\n\
00066 uint8 FATAL=4\n\
00067 \n\
00068 uint8 level\n\
00069 string msg\n\
00070 \n\
00071 "; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00074
00075 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00076
00077 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00078 {
00079 ros::serialization::OStream stream(write_ptr, 1000000000);
00080 ros::serialization::serialize(stream, level);
00081 ros::serialization::serialize(stream, msg);
00082 return stream.getData();
00083 }
00084
00085 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00086 {
00087 ros::serialization::IStream stream(read_ptr, 1000000000);
00088 ros::serialization::deserialize(stream, level);
00089 ros::serialization::deserialize(stream, msg);
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(level);
00097 size += ros::serialization::serializationLength(msg);
00098 return size;
00099 }
00100
00101 typedef boost::shared_ptr< ::rosserial_msgs::Log_<ContainerAllocator> > Ptr;
00102 typedef boost::shared_ptr< ::rosserial_msgs::Log_<ContainerAllocator> const> ConstPtr;
00103 };
00104 typedef ::rosserial_msgs::Log_<std::allocator<void> > Log;
00105
00106 typedef boost::shared_ptr< ::rosserial_msgs::Log> LogPtr;
00107 typedef boost::shared_ptr< ::rosserial_msgs::Log const> LogConstPtr;
00108
00109
00110 template<typename ContainerAllocator>
00111 std::ostream& operator<<(std::ostream& s, const ::rosserial_msgs::Log_<ContainerAllocator> & v)
00112 {
00113 ros::message_operations::Printer< ::rosserial_msgs::Log_<ContainerAllocator> >::stream(s, "", v);
00114 return s;}
00115
00116 }
00117
00118 namespace ros
00119 {
00120 namespace message_traits
00121 {
00122 template<class ContainerAllocator>
00123 struct MD5Sum< ::rosserial_msgs::Log_<ContainerAllocator> > {
00124 static const char* value()
00125 {
00126 return "7170d5aec999754ba0d9f762bf49b913";
00127 }
00128
00129 static const char* value(const ::rosserial_msgs::Log_<ContainerAllocator> &) { return value(); }
00130 static const uint64_t static_value1 = 0x7170d5aec999754bULL;
00131 static const uint64_t static_value2 = 0xa0d9f762bf49b913ULL;
00132 };
00133
00134 template<class ContainerAllocator>
00135 struct DataType< ::rosserial_msgs::Log_<ContainerAllocator> > {
00136 static const char* value()
00137 {
00138 return "rosserial_msgs/Log";
00139 }
00140
00141 static const char* value(const ::rosserial_msgs::Log_<ContainerAllocator> &) { return value(); }
00142 };
00143
00144 template<class ContainerAllocator>
00145 struct Definition< ::rosserial_msgs::Log_<ContainerAllocator> > {
00146 static const char* value()
00147 {
00148 return "\n\
00149 #ROS Logging Levels\n\
00150 uint8 DEBUG=0\n\
00151 uint8 INFO=1\n\
00152 uint8 WARN=2\n\
00153 uint8 ERROR=3\n\
00154 uint8 FATAL=4\n\
00155 \n\
00156 uint8 level\n\
00157 string msg\n\
00158 \n\
00159 ";
00160 }
00161
00162 static const char* value(const ::rosserial_msgs::Log_<ContainerAllocator> &) { return value(); }
00163 };
00164
00165 }
00166 }
00167
00168 namespace ros
00169 {
00170 namespace serialization
00171 {
00172
00173 template<class ContainerAllocator> struct Serializer< ::rosserial_msgs::Log_<ContainerAllocator> >
00174 {
00175 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00176 {
00177 stream.next(m.level);
00178 stream.next(m.msg);
00179 }
00180
00181 ROS_DECLARE_ALLINONE_SERIALIZER;
00182 };
00183 }
00184 }
00185
00186 namespace ros
00187 {
00188 namespace message_operations
00189 {
00190
00191 template<class ContainerAllocator>
00192 struct Printer< ::rosserial_msgs::Log_<ContainerAllocator> >
00193 {
00194 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::rosserial_msgs::Log_<ContainerAllocator> & v)
00195 {
00196 s << indent << "level: ";
00197 Printer<uint8_t>::stream(s, indent + " ", v.level);
00198 s << indent << "msg: ";
00199 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.msg);
00200 }
00201 };
00202
00203
00204 }
00205 }
00206
00207 #endif // ROSSERIAL_MSGS_MESSAGE_LOG_H
00208