00001 #warning("This header has been deprecated in favor of rosgraph_msgs/Log.h")
00002
00003
00004 #ifndef ROSLIB_MESSAGE_LOG_H
00005 #define ROSLIB_MESSAGE_LOG_H
00006 #include <string>
00007 #include <vector>
00008 #include <ostream>
00009 #include "ros/serialization.h"
00010 #include "ros/builtin_message_traits.h"
00011 #include "ros/message_operations.h"
00012 #include "ros/message.h"
00013 #include "ros/time.h"
00014
00015 #include "roslib/Header.h"
00016
00017 namespace roslib
00018 {
00019 template <class ContainerAllocator>
00020 struct Log_ : public ros::Message
00021 {
00022 typedef Log_<ContainerAllocator> Type;
00023
00024 Log_()
00025 : header()
00026 , level(0)
00027 , name()
00028 , msg()
00029 , file()
00030 , function()
00031 , line(0)
00032 , topics()
00033 {
00034 }
00035
00036 Log_(const ContainerAllocator& _alloc)
00037 : header(_alloc)
00038 , level(0)
00039 , name(_alloc)
00040 , msg(_alloc)
00041 , file(_alloc)
00042 , function(_alloc)
00043 , line(0)
00044 , topics(_alloc)
00045 {
00046 }
00047
00048 typedef ::roslib::Header_<ContainerAllocator> _header_type;
00049 ::roslib::Header_<ContainerAllocator> header;
00050
00051 typedef int8_t _level_type;
00052 int8_t level;
00053
00054 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00055 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00056
00057 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _msg_type;
00058 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > msg;
00059
00060 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _file_type;
00061 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > file;
00062
00063 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _function_type;
00064 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > function;
00065
00066 typedef uint32_t _line_type;
00067 uint32_t line;
00068
00069 typedef std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > _topics_type;
00070 std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > topics;
00071
00072 enum { DEBUG = 1 };
00073 enum { INFO = 2 };
00074 enum { WARN = 4 };
00075 enum { ERROR = 8 };
00076 enum { FATAL = 16 };
00077
00078 uint32_t get_topics_size() const { return (uint32_t)topics.size(); }
00079 void set_topics_size(uint32_t size) { topics.resize((size_t)size); }
00080 void get_topics_vec(std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) const { vec = this->topics; }
00081 void set_topics_vec(const std::vector<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > , typename ContainerAllocator::template rebind<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::other > & vec) { this->topics = vec; }
00082 private:
00083 static const char* __s_getDataType_() { return "roslib/Log"; }
00084 public:
00085 static const std::string __s_getDataType() { return __s_getDataType_(); }
00086
00087 const std::string __getDataType() const { return __s_getDataType_(); }
00088
00089 private:
00090 static const char* __s_getMD5Sum_() { return "acffd30cd6b6de30f120938c17c593fb"; }
00091 public:
00092 static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00093
00094 const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00095
00096 private:
00097 static const char* __s_getMessageDefinition_() { return "##\n\
00098 ## Severity level constants\n\
00099 ##\n\
00100 byte DEBUG=1 #debug level\n\
00101 byte INFO=2 #general level\n\
00102 byte WARN=4 #warning level\n\
00103 byte ERROR=8 #error level\n\
00104 byte FATAL=16 #fatal/critical level\n\
00105 ##\n\
00106 ## Fields\n\
00107 ##\n\
00108 Header header\n\
00109 byte level\n\
00110 string name # name of the node\n\
00111 string msg # message \n\
00112 string file # file the message came from\n\
00113 string function # function the message came from\n\
00114 uint32 line # line the message came from\n\
00115 string[] topics # topic names that the node publishes\n\
00116 \n\
00117 ================================================================================\n\
00118 MSG: roslib/Header\n\
00119 # Standard metadata for higher-level stamped data types.\n\
00120 # This is generally used to communicate timestamped data \n\
00121 # in a particular coordinate frame.\n\
00122 # \n\
00123 # sequence ID: consecutively increasing ID \n\
00124 uint32 seq\n\
00125 #Two-integer timestamp that is expressed as:\n\
00126 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00127 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00128 # time-handling sugar is provided by the client library\n\
00129 time stamp\n\
00130 #Frame this data is associated with\n\
00131 # 0: no frame\n\
00132 # 1: global frame\n\
00133 string frame_id\n\
00134 \n\
00135 "; }
00136 public:
00137 static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00138
00139 const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00140
00141 virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00142 {
00143 ros::serialization::OStream stream(write_ptr, 1000000000);
00144 ros::serialization::serialize(stream, header);
00145 ros::serialization::serialize(stream, level);
00146 ros::serialization::serialize(stream, name);
00147 ros::serialization::serialize(stream, msg);
00148 ros::serialization::serialize(stream, file);
00149 ros::serialization::serialize(stream, function);
00150 ros::serialization::serialize(stream, line);
00151 ros::serialization::serialize(stream, topics);
00152 return stream.getData();
00153 }
00154
00155 virtual uint8_t *deserialize(uint8_t *read_ptr)
00156 {
00157 ros::serialization::IStream stream(read_ptr, 1000000000);
00158 ros::serialization::deserialize(stream, header);
00159 ros::serialization::deserialize(stream, level);
00160 ros::serialization::deserialize(stream, name);
00161 ros::serialization::deserialize(stream, msg);
00162 ros::serialization::deserialize(stream, file);
00163 ros::serialization::deserialize(stream, function);
00164 ros::serialization::deserialize(stream, line);
00165 ros::serialization::deserialize(stream, topics);
00166 return stream.getData();
00167 }
00168
00169 virtual uint32_t serializationLength() const
00170 {
00171 uint32_t size = 0;
00172 size += ros::serialization::serializationLength(header);
00173 size += ros::serialization::serializationLength(level);
00174 size += ros::serialization::serializationLength(name);
00175 size += ros::serialization::serializationLength(msg);
00176 size += ros::serialization::serializationLength(file);
00177 size += ros::serialization::serializationLength(function);
00178 size += ros::serialization::serializationLength(line);
00179 size += ros::serialization::serializationLength(topics);
00180 return size;
00181 }
00182
00183 typedef boost::shared_ptr< ::roslib::Log_<ContainerAllocator> > Ptr;
00184 typedef boost::shared_ptr< ::roslib::Log_<ContainerAllocator> const> ConstPtr;
00185 };
00186 typedef ::roslib::Log_<std::allocator<void> > Log;
00187
00188 typedef boost::shared_ptr< ::roslib::Log> LogPtr;
00189 typedef boost::shared_ptr< ::roslib::Log const> LogConstPtr;
00190
00191
00192 template<typename ContainerAllocator>
00193 std::ostream& operator<<(std::ostream& s, const ::roslib::Log_<ContainerAllocator> & v)
00194 {
00195 ros::message_operations::Printer< ::roslib::Log_<ContainerAllocator> >::stream(s, "", v);
00196 return s;}
00197
00198 }
00199
00200 namespace ros
00201 {
00202 namespace message_traits
00203 {
00204 template<class ContainerAllocator>
00205 struct MD5Sum< ::roslib::Log_<ContainerAllocator> > {
00206 static const char* value()
00207 {
00208 return "acffd30cd6b6de30f120938c17c593fb";
00209 }
00210
00211 static const char* value(const ::roslib::Log_<ContainerAllocator> &) { return value(); }
00212 static const uint64_t static_value1 = 0xacffd30cd6b6de30ULL;
00213 static const uint64_t static_value2 = 0xf120938c17c593fbULL;
00214 };
00215
00216 template<class ContainerAllocator>
00217 struct DataType< ::roslib::Log_<ContainerAllocator> > {
00218 static const char* value()
00219 {
00220 return "roslib/Log";
00221 }
00222
00223 static const char* value(const ::roslib::Log_<ContainerAllocator> &) { return value(); }
00224 };
00225
00226 template<class ContainerAllocator>
00227 struct Definition< ::roslib::Log_<ContainerAllocator> > {
00228 static const char* value()
00229 {
00230 return "##\n\
00231 ## Severity level constants\n\
00232 ##\n\
00233 byte DEBUG=1 #debug level\n\
00234 byte INFO=2 #general level\n\
00235 byte WARN=4 #warning level\n\
00236 byte ERROR=8 #error level\n\
00237 byte FATAL=16 #fatal/critical level\n\
00238 ##\n\
00239 ## Fields\n\
00240 ##\n\
00241 Header header\n\
00242 byte level\n\
00243 string name # name of the node\n\
00244 string msg # message \n\
00245 string file # file the message came from\n\
00246 string function # function the message came from\n\
00247 uint32 line # line the message came from\n\
00248 string[] topics # topic names that the node publishes\n\
00249 \n\
00250 ================================================================================\n\
00251 MSG: roslib/Header\n\
00252 # Standard metadata for higher-level stamped data types.\n\
00253 # This is generally used to communicate timestamped data \n\
00254 # in a particular coordinate frame.\n\
00255 # \n\
00256 # sequence ID: consecutively increasing ID \n\
00257 uint32 seq\n\
00258 #Two-integer timestamp that is expressed as:\n\
00259 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00260 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00261 # time-handling sugar is provided by the client library\n\
00262 time stamp\n\
00263 #Frame this data is associated with\n\
00264 # 0: no frame\n\
00265 # 1: global frame\n\
00266 string frame_id\n\
00267 \n\
00268 ";
00269 }
00270
00271 static const char* value(const ::roslib::Log_<ContainerAllocator> &) { return value(); }
00272 };
00273
00274 template<class ContainerAllocator> struct HasHeader< ::roslib::Log_<ContainerAllocator> > : public TrueType {};
00275 }
00276 }
00277
00278 namespace ros
00279 {
00280 namespace serialization
00281 {
00282
00283 template<class ContainerAllocator> struct Serializer< ::roslib::Log_<ContainerAllocator> >
00284 {
00285 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00286 {
00287 stream.next(m.header);
00288 stream.next(m.level);
00289 stream.next(m.name);
00290 stream.next(m.msg);
00291 stream.next(m.file);
00292 stream.next(m.function);
00293 stream.next(m.line);
00294 stream.next(m.topics);
00295 }
00296
00297 ROS_DECLARE_ALLINONE_SERIALIZER;
00298 };
00299 }
00300 }
00301
00302 namespace ros
00303 {
00304 namespace message_operations
00305 {
00306
00307 template<class ContainerAllocator>
00308 struct Printer< ::roslib::Log_<ContainerAllocator> >
00309 {
00310 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::roslib::Log_<ContainerAllocator> & v)
00311 {
00312 s << indent << "header: ";
00313 s << std::endl;
00314 Printer< ::roslib::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00315 s << indent << "level: ";
00316 Printer<int8_t>::stream(s, indent + " ", v.level);
00317 s << indent << "name: ";
00318 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00319 s << indent << "msg: ";
00320 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.msg);
00321 s << indent << "file: ";
00322 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.file);
00323 s << indent << "function: ";
00324 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.function);
00325 s << indent << "line: ";
00326 Printer<uint32_t>::stream(s, indent + " ", v.line);
00327 s << indent << "topics[]" << std::endl;
00328 for (size_t i = 0; i < v.topics.size(); ++i)
00329 {
00330 s << indent << " topics[" << i << "]: ";
00331 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.topics[i]);
00332 }
00333 }
00334 };
00335
00336
00337 }
00338 }
00339
00340 #endif // ROSLIB_MESSAGE_LOG_H
00341