Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches
message.h
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_GRAPH_MESSAGE_H
8#define BABELTRACE2_GRAPH_MESSAGE_H
9
10/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
14#endif
15
16#include <babeltrace2/types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
1025
1039 __BT_NOEXCEPT;
1040
1068
1110extern
1112 bt_self_message_iterator *self_message_iterator,
1113 const bt_stream *stream) __BT_NOEXCEPT;
1114
1138 bt_message *message) __BT_NOEXCEPT;
1139
1148 const bt_message *message) __BT_NOEXCEPT;
1149
1174extern
1176 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1177
1211 const bt_message *message,
1212 const bt_clock_snapshot **clock_snapshot) __BT_NOEXCEPT;
1213
1241extern const bt_clock_class *
1243 const bt_message *message) __BT_NOEXCEPT;
1244
1286extern
1288 bt_self_message_iterator *self_message_iterator,
1289 const bt_stream *stream) __BT_NOEXCEPT;
1290
1314 bt_message *message) __BT_NOEXCEPT;
1315
1324 const bt_message *message) __BT_NOEXCEPT;
1325
1350extern
1352 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1353
1387 const bt_message *message,
1388 const bt_clock_snapshot **clock_snapshot) __BT_NOEXCEPT;
1389
1418extern const bt_clock_class *
1420 const bt_message *message) __BT_NOEXCEPT;
1421
1503extern
1505 bt_self_message_iterator *self_message_iterator,
1506 const bt_event_class *event_class,
1507 const bt_stream *stream) __BT_NOEXCEPT;
1508
1587extern
1589 bt_self_message_iterator *self_message_iterator,
1590 const bt_event_class *event_class,
1591 const bt_stream *stream, uint64_t clock_snapshot_value)
1592 __BT_NOEXCEPT;
1593
1673extern
1675 bt_self_message_iterator *self_message_iterator,
1676 const bt_event_class *event_class,
1677 const bt_packet *packet) __BT_NOEXCEPT;
1678
1762extern
1764 bt_self_message_iterator *self_message_iterator,
1765 const bt_event_class *event_class,
1766 const bt_packet *packet, uint64_t clock_snapshot_value)
1767 __BT_NOEXCEPT;
1768
1792 __BT_NOEXCEPT;
1793
1802 const bt_message *message) __BT_NOEXCEPT;
1803
1822extern const bt_clock_snapshot *
1824 __BT_NOEXCEPT;
1825
1854extern const bt_clock_class *
1856 const bt_message *message) __BT_NOEXCEPT;
1857
1921extern
1923 bt_self_message_iterator *self_message_iterator,
1924 const bt_packet *packet) __BT_NOEXCEPT;
1925
1986extern
1988 bt_self_message_iterator *self_message_iterator,
1989 const bt_packet *packet, uint64_t clock_snapshot_value)
1990 __BT_NOEXCEPT;
1991
2015 bt_message *message) __BT_NOEXCEPT;
2016
2025 const bt_message *message) __BT_NOEXCEPT;
2026
2046extern const bt_clock_snapshot *
2048 const bt_message *message) __BT_NOEXCEPT;
2049
2078extern const bt_clock_class *
2080 const bt_message *message) __BT_NOEXCEPT;
2081
2144extern
2146 bt_self_message_iterator *self_message_iterator,
2147 const bt_packet *packet) __BT_NOEXCEPT;
2148
2209extern
2211 bt_self_message_iterator *self_message_iterator,
2212 const bt_packet *packet, uint64_t clock_snapshot_value)
2213 __BT_NOEXCEPT;
2214
2238 bt_message *message) __BT_NOEXCEPT;
2239
2248 const bt_message *message) __BT_NOEXCEPT;
2249
2269extern const bt_clock_snapshot *
2271 const bt_message *message) __BT_NOEXCEPT;
2272
2301extern const bt_clock_class *
2303 const bt_message *message) __BT_NOEXCEPT;
2304
2371 bt_self_message_iterator *self_message_iterator,
2372 const bt_stream *stream) __BT_NOEXCEPT;
2373
2443 bt_self_message_iterator *self_message_iterator,
2444 const bt_stream *stream,
2445 uint64_t beginning_clock_snapshot_value,
2446 uint64_t end_clock_snapshot_value)
2447 __BT_NOEXCEPT;
2448
2472 bt_message *message) __BT_NOEXCEPT;
2473
2481extern const bt_stream *
2483 __BT_NOEXCEPT;
2484
2508extern const bt_clock_snapshot *
2510 const bt_message *message) __BT_NOEXCEPT;
2511
2535extern const bt_clock_snapshot *
2537 const bt_message *message) __BT_NOEXCEPT;
2538
2566extern const bt_clock_class *
2568 const bt_message *message) __BT_NOEXCEPT;
2569
2595 uint64_t count) __BT_NOEXCEPT;
2596
2626 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2627
2694 bt_self_message_iterator *self_message_iterator,
2695 const bt_stream *stream) __BT_NOEXCEPT;
2696
2766 bt_self_message_iterator *self_message_iterator,
2767 const bt_stream *stream, uint64_t beginning_clock_snapshot_value,
2768 uint64_t end_clock_snapshot_value) __BT_NOEXCEPT;
2769
2793 bt_message *message) __BT_NOEXCEPT;
2794
2802extern const bt_stream *
2804 __BT_NOEXCEPT;
2805
2829extern const bt_clock_snapshot *
2831 const bt_message *message) __BT_NOEXCEPT;
2832
2856extern const bt_clock_snapshot *
2858 const bt_message *message) __BT_NOEXCEPT;
2859
2887extern const bt_clock_class *
2889 const bt_message *message) __BT_NOEXCEPT;
2890
2916 uint64_t count) __BT_NOEXCEPT;
2917
2947 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2948
2995extern
2997 bt_self_message_iterator *self_message_iterator,
2998 const bt_clock_class *clock_class,
2999 uint64_t clock_snapshot_value) __BT_NOEXCEPT;
3000
3017extern const bt_clock_snapshot *
3019 const bt_message *message) __BT_NOEXCEPT;
3020
3043extern void bt_message_get_ref(const bt_message *message) __BT_NOEXCEPT;
3044
3060extern void bt_message_put_ref(const bt_message *message) __BT_NOEXCEPT;
3061
3076#define BT_MESSAGE_PUT_REF_AND_RESET(_message) \
3077 do { \
3078 bt_message_put_ref(_message); \
3079 (_message) = NULL; \
3080 } while (0)
3081
3107#define BT_MESSAGE_MOVE_REF(_dst, _src) \
3108 do { \
3109 bt_message_put_ref(_dst); \
3110 (_dst) = (_src); \
3111 (_src) = NULL; \
3112 } while (0)
3113
3151
3198 const bt_component_descriptor_set *component_descriptors,
3199 bt_logging_level logging_level, uint64_t *mip_version)
3200 __BT_NOEXCEPT;
3201
3282 const struct bt_component_descriptor_set *component_descriptors,
3283 enum bt_logging_level logging_level,
3284 const bt_integer_range_set_unsigned *mip_version_restriction,
3285 uint64_t *mip_version)
3286 __BT_NOEXCEPT;
3287
3299extern uint64_t bt_get_maximal_mip_version(void) __BT_NOEXCEPT;
3300
3305#ifdef __cplusplus
3306}
3307#endif
3308
3309#endif /* BABELTRACE2_GRAPH_MESSAGE_H */
bt_property_availability
Availability of an object property.
Definition types.h:159
struct bt_component_descriptor_set bt_component_descriptor_set
Component descriptor set.
Definition types.h:29
struct bt_integer_range_set_unsigned bt_integer_range_set_unsigned
Set of unsigned 64-bit integer ranges.
Definition types.h:54
bt_logging_level
Logging level enumerators.
Definition logging.h:97
struct bt_message bt_message
Message.
Definition types.h:58
bt_stream * bt_message_stream_beginning_borrow_stream(bt_message *message)
Borrows the stream of the stream beginning message message.
void bt_message_stream_beginning_set_default_clock_snapshot(bt_message *message, uint64_t value)
Sets the value, in clock cycles, of the default clock snapshot of the stream beginning message messag...
const bt_clock_class * bt_message_packet_beginning_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the packet beginning message message.
void bt_message_stream_end_set_default_clock_snapshot(bt_message *message, uint64_t value)
Sets the value, in clock cycles, of the default clock snapshot of the stream end message message to v...
bt_stream * bt_message_discarded_events_borrow_stream(bt_message *message)
Borrows the stream of the discarded events message message.
const bt_clock_snapshot * bt_message_message_iterator_inactivity_borrow_clock_snapshot_const(const bt_message *message)
Borrows the clock snapshot of the message iterator inactivity message message.
const bt_event * bt_message_event_borrow_event_const(const bt_message *message)
Borrows the event of the event message message (const version).
const bt_stream * bt_message_stream_beginning_borrow_stream_const(const bt_message *message)
Borrows the stream of the stream beginning message message (const version).
bt_message_stream_clock_snapshot_state bt_message_stream_beginning_borrow_default_clock_snapshot_const(const bt_message *message, const bt_clock_snapshot **clock_snapshot)
Borrows the default clock snapshot of the stream beginning message message.
const bt_clock_snapshot * bt_message_discarded_packets_borrow_end_default_clock_snapshot_const(const bt_message *message)
Borrows the end default clock snapshot of the discarded packets message message.
bt_message * bt_message_packet_beginning_create_with_default_clock_snapshot(bt_self_message_iterator *self_message_iterator, const bt_packet *packet, uint64_t clock_snapshot_value)
Creates a packet beginning message having a default clock snapshot with the value clock_snapshot_valu...
const bt_clock_class * bt_message_packet_end_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the packet end message message.
bt_message_type bt_message_get_type(const bt_message *message)
Returns the type enumerator of the message message.
bt_message * bt_message_stream_beginning_create(bt_self_message_iterator *self_message_iterator, const bt_stream *stream)
Creates a stream beginning message for the stream stream from the message iterator self_message_itera...
bt_property_availability bt_message_discarded_events_get_count(const bt_message *message, uint64_t *count)
Returns the number of discarded events of the discarded events message message.
bt_packet * bt_message_packet_beginning_borrow_packet(bt_message *message)
Borrows the packet of the packet beginning message message.
bt_message_type
Message type enumerators.
Definition message.h:976
bt_message * bt_message_packet_end_create_with_default_clock_snapshot(bt_self_message_iterator *self_message_iterator, const bt_packet *packet, uint64_t clock_snapshot_value)
Creates a packet end message having a default clock snapshot with the value clock_snapshot_value for ...
bt_message_stream_clock_snapshot_state bt_message_stream_end_borrow_default_clock_snapshot_const(const bt_message *message, const bt_clock_snapshot **clock_snapshot)
Borrows the default clock snapshot of the stream end message message.
bt_packet * bt_message_packet_end_borrow_packet(bt_message *message)
Borrows the packet of the packet end message message.
const bt_clock_class * bt_message_discarded_events_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the discarded events message message.
bt_message_stream_clock_snapshot_state
Return type of bt_message_stream_beginning_borrow_default_clock_snapshot_const() and bt_message_strea...
Definition message.h:1055
const bt_clock_class * bt_message_discarded_packets_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the discarded packets message message.
uint64_t bt_get_maximal_mip_version(void)
Returns the maximal available Message Interchange Protocol version as of Babeltrace&#160;2....
const bt_stream * bt_message_stream_end_borrow_stream_const(const bt_message *message)
Borrows the stream of the stream end message message (const version).
const bt_clock_class * bt_message_stream_end_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the stream end message message.
const bt_clock_snapshot * bt_message_discarded_events_borrow_beginning_default_clock_snapshot_const(const bt_message *message)
Borrows the beginning default clock snapshot of the discarded events message message.
const bt_packet * bt_message_packet_end_borrow_packet_const(const bt_message *message)
Borrows the packet of the packet end message message (const version).
void bt_message_discarded_packets_set_count(bt_message *message, uint64_t count)
Sets the number of discarded packets of the discarded packets message message to count.
bt_message * bt_message_discarded_events_create(bt_self_message_iterator *self_message_iterator, const bt_stream *stream)
Creates a discarded events message for the stream stream from the message iterator self_message_itera...
bt_message * bt_message_event_create_with_default_clock_snapshot(bt_self_message_iterator *self_message_iterator, const bt_event_class *event_class, const bt_stream *stream, uint64_t clock_snapshot_value)
Creates an event message, having an instance of the event class event_class and a default clock snaps...
bt_message * bt_message_event_create(bt_self_message_iterator *self_message_iterator, const bt_event_class *event_class, const bt_stream *stream)
Creates an event message, having an instance of the event class event_class, for the stream stream fr...
bt_property_availability bt_message_discarded_packets_get_count(const bt_message *message, uint64_t *count)
Returns the number of discarded packets of the discarded packets message message.
const bt_clock_snapshot * bt_message_discarded_events_borrow_end_default_clock_snapshot_const(const bt_message *message)
Borrows the end default clock snapshot of the discarded events message message.
bt_message * bt_message_message_iterator_inactivity_create(bt_self_message_iterator *self_message_iterator, const bt_clock_class *clock_class, uint64_t clock_snapshot_value)
Creates a message iterator inactivity message having a clock snapshot of a fictitious instance of the...
bt_get_greatest_operative_mip_version_status bt_get_greatest_operative_mip_version(const bt_component_descriptor_set *component_descriptors, bt_logging_level logging_level, uint64_t *mip_version)
Computes the greatest Message Interchange Protocol version which you can use to create a trace proces...
const bt_clock_class * bt_message_event_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the event message message.
const bt_clock_snapshot * bt_message_packet_end_borrow_default_clock_snapshot_const(const bt_message *message)
Borrows the default clock snapshot of the packet end message message.
enum bt_get_greatest_operative_mip_version_status bt_get_greatest_operative_mip_version_with_restriction(const struct bt_component_descriptor_set *component_descriptors, enum bt_logging_level logging_level, const bt_integer_range_set_unsigned *mip_version_restriction, uint64_t *mip_version)
Computes the greatest Message Interchange Protocol version, restricted to the set of versions mip_ver...
const bt_packet * bt_message_packet_beginning_borrow_packet_const(const bt_message *message)
Borrows the packet of the packet beginning message message (const version).
bt_message * bt_message_event_create_with_packet_and_default_clock_snapshot(bt_self_message_iterator *self_message_iterator, const bt_event_class *event_class, const bt_packet *packet, uint64_t clock_snapshot_value)
Creates an event message, having an instance of the event class event_class and a default clock snaps...
const bt_stream * bt_message_discarded_packets_borrow_stream_const(const bt_message *message)
Borrows the stream of the discarded packets message message (const version).
const bt_clock_class * bt_message_stream_beginning_borrow_stream_class_default_clock_class_const(const bt_message *message)
Borrows the default clock class of the stream class of the stream beginning message message.
const bt_clock_snapshot * bt_message_packet_beginning_borrow_default_clock_snapshot_const(const bt_message *message)
Borrows the default clock snapshot of the packet beginning message message.
bt_message * bt_message_discarded_events_create_with_default_clock_snapshots(bt_self_message_iterator *self_message_iterator, const bt_stream *stream, uint64_t beginning_clock_snapshot_value, uint64_t end_clock_snapshot_value)
Creates a discarded events message having the beginning and end default clock snapshots with the valu...
bt_message * bt_message_packet_beginning_create(bt_self_message_iterator *self_message_iterator, const bt_packet *packet)
Creates a packet beginning message for the packet packet from the message iterator self_message_itera...
bt_stream * bt_message_discarded_packets_borrow_stream(bt_message *message)
Borrows the stream of the discarded packets message message.
bt_get_greatest_operative_mip_version_status
Status codes for bt_get_greatest_operative_mip_version() and bt_get_greatest_operative_mip_version_wi...
Definition message.h:3126
bt_event * bt_message_event_borrow_event(bt_message *message)
Borrows the event of the event message message.
void bt_message_discarded_events_set_count(bt_message *message, uint64_t count)
Sets the number of discarded events of the discarded events message message to count.
bt_message * bt_message_discarded_packets_create(bt_self_message_iterator *self_message_iterator, const bt_stream *stream)
Creates a discarded packets message for the stream stream from the message iterator self_message_iter...
bt_stream * bt_message_stream_end_borrow_stream(bt_message *message)
Borrows the stream of the stream end message message.
bt_message * bt_message_event_create_with_packet(bt_self_message_iterator *self_message_iterator, const bt_event_class *event_class, const bt_packet *packet)
Creates an event message, having an instance of the event class event_class, for the packet packet fr...
const bt_clock_snapshot * bt_message_discarded_packets_borrow_beginning_default_clock_snapshot_const(const bt_message *message)
Borrows the beginning default clock snapshot of the discarded packets message message.
const bt_stream * bt_message_discarded_events_borrow_stream_const(const bt_message *message)
Borrows the stream of the discarded events message message (const version).
bt_message * bt_message_stream_end_create(bt_self_message_iterator *self_message_iterator, const bt_stream *stream)
Creates a stream end message for the stream stream from the message iterator self_message_iterator.
bt_message * bt_message_discarded_packets_create_with_default_clock_snapshots(bt_self_message_iterator *self_message_iterator, const bt_stream *stream, uint64_t beginning_clock_snapshot_value, uint64_t end_clock_snapshot_value)
Creates a discarded packets message having the beginning and end default clock snapshots with the val...
bt_message * bt_message_packet_end_create(bt_self_message_iterator *self_message_iterator, const bt_packet *packet)
Creates a packet end message for the packet packet from the message iterator self_message_iterator.
void bt_message_get_ref(const bt_message *message)
Increments the reference count of the message message.
void bt_message_put_ref(const bt_message *message)
Decrements the reference count of the message message.
const bt_clock_snapshot * bt_message_event_borrow_default_clock_snapshot_const(const bt_message *message)
Borrows the default clock snapshot of the event message message.
@ BT_MESSAGE_TYPE_EVENT
Event message.
Definition message.h:993
@ BT_MESSAGE_TYPE_STREAM_BEGINNING
Stream beginning message.
Definition message.h:981
@ BT_MESSAGE_TYPE_PACKET_BEGINNING
Packet beginning message.
Definition message.h:999
@ BT_MESSAGE_TYPE_PACKET_END
Packet end message.
Definition message.h:1005
@ BT_MESSAGE_TYPE_DISCARDED_PACKETS
Discarded packets message.
Definition message.h:1017
@ BT_MESSAGE_TYPE_MESSAGE_ITERATOR_INACTIVITY
Message iterator inactivity message.
Definition message.h:1023
@ BT_MESSAGE_TYPE_STREAM_END
Stream end message.
Definition message.h:987
@ BT_MESSAGE_TYPE_DISCARDED_EVENTS
Discarded events message.
Definition message.h:1011
@ BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_KNOWN
Known clock snapshot.
Definition message.h:1060
@ BT_MESSAGE_STREAM_CLOCK_SNAPSHOT_STATE_UNKNOWN
Unknown (no) clock snapshot.
Definition message.h:1066
@ BT_GET_GREATEST_OPERATIVE_MIP_VERSION_STATUS_OK
Success.
Definition message.h:3131
@ BT_GET_GREATEST_OPERATIVE_MIP_VERSION_STATUS_NO_MATCH
No match found.
Definition message.h:3137
@ BT_GET_GREATEST_OPERATIVE_MIP_VERSION_STATUS_MEMORY_ERROR
Out of memory.
Definition message.h:3143
@ BT_GET_GREATEST_OPERATIVE_MIP_VERSION_STATUS_ERROR
Other error.
Definition message.h:3149
struct bt_self_message_iterator bt_self_message_iterator
Self message iterator.
Definition types.h:86
struct bt_clock_class bt_clock_class
Clock class.
Definition types.h:22
struct bt_clock_snapshot bt_clock_snapshot
Clock snapshot.
Definition types.h:23
struct bt_event_class bt_event_class
Event class.
Definition types.h:37
struct bt_event bt_event
Event.
Definition types.h:36
struct bt_packet bt_packet
Packet.
Definition types.h:62
struct bt_stream bt_stream
Stream.
Definition types.h:89