Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_ROS_METRICS_FAMILY_FACTORY_H
00018 #define CARTOGRAPHER_ROS_METRICS_FAMILY_FACTORY_H
00019
00020 #include <memory>
00021 #include <string>
00022
00023 #include "cartographer/metrics/family_factory.h"
00024 #include "cartographer_ros/metrics/internal/counter.h"
00025 #include "cartographer_ros/metrics/internal/family.h"
00026 #include "cartographer_ros/metrics/internal/gauge.h"
00027 #include "cartographer_ros/metrics/internal/histogram.h"
00028 #include "cartographer_ros_msgs/ReadMetrics.h"
00029
00030 namespace cartographer_ros {
00031 namespace metrics {
00032
00033
00034
00035 class FamilyFactory : public ::cartographer::metrics::FamilyFactory {
00036 public:
00037 ::cartographer::metrics::Family<::cartographer::metrics::Counter>*
00038
00039 NewCounterFamily(const std::string& name,
00040 const std::string& description) override;
00041 ::cartographer::metrics::Family<::cartographer::metrics::Gauge>*
00042 NewGaugeFamily(const std::string& name,
00043 const std::string& description) override;
00044 ::cartographer::metrics::Family<::cartographer::metrics::Histogram>*
00045 NewHistogramFamily(const std::string& name, const std::string& description,
00046 const ::cartographer::metrics::Histogram::BucketBoundaries&
00047 boundaries) override;
00048
00049 void ReadMetrics(
00050 ::cartographer_ros_msgs::ReadMetrics::Response* response) const;
00051
00052 private:
00053 std::vector<std::unique_ptr<CounterFamily>> counter_families_;
00054 std::vector<std::unique_ptr<GaugeFamily>> gauge_families_;
00055 std::vector<std::unique_ptr<HistogramFamily>> histogram_families_;
00056 };
00057
00058 }
00059 }
00060
00061 #endif // CARTOGRAPHER_ROS_METRICS_FAMILY_FACTORY_H