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>
1176 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1352 bt_message *message, uint64_t value) __BT_NOEXCEPT;
1591 const bt_stream *stream, uint64_t clock_snapshot_value)
1766 const bt_packet *packet, uint64_t clock_snapshot_value)
1989 const bt_packet *packet, uint64_t clock_snapshot_value)
2212 const bt_packet *packet, uint64_t clock_snapshot_value)
2445 uint64_t beginning_clock_snapshot_value,
2446 uint64_t end_clock_snapshot_value)
2595 uint64_t count) __BT_NOEXCEPT;
2626 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2767 const bt_stream *stream, uint64_t beginning_clock_snapshot_value,
2768 uint64_t end_clock_snapshot_value) __BT_NOEXCEPT;
2916 uint64_t count) __BT_NOEXCEPT;
2947 const bt_message *message, uint64_t *count) __BT_NOEXCEPT;
2999 uint64_t clock_snapshot_value) __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); \
3285 uint64_t *mip_version)
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 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