Babeltrace 2 C API
2.0.0
Open-source trace manipulation framework
|
Class of streams.
A stream class is the class of streams:
In the illustration above, notice that:
A stream is a conceptual sequence of messages.
The sequence always starts with a stream beginning message and ends with a stream end message.
A stream class is a trace IR metadata object.
A stream class is a shared object: get a new reference with bt_stream_class_get_ref() and put an existing reference with bt_stream_class_put_ref().
Some library functions freeze stream classes on success. The documentation of those functions indicate this postcondition. You can still create and add an event classes to a frozen stream class with bt_event_class_create() or bt_event_class_create_with_id().
The type of a stream class is bt_stream_class.
A trace class contains stream classes. All the stream classes of a given trace class have unique numeric IDs. Borrow the trace class which contains a stream class with bt_stream_class_borrow_trace_class() or bt_stream_class_borrow_trace_class_const().
A stream class contains event classes. All the event classes of a given stream class have unique numeric IDs. Get the number of event classes in a stream class with bt_stream_class_get_event_class_count(). Borrow a specific event class from a stream class with bt_stream_class_borrow_event_class_by_index(), bt_stream_class_borrow_event_class_by_index_const(), bt_stream_class_borrow_event_class_by_id(), and bt_stream_class_borrow_event_class_by_id_const().
A stream class controls what its instances (streams) support:
By default, a stream class's streams do not have default clocks.
Set the default clock class of a stream class with bt_stream_class_set_default_clock_class(). This makes all its streams have their own default clock.
By default, a stream class's streams do not support packets.
In other words, you cannot create a packet for such a stream, therefore you cannot create packet beginning messages and packet end messages for this stream either.
Enable packet support for a stream class's streams with bt_stream_class_set_supports_packets().
bt_stream_class_set_supports_packets() also configures whether or not the packets of the stream class's instances have beginning and/or end default clock snapshots.
By default, a stream class's streams do not support discarded events.
In other words, you cannot create discarded events messages for such a stream.
Enable discarded events support for a stream class's streams with bt_stream_class_set_supports_discarded_events().
bt_stream_class_set_supports_discarded_events() also configures whether or not the discarded events messages of the stream class's instances have beginning and end default clock snapshots to indicate the discarded events time range.
By default, a stream class's streams do not support discarded packets.
In other words, you cannot create discarded packets messages for such a stream.
Enable discarded packets support for a stream class's streams with bt_stream_class_set_supports_discarded_packets(). This also implies that you must enable packet support with bt_stream_class_set_supports_packets().
bt_stream_class_set_supports_discarded_packets() also configures whether or not the discarded packets messages of the stream class's instances have beginning and end clock snapshots to indicate the discarded packets time range.
Set whether or not the event classes and streams you create for a stream class get automatic numeric IDs with bt_stream_class_set_assigns_automatic_event_class_id() and bt_stream_class_set_assigns_automatic_stream_id().
To create a default stream class:
A stream class has the following properties:
Numeric ID, unique amongst the numeric IDs of the stream class's trace class's stream classes.
Depending on whether or not the stream class's trace class automatically assigns event class IDs (see bt_trace_class_assigns_automatic_stream_class_id()), set the stream class's numeric ID on creation with bt_stream_class_create() or bt_stream_class_create_with_id().
You cannot change the numeric ID once the stream class is created.
Get a stream class's numeric ID with bt_stream_class_get_id().
Name of the stream class.
Use bt_stream_class_set_name() and bt_stream_class_get_name().
Default clock class of the stream class.
As of Babeltrace 2.0, a stream class either has a default clock class or none: it cannot have more than one clock class.
When a stream class has a default clock class, then all its instances (streams) have a default clock which is an instance of the stream class's default clock class.
Use bt_stream_class_set_default_clock_class(), bt_stream_class_borrow_default_clock_class(), and bt_stream_class_borrow_default_clock_class_const().
Packet context field class of the stream class.
This property is only relevant if the stream class supports packets.
The context of a packet contains data which is common to all the packet's events.
Use bt_stream_class_set_packet_context_field_class() bt_stream_class_borrow_packet_context_field_class(), and bt_stream_class_borrow_packet_context_field_class_const().
Event common context field class of the stream class.
The common context of an event contains contextual data of which the layout is common to all the stream class's event classes.
Use bt_stream_class_set_event_common_context_field_class() bt_stream_class_borrow_event_common_context_field_class(), and bt_stream_class_borrow_event_common_context_field_class_const().
Whether or not the event classes you create and add to the stream class get numeric IDs automatically.
Depending on the value of this property, to create an event class and add it to the stream class:
Use bt_stream_class_set_assigns_automatic_event_class_id() and bt_stream_class_assigns_automatic_event_class_id().
Whether or not the streams you create from the stream class get numeric IDs automatically.
Depending on the value of this property, to create a stream from the stream class:
Use bt_stream_class_set_assigns_automatic_stream_id() and bt_stream_class_assigns_automatic_stream_id().
Whether or not the streams you create from the stream class have packets.
If a stream has packets, then all the stream's events are conceptually contained within packets, which means you must create event messages for such streams with bt_message_event_create_with_packet() or bt_message_event_create_with_packet_and_default_clock_snapshot() instead of bt_message_event_create() or bt_message_event_create_with_default_clock_snapshot().
It also means you must create packet beginning messages and packet end messages to indicate where packets begin and end within the stream's message sequence.
Use bt_stream_class_set_supports_packets() and bt_stream_class_supports_packets().
Whether or not the packets of the streams you create from the stream class have beginning default clock snapshots.
This property is only relevant if the stream class supports packets and has a default clock class.
If the stream packets have a beginning default clock snapshot, then you must create packet beginning messages with bt_message_packet_beginning_create_with_default_clock_snapshot() instead of bt_message_packet_beginning_create().
Use bt_stream_class_set_supports_packets() and bt_stream_class_packets_have_beginning_default_clock_snapshot().
Whether or not the packets of the streams you create from the stream class have end default clock snapshots.
This property is only relevant if the stream class supports packets and has a default clock class.
If the stream packets have an end default clock snapshot, then you must create packet end messages with bt_message_packet_end_create_with_default_clock_snapshot() instead of bt_message_packet_end_create().
Use bt_stream_class_set_supports_packets() and bt_stream_class_packets_have_end_default_clock_snapshot().
Whether or not the streams you create from the stream class can have discarded events.
If the stream class supports discarded events, then you can create discarded events messages for this stream.
Use bt_stream_class_set_supports_discarded_events() and bt_stream_class_supports_discarded_events().
Whether or not the stream's discarded events messages have default beginning and end clock snapshots to indicate the discarded events time range.
This property is only relevant if the stream class supports discarded events and has a default clock class.
If the stream's discarded events messages have beginning and end default clock snapshots, then you must create them with bt_message_discarded_events_create_with_default_clock_snapshots() instead of bt_message_discarded_events_create().
Use bt_stream_class_set_supports_discarded_events() and bt_stream_class_discarded_events_have_default_clock_snapshots().
Whether or not the streams you create from the stream class can have discarded packets.
This property is only relevant if the stream class supports packets.
If the stream class supports discarded packets, then you can create discarded packets messages for this stream.
Use bt_stream_class_set_supports_discarded_packets() and bt_stream_class_supports_discarded_packets().
Whether or not the stream's discarded packets messages have default beginning and end clock snapshots to indicate the discarded packets time range.
This property is only relevant if the stream class supports discarded packets and has a default clock class.
If the stream's discarded packets messages have default clock snapshots, then you must create them with bt_message_discarded_packets_create_with_default_clock_snapshots() instead of bt_message_discarded_packets_create().
Use bt_stream_class_set_supports_discarded_packets() and bt_stream_class_discarded_packets_have_default_clock_snapshots().
User attributes of the stream class.
User attributes are custom attributes attached to a stream class.
Use bt_stream_class_set_user_attributes(), bt_stream_class_borrow_user_attributes(), and bt_stream_class_borrow_user_attributes_const().
Type | |
typedef struct bt_stream_class | bt_stream_class |
Stream class. | |
Creation | |
bt_stream_class * | bt_stream_class_create (bt_trace_class *trace_class) |
Creates a default stream class and adds it to the trace class trace_class. More... | |
bt_stream_class * | bt_stream_class_create_with_id (bt_trace_class *trace_class, uint64_t id) |
Creates a default stream class with the numeric ID id and adds it to the trace class trace_class. More... | |
Trace class access | |
bt_trace_class * | bt_stream_class_borrow_trace_class (bt_stream_class *stream_class) |
Borrows the trace class which contains the stream class stream_class. More... | |
const bt_trace_class * | bt_stream_class_borrow_trace_class_const (const bt_stream_class *stream_class) |
Borrows the trace class which contains the stream class stream_class (const version). More... | |
Event class access | |
uint64_t | bt_stream_class_get_event_class_count (const bt_stream_class *stream_class) |
Returns the number of event classes contained in the stream class stream_class. More... | |
bt_event_class * | bt_stream_class_borrow_event_class_by_index (bt_stream_class *stream_class, uint64_t index) |
Borrows the event class at index index from the stream class stream_class. More... | |
const bt_event_class * | bt_stream_class_borrow_event_class_by_index_const (const bt_stream_class *stream_class, uint64_t index) |
Borrows the event class at index index from the stream class stream_class (const version). More... | |
bt_event_class * | bt_stream_class_borrow_event_class_by_id (bt_stream_class *stream_class, uint64_t id) |
Borrows the event class having the numeric ID id from the stream class stream_class. More... | |
const bt_event_class * | bt_stream_class_borrow_event_class_by_id_const (const bt_stream_class *stream_class, uint64_t id) |
Borrows the event class having the numeric ID id from the stream class stream_class (const version). More... | |
Properties | |
enum | bt_stream_class_set_name_status { BT_STREAM_CLASS_SET_NAME_STATUS_OK, BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR } |
Status codes for bt_stream_class_set_name(). More... | |
enum | bt_stream_class_set_default_clock_class_status { BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK } |
Status codes for bt_stream_class_set_default_clock_class(). More... | |
enum | bt_stream_class_set_field_class_status { BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK, BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR } |
Status codes for bt_stream_class_set_packet_context_field_class() and bt_stream_class_set_event_common_context_field_class(). More... | |
typedef enum bt_stream_class_set_name_status | bt_stream_class_set_name_status |
Status codes for bt_stream_class_set_name(). | |
typedef enum bt_stream_class_set_default_clock_class_status | bt_stream_class_set_default_clock_class_status |
Status codes for bt_stream_class_set_default_clock_class(). | |
typedef enum bt_stream_class_set_field_class_status | bt_stream_class_set_field_class_status |
Status codes for bt_stream_class_set_packet_context_field_class() and bt_stream_class_set_event_common_context_field_class(). | |
uint64_t | bt_stream_class_get_id (const bt_stream_class *stream_class) |
Returns the numeric ID of the stream class stream_class. More... | |
bt_stream_class_set_name_status | bt_stream_class_set_name (bt_stream_class *stream_class, const char *name) |
Sets the name of the stream class stream_class to a copy of name. More... | |
const char * | bt_stream_class_get_name (const bt_stream_class *stream_class) |
Returns the name of the stream class stream_class. More... | |
bt_stream_class_set_default_clock_class_status | bt_stream_class_set_default_clock_class (bt_stream_class *stream_class, bt_clock_class *clock_class) |
Sets the default clock class of the stream class stream_class to clock_class. More... | |
bt_clock_class * | bt_stream_class_borrow_default_clock_class (bt_stream_class *stream_class) |
Borrows the default clock class from the stream class stream_class. More... | |
const bt_clock_class * | bt_stream_class_borrow_default_clock_class_const (const bt_stream_class *stream_class) |
Borrows the default clock class from the stream class stream_class (const version). More... | |
bt_stream_class_set_field_class_status | bt_stream_class_set_packet_context_field_class (bt_stream_class *stream_class, bt_field_class *field_class) |
Sets the packet context field class of the stream class stream_class to field_class. More... | |
bt_field_class * | bt_stream_class_borrow_packet_context_field_class (bt_stream_class *stream_class) |
Borrows the packet context field class from the stream class stream_class. More... | |
const bt_field_class * | bt_stream_class_borrow_packet_context_field_class_const (const bt_stream_class *stream_class) |
Borrows the packet context field class from the stream class stream_class (const version). More... | |
bt_stream_class_set_field_class_status | bt_stream_class_set_event_common_context_field_class (bt_stream_class *stream_class, bt_field_class *field_class) |
Sets the event common context field class of the stream class stream_class to field_class. More... | |
bt_field_class * | bt_stream_class_borrow_event_common_context_field_class (bt_stream_class *stream_class) |
Borrows the event common context field class from the stream class stream_class. More... | |
const bt_field_class * | bt_stream_class_borrow_event_common_context_field_class_const (const bt_stream_class *stream_class) |
Borrows the event common context field class from the stream class stream_class (const version()). More... | |
void | bt_stream_class_set_assigns_automatic_event_class_id (bt_stream_class *stream_class, bt_bool assigns_automatic_event_class_id) |
Sets whether or not the stream class stream_class automatically assigns a numeric ID to an event class you create and add to it. More... | |
bt_bool | bt_stream_class_assigns_automatic_event_class_id (const bt_stream_class *stream_class) |
Returns whether or not the stream class stream_class automatically assigns a numeric ID to an event class you create and add to it. More... | |
void | bt_stream_class_set_assigns_automatic_stream_id (bt_stream_class *stream_class, bt_bool assigns_automatic_stream_id) |
Sets whether or not the stream class stream_class automatically assigns a numeric ID to a stream you create from it. More... | |
bt_bool | bt_stream_class_assigns_automatic_stream_id (const bt_stream_class *stream_class) |
Returns whether or not the stream class stream_class automatically assigns a numeric ID to a stream you create from it. More... | |
void | bt_stream_class_set_supports_packets (bt_stream_class *stream_class, bt_bool supports_packets, bt_bool with_beginning_default_clock_snapshot, bt_bool with_end_default_clock_snapshot) |
Sets whether or not the instances (streams) of the stream class stream_class have packets and, if so, if those packets have beginning and/or end default clock snapshots. More... | |
bt_bool | bt_stream_class_supports_packets (const bt_stream_class *stream_class) |
Returns whether or not the instances (streams) of the stream class stream_class have packets. More... | |
bt_bool | bt_stream_class_packets_have_beginning_default_clock_snapshot (const bt_stream_class *stream_class) |
Returns whether or not the packets of the instances (streams) of the stream class stream_class have a beginning default clock snapshot. More... | |
bt_bool | bt_stream_class_packets_have_end_default_clock_snapshot (const bt_stream_class *stream_class) |
Returns whether or not the packets of the instances (streams) of the stream class stream_class have an end default clock snapshot. More... | |
void | bt_stream_class_set_supports_discarded_events (bt_stream_class *stream_class, bt_bool supports_discarded_events, bt_bool with_default_clock_snapshots) |
Sets whether or not the instances (streams) of the stream class stream_class can have discarded events and, if so, if the discarded events messages of those streams have beginning and end default clock snapshots. More... | |
bt_bool | bt_stream_class_supports_discarded_events (const bt_stream_class *stream_class) |
Returns whether or not the instances (streams) of the stream class stream_class can have discarded events. More... | |
bt_bool | bt_stream_class_discarded_events_have_default_clock_snapshots (const bt_stream_class *stream_class) |
Returns whether or not the discarded events messages of the instances (streams) of the stream class stream_class have beginning and end default clock snapshots. More... | |
void | bt_stream_class_set_supports_discarded_packets (bt_stream_class *stream_class, bt_bool supports_discarded_packets, bt_bool with_default_clock_snapshots) |
Sets whether or not the instances (streams) of the stream class stream_class can have discarded packets and, if so, if the discarded packets messages of those streams have beginning and end default clock snapshots. More... | |
bt_bool | bt_stream_class_supports_discarded_packets (const bt_stream_class *stream_class) |
Returns whether or not the instances (streams) of the stream class stream_class can have discarded packets. More... | |
bt_bool | bt_stream_class_discarded_packets_have_default_clock_snapshots (const bt_stream_class *stream_class) |
Returns whether or not the discarded packets messages of the instances (streams) of the stream class stream_class have beginning and end default clock snapshots. More... | |
void | bt_stream_class_set_user_attributes (bt_stream_class *stream_class, const bt_value *user_attributes) |
Sets the user attributes of the stream class stream_class to user_attributes. More... | |
bt_value * | bt_stream_class_borrow_user_attributes (bt_stream_class *stream_class) |
Borrows the user attributes of the stream class stream_class. More... | |
const bt_value * | bt_stream_class_borrow_user_attributes_const (const bt_stream_class *stream_class) |
Borrows the user attributes of the stream class stream_class (const version). More... | |
Reference count | |
void | bt_stream_class_get_ref (const bt_stream_class *stream_class) |
Increments the reference count of the stream class stream_class. More... | |
void | bt_stream_class_put_ref (const bt_stream_class *stream_class) |
Decrements the reference count of the stream class stream_class. More... | |
#define | BT_STREAM_CLASS_PUT_REF_AND_RESET(_stream_class) |
Decrements the reference count of the stream class _stream_class, and then sets _stream_class to NULL . More... | |
#define | BT_STREAM_CLASS_MOVE_REF(_dst, _src) |
Decrements the reference count of the stream class _dst, sets _dst to _src, and then sets _src to NULL . More... | |
Status codes for bt_stream_class_set_name().
Enumerator | |
---|---|
BT_STREAM_CLASS_SET_NAME_STATUS_OK | Success. |
BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_stream_class_set_default_clock_class().
Enumerator | |
---|---|
BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK | Success. |
Status codes for bt_stream_class_set_packet_context_field_class() and bt_stream_class_set_event_common_context_field_class().
Enumerator | |
---|---|
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK | Success. |
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR | Out of memory. |
#define BT_STREAM_CLASS_PUT_REF_AND_RESET | ( | _stream_class | ) |
Decrements the reference count of the stream class _stream_class, and then sets _stream_class to NULL
.
_stream_class | Stream class of which to decrement the reference count. Can contain |
#define BT_STREAM_CLASS_MOVE_REF | ( | _dst, | |
_src | |||
) |
Decrements the reference count of the stream class _dst, sets _dst to _src, and then sets _src to NULL
.
This macro effectively moves a stream class reference from the expression _src to the expression _dst, putting the existing _dst reference.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
bt_stream_class* bt_stream_class_create | ( | bt_trace_class * | trace_class | ) |
Creates a default stream class and adds it to the trace class trace_class.
Only use this function if
returns BT_TRUE.
Otherwise, use bt_stream_class_create_with_id().
On success, the returned stream class has the following property values:
Property | Value |
---|---|
Numeric ID | Automatically assigned by trace_class |
Name | None |
Default clock class | None |
Packet context field class | None |
Event common context field class | None |
Assigns automatic event class IDs? | Yes |
Assigns automatic stream IDs? | Yes |
Supports packets? | No |
Packets have a beginning default clock snapshot? | No |
Packets have an end default clock snapshot? | No |
Supports discarded events? | No |
Discarded events have default clock snapshots? | No |
Supports discarded packets? | No |
Discarded packets have default clock snapshots? | No |
User attributes | Empty map value |
[in] | trace_class | Trace class to add the created stream class to. |
NULL
on memory error.NULL
. bt_trace_class_assigns_automatic_stream_class_id(trace_class)
returns BT_TRUE.bt_stream_class* bt_stream_class_create_with_id | ( | bt_trace_class * | trace_class, |
uint64_t | id | ||
) |
Creates a default stream class with the numeric ID id and adds it to the trace class trace_class.
Only use this function if
returns BT_FALSE.
Otherwise, use bt_stream_class_create().
On success, the returned stream class has the following property values:
[in] | trace_class | Trace class to add the created stream class to. |
[in] | id | Numeric ID of the stream class to create and add to trace_class. |
NULL
on memory error.NULL
. bt_trace_class_assigns_automatic_stream_class_id(trace_class)
returns BT_FALSE. bt_trace_class* bt_stream_class_borrow_trace_class | ( | bt_stream_class * | stream_class | ) |
Borrows the trace class which contains the stream class stream_class.
[in] | stream_class | Stream class from which to borrow the trace class which contains it. |
NULL
.const
version of this function. const bt_trace_class* bt_stream_class_borrow_trace_class_const | ( | const bt_stream_class * | stream_class | ) |
Borrows the trace class which contains the stream class stream_class (const
version).
uint64_t bt_stream_class_get_event_class_count | ( | const bt_stream_class * | stream_class | ) |
Returns the number of event classes contained in the stream class stream_class.
[in] | stream_class | Stream class of which to get the number of contained event classes. |
NULL
. bt_event_class* bt_stream_class_borrow_event_class_by_index | ( | bt_stream_class * | stream_class, |
uint64_t | index | ||
) |
Borrows the event class at index index from the stream class stream_class.
[in] | stream_class | Stream class from which to borrow the event class at index index. |
[in] | index | Index of the event class to borrow from stream_class. |
Borrowed reference of the event class of stream_class at index index.
The returned pointer remains valid as long as stream_class exists.
NULL
. const
version of this function. const bt_event_class* bt_stream_class_borrow_event_class_by_index_const | ( | const bt_stream_class * | stream_class, |
uint64_t | index | ||
) |
Borrows the event class at index index from the stream class stream_class (const
version).
bt_event_class* bt_stream_class_borrow_event_class_by_id | ( | bt_stream_class * | stream_class, |
uint64_t | id | ||
) |
Borrows the event class having the numeric ID id from the stream class stream_class.
If there's no event class having the numeric ID id in stream_class, this function returns NULL
.
[in] | stream_class | Stream class from which to borrow the event class having the numeric ID id. |
[in] | id | ID of the event class to borrow from stream_class. |
Borrowed reference of the event class of stream_class having the numeric ID id, or NULL
if none.
The returned pointer remains valid as long as stream_class exists.
NULL
.const
version of this function. const bt_event_class* bt_stream_class_borrow_event_class_by_id_const | ( | const bt_stream_class * | stream_class, |
uint64_t | id | ||
) |
Borrows the event class having the numeric ID id from the stream class stream_class (const
version).
uint64_t bt_stream_class_get_id | ( | const bt_stream_class * | stream_class | ) |
Returns the numeric ID of the stream class stream_class.
See the numeric ID property.
[in] | stream_class | Stream class of which to get the numeric ID. |
NULL
.bt_stream_class_set_name_status bt_stream_class_set_name | ( | bt_stream_class * | stream_class, |
const char * | name | ||
) |
Sets the name of the stream class stream_class to a copy of name.
See the name property.
[in] | stream_class | Stream class of which to set the name to name. |
[in] | name | New name of stream_class (copied). |
BT_STREAM_CLASS_SET_NAME_STATUS_OK | Success. |
BT_STREAM_CLASS_SET_NAME_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
.const char* bt_stream_class_get_name | ( | const bt_stream_class * | stream_class | ) |
Returns the name of the stream class stream_class.
See the name property.
If stream_class has no name, this function returns NULL
.
[in] | stream_class | Stream class of which to get the name. |
Name of stream_class, or NULL
if none.
The returned pointer remains valid as long as stream_class is not modified.
NULL
.bt_stream_class_set_default_clock_class_status bt_stream_class_set_default_clock_class | ( | bt_stream_class * | stream_class, |
bt_clock_class * | clock_class | ||
) |
Sets the default clock class of the stream class stream_class to clock_class.
See the default clock class property.
[in] | stream_class | Stream class of which to set the default clock class to clock_class. |
[in] | clock_class | New default clock class of stream_class. |
BT_STREAM_CLASS_SET_DEFAULT_CLOCK_CLASS_STATUS_OK | Success. |
NULL
. NULL
.const
version). bt_clock_class* bt_stream_class_borrow_default_clock_class | ( | bt_stream_class * | stream_class | ) |
Borrows the default clock class from the stream class stream_class.
See the default clock class property.
If stream_class has no default clock class, this function returns NULL
.
[in] | stream_class | Stream class from which to borrow the default clock class. |
NULL
if none.NULL
.const
version of this function. const bt_clock_class* bt_stream_class_borrow_default_clock_class_const | ( | const bt_stream_class * | stream_class | ) |
Borrows the default clock class from the stream class stream_class (const
version).
bt_stream_class_set_field_class_status bt_stream_class_set_packet_context_field_class | ( | bt_stream_class * | stream_class, |
bt_field_class * | field_class | ||
) |
Sets the packet context field class of the stream class stream_class to field_class.
See the packet context field class property.
stream_class must support packets (see bt_stream_class_set_supports_packets()).
[in] | stream_class | Stream class of which to set the packet context field class to field_class. |
[in] | field_class | New packet context field class of stream_class. |
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK | Success. |
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. bt_stream_class_supports_packets(stream_class)
returns BT_TRUE. NULL
. const
version). bt_field_class* bt_stream_class_borrow_packet_context_field_class | ( | bt_stream_class * | stream_class | ) |
Borrows the packet context field class from the stream class stream_class.
See the packet context field class property.
If stream_class has no packet context field class, this function returns NULL
.
[in] | stream_class | Stream class from which to borrow the packet context field class. |
NULL
if none.NULL
.const
version of this function. const bt_field_class* bt_stream_class_borrow_packet_context_field_class_const | ( | const bt_stream_class * | stream_class | ) |
Borrows the packet context field class from the stream class stream_class (const
version).
bt_stream_class_set_field_class_status bt_stream_class_set_event_common_context_field_class | ( | bt_stream_class * | stream_class, |
bt_field_class * | field_class | ||
) |
Sets the event common context field class of the stream class stream_class to field_class.
See the event common context field class property.
[in] | stream_class | Stream class of which to set the event common context field class to field_class. |
[in] | field_class | New event common context field class of stream_class. |
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_OK | Success. |
BT_STREAM_CLASS_SET_FIELD_CLASS_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. const
version). bt_field_class* bt_stream_class_borrow_event_common_context_field_class | ( | bt_stream_class * | stream_class | ) |
Borrows the event common context field class from the stream class stream_class.
See the event common context field class property.
If stream_class has no event common context field class, this function returns NULL
.
[in] | stream_class | Stream class from which to borrow the event common context field class. |
NULL
if none.NULL
.const
version of this function. const bt_field_class* bt_stream_class_borrow_event_common_context_field_class_const | ( | const bt_stream_class * | stream_class | ) |
Borrows the event common context field class from the stream class stream_class (const
version()).
See bt_stream_class_borrow_event_common_context_field_class().
void bt_stream_class_set_assigns_automatic_event_class_id | ( | bt_stream_class * | stream_class, |
bt_bool | assigns_automatic_event_class_id | ||
) |
Sets whether or not the stream class stream_class automatically assigns a numeric ID to an event class you create and add to it.
See the assigns automatic event class IDs? property.
[in] | stream_class | Stream class of which to set whether or not it assigns automatic event class IDs. |
[in] | assigns_automatic_event_class_id | BT_TRUE to make stream_class assign automatic event class IDs. |
NULL
. bt_bool bt_stream_class_assigns_automatic_event_class_id | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the stream class stream_class automatically assigns a numeric ID to an event class you create and add to it.
See the assigns automatic event class IDs? property.
[in] | stream_class | Stream class of which to get whether or not it assigns automatic event class IDs. |
NULL
.void bt_stream_class_set_assigns_automatic_stream_id | ( | bt_stream_class * | stream_class, |
bt_bool | assigns_automatic_stream_id | ||
) |
Sets whether or not the stream class stream_class automatically assigns a numeric ID to a stream you create from it.
See the assigns automatic stream IDs? property.
[in] | stream_class | Stream class of which to set whether or not it assigns automatic stream IDs. |
[in] | assigns_automatic_stream_id | BT_TRUE to make stream_class assign automatic stream IDs. |
NULL
. bt_bool bt_stream_class_assigns_automatic_stream_id | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the stream class stream_class automatically assigns a numeric ID to a stream you create from it.
See the assigns automatic stream IDs? property.
[in] | stream_class | Stream class of which to get whether or not it assigns automatic stream IDs. |
NULL
.void bt_stream_class_set_supports_packets | ( | bt_stream_class * | stream_class, |
bt_bool | supports_packets, | ||
bt_bool | with_beginning_default_clock_snapshot, | ||
bt_bool | with_end_default_clock_snapshot | ||
) |
Sets whether or not the instances (streams) of the stream class stream_class have packets and, if so, if those packets have beginning and/or end default clock snapshots.
See the supports packets?, packets have a beginning default clock snapshot?, and packets have an end default clock snapshot? properties.
[in] | stream_class | Stream class of which to set whether or not its streams have packets. |
[in] | supports_packets | BT_TRUE to make the streams of stream_class have packets. |
[in] | with_beginning_default_clock_snapshot | BT_TRUE to make the packets of the streams of stream_class have a beginning default clock snapshot. |
[in] | with_end_default_clock_snapshot | BT_TRUE to make the packets of the streams of stream_class have an end default clock snapshot. |
NULL
. bt_bool bt_stream_class_supports_packets | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the instances (streams) of the stream class stream_class have packets.
See the supports packets? property.
[in] | stream_class | Stream class of which to get whether or not its streams have packets. |
NULL
.bt_bool bt_stream_class_packets_have_beginning_default_clock_snapshot | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the packets of the instances (streams) of the stream class stream_class have a beginning default clock snapshot.
See the packets have a beginning default clock snapshot? property.
[in] | stream_class | Stream class of which to get whether or not its streams's packets have a beginning default clock snapshot. |
NULL
.bt_bool bt_stream_class_packets_have_end_default_clock_snapshot | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the packets of the instances (streams) of the stream class stream_class have an end default clock snapshot.
See the packets have an end default clock snapshot? property.
[in] | stream_class | Stream class of which to get whether or not its streams's packets have an end default clock snapshot. |
NULL
.void bt_stream_class_set_supports_discarded_events | ( | bt_stream_class * | stream_class, |
bt_bool | supports_discarded_events, | ||
bt_bool | with_default_clock_snapshots | ||
) |
Sets whether or not the instances (streams) of the stream class stream_class can have discarded events and, if so, if the discarded events messages of those streams have beginning and end default clock snapshots.
See the supports discarded events? and discarded events have default clock snapshots? properties.
[in] | stream_class | Stream class of which to set whether or not its streams can have discarded events. |
[in] | supports_discarded_events | BT_TRUE to make the streams of stream_class be able to have discarded events. |
[in] | with_default_clock_snapshots | BT_TRUE to make the discarded events messages the streams of stream_class have beginning and end default clock snapshots. |
NULL
. bt_bool bt_stream_class_supports_discarded_events | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the instances (streams) of the stream class stream_class can have discarded events.
See the supports discarded events? property.
[in] | stream_class | Stream class of which to get whether or not its streams can have discarded events. |
NULL
.bt_bool bt_stream_class_discarded_events_have_default_clock_snapshots | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the discarded events messages of the instances (streams) of the stream class stream_class have beginning and end default clock snapshots.
See the discarded events have default clock snapshots? property.
[in] | stream_class | Stream class of which to get whether or not its streams's discarded events messages have a beginning and end default clock snapshots. |
NULL
.void bt_stream_class_set_supports_discarded_packets | ( | bt_stream_class * | stream_class, |
bt_bool | supports_discarded_packets, | ||
bt_bool | with_default_clock_snapshots | ||
) |
Sets whether or not the instances (streams) of the stream class stream_class can have discarded packets and, if so, if the discarded packets messages of those streams have beginning and end default clock snapshots.
See the supports discarded packets? and discarded packets have default clock snapshots? properties.
stream_class must support packets (see bt_stream_class_set_supports_packets()).
[in] | stream_class | Stream class of which to set whether or not its streams can have discarded packets. |
[in] | supports_discarded_packets | BT_TRUE to make the streams of stream_class be able to have discarded packets. |
[in] | with_default_clock_snapshots | BT_TRUE to make the discarded packets messages the streams of stream_class have beginning and end default clock snapshots. |
NULL
. bt_stream_class_supports_packets(stream_class)
returns BT_TRUE. bt_bool bt_stream_class_supports_discarded_packets | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the instances (streams) of the stream class stream_class can have discarded packets.
See the supports discarded packets? property.
[in] | stream_class | Stream class of which to get whether or not its streams can have discarded packets. |
NULL
.bt_bool bt_stream_class_discarded_packets_have_default_clock_snapshots | ( | const bt_stream_class * | stream_class | ) |
Returns whether or not the discarded packets messages of the instances (streams) of the stream class stream_class have beginning and end default clock snapshots.
See the discarded packets have default clock snapshots? property.
[in] | stream_class | Stream class of which to get whether or not its streams's discarded packets messages have a beginning and end default clock snapshots. |
NULL
.void bt_stream_class_set_user_attributes | ( | bt_stream_class * | stream_class, |
const bt_value * | user_attributes | ||
) |
Sets the user attributes of the stream class stream_class to user_attributes.
See the user attributes property.
[in] | stream_class | Stream class of which to set the user attributes to user_attributes. |
[in] | user_attributes | New user attributes of stream_class. |
NULL
. NULL
. bt_value* bt_stream_class_borrow_user_attributes | ( | bt_stream_class * | stream_class | ) |
Borrows the user attributes of the stream class stream_class.
See the user attributes property.
[in] | stream_class | Stream class from which to borrow the user attributes. |
NULL
.const
version of this function. const bt_value* bt_stream_class_borrow_user_attributes_const | ( | const bt_stream_class * | stream_class | ) |
Borrows the user attributes of the stream class stream_class (const
version).
void bt_stream_class_get_ref | ( | const bt_stream_class * | stream_class | ) |
Increments the reference count of the stream class stream_class.
[in] | stream_class | Stream class of which to increment the reference count. Can be |
void bt_stream_class_put_ref | ( | const bt_stream_class * | stream_class | ) |
Decrements the reference count of the stream class stream_class.
[in] | stream_class | Stream class of which to decrement the reference count. Can be |