00001
00002 #ifndef DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICSTATUS_H
00003 #define DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICSTATUS_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 "diagnostic_msgs/KeyValue.h"
00014
00015 namespace diagnostic_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct DiagnosticStatus_ : public ros::Message
00019 {
00020 typedef DiagnosticStatus_<ContainerAllocator> Type;
00021
00022 DiagnosticStatus_()
00023 : level(0)
00024 , name()
00025 , message()
00026 , hardware_id()
00027 , values()
00028 {
00029 }
00030
00031 DiagnosticStatus_(const ContainerAllocator& _alloc)
00032 : level(0)
00033 , name(_alloc)
00034 , message(_alloc)
00035 , hardware_id(_alloc)
00036 , values(_alloc)
00037 {
00038 }
00039
00040 typedef int8_t _level_type;
00041 int8_t level;
00042
00043 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00044 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00045
00046 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _message_type;
00047 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > message;
00048
00049 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _hardware_id_type;
00050 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > hardware_id;
00051
00052 typedef std::vector< ::diagnostic_msgs::KeyValue_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::KeyValue_<ContainerAllocator> >::other > _values_type;
00053 std::vector< ::diagnostic_msgs::KeyValue_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::KeyValue_<ContainerAllocator> >::other > values;
00054
00055 enum { OK = 0 };
00056 enum { WARN = 1 };
00057 enum { ERROR = 2 };
00058
00059 ROS_DEPRECATED uint32_t get_values_size() const { return (uint32_t)values.size(); }
00060 ROS_DEPRECATED void set_values_size(uint32_t size) { values.resize((size_t)size); }
00061 ROS_DEPRECATED void get_values_vec(std::vector< ::diagnostic_msgs::KeyValue_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::KeyValue_<ContainerAllocator> >::other > & vec) const { vec = this->values; }
00062 ROS_DEPRECATED void set_values_vec(const std::vector< ::diagnostic_msgs::KeyValue_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::KeyValue_<ContainerAllocator> >::other > & vec) { this->values = vec; }
00063 private:
00064 static const char* __s_getDataType_() { return "diagnostic_msgs/DiagnosticStatus"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00067
00068 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00069
00070 private:
00071 static const char* __s_getMD5Sum_() { return "67d15a62edb26e9d52b0f0efa3ef9da7"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00074
00075 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00076
00077 private:
00078 static const char* __s_getMessageDefinition_() { return "# This message holds the status of an individual component of the robot.\n\
00079 # \n\
00080 \n\
00081 # Possible levels of operations\n\
00082 byte OK=0\n\
00083 byte WARN=1\n\
00084 byte ERROR=2\n\
00085 \n\
00086 byte level # level of operation enumerated above \n\
00087 string name # a description of the test/component reporting\n\
00088 string message # a description of the status\n\
00089 string hardware_id # a hardware unique string\n\
00090 KeyValue[] values # an array of values associated with the status\n\
00091 \n\
00092 \n\
00093 ================================================================================\n\
00094 MSG: diagnostic_msgs/KeyValue\n\
00095 string key # what to label this value when viewing\n\
00096 string value # a value to track over time\n\
00097 \n\
00098 "; }
00099 public:
00100 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00101
00102 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00103
00104 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00105 {
00106 ros::serialization::OStream stream(write_ptr, 1000000000);
00107 ros::serialization::serialize(stream, level);
00108 ros::serialization::serialize(stream, name);
00109 ros::serialization::serialize(stream, message);
00110 ros::serialization::serialize(stream, hardware_id);
00111 ros::serialization::serialize(stream, values);
00112 return stream.getData();
00113 }
00114
00115 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00116 {
00117 ros::serialization::IStream stream(read_ptr, 1000000000);
00118 ros::serialization::deserialize(stream, level);
00119 ros::serialization::deserialize(stream, name);
00120 ros::serialization::deserialize(stream, message);
00121 ros::serialization::deserialize(stream, hardware_id);
00122 ros::serialization::deserialize(stream, values);
00123 return stream.getData();
00124 }
00125
00126 ROS_DEPRECATED virtual uint32_t serializationLength() const
00127 {
00128 uint32_t size = 0;
00129 size += ros::serialization::serializationLength(level);
00130 size += ros::serialization::serializationLength(name);
00131 size += ros::serialization::serializationLength(message);
00132 size += ros::serialization::serializationLength(hardware_id);
00133 size += ros::serialization::serializationLength(values);
00134 return size;
00135 }
00136
00137 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> > Ptr;
00138 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> const> ConstPtr;
00139 };
00140 typedef ::diagnostic_msgs::DiagnosticStatus_<std::allocator<void> > DiagnosticStatus;
00141
00142 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticStatus> DiagnosticStatusPtr;
00143 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticStatus const> DiagnosticStatusConstPtr;
00144
00145
00146 template<typename ContainerAllocator>
00147 std::ostream& operator<<(std::ostream& s, const ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> & v)
00148 {
00149 ros::message_operations::Printer< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::stream(s, "", v);
00150 return s;}
00151
00152 }
00153
00154 namespace ros
00155 {
00156 namespace message_traits
00157 {
00158 template<class ContainerAllocator>
00159 struct MD5Sum< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> > {
00160 static const char* value()
00161 {
00162 return "67d15a62edb26e9d52b0f0efa3ef9da7";
00163 }
00164
00165 static const char* value(const ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> &) { return value(); }
00166 static const uint64_t static_value1 = 0x67d15a62edb26e9dULL;
00167 static const uint64_t static_value2 = 0x52b0f0efa3ef9da7ULL;
00168 };
00169
00170 template<class ContainerAllocator>
00171 struct DataType< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> > {
00172 static const char* value()
00173 {
00174 return "diagnostic_msgs/DiagnosticStatus";
00175 }
00176
00177 static const char* value(const ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> &) { return value(); }
00178 };
00179
00180 template<class ContainerAllocator>
00181 struct Definition< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> > {
00182 static const char* value()
00183 {
00184 return "# This message holds the status of an individual component of the robot.\n\
00185 # \n\
00186 \n\
00187 # Possible levels of operations\n\
00188 byte OK=0\n\
00189 byte WARN=1\n\
00190 byte ERROR=2\n\
00191 \n\
00192 byte level # level of operation enumerated above \n\
00193 string name # a description of the test/component reporting\n\
00194 string message # a description of the status\n\
00195 string hardware_id # a hardware unique string\n\
00196 KeyValue[] values # an array of values associated with the status\n\
00197 \n\
00198 \n\
00199 ================================================================================\n\
00200 MSG: diagnostic_msgs/KeyValue\n\
00201 string key # what to label this value when viewing\n\
00202 string value # a value to track over time\n\
00203 \n\
00204 ";
00205 }
00206
00207 static const char* value(const ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> &) { return value(); }
00208 };
00209
00210 }
00211 }
00212
00213 namespace ros
00214 {
00215 namespace serialization
00216 {
00217
00218 template<class ContainerAllocator> struct Serializer< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >
00219 {
00220 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00221 {
00222 stream.next(m.level);
00223 stream.next(m.name);
00224 stream.next(m.message);
00225 stream.next(m.hardware_id);
00226 stream.next(m.values);
00227 }
00228
00229 ROS_DECLARE_ALLINONE_SERIALIZER;
00230 };
00231 }
00232 }
00233
00234 namespace ros
00235 {
00236 namespace message_operations
00237 {
00238
00239 template<class ContainerAllocator>
00240 struct Printer< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >
00241 {
00242 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> & v)
00243 {
00244 s << indent << "level: ";
00245 Printer<int8_t>::stream(s, indent + " ", v.level);
00246 s << indent << "name: ";
00247 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00248 s << indent << "message: ";
00249 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.message);
00250 s << indent << "hardware_id: ";
00251 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.hardware_id);
00252 s << indent << "values[]" << std::endl;
00253 for (size_t i = 0; i < v.values.size(); ++i)
00254 {
00255 s << indent << " values[" << i << "]: ";
00256 s << std::endl;
00257 s << indent;
00258 Printer< ::diagnostic_msgs::KeyValue_<ContainerAllocator> >::stream(s, indent + " ", v.values[i]);
00259 }
00260 }
00261 };
00262
00263
00264 }
00265 }
00266
00267 #endif // DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICSTATUS_H
00268