Commit | Line | Data |
---|---|---|
043e2020 | 1 | /* |
0235b0db MJ |
2 | * SPDX-License-Identifier: MIT |
3 | * | |
e2f7325d | 4 | * Copyright 2017-2018 Philippe Proulx <pproulx@efficios.com> |
043e2020 | 5 | * Copyright 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com> |
043e2020 JG |
6 | */ |
7 | ||
0235b0db MJ |
8 | #ifndef BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H |
9 | #define BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H | |
10 | ||
43c59509 | 11 | #include <babeltrace2/graph/message.h> |
188edac1 | 12 | |
578e048b MJ |
13 | #include "compat/compiler.h" |
14 | #include "lib/trace-ir/stream.h" | |
15 | #include "lib/trace-ir/clock-snapshot.h" | |
16 | #include "common/assert.h" | |
17 | ||
18 | #include "message.h" | |
043e2020 | 19 | |
5df26c89 | 20 | struct bt_message_stream { |
d6e69534 | 21 | struct bt_message parent; |
50842bdc | 22 | struct bt_stream *stream; |
188edac1 SM |
23 | struct bt_clock_snapshot *default_cs; |
24 | enum bt_message_stream_clock_snapshot_state default_cs_state; | |
043e2020 JG |
25 | }; |
26 | ||
188edac1 SM |
27 | static inline |
28 | const char *bt_message_stream_clock_snapshot_state_string( | |
29 | enum bt_message_stream_clock_snapshot_state state) | |
30 | { | |
31 | switch (state) { | |
32 | case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN: | |
8a432889 | 33 | return "KNOWN"; |
188edac1 | 34 | case BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN: |
8a432889 | 35 | return "UNKNOWN"; |
188edac1 SM |
36 | default: |
37 | return "(unknown)"; | |
38 | } | |
39 | } | |
40 | ||
41 | ||
d6e69534 | 42 | #endif /* BABELTRACE_GRAPH_MESSAGE_STREAM_INTERNAL_H */ |