7#ifndef BABELTRACE2_GRAPH_MESSAGE_H
8#define BABELTRACE2_GRAPH_MESSAGE_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
16#include <babeltrace2/types.h>
1112 bt_self_message_iterator *self_message_iterator,
1113 const bt_stream *stream) __BT_NOEXCEPT;
1138 bt_message *message) __BT_NOEXCEPT;
1148 const bt_message *message) __BT_NOEXCEPT;
1176 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1211 const bt_message *message,
1212 const bt_clock_snapshot **clock_snapshot) __BT_NOEXCEPT;
1241extern const bt_clock_class *
1243 const bt_message *message) __BT_NOEXCEPT;
1288 bt_self_message_iterator *self_message_iterator,
1289 const bt_stream *stream) __BT_NOEXCEPT;
1314 bt_message *message) __BT_NOEXCEPT;
1324 const bt_message *message) __BT_NOEXCEPT;
1352 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1387 const bt_message *message,
1388 const bt_clock_snapshot **clock_snapshot) __BT_NOEXCEPT;
1418extern const bt_clock_class *
1420 const bt_message *message) __BT_NOEXCEPT;
1505 bt_self_message_iterator *self_message_iterator,
1506 const bt_event_class *event_class,
1507 const bt_stream *stream) __BT_NOEXCEPT;
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)
1675 bt_self_message_iterator *self_message_iterator,
1676 const bt_event_class *event_class,
1677 const bt_packet *packet) __BT_NOEXCEPT;
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)
1802 const bt_message *message) __BT_NOEXCEPT;
1822extern const bt_clock_snapshot *
1854extern const bt_clock_class *
1856 const bt_message *message) __BT_NOEXCEPT;
1923 bt_self_message_iterator *self_message_iterator,
1924 const bt_packet *packet) __BT_NOEXCEPT;
1988 bt_self_message_iterator *self_message_iterator,
1989 const bt_packet *packet, uint64_t clock_snapshot_value)
2015 bt_message *message) __BT_NOEXCEPT;
2025 const bt_message *message) __BT_NOEXCEPT;
2046extern const bt_clock_snapshot *
2048 const bt_message *message) __BT_NOEXCEPT;
2078extern const bt_clock_class *
2080 const bt_message *message) __BT_NOEXCEPT;
2146 bt_self_message_iterator *self_message_iterator,
2147 const bt_packet *packet) __BT_NOEXCEPT;
2211 bt_self_message_iterator *self_message_iterator,
2212 const bt_packet *packet, uint64_t clock_snapshot_value)
2238 bt_message *message) __BT_NOEXCEPT;
2248 const bt_message *message) __BT_NOEXCEPT;
2269extern const bt_clock_snapshot *
2271 const bt_message *message) __BT_NOEXCEPT;
2301extern const bt_clock_class *
2303 const bt_message *message) __BT_NOEXCEPT;
2371 bt_self_message_iterator *self_message_iterator,
2372 const bt_stream *stream) __BT_NOEXCEPT;
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)
2472 bt_message *message) __BT_NOEXCEPT;
2481extern const bt_stream *
2508extern const bt_clock_snapshot *
2510 const bt_message *message) __BT_NOEXCEPT;
2535extern const bt_clock_snapshot *
2537 const bt_message *message) __BT_NOEXCEPT;
2566extern const bt_clock_class *
2568 const bt_message *message) __BT_NOEXCEPT;
2595 uint64_t count) __BT_NOEXCEPT;
2626 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2694 bt_self_message_iterator *self_message_iterator,
2695 const bt_stream *stream) __BT_NOEXCEPT;
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;
2793 bt_message *message) __BT_NOEXCEPT;
2802extern const bt_stream *
2829extern const bt_clock_snapshot *
2831 const bt_message *message) __BT_NOEXCEPT;
2856extern const bt_clock_snapshot *
2858 const bt_message *message) __BT_NOEXCEPT;
2887extern const bt_clock_class *
2889 const bt_message *message) __BT_NOEXCEPT;
2916 uint64_t count) __BT_NOEXCEPT;
2947 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2997 bt_self_message_iterator *self_message_iterator,
2998 const bt_clock_class *clock_class,
2999 uint64_t clock_snapshot_value) __BT_NOEXCEPT;
3017extern const bt_clock_snapshot *
3019 const bt_message *message) __BT_NOEXCEPT;
3076#define BT_MESSAGE_PUT_REF_AND_RESET(_message) \
3078 bt_message_put_ref(_message); \
3079 (_message) = NULL; \
3107#define BT_MESSAGE_MOVE_REF(_dst, _src) \
3109 bt_message_put_ref(_dst); \
3198 const bt_component_descriptor_set *component_descriptors,
3282 const struct bt_component_descriptor_set *component_descriptors,
3284 const bt_integer_range_set_unsigned *mip_version_restriction,
3285 uint64_t *mip_version)
bt_property_availability
Availability of an object property.
Definition types.h:159
bt_logging_level
Logging level enumerators.
Definition logging.h:97
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 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