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