Move to kernel style SPDX license identifiers
[babeltrace.git] / src / plugins / utils / counter / counter.h
CommitLineData
358340ec 1/*
0235b0db 2 * SPDX-License-Identifier: MIT
358340ec 3 *
0235b0db 4 * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
358340ec
PP
5 */
6
0235b0db
MJ
7#ifndef BABELTRACE_PLUGINS_UTILS_COUNTER_H
8#define BABELTRACE_PLUGINS_UTILS_COUNTER_H
9
358340ec 10#include <glib.h>
3fadfbc0 11#include <babeltrace2/babeltrace.h>
358340ec
PP
12#include <stdbool.h>
13#include <stdint.h>
91d81473 14#include "common/macros.h"
358340ec
PP
15
16struct counter {
9a2c8b8e 17 bt_message_iterator *msg_iter;
358340ec
PP
18 struct {
19 uint64_t event;
20 uint64_t stream_begin;
21 uint64_t stream_end;
22 uint64_t packet_begin;
23 uint64_t packet_end;
0e847b69
PP
24 uint64_t disc_events;
25 uint64_t disc_packets;
b9fd9cbb 26 uint64_t msg_iter_inactivity;
358340ec
PP
27 uint64_t other;
28 } count;
29 uint64_t last_printed_total;
d4393e08 30 uint64_t at;
358340ec
PP
31 uint64_t step;
32 bool hide_zero;
9d87d0ea 33 bt_logging_level log_level;
82e80647 34 bt_self_component *self_comp;
358340ec
PP
35};
36
d94d92ac 37BT_HIDDEN
21a9f056 38bt_component_class_initialize_method_status counter_init(
b19ff26f 39 bt_self_component_sink *component,
59225a3e 40 bt_self_component_sink_configuration *config,
b19ff26f 41 const bt_value *params, void *init_method_data);
d94d92ac
PP
42
43BT_HIDDEN
b19ff26f 44void counter_finalize(bt_self_component_sink *component);
d94d92ac
PP
45
46BT_HIDDEN
d24d5663 47bt_component_class_sink_graph_is_configured_method_status counter_graph_is_configured(
5badd463 48 bt_self_component_sink *component);
d94d92ac
PP
49
50BT_HIDDEN
d24d5663 51bt_component_class_sink_consume_method_status counter_consume(bt_self_component_sink *component);
358340ec
PP
52
53#endif /* BABELTRACE_PLUGINS_UTILS_COUNTER_H */
This page took 0.058057 seconds and 4 git commands to generate.