Metric.h 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. // Generated by gencpp from file cartographer_ros_msgs/Metric.msg
  2. // DO NOT EDIT!
  3. #ifndef CARTOGRAPHER_ROS_MSGS_MESSAGE_METRIC_H
  4. #define CARTOGRAPHER_ROS_MSGS_MESSAGE_METRIC_H
  5. #include <string>
  6. #include <vector>
  7. #include <map>
  8. #include <ros/types.h>
  9. #include <ros/serialization.h>
  10. #include <ros/builtin_message_traits.h>
  11. #include <ros/message_operations.h>
  12. #include <cartographer_ros_msgs/MetricLabel.h>
  13. #include <cartographer_ros_msgs/HistogramBucket.h>
  14. namespace cartographer_ros_msgs
  15. {
  16. template <class ContainerAllocator>
  17. struct Metric_
  18. {
  19. typedef Metric_<ContainerAllocator> Type;
  20. Metric_()
  21. : type(0)
  22. , labels()
  23. , value(0.0)
  24. , counts_by_bucket() {
  25. }
  26. Metric_(const ContainerAllocator& _alloc)
  27. : type(0)
  28. , labels(_alloc)
  29. , value(0.0)
  30. , counts_by_bucket(_alloc) {
  31. (void)_alloc;
  32. }
  33. typedef uint8_t _type_type;
  34. _type_type type;
  35. typedef std::vector< ::cartographer_ros_msgs::MetricLabel_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cartographer_ros_msgs::MetricLabel_<ContainerAllocator> >::other > _labels_type;
  36. _labels_type labels;
  37. typedef double _value_type;
  38. _value_type value;
  39. typedef std::vector< ::cartographer_ros_msgs::HistogramBucket_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::cartographer_ros_msgs::HistogramBucket_<ContainerAllocator> >::other > _counts_by_bucket_type;
  40. _counts_by_bucket_type counts_by_bucket;
  41. enum {
  42. TYPE_COUNTER = 0u,
  43. TYPE_GAUGE = 1u,
  44. TYPE_HISTOGRAM = 2u,
  45. };
  46. typedef boost::shared_ptr< ::cartographer_ros_msgs::Metric_<ContainerAllocator> > Ptr;
  47. typedef boost::shared_ptr< ::cartographer_ros_msgs::Metric_<ContainerAllocator> const> ConstPtr;
  48. }; // struct Metric_
  49. typedef ::cartographer_ros_msgs::Metric_<std::allocator<void> > Metric;
  50. typedef boost::shared_ptr< ::cartographer_ros_msgs::Metric > MetricPtr;
  51. typedef boost::shared_ptr< ::cartographer_ros_msgs::Metric const> MetricConstPtr;
  52. // constants requiring out of line definition
  53. template<typename ContainerAllocator>
  54. std::ostream& operator<<(std::ostream& s, const ::cartographer_ros_msgs::Metric_<ContainerAllocator> & v)
  55. {
  56. ros::message_operations::Printer< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >::stream(s, "", v);
  57. return s;
  58. }
  59. } // namespace cartographer_ros_msgs
  60. namespace ros
  61. {
  62. namespace message_traits
  63. {
  64. // BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': False}
  65. // {'std_msgs': ['/opt/ros/melodic/share/std_msgs/cmake/../msg'], 'cartographer_ros_msgs': ['/home/youchen/Documents/catkin_ws/src/cartographer_ros/cartographer_ros_msgs/msg'], 'geometry_msgs': ['/opt/ros/melodic/share/geometry_msgs/cmake/../msg']}
  66. // !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
  67. template <class ContainerAllocator>
  68. struct IsFixedSize< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  69. : FalseType
  70. { };
  71. template <class ContainerAllocator>
  72. struct IsFixedSize< ::cartographer_ros_msgs::Metric_<ContainerAllocator> const>
  73. : FalseType
  74. { };
  75. template <class ContainerAllocator>
  76. struct IsMessage< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  77. : TrueType
  78. { };
  79. template <class ContainerAllocator>
  80. struct IsMessage< ::cartographer_ros_msgs::Metric_<ContainerAllocator> const>
  81. : TrueType
  82. { };
  83. template <class ContainerAllocator>
  84. struct HasHeader< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  85. : FalseType
  86. { };
  87. template <class ContainerAllocator>
  88. struct HasHeader< ::cartographer_ros_msgs::Metric_<ContainerAllocator> const>
  89. : FalseType
  90. { };
  91. template<class ContainerAllocator>
  92. struct MD5Sum< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  93. {
  94. static const char* value()
  95. {
  96. return "94a6ea1c6ef245b483a220f6769c8e36";
  97. }
  98. static const char* value(const ::cartographer_ros_msgs::Metric_<ContainerAllocator>&) { return value(); }
  99. static const uint64_t static_value1 = 0x94a6ea1c6ef245b4ULL;
  100. static const uint64_t static_value2 = 0x83a220f6769c8e36ULL;
  101. };
  102. template<class ContainerAllocator>
  103. struct DataType< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  104. {
  105. static const char* value()
  106. {
  107. return "cartographer_ros_msgs/Metric";
  108. }
  109. static const char* value(const ::cartographer_ros_msgs::Metric_<ContainerAllocator>&) { return value(); }
  110. };
  111. template<class ContainerAllocator>
  112. struct Definition< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  113. {
  114. static const char* value()
  115. {
  116. return "# 2018 The Cartographer Authors\n\
  117. #\n\
  118. # Licensed under the Apache License, Version 2.0 (the \"License\");\n\
  119. # you may not use this file except in compliance with the License.\n\
  120. # You may obtain a copy of the License at\n\
  121. #\n\
  122. # http://www.apache.org/licenses/LICENSE-2.0\n\
  123. #\n\
  124. # Unless required by applicable law or agreed to in writing, software\n\
  125. # distributed under the License is distributed on an \"AS IS\" BASIS,\n\
  126. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
  127. # See the License for the specific language governing permissions and\n\
  128. # limitations under the License.\n\
  129. \n\
  130. uint8 TYPE_COUNTER=0\n\
  131. uint8 TYPE_GAUGE=1\n\
  132. uint8 TYPE_HISTOGRAM=2\n\
  133. \n\
  134. uint8 type\n\
  135. cartographer_ros_msgs/MetricLabel[] labels\n\
  136. \n\
  137. # TYPE_COUNTER or TYPE_GAUGE\n\
  138. float64 value\n\
  139. \n\
  140. # TYPE_HISTOGRAM\n\
  141. cartographer_ros_msgs/HistogramBucket[] counts_by_bucket\n\
  142. \n\
  143. ================================================================================\n\
  144. MSG: cartographer_ros_msgs/MetricLabel\n\
  145. # 2018 The Cartographer Authors\n\
  146. #\n\
  147. # Licensed under the Apache License, Version 2.0 (the \"License\");\n\
  148. # you may not use this file except in compliance with the License.\n\
  149. # You may obtain a copy of the License at\n\
  150. #\n\
  151. # http://www.apache.org/licenses/LICENSE-2.0\n\
  152. #\n\
  153. # Unless required by applicable law or agreed to in writing, software\n\
  154. # distributed under the License is distributed on an \"AS IS\" BASIS,\n\
  155. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
  156. # See the License for the specific language governing permissions and\n\
  157. # limitations under the License.\n\
  158. \n\
  159. string key\n\
  160. string value\n\
  161. \n\
  162. ================================================================================\n\
  163. MSG: cartographer_ros_msgs/HistogramBucket\n\
  164. # 2018 The Cartographer Authors\n\
  165. #\n\
  166. # Licensed under the Apache License, Version 2.0 (the \"License\");\n\
  167. # you may not use this file except in compliance with the License.\n\
  168. # You may obtain a copy of the License at\n\
  169. #\n\
  170. # http://www.apache.org/licenses/LICENSE-2.0\n\
  171. #\n\
  172. # Unless required by applicable law or agreed to in writing, software\n\
  173. # distributed under the License is distributed on an \"AS IS\" BASIS,\n\
  174. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\
  175. # See the License for the specific language governing permissions and\n\
  176. # limitations under the License.\n\
  177. \n\
  178. # A histogram bucket counts values x for which:\n\
  179. # previous_boundary < x <= bucket_boundary\n\
  180. # holds.\n\
  181. float64 bucket_boundary\n\
  182. float64 count\n\
  183. ";
  184. }
  185. static const char* value(const ::cartographer_ros_msgs::Metric_<ContainerAllocator>&) { return value(); }
  186. };
  187. } // namespace message_traits
  188. } // namespace ros
  189. namespace ros
  190. {
  191. namespace serialization
  192. {
  193. template<class ContainerAllocator> struct Serializer< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  194. {
  195. template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
  196. {
  197. stream.next(m.type);
  198. stream.next(m.labels);
  199. stream.next(m.value);
  200. stream.next(m.counts_by_bucket);
  201. }
  202. ROS_DECLARE_ALLINONE_SERIALIZER
  203. }; // struct Metric_
  204. } // namespace serialization
  205. } // namespace ros
  206. namespace ros
  207. {
  208. namespace message_operations
  209. {
  210. template<class ContainerAllocator>
  211. struct Printer< ::cartographer_ros_msgs::Metric_<ContainerAllocator> >
  212. {
  213. template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cartographer_ros_msgs::Metric_<ContainerAllocator>& v)
  214. {
  215. s << indent << "type: ";
  216. Printer<uint8_t>::stream(s, indent + " ", v.type);
  217. s << indent << "labels[]" << std::endl;
  218. for (size_t i = 0; i < v.labels.size(); ++i)
  219. {
  220. s << indent << " labels[" << i << "]: ";
  221. s << std::endl;
  222. s << indent;
  223. Printer< ::cartographer_ros_msgs::MetricLabel_<ContainerAllocator> >::stream(s, indent + " ", v.labels[i]);
  224. }
  225. s << indent << "value: ";
  226. Printer<double>::stream(s, indent + " ", v.value);
  227. s << indent << "counts_by_bucket[]" << std::endl;
  228. for (size_t i = 0; i < v.counts_by_bucket.size(); ++i)
  229. {
  230. s << indent << " counts_by_bucket[" << i << "]: ";
  231. s << std::endl;
  232. s << indent;
  233. Printer< ::cartographer_ros_msgs::HistogramBucket_<ContainerAllocator> >::stream(s, indent + " ", v.counts_by_bucket[i]);
  234. }
  235. }
  236. };
  237. } // namespace message_operations
  238. } // namespace ros
  239. #endif // CARTOGRAPHER_ROS_MSGS_MESSAGE_METRIC_H