00001
00002 #ifndef DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICARRAY_H
00003 #define DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICARRAY_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 #include "diagnostic_msgs/DiagnosticStatus.h"
00015
00016 namespace diagnostic_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct DiagnosticArray_ : public ros::Message
00020 {
00021 typedef DiagnosticArray_<ContainerAllocator> Type;
00022
00023 DiagnosticArray_()
00024 : header()
00025 , status()
00026 {
00027 }
00028
00029 DiagnosticArray_(const ContainerAllocator& _alloc)
00030 : header(_alloc)
00031 , status(_alloc)
00032 {
00033 }
00034
00035 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00036 ::std_msgs::Header_<ContainerAllocator> header;
00037
00038 typedef std::vector< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::other > _status_type;
00039 std::vector< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::other > status;
00040
00041
00042 ROS_DEPRECATED uint32_t get_status_size() const { return (uint32_t)status.size(); }
00043 ROS_DEPRECATED void set_status_size(uint32_t size) { status.resize((size_t)size); }
00044 ROS_DEPRECATED void get_status_vec(std::vector< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::other > & vec) const { vec = this->status; }
00045 ROS_DEPRECATED void set_status_vec(const std::vector< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::other > & vec) { this->status = vec; }
00046 private:
00047 static const char* __s_getDataType_() { return "diagnostic_msgs/DiagnosticArray"; }
00048 public:
00049 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00050
00051 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00052
00053 private:
00054 static const char* __s_getMD5Sum_() { return "3cfbeff055e708a24c3d946a5c8139cd"; }
00055 public:
00056 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00057
00058 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00059
00060 private:
00061 static const char* __s_getMessageDefinition_() { return "# This message is used to send diagnostic information about the state of the robot\n\
00062 Header header #for timestamp\n\
00063 DiagnosticStatus[] status # an array of components being reported on\n\
00064 ================================================================================\n\
00065 MSG: std_msgs/Header\n\
00066 # Standard metadata for higher-level stamped data types.\n\
00067 # This is generally used to communicate timestamped data \n\
00068 # in a particular coordinate frame.\n\
00069 # \n\
00070 # sequence ID: consecutively increasing ID \n\
00071 uint32 seq\n\
00072 #Two-integer timestamp that is expressed as:\n\
00073 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00074 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00075 # time-handling sugar is provided by the client library\n\
00076 time stamp\n\
00077 #Frame this data is associated with\n\
00078 # 0: no frame\n\
00079 # 1: global frame\n\
00080 string frame_id\n\
00081 \n\
00082 ================================================================================\n\
00083 MSG: diagnostic_msgs/DiagnosticStatus\n\
00084 # This message holds the status of an individual component of the robot.\n\
00085 # \n\
00086 \n\
00087 # Possible levels of operations\n\
00088 byte OK=0\n\
00089 byte WARN=1\n\
00090 byte ERROR=2\n\
00091 \n\
00092 byte level # level of operation enumerated above \n\
00093 string name # a description of the test/component reporting\n\
00094 string message # a description of the status\n\
00095 string hardware_id # a hardware unique string\n\
00096 KeyValue[] values # an array of values associated with the status\n\
00097 \n\
00098 \n\
00099 ================================================================================\n\
00100 MSG: diagnostic_msgs/KeyValue\n\
00101 string key # what to label this value when viewing\n\
00102 string value # a value to track over time\n\
00103 \n\
00104 "; }
00105 public:
00106 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00107
00108 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00109
00110 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00111 {
00112 ros::serialization::OStream stream(write_ptr, 1000000000);
00113 ros::serialization::serialize(stream, header);
00114 ros::serialization::serialize(stream, status);
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, header);
00122 ros::serialization::deserialize(stream, status);
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(header);
00130 size += ros::serialization::serializationLength(status);
00131 return size;
00132 }
00133
00134 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > Ptr;
00135 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> const> ConstPtr;
00136 };
00137 typedef ::diagnostic_msgs::DiagnosticArray_<std::allocator<void> > DiagnosticArray;
00138
00139 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticArray> DiagnosticArrayPtr;
00140 typedef boost::shared_ptr< ::diagnostic_msgs::DiagnosticArray const> DiagnosticArrayConstPtr;
00141
00142
00143 template<typename ContainerAllocator>
00144 std::ostream& operator<<(std::ostream& s, const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> & v)
00145 {
00146 ros::message_operations::Printer< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> >::stream(s, "", v);
00147 return s;}
00148
00149 }
00150
00151 namespace ros
00152 {
00153 namespace message_traits
00154 {
00155 template<class ContainerAllocator>
00156 struct MD5Sum< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > {
00157 static const char* value()
00158 {
00159 return "3cfbeff055e708a24c3d946a5c8139cd";
00160 }
00161
00162 static const char* value(const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> &) { return value(); }
00163 static const uint64_t static_value1 = 0x3cfbeff055e708a2ULL;
00164 static const uint64_t static_value2 = 0x4c3d946a5c8139cdULL;
00165 };
00166
00167 template<class ContainerAllocator>
00168 struct DataType< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > {
00169 static const char* value()
00170 {
00171 return "diagnostic_msgs/DiagnosticArray";
00172 }
00173
00174 static const char* value(const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> &) { return value(); }
00175 };
00176
00177 template<class ContainerAllocator>
00178 struct Definition< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > {
00179 static const char* value()
00180 {
00181 return "# This message is used to send diagnostic information about the state of the robot\n\
00182 Header header #for timestamp\n\
00183 DiagnosticStatus[] status # an array of components being reported on\n\
00184 ================================================================================\n\
00185 MSG: std_msgs/Header\n\
00186 # Standard metadata for higher-level stamped data types.\n\
00187 # This is generally used to communicate timestamped data \n\
00188 # in a particular coordinate frame.\n\
00189 # \n\
00190 # sequence ID: consecutively increasing ID \n\
00191 uint32 seq\n\
00192 #Two-integer timestamp that is expressed as:\n\
00193 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00194 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00195 # time-handling sugar is provided by the client library\n\
00196 time stamp\n\
00197 #Frame this data is associated with\n\
00198 # 0: no frame\n\
00199 # 1: global frame\n\
00200 string frame_id\n\
00201 \n\
00202 ================================================================================\n\
00203 MSG: diagnostic_msgs/DiagnosticStatus\n\
00204 # This message holds the status of an individual component of the robot.\n\
00205 # \n\
00206 \n\
00207 # Possible levels of operations\n\
00208 byte OK=0\n\
00209 byte WARN=1\n\
00210 byte ERROR=2\n\
00211 \n\
00212 byte level # level of operation enumerated above \n\
00213 string name # a description of the test/component reporting\n\
00214 string message # a description of the status\n\
00215 string hardware_id # a hardware unique string\n\
00216 KeyValue[] values # an array of values associated with the status\n\
00217 \n\
00218 \n\
00219 ================================================================================\n\
00220 MSG: diagnostic_msgs/KeyValue\n\
00221 string key # what to label this value when viewing\n\
00222 string value # a value to track over time\n\
00223 \n\
00224 ";
00225 }
00226
00227 static const char* value(const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> &) { return value(); }
00228 };
00229
00230 template<class ContainerAllocator> struct HasHeader< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > : public TrueType {};
00231 template<class ContainerAllocator> struct HasHeader< const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> > : public TrueType {};
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace serialization
00238 {
00239
00240 template<class ContainerAllocator> struct Serializer< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> >
00241 {
00242 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00243 {
00244 stream.next(m.header);
00245 stream.next(m.status);
00246 }
00247
00248 ROS_DECLARE_ALLINONE_SERIALIZER;
00249 };
00250 }
00251 }
00252
00253 namespace ros
00254 {
00255 namespace message_operations
00256 {
00257
00258 template<class ContainerAllocator>
00259 struct Printer< ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> >
00260 {
00261 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::diagnostic_msgs::DiagnosticArray_<ContainerAllocator> & v)
00262 {
00263 s << indent << "header: ";
00264 s << std::endl;
00265 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00266 s << indent << "status[]" << std::endl;
00267 for (size_t i = 0; i < v.status.size(); ++i)
00268 {
00269 s << indent << " status[" << i << "]: ";
00270 s << std::endl;
00271 s << indent;
00272 Printer< ::diagnostic_msgs::DiagnosticStatus_<ContainerAllocator> >::stream(s, indent + " ", v.status[i]);
00273 }
00274 }
00275 };
00276
00277
00278 }
00279 }
00280
00281 #endif // DIAGNOSTIC_MSGS_MESSAGE_DIAGNOSTICARRAY_H
00282