libstatistics_collector  master
Lightweight aggregation utilities to collect statistics and measure message metrics.
All Classes Functions Variables Pages
generate_statistics_message.hpp
1 // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef LIBSTATISTICS_COLLECTOR__COLLECTOR__GENERATE_STATISTICS_MESSAGE_HPP_
16 #define LIBSTATISTICS_COLLECTOR__COLLECTOR__GENERATE_STATISTICS_MESSAGE_HPP_
17 
18 #include <string>
19 
20 #include "builtin_interfaces/msg/time.hpp"
21 #include "statistics_msgs/msg/metrics_message.hpp"
22 
23 #include "libstatistics_collector/visibility_control.hpp"
24 #include "libstatistics_collector/moving_average_statistics/types.hpp"
25 
26 namespace libstatistics_collector
27 {
28 namespace collector
29 {
30 
42 LIBSTATISTICS_COLLECTOR_PUBLIC
43 statistics_msgs::msg::MetricsMessage GenerateStatisticMessage(
44  const std::string & node_name,
45  const std::string & metric_name,
46  const std::string & unit,
47  const builtin_interfaces::msg::Time window_start,
48  const builtin_interfaces::msg::Time window_stop,
50 );
51 
52 } // namespace collector
53 } // namespace libstatistics_collector
54 
55 #endif // LIBSTATISTICS_COLLECTOR__COLLECTOR__GENERATE_STATISTICS_MESSAGE_HPP_
libstatistics_collector::moving_average_statistics::StatisticData
Definition: types.hpp:32