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