Commit | Line | Data |
---|---|---|
e0dfa761 | 1 | /* |
0235b0db | 2 | * SPDX-License-Identifier: MIT |
e0dfa761 | 3 | * |
0235b0db | 4 | * Copyright 2017 Philippe Proulx <pproulx@efficios.com> |
e0dfa761 PP |
5 | */ |
6 | ||
3fadfbc0 | 7 | #include <babeltrace2/babeltrace.h> |
fca1d0f5 PP |
8 | |
9 | #include "cpp-common/bt2/plugin-dev.hpp" | |
10 | ||
358340ec | 11 | #include "counter/counter.h" |
fca1d0f5 PP |
12 | #include "dummy/dummy.h" |
13 | #include "muxer/comp.hpp" | |
14 | #include "muxer/msg-iter.hpp" | |
7de0e49a | 15 | #include "trimmer/trimmer.h" |
e0dfa761 | 16 | |
52238017 MJ |
17 | #ifndef BT_BUILT_IN_PLUGINS |
18 | BT_PLUGIN_MODULE(); | |
19 | #endif | |
20 | ||
e0dfa761 | 21 | BT_PLUGIN(utils); |
602d20a2 PP |
22 | BT_PLUGIN_DESCRIPTION("Common graph utilities"); |
23 | BT_PLUGIN_AUTHOR("EfficiOS <https://www.efficios.com/>"); | |
e0dfa761 PP |
24 | BT_PLUGIN_LICENSE("MIT"); |
25 | ||
358340ec | 26 | /* sink.utils.dummy */ |
e0dfa761 | 27 | BT_PLUGIN_SINK_COMPONENT_CLASS(dummy, dummy_consume); |
21a9f056 | 28 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(dummy, dummy_init); |
64cadc66 | 29 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(dummy, dummy_finalize); |
fca1d0f5 PP |
30 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(dummy, dummy_graph_is_configured); |
31 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(dummy, "Consume messages and discard them."); | |
32 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(dummy, "See the babeltrace2-sink.utils.dummy(7) manual page."); | |
e0dfa761 | 33 | |
358340ec PP |
34 | /* sink.utils.counter */ |
35 | BT_PLUGIN_SINK_COMPONENT_CLASS(counter, counter_consume); | |
21a9f056 | 36 | BT_PLUGIN_SINK_COMPONENT_CLASS_INITIALIZE_METHOD(counter, counter_init); |
358340ec | 37 | BT_PLUGIN_SINK_COMPONENT_CLASS_FINALIZE_METHOD(counter, counter_finalize); |
fca1d0f5 PP |
38 | BT_PLUGIN_SINK_COMPONENT_CLASS_GRAPH_IS_CONFIGURED_METHOD(counter, counter_graph_is_configured); |
39 | BT_PLUGIN_SINK_COMPONENT_CLASS_DESCRIPTION(counter, "Count messages and print the statistics."); | |
602d20a2 | 40 | BT_PLUGIN_SINK_COMPONENT_CLASS_HELP(counter, |
fca1d0f5 | 41 | "See the babeltrace2-sink.utils.counter(7) manual page."); |
358340ec PP |
42 | |
43 | /* flt.utils.trimmer */ | |
7de0e49a | 44 | BT_PLUGIN_FILTER_COMPONENT_CLASS(trimmer, trimmer_msg_iter_next); |
fca1d0f5 PP |
45 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION( |
46 | trimmer, "Discard messages that occur outside a specific time range."); | |
602d20a2 | 47 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(trimmer, |
fca1d0f5 | 48 | "See the babeltrace2-filter.utils.trimmer(7) manual page."); |
21a9f056 | 49 | BT_PLUGIN_FILTER_COMPONENT_CLASS_INITIALIZE_METHOD(trimmer, trimmer_init); |
7de0e49a | 50 | BT_PLUGIN_FILTER_COMPONENT_CLASS_FINALIZE_METHOD(trimmer, trimmer_finalize); |
8e1fe2a4 | 51 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_INITIALIZE_METHOD(trimmer, |
fca1d0f5 | 52 | trimmer_msg_iter_init); |
8e1fe2a4 | 53 | BT_PLUGIN_FILTER_COMPONENT_CLASS_MESSAGE_ITERATOR_CLASS_FINALIZE_METHOD(trimmer, |
fca1d0f5 | 54 | trimmer_msg_iter_finalize); |
958f7d11 | 55 | |
358340ec | 56 | /* flt.utils.muxer */ |
06bb401e | 57 | BT_CPP_PLUGIN_FILTER_COMPONENT_CLASS(muxer, bt2mux::Comp); |
fca1d0f5 PP |
58 | BT_PLUGIN_FILTER_COMPONENT_CLASS_DESCRIPTION( |
59 | muxer, "Sort messages from multiple input ports to a single output port by time."); | |
602d20a2 | 60 | BT_PLUGIN_FILTER_COMPONENT_CLASS_HELP(muxer, |
fca1d0f5 | 61 | "See the babeltrace2-filter.utils.muxer(7) manual page."); |