libstatistics_collector
master
Lightweight aggregation utilities to collect statistics and measure message metrics.
include
libstatistics_collector
topic_statistics_collector
topic_statistics_collector.hpp
Go to the documentation of this file.
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
16
#ifndef LIBSTATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR_HPP_
17
#define LIBSTATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR_HPP_
18
19
#include <chrono>
20
#include <string>
21
22
#include "rcl/time.h"
23
24
#include "
libstatistics_collector/collector/collector.hpp
"
25
26
namespace
libstatistics_collector
27
{
28
namespace
topic_statistics_collector
29
{
30
36
template
<
typename
T>
37
class
TopicStatisticsCollector
:
public
collector::Collector
38
{
39
public
:
40
TopicStatisticsCollector
() =
default
;
41
42
virtual
~TopicStatisticsCollector
() =
default
;
43
52
virtual
void
OnMessageReceived
(
53
const
T & received_message,
54
const
rcl_time_point_value_t now_nanoseconds) = 0;
55
};
56
57
}
// namespace topic_statistics_collector
58
}
// namespace libstatistics_collector
59
60
#endif // LIBSTATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR__TOPIC_STATISTICS_COLLECTOR_HPP_
libstatistics_collector::topic_statistics_collector::TopicStatisticsCollector
Definition:
topic_statistics_collector.hpp:37
libstatistics_collector
Definition:
collector.hpp:29
libstatistics_collector::topic_statistics_collector::TopicStatisticsCollector::OnMessageReceived
virtual void OnMessageReceived(const T &received_message, const rcl_time_point_value_t now_nanoseconds)=0
collector.hpp
libstatistics_collector::topic_statistics_collector::TopicStatisticsCollector::TopicStatisticsCollector
TopicStatisticsCollector()=default
libstatistics_collector::topic_statistics_collector::TopicStatisticsCollector::~TopicStatisticsCollector
virtual ~TopicStatisticsCollector()=default
libstatistics_collector::collector::Collector
Definition:
collector.hpp:37
Generated by
1.8.17