Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches

Detailed Description

Classes of fields.

Field classes are the classes of fields:

Field classes are trace IR metadata objects.

There are many types of field classes. They can be divided into two main categories:

Scalar

Classes of fields which contain a simple value.

The scalar field classes are:

Container

Classes of fields which contain other fields.

The container field classes are:

Fields (green) are instances of field classes (orange).

Some field classes conceptually inherit other field classes, eventually making an inheritance hierarchy. For example, a static array field class is an array field class. Therefore, a static array field class has any property that an array field class has.

The complete field class inheritance hierarchy is:

In the illustration above:

Field classes are shared objects: get a new reference with bt_field_class_get_ref() and put an existing reference with bt_field_class_put_ref().

Some library functions freeze field classes on success. The documentation of those functions indicate this postcondition.

All the field class types share the same C type, bt_field_class.

Get the type enumerator of a field class with bt_field_class_get_type(). Get whether or not a field class type conceptually is a given type with the inline bt_field_class_type_is() function.

Since Babeltrace 2.1, get the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which a field class was created with bt_field_class_get_graph_mip_version().

The following table shows the available type enumerators and creation functions for each type of concrete (non-abstract) field class:

Name Type enumerator Creation function(s)
Boolean BT_FIELD_CLASS_TYPE_BOOL bt_field_class_bool_create()
Bit array BT_FIELD_CLASS_TYPE_BIT_ARRAY bt_field_class_bit_array_create()
Unsigned integer BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER bt_field_class_integer_unsigned_create()
Signed integer BT_FIELD_CLASS_TYPE_SIGNED_INTEGER bt_field_class_integer_signed_create()
Unsigned enumeration BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION bt_field_class_enumeration_unsigned_create()
Signed enumeration BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION bt_field_class_enumeration_signed_create()
Single-precision real BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL bt_field_class_real_single_precision_create()
Double-precision real BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL bt_field_class_real_double_precision_create()
String BT_FIELD_CLASS_TYPE_STRING bt_field_class_string_create()
Static BLOB (available since Babeltrace 2.1) BT_FIELD_CLASS_TYPE_STATIC_BLOB bt_field_class_blob_static_create()
Dynamic BLOB (instances without a linked length field; available since Babeltrace 2.1) BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD bt_field_class_blob_dynamic_without_length_field_location_create()
Dynamic BLOB (instances with a linked length field; available since Babeltrace 2.1) BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITH_LENGTH_FIELD bt_field_class_blob_dynamic_with_length_field_location_create()
Static array BT_FIELD_CLASS_TYPE_STATIC_ARRAY bt_field_class_array_static_create()
Dynamic array (instances without a linked length field) BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD
Dynamic array (instances with a linked length field) BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD
Structure BT_FIELD_CLASS_TYPE_STRUCTURE bt_field_class_structure_create()
Option (instances without a linked selector field) BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD
Option (instances with a linked boolean selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD
Option (instances with a linked unsigned integer selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD
Option (instances with a linked signed integer selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD
Variant (instances without a linked selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD
Variant (instances with a linked unsigned integer selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD
Variant (instances with a linked signed integer selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD

You need a trace class to create a field class: create one from a self component with bt_trace_class_create().

Outside the field class API, you can use field classes at four locations, called scopes, within the trace IR API:

When you call one of the four functions above:

Once you have called one of the four functions above, the passed field class becomes frozen.

Common field class property

A field class has the following common property:

Optional: User attributes

User attributes of the field class.

User attributes are custom attributes attached to a field class.

Use bt_field_class_set_user_attributes(), bt_field_class_borrow_user_attributes(), and bt_field_class_borrow_user_attributes_const().

Boolean field class

A boolean field class is the class of boolean fields.

A boolean field contains a boolean value (BT_TRUE or BT_FALSE).

Create a boolean field class with bt_field_class_bool_create().

A boolean field class has no specific properties.

Bit array field class

A bit array field class is the class of bit array fields.

A bit array field contains a fixed-length array of bits.

Create a bit array field class with bt_field_class_bit_array_create().

A bit array field class has the following property:

Length

Number of bits contained in the instances (bit array fields) of the bit array field class.

As of Babeltrace 2.0, the maximum length of a bit array field is 64.

You cannot change the length once the bit array field class is created.

Get the length of instances of a bit array field class with bt_field_class_bit_array_get_length().

Optional: Flags (only available when the field class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 1; available since Babeltrace 2.1)

Set of flags of the bit array field class.

A bit array field class flag is a label (string) and an unsigned integer range set, a set of bit index ranges. In the value of an instance (a bit array field) returned by bt_field_bit_array_get_value_as_integer(), the index of the least significant bit is 0.

The integer ranges of a given flag or of multiple flags of the same bit array field class can overlap. For example, a bit array field class can have those two flags:

  • GALLERY: [1, 4], [8, 14]
  • LUNCH: [3, 6]

In that case, the bit indexes 2 and 12 correspond to the label GALLERY, the bit index 5 to the label LUNCH, and the bit index 3 to the labels GALLERY and LUNCH.

Given some bit flag field value (as an integer), a flag is said to be active when at least one of its bit indexes is the index of a set bit of the value. For example, given the 8-bit bit array field value

[true, false, true, true, false, true, false, true]

where the first element is the first bit of the bit array field (the value as an integer being 0xad):

  • A flag targeting bits 1, 3, and 6 would be active because bit 3 is set.
  • A flag targeting bits 1 and 4 wouldn't be active because both bits are cleared.

Two flags of the same bit array field class cannot have the same label.

Add a flag to a bit array field class with bt_field_class_bit_array_add_flag().

Get the number of flags in a bit array field class with bt_field_class_bit_array_get_flag_count().

Borrow a flag from a bit array field class with bt_field_class_bit_array_borrow_flag_by_index_const() and bt_field_class_bit_array_borrow_flag_by_label_const().

A bit array field class flag is a unique object: it belongs to the bit array field class which contains it.

The type of a bit array field class flag is bt_field_class_bit_array_flag.

Get the label of a bit array field class flag with bt_field_class_bit_array_flag_get_label().

Borrow the bit index range set of a bit array field class flag with bt_field_class_bit_array_flag_borrow_index_ranges_const().

Get the labels of all the active flags of a bit array field class for the set bits of some integral value with bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().

Integer field classes

Integer field classes are classes of integer fields.

Integer fields contain integral values.

An integer field class is an abstract field class: you cannot create one. The concrete integer field classes are:

Unsigned integer field class

Its instances (unsigned integer fields) contain an unsigned integral value (uint64_t).

Create with bt_field_class_integer_unsigned_create().

Signed integer field class

Its instances (signed integer fields) contain a signed integral value (int64_t).

Create with bt_field_class_integer_signed_create().

Integer field classes have the following common properties:

Field value range

Expected range of values that the instances (integer fields) of the integer field class can contain.

For example, if the field value range of an unsigned integer field class is [0, 16383], then its unsigned integer fields can only contain the values from 0 to 16383.

Sink components can benefit from this property to make some space optimizations when writing trace data.

Use bt_field_class_integer_set_field_value_range() and bt_field_class_integer_get_field_value_range().

Field value hints (only available when the field class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 1; available since Babeltrace 2.1)

Hints about the values of the instances (integer fields) integer field class.

As of Babeltrace 2.0, the only available hint is BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL which means that instances are expected to hold small integer values.

Use bt_field_class_integer_set_field_value_hints(), bt_field_class_integer_get_field_value_hints(), and bt_field_class_integer_has_field_value_hint().

Preferred display base

Preferred base (2, 8, 10, or 16) to use when displaying the instances (integer fields) of the integer field class.

Use bt_field_class_integer_set_preferred_display_base() and bt_field_class_integer_get_preferred_display_base().

Enumeration field classes

Enumeration field classes are classes of enumeration fields.

Enumeration field classes are integer field classes: they have the integer field classes properties.

Enumeration fields are integer fields: they contain integral values.

Enumeration field classes associate labels (strings) to specific ranges of integral values. This association is called an enumeration field class mapping.

For example, if an enumeration field class maps the label SUGAR to the integer ranges [1, 19] and [25, 31], then an instance (enumeration field) of this field class with the value 15 or 28 has the label SUGAR.

An enumeration field class is an abstract field class: you cannot create one. The concrete enumeration field classes are:

Unsigned enumeration field class

Its instances (unsigned enumeration fields) contain an unsigned value (uint64_t).

Create with bt_field_class_enumeration_unsigned_create().

Signed enumeration field class

Its instances (signed enumeration fields) contain a signed value (int64_t).

Create with bt_field_class_enumeration_signed_create().

Enumeration field classes have the following common property:

Mappings

Set of mappings of the enumeration field class.

An enumeration field class mapping is a label (string) and an integer range set.

The integer ranges of a given mapping or of multiple mappings of the same enumeration field class can overlap. For example, an enumeration field class can have those two mappings:

  • CALORIES: [1, 11], [15, 37]
  • SODIUM: [7, 13]

In that case, the values 2 and 30 correspond to the label CALORIES, the value 12 to the label SODIUM, and the value 10 to the labels CALORIES and SODIUM.

Two mappings of the same enumeration field class cannot have the same label.

Add a mapping to an enumeration field class with bt_field_class_enumeration_unsigned_add_mapping() or bt_field_class_enumeration_signed_add_mapping().

Get the number of mappings in an enumeration field class with bt_field_class_enumeration_get_mapping_count().

Borrow a mapping from an enumeration field class with bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const(), bt_field_class_enumeration_signed_borrow_mapping_by_index_const(), bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const(), and bt_field_class_enumeration_signed_borrow_mapping_by_label_const().

An enumeration field class mapping is a unique object: it belongs to the enumeration field class which contains it.

There are two enumeration field class mapping types, depending on the type of the field class: bt_field_class_enumeration_unsigned_mapping and bt_field_class_enumeration_signed_mapping.

There's also the bt_field_class_enumeration_mapping type for common properties and operations (for example, bt_field_class_enumeration_mapping_get_label()). Upcast a specific enumeration field class mapping to the bt_field_class_enumeration_mapping type with bt_field_class_enumeration_unsigned_mapping_as_mapping_const() or bt_field_class_enumeration_signed_mapping_as_mapping_const().

Get all the enumeration field class labels mapped to a given integer value with bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().

Real field classes

Real field classes are classes of real fields.

Real fields contain real values (float or double types).

A real field class is an abstract field class: you cannot create one. The concrete real field classes are:

Single-precision real field class

Its instances (single-precision real fields) contain a float value.

Create with bt_field_class_real_single_precision_create().

Double-precision real field class

Its instances (double-precision real fields) contain a double value.

Create with bt_field_class_real_double_precision_create().

Real field classes have no specific properties.

String field class

A string field class is the class of string fields.

A string field contains an UTF-8 string value.

Create a string field class with bt_field_class_string_create().

A string field class has no specific properties.

BLOB field classes (available since Babeltrace 2.1)

BLOB field classes are classes of BLOB fields.

BLOB fields contain zero or more bytes of binary data.

Note
BLOB field classes are only available when the trace class from which you create them was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 1 (available since Babeltrace 2.1).

A BLOB field class is an abstract field class: you cannot create one. The concrete BLOB field classes are:

Static BLOB field class

Its instances (static BLOB fields) contain a fixed number of bytes.

Create with bt_field_class_blob_static_create().

A static BLOB field class has the following specific property:

Length

Number of bytes contained in the instances (static BLOB fields) of the static BLOB field class.

You cannot change the length once the static BLOB field class is created.

Get the length of instances of a static BLOB field class with bt_field_class_blob_static_get_length().

Dynamic BLOB field class

Its instances (dynamic BLOB fields) contain a variable number of bytes.

There are two types of dynamic BLOB field classes: instances without or with a linked length field. See Fields with links to other fields to learn more.

A dynamic blob field linked to an unsigned integer length field.

Create with bt_field_class_blob_dynamic_without_length_field_location_create() or bt_field_class_blob_dynamic_with_length_field_location_create().

The class of a dynamic BLOB field with a linked length field has the following specific property:

Length field location

Field location to locate the linked length field of an instance.

Borrow the length field location of a dynamic BLOB field class with bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const().

BLOB field classes have the following common property:

Media type

IANA media type of instances of the BLOB field class.

Use bt_field_class_blob_set_media_type() and bt_field_class_blob_get_media_type().

Array field classes

Array field classes are classes of array fields.

Array fields contain zero or more fields which have the same class.

An array field class is an abstract field class: you cannot create one. The concrete array field classes are:

Static array field class

Its instances (static array fields) contain a fixed number of fields.

Create with bt_field_class_array_static_create().

A static array field class has the following specific property:

Length

Number of fields contained in the instances (static array fields) of the static array field class.

You cannot change the length once the static array field class is created.

Get the length of instances of a static array field class with bt_field_class_array_static_get_length().

Dynamic array field class

Its instances (dynamic array fields) contain a variable number of fields.

There are two types of dynamic array field classes: instances without or with a linked length field. See Fields with links to other fields to learn more.

A dynamic array field linked to an unsigned integer length field.

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_array_dynamic_create().

MIP 1 (available since Babeltrace 2.1)
bt_field_class_array_dynamic_without_length_field_location_create() or bt_field_class_array_dynamic_with_length_field_location_create().

The class of a dynamic array field with a linked length field has one of the following specific properties, depending on the effective MIP version of the trace processing graph:

MIP 0: Length field path

Field path to locate the linked length field of an instance.

Borrow the length field path of a dynamic array field class with bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const().

MIP 1: Length field location (available since Babeltrace 2.1)

Field location to locate the linked length field of an instance.

Borrow the length field location of a dynamic array field class with bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const().

Array field classes have the following common property:

Element field class

Class of the fields contained in the instances (array fields) of the array field class.

You cannot change the element field class once the array field class is created.

Borrow the element field class of an array field class with bt_field_class_array_borrow_element_field_class() and bt_field_class_array_borrow_element_field_class_const().

Structure field class

A structure field class is the class of a structure field.

A structure field contains an ordered list of zero or more members. Each structure field member is the instance of a structure field class member. A structure field class member has a name, a field class, and user attributes.

Create a structure field class with bt_field_class_structure_create().

A structure field class has the following specific property:

Members

Ordered list of members (zero or more) of the structure field class.

Each member has:

  • A name, unique amongst all the member names of the same structure field class.
  • A field class.
  • User attributes.

The instances (structure fields) of a structure field class have members which are instances of the corresponding structure field class members.

Append a member to a structure field class with bt_field_class_structure_append_member().

Borrow a member from a structure field class with bt_field_class_structure_borrow_member_by_index(), bt_field_class_structure_borrow_member_by_name(), bt_field_class_structure_borrow_member_by_index_const(), and bt_field_class_structure_borrow_member_by_name_const().

A structure field class member is a unique object: it belongs to the structure field class which contains it.

The type of a structure field class member is bt_field_class_structure_member.

Get the name of a structure field class member with bt_field_class_structure_member_get_name().

Borrow the field class of a structure field class member with bt_field_class_structure_member_borrow_field_class() and bt_field_class_structure_member_borrow_field_class_const().

Set the user attributes of a structure field class member with bt_field_class_structure_member_set_user_attributes().

Borrow the user attributes of a structure field class member with bt_field_class_structure_member_borrow_user_attributes() and bt_field_class_structure_member_borrow_user_attributes_const().

Option field classes

Option field classes are classes of option fields.

An option field either does or doesn't contain a field, called its optional field.

An option field class is an abstract field class: you cannot create one. An instance of an option field class either has a linked selector field (see Fields with links to other fields) or none. Therefore, the concrete option field classes are:

Option field class (instances without a linked selector field)

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_option_without_selector_create()

MIP 1 (available since Babeltrace 2.1)
bt_field_class_option_without_selector_field_location_create()

The class of an option field without a linked selector field has no specific properties.

Option field class (instances with a linked boolean selector field)

The linked selector field of an option field class instance (an option field) is a boolean field.

Option field class with a boolean selector field.

Create with, depending on the effective Message Interchange Protocol (MIP) version:

MIP 0

bt_field_class_option_with_selector_field_bool_create()

MIP 1 (available since Babeltrace 2.1)
bt_field_class_option_with_selector_field_location_bool_create()

The class of an option field with a linked boolean selector field has the following specific property:

Selector is reversed?

Whether or not the linked boolean selector field make the option field class instance (an option field) contain a field when it's BT_TRUE or when it's BT_FALSE.

If this property is BT_TRUE, then if the linked selector field has the value BT_FALSE, the option field contains a field.

Use bt_field_class_option_with_selector_field_bool_set_selector_is_reversed() and bt_field_class_option_with_selector_field_bool_selector_is_reversed().

Option field class (instances with a linked unsigned integer selector field)

The linked selector field of an option field class instance (an option field) is an unsigned integer field.

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_option_with_selector_field_integer_unsigned_create()

MIP 1 (available since Babeltrace 2.1)
bt_field_class_option_with_selector_field_location_integer_unsigned_create()

Pass an unsigned integer range set on creation to set which values of the selector field can make the option field contain a field.

The class of an option field with a linked unsigned integer selector field has the following specific property:

Unsigned integer ranges of the selector

If the linked unsigned integer selector field of an option field class instance (an option field) has a value which intersects with the unsigned integer ranges of the selector, then the option field contains a field.

You cannot change the unsigned integer ranges of the selector once the option field class is created.

Borrow the unsigned integer ranges of the selector from such an option field class with bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const().

Option field class (instances with a linked signed integer selector field)

The linked selector field of an option field class instance (an option field) is a signed integer field.

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_option_with_selector_field_integer_signed_create()

MIP 1 (available since Babeltrace 2.1)
bt_field_class_option_with_selector_field_location_integer_signed_create()

Pass a signed integer range set on creation to set which values of the selector field can make the option field contain a field.

The class of an option field class with a linked signed integer selector field has the following specific property:

Signed integer ranges of the selector

If the linked signed integer selector field of an option field class instance (an option field) has a value which intersects with the signed integer ranges of the selector, then the option field contains a field.

You cannot change the signed integer ranges of the selector once the option field class is created.

Borrow the signed integer ranges of the selector from such an option field class with bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const().

The classes of option fields with a linked selector field have one of the following common properties, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0: Selector field path

Field path to locate the linked selector field of an instance.

Borrow the selector field path of such an option field class with bt_field_class_option_with_selector_field_borrow_selector_field_path_const().

MIP 1: Selector field location (available since Babeltrace 2.1)

Field location to locate the linked selector field of an instance.

Borrow the selector field location of such an option field class with bt_field_class_option_with_selector_field_borrow_selector_field_location_const().

Option field classes have the following common property:

Optional field class

Class of the optional field of an instance (option field) of the option field class.

You cannot change the optional field class once the option field class is created.

Borrow the optional field class of an option field class with bt_field_class_option_borrow_field_class() and bt_field_class_option_borrow_field_class_const().

Variant field classes

Variant field classes are classes of variant fields.

A variant field contains a field amongst one or more possible fields.

Variant field classes contain one or more options. Each variant field class option has a name, a field class, user attributes, and integer ranges, depending on the exact type.

A variant field class is an abstract field class: you cannot create one. An instance of a variant field class either has a linked selector field (see Fields with links to other fields) or none. Therefore, the concrete variant field classes are:

Variant field class (instances without a linked selector field)

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_variant_create(), passing NULL as the selector field class.

MIP 1 (available since Babeltrace 2.1)
bt_field_class_variant_without_selector_field_location_create().

Append an option to such a variant field class with bt_field_class_variant_without_selector_append_option().

The class of a variant field without a linked selector field has no specific properties.

Variant field class (instances with a linked unsigned selector field)

The linked selector field of a variant field class instance (a variant field) is an unsigned integer field.

A variant field linked to an unsigned integer selector field.

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_variant_create(), passing an unsigned integer field class as the selector field class.

MIP 1 (available since Babeltrace 2.1)
bt_field_class_variant_with_selector_field_location_integer_unsigned_create().

Append an option to such a variant field class with bt_field_class_variant_with_selector_field_integer_unsigned_append_option().

Pass an unsigned integer range set when you append an option to set which values of the selector field can make the variant field have a given current option.

Borrow an option of such a variant field class with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const().

Variant field class (instances with a linked signed selector field)

The linked selector field of a variant field class instance (a variant field) is a signed integer field.

Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0

bt_field_class_variant_create(), passing an signed integer field class as the selector field class.

MIP 1 (available since Babeltrace 2.1)
bt_field_class_variant_with_selector_field_location_integer_signed_create().

Append an option to such a variant field class with bt_field_class_variant_with_selector_field_integer_signed_append_option().

Pass a signed integer range set when you append an option to set which values of the selector field can make the variant field have a given current option.

Borrow an option of such a variant field class with bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const().

The classes of variant fields with a linked selector field have one of the following common properties, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0: Selector field path

Field path to locate the linked selector field of an instance.

Borrow the selector field path of such a variant field class with bt_field_class_variant_with_selector_field_borrow_selector_field_path_const().

MIP 1: Selector field location (available since Babeltrace 2.1)

Field location to locate the linked selector field of an instance.

Borrow the selector field location of such a variant field class with bt_field_class_variant_with_selector_field_borrow_selector_field_location_const().

Variant field classes have the following common property:

Options

Options of the variant field class.

Each option has:

  • A name, unique amongst all the option names of the same variant field class.

    The name is optional when the effective Message Interchange Protocol version of the trace processing graph is 1 (available since Babeltrace 2.1).

  • A field class.
  • User attributes.

If an instance of the variant field class is linked to a selector field, then each option also has an integer range set. In that case, the ranges of a given option cannot overlap any range of any other option.

A variant field class must contain at least one option.

Depending on whether or not an instance of the variant field class has a linked selector field, append an option to a variant field class with bt_field_class_variant_without_selector_append_option(), bt_field_class_variant_with_selector_field_integer_unsigned_append_option(), or bt_field_class_variant_with_selector_field_integer_signed_append_option().

Get the number of options contained in a variant field class with bt_field_class_variant_get_option_count().

A variant field class option is a unique object: it belongs to the variant field class which contains it.

Borrow an option of any variant field class with bt_field_class_variant_borrow_option_by_index(), bt_field_class_variant_borrow_option_by_name(), bt_field_class_variant_borrow_option_by_index_const(), and bt_field_class_variant_borrow_option_by_name_const().

Those functions return the common bt_field_class_variant_option type. Get the name of a variant field class option with bt_field_class_variant_option_get_name(). Borrow the field class of a variant field class option with bt_field_class_variant_option_borrow_field_class() and bt_field_class_variant_option_borrow_field_class_const().

Borrow the option of the class of a variant field with a linked selector field with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const(), bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const(), bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const(), or bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const(), depending on the type of the selector field class.

Those functions return the bt_field_class_variant_with_selector_field_integer_unsigned_option or bt_field_class_variant_with_selector_field_integer_signed_option type. Upcast those types to the bt_field_class_variant_option type with bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const() or bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const().

Borrow ranges of an option from the class of a variant field with a linked selector field with bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const() or bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const().

Set the user attributes of a variant field class option with bt_field_class_variant_option_set_user_attributes().

Borrow the user attributes of a variant field class option with bt_field_class_variant_option_borrow_user_attributes() and bt_field_class_variant_option_borrow_user_attributes_const().

Fields with links to other fields

An instance of a dynamic BLOB field class (available since Babeltrace 2.1), a dynamic array field class, a option field class, or a variant field class may have a link to another, anterior field within the same packet or event.

This feature exists so that the linked field can contain the value of a dynamic property of the "dependent" field. Those properties are:

Dynamic BLOB field (available since Babeltrace 2.1)

The linked field, a unsigned integer field, contains the length (number of bytes) of the dynamic BLOB field.

Dynamic array field

The linked field, a unsigned integer field, contains the length (number of elements) of the dynamic array field.

Option field

The linked field, either a boolean field or an integer field, indicates whether or not the option field has a field.

Variant field
The linked field, an integer field, indicates the current selected field of a variant field.

Having a linked field is optional: you always set the field properties with a dedicated function anyway. For example, even if a dynamic array field is linked to an anterior length field, you must still set its integral length with bt_field_array_dynamic_set_length(). In that case, the value of the linked length field must match what you pass to bt_field_array_dynamic_set_length().

The purpose of this feature is to eventually save space when a sink component writes trace files: if, for example, the trace format can convey that an anterior, existing field represents the length of a dynamic array field, then the sink component doesn't need to write the length of the dynamic array field twice. This is the case of the Common Trace Format, for example.

A dynamic array field linked to an unsigned integer length field.

How exactly you link a dependent field to another field at the field class level depends on the effective Message Interchange Protocol (MIP) version of the trace processing graph:

MIP 0: Field path API

Pass the class of the linked field when you create the class of the dependent field.

For example, pass the unsigned integer length field class to bt_field_class_array_dynamic_create() to create a class of dynamic array field with a linked length field.

Then, when you call bt_stream_class_set_packet_context_field_class(), bt_stream_class_set_event_common_context_field_class(), bt_event_class_set_specific_context_field_class(), or bt_event_class_set_payload_field_class() with a field class containing a dependent field class with the class a linked field, the path to the linked field becomes available in the dependent field class. The functions to borrow said field path are:

MIP 1: Field location API (available since Babeltrace 2.1)

Pass the field location when you create the class of the dependent field.

For example, pass the length field location to bt_field_class_array_dynamic_with_length_field_location_create() to create a class of dynamic array field with a linked length field.

The functions to borrow the field location of a field class are:

Both field paths (MIP 0 API) and field locations (MIP 1 API; available since Babeltrace 2.1) indicate how to reach the linked field of a dependent field from some specific root scope (the starting point). The available scopes are:

BT_FIELD_PATH_SCOPE_PACKET_CONTEXT
BT_FIELD_LOCATION_SCOPE_PACKET_CONTEXT (available since Babeltrace 2.1)

Context field of the current packet.

See bt_packet_borrow_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_COMMON_CONTEXT
BT_FIELD_LOCATION_SCOPE_EVENT_COMMON_CONTEXT (available since Babeltrace 2.1)

Common context field of the current event.

See bt_event_borrow_common_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_SPECIFIC_CONTEXT
BT_FIELD_LOCATION_SCOPE_EVENT_SPECIFIC_CONTEXT (available since Babeltrace 2.1)

Specific context field of the current event.

See bt_event_borrow_specific_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD
BT_FIELD_LOCATION_SCOPE_EVENT_PAYLOAD (available since Babeltrace 2.1)

Payload field of the current event.

See bt_event_borrow_payload_field_const().

The difference between a field path and a field location is that a field path works with structure field member indexes while a field location works with structure field member names. The latter is more versatile because many fields may be candidates for the length/selector field of a dependent field (when they're all part of the same variant field).

The rules regarding the dependent field A vs. the linked field B are:

Type query

enum  bt_field_class_type {
  BT_FIELD_CLASS_TYPE_BOOL ,
  BT_FIELD_CLASS_TYPE_BIT_ARRAY ,
  BT_FIELD_CLASS_TYPE_INTEGER ,
  BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER ,
  BT_FIELD_CLASS_TYPE_SIGNED_INTEGER ,
  BT_FIELD_CLASS_TYPE_ENUMERATION ,
  BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION ,
  BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION ,
  BT_FIELD_CLASS_TYPE_REAL ,
  BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL ,
  BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL ,
  BT_FIELD_CLASS_TYPE_STRING ,
  BT_FIELD_CLASS_TYPE_BLOB ,
  BT_FIELD_CLASS_TYPE_STATIC_BLOB ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITH_LENGTH_FIELD ,
  BT_FIELD_CLASS_TYPE_STRUCTURE ,
  BT_FIELD_CLASS_TYPE_ARRAY ,
  BT_FIELD_CLASS_TYPE_STATIC_ARRAY ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD ,
  BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION ,
  BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_VARIANT ,
  BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD ,
  BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD ,
  __BT_FIELD_CLASS_TYPE_BIG_VALUE
}
 Field class type enumerators. More...
 
typedef enum bt_field_class_type bt_field_class_type
 Field class type enumerators.
 
bt_field_class_type bt_field_class_get_type (const bt_field_class *field_class)
 Returns the type enumerator of the field class field_class.
 
static bt_bool bt_field_class_type_is (const bt_field_class_type type, const bt_field_class_type other_type)
 Returns whether or not the field class type type conceptually is the field class type other_type.
 

Bit array field class

enum  bt_field_class_bit_array_add_flag_status {
  BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_OK ,
  BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_bit_array_add_flag(). More...
 
enum  bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status {
  BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_OK ,
  BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer(). More...
 
typedef enum bt_field_class_bit_array_add_flag_status bt_field_class_bit_array_add_flag_status
 Status codes for bt_field_class_bit_array_add_flag().
 
typedef char const *const * bt_field_class_bit_array_flag_label_array
 Array of const bit array field class flag labels.
 
typedef enum bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status
 Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
 
bt_field_classbt_field_class_bit_array_create (bt_trace_class *trace_class, uint64_t length)
 Creates a bit array field class with the length length from the trace class trace_class.
 
uint64_t bt_field_class_bit_array_get_length (const bt_field_class *field_class)
 Returns the length of the bit array field class field_class.
 
bt_field_class_bit_array_add_flag_status bt_field_class_bit_array_add_flag (bt_field_class *field_class, const char *label, const bt_integer_range_set_unsigned *index_ranges)
 Adds a flag to the bit array field class field_class having the label label and the bit index ranges index_ranges.
 
uint64_t bt_field_class_bit_array_get_flag_count (const bt_field_class *field_class)
 Returns the number of flags contained in the bit array field class field_class.
 
const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the flag at index index from the bit array field class field_class.
 
const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_label_const (const bt_field_class *field_class, const char *label)
 Borrows the flag having the label label from the bit array field class field_class.
 
bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer (const bt_field_class *field_class, uint64_t value_as_integer, bt_field_class_bit_array_flag_label_array *labels, uint64_t *count)
 Returns the labels of all the active flags of the bit array field class field_class for the set bits of value_as_integer (a bit array field value as an integer).
 
const char * bt_field_class_bit_array_flag_get_label (const bt_field_class_bit_array_flag *flag)
 Returns the label of the bit array field class flag flag.
 
const bt_integer_range_set_unsignedbt_field_class_bit_array_flag_borrow_index_ranges_const (const bt_field_class_bit_array_flag *flag)
 Borrows the bit index ranges from the bit array field class flag flag.
 

Integer field class

enum  bt_field_class_integer_field_value_hint { BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL }
 Integer field class field value hint. More...
 
enum  bt_field_class_integer_preferred_display_base {
  BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY ,
  BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL ,
  BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL ,
  BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL
}
 Integer field class preferred display bases. More...
 
typedef enum bt_field_class_integer_field_value_hint bt_field_class_integer_field_value_hint
 Integer field class field value hint.
 
typedef enum bt_field_class_integer_preferred_display_base bt_field_class_integer_preferred_display_base
 Integer field class preferred display bases.
 
void bt_field_class_integer_set_field_value_range (bt_field_class *field_class, uint64_t n)
 Sets the field value range of the integer field class field_class to n.
 
uint64_t bt_field_class_integer_get_field_value_range (const bt_field_class *field_class)
 Returns the field value range of the integer field class field_class.
 
void bt_field_class_integer_set_field_value_hints (bt_field_class *field_class, uint64_t hints)
 Sets the field value hints of the integer field class field_class to a bitwise disjunction (OR) of bt_field_class_integer_field_value_hint enumerators.
 
uint64_t bt_field_class_integer_get_field_value_hints (const bt_field_class *field_class)
 Returns the field value hints of the integer field class field_class.
 
static bt_bool bt_field_class_integer_has_field_value_hint (const bt_field_class *const field_class, const bt_field_class_integer_field_value_hint hint)
 Returns whether or not the integer field class field_class has the field value hint hint.
 
void bt_field_class_integer_set_preferred_display_base (bt_field_class *field_class, bt_field_class_integer_preferred_display_base preferred_display_base)
 Sets the preferred display base of the integer field class field_class to preferred_display_base.
 
bt_field_class_integer_preferred_display_base bt_field_class_integer_get_preferred_display_base (const bt_field_class *field_class)
 Returns the preferred display base of the integer field class field_class.
 

Enumeration field class

enum  bt_field_class_enumeration_get_mapping_labels_for_value_status {
  BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_OK ,
  BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value(). More...
 
enum  bt_field_class_enumeration_add_mapping_status {
  BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OK ,
  BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_enumeration_unsigned_add_mapping() and bt_field_class_enumeration_signed_add_mapping(). More...
 
typedef char const *const * bt_field_class_enumeration_mapping_label_array
 Array of const enumeration field class mapping labels.
 
typedef enum bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_get_mapping_labels_for_value_status
 Status codes for bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().
 
typedef enum bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_add_mapping_status
 Status codes for bt_field_class_enumeration_unsigned_add_mapping() and bt_field_class_enumeration_signed_add_mapping().
 

BLOB field class (available since Babeltrace 2.1)

enum  bt_field_class_blob_set_media_type_status {
  BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OK ,
  BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_blob_set_media_type(). More...
 
typedef enum bt_field_class_blob_set_media_type_status bt_field_class_blob_set_media_type_status
 Status codes for bt_field_class_blob_set_media_type().
 
bt_field_classbt_field_class_blob_static_create (bt_trace_class *trace_class, uint64_t length)
 Creates a static BLOB field class having the length length from the trace class trace_class.
 
bt_field_classbt_field_class_blob_dynamic_without_length_field_location_create (bt_trace_class *trace_class)
 Creates a dynamic BLOB field class (instances without a linked length field) from the trace class trace_class.
 
bt_field_classbt_field_class_blob_dynamic_with_length_field_location_create (bt_trace_class *trace_class, const bt_field_location *length_field_location)
 Creates a dynamic BLOB field class (instances with a linked length field) having the length field location length_field_location from the trace class trace_class.
 
uint64_t bt_field_class_blob_static_get_length (const bt_field_class *field_class)
 Returns the length of the static BLOB field class field_class.
 
const bt_field_location * bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const (const bt_field_class *field_class)
 Borrows the length field location from the dynamic BLOB field class (instances with a linked length field) field_class.
 
bt_field_class_blob_set_media_type_status bt_field_class_blob_set_media_type (bt_field_class *field_class, const char *media_type)
 Sets the IANA media type of the BLOB field class field_class to a copy of media_type.
 
const char * bt_field_class_blob_get_media_type (const bt_field_class *field_class)
 Returns the IANA media type of the BLOB field class field_class.
 

Structure field class

enum  bt_field_class_structure_append_member_status {
  BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK ,
  BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_structure_append_member(). More...
 
typedef enum bt_field_class_structure_append_member_status bt_field_class_structure_append_member_status
 Status codes for bt_field_class_structure_append_member().
 
bt_field_classbt_field_class_structure_create (bt_trace_class *trace_class)
 Creates a structure field class from the trace class trace_class.
 
bt_field_class_structure_append_member_status bt_field_class_structure_append_member (bt_field_class *field_class, const char *name, bt_field_class *member_field_class)
 Appends a member to the structure field class field_class having the name name and the field class member_field_class.
 
uint64_t bt_field_class_structure_get_member_count (const bt_field_class *field_class)
 Returns the number of members contained in the structure field class field_class.
 
bt_field_class_structure_memberbt_field_class_structure_borrow_member_by_index (bt_field_class *field_class, uint64_t index)
 Borrows the member at index index from the structure field class field_class.
 
const bt_field_class_structure_memberbt_field_class_structure_borrow_member_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the member at index index from the structure field class field_class (const version).
 
bt_field_class_structure_memberbt_field_class_structure_borrow_member_by_name (bt_field_class *field_class, const char *name)
 Borrows the member having the name name from the structure field class field_class.
 
const bt_field_class_structure_memberbt_field_class_structure_borrow_member_by_name_const (const bt_field_class *field_class, const char *name)
 Borrows the member having the name name from the structure field class field_class (const version).
 

Variant field class: instances without a linked selector field

enum  bt_field_class_variant_without_selector_append_option_status {
  BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK ,
  BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_variant_without_selector_append_option(). More...
 
typedef enum bt_field_class_variant_without_selector_append_option_status bt_field_class_variant_without_selector_append_option_status
 Status codes for bt_field_class_variant_without_selector_append_option().
 
bt_field_classbt_field_class_variant_without_selector_field_location_create (bt_trace_class *trace_class)
 Creates an empty variant field class (instances without a linked selector field) from the trace class trace_class.
 
bt_field_class_variant_without_selector_append_option_status bt_field_class_variant_without_selector_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class)
 Appends an option to the variant field class (instances without a linked selector field) field_class having the name name and the field class option_field_class.
 

Variant field class: instances with a linked selector field

enum  bt_field_class_variant_with_selector_field_integer_append_option_status {
  BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK ,
  BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROR
}
 Status codes for bt_field_class_variant_with_selector_field_integer_unsigned_append_option() and bt_field_class_variant_with_selector_field_integer_signed_append_option(). More...
 
typedef enum bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_append_option_status
 Status codes for bt_field_class_variant_with_selector_field_integer_unsigned_append_option() and bt_field_class_variant_with_selector_field_integer_signed_append_option().
 
const bt_field_pathbt_field_class_variant_with_selector_field_borrow_selector_field_path_const (const bt_field_class *field_class)
 Borrows the selector field path from the variant field class (instances with a linked selector field) field_class.
 
const bt_field_location * bt_field_class_variant_with_selector_field_borrow_selector_field_location_const (const bt_field_class *field_class)
 Borrows the selector field location from the variant field class (instances with a linked selector field) field_class.
 

Type

typedef struct bt_field_class bt_field_class
 Field class.
 

Enumeration field class mapping

typedef struct bt_field_class_enumeration_mapping bt_field_class_enumeration_mapping
 Enumeration field class mapping.
 
uint64_t bt_field_class_enumeration_get_mapping_count (const bt_field_class *field_class)
 Returns the number of mappings contained in the enumeration field class field_class.
 
const char * bt_field_class_enumeration_mapping_get_label (const bt_field_class_enumeration_mapping *mapping)
 Returns the label of the enumeration field class mapping mapping.
 

Unsigned enumeration field class mapping

typedef struct bt_field_class_enumeration_unsigned_mapping bt_field_class_enumeration_unsigned_mapping
 Unsigned enumeration field class mapping.
 
const bt_integer_range_set_unsignedbt_field_class_enumeration_unsigned_mapping_borrow_ranges_const (const bt_field_class_enumeration_unsigned_mapping *mapping)
 Borrows the unsigned integer ranges from the unsigned enumeration field class mapping mapping.
 
static const bt_field_class_enumeration_mappingbt_field_class_enumeration_unsigned_mapping_as_mapping_const (const bt_field_class_enumeration_unsigned_mapping *mapping)
 Upcasts the unsigned enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.
 

Signed enumeration field class mapping

typedef struct bt_field_class_enumeration_signed_mapping bt_field_class_enumeration_signed_mapping
 Signed enumeration field class mapping.
 
const bt_integer_range_set_signedbt_field_class_enumeration_signed_mapping_borrow_ranges_const (const bt_field_class_enumeration_signed_mapping *mapping)
 Borrows the signed integer ranges from the signed enumeration field class mapping mapping.
 
static const bt_field_class_enumeration_mappingbt_field_class_enumeration_signed_mapping_as_mapping_const (const bt_field_class_enumeration_signed_mapping *mapping)
 Upcasts the signed enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.
 

Structure field class member

typedef struct bt_field_class_structure_member bt_field_class_structure_member
 Structure field class member.
 
const char * bt_field_class_structure_member_get_name (const bt_field_class_structure_member *member)
 Returns the name of the structure field class member member.
 
bt_field_classbt_field_class_structure_member_borrow_field_class (bt_field_class_structure_member *member)
 Borrows the field class from the structure field class member member.
 
const bt_field_classbt_field_class_structure_member_borrow_field_class_const (const bt_field_class_structure_member *member)
 Borrows the field class from the structure field class member member (const version).
 
void bt_field_class_structure_member_set_user_attributes (bt_field_class_structure_member *member, const bt_value *user_attributes)
 Sets the user attributes of the structure field class member member to user_attributes.
 
bt_valuebt_field_class_structure_member_borrow_user_attributes (bt_field_class_structure_member *member)
 Borrows the user attributes of the structure field class member member.
 
const bt_valuebt_field_class_structure_member_borrow_user_attributes_const (const bt_field_class_structure_member *member)
 Borrows the user attributes of the structure field class member member (const version).
 

Variant field class option

typedef struct bt_field_class_variant_option bt_field_class_variant_option
 Variant field class option.
 
const char * bt_field_class_variant_option_get_name (const bt_field_class_variant_option *option)
 Returns the name of the variant field class option option.
 
bt_field_classbt_field_class_variant_option_borrow_field_class (bt_field_class_variant_option *option)
 Borrows the field class from the variant field class option option.
 
const bt_field_classbt_field_class_variant_option_borrow_field_class_const (const bt_field_class_variant_option *option)
 Borrows the field class from the variant field class option option (const version).
 
void bt_field_class_variant_option_set_user_attributes (bt_field_class_variant_option *option, const bt_value *user_attributes)
 Sets the user attributes of the variant field class option option to user_attributes.
 
bt_valuebt_field_class_variant_option_borrow_user_attributes (bt_field_class_variant_option *option)
 Borrows the user attributes of the variant field class option option.
 
const bt_valuebt_field_class_variant_option_borrow_user_attributes_const (const bt_field_class_variant_option *option)
 Borrows the user attributes of the variant field class option option (const version).
 

Variant field class option: instances with a linked unsigned integer selector field

typedef struct bt_field_class_variant_with_selector_field_integer_unsigned_option bt_field_class_variant_with_selector_field_integer_unsigned_option
 Variant field class option (instances with a linked unsigned integer selector field).
 
const bt_integer_range_set_unsignedbt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const (const bt_field_class_variant_with_selector_field_integer_unsigned_option *option)
 Borrows the unsigned integer ranges from the variant field class option (instances with a linked unsigned integer selector field) option.
 
static const bt_field_class_variant_optionbt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const (const bt_field_class_variant_with_selector_field_integer_unsigned_option *option)
 Upcasts the variant field class option (instances with a linked unsigned integer selector field) option to the common bt_field_class_variant_option type.
 

Variant field class option: instances with a linked signed integer selector field

typedef struct bt_field_class_variant_with_selector_field_integer_signed_option bt_field_class_variant_with_selector_field_integer_signed_option
 Variant field class option (instances with a linked signed integer selector field).
 
const bt_integer_range_set_signedbt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const (const bt_field_class_variant_with_selector_field_integer_signed_option *option)
 Borrows the signed integer ranges from the variant field class option (instances with a linked signed integer selector field) option.
 
static const bt_field_class_variant_optionbt_field_class_variant_with_selector_field_integer_signed_option_as_option_const (const bt_field_class_variant_with_selector_field_integer_signed_option *option)
 Upcasts the variant field class option (instances with a linked signed integer selector field) option to the common bt_field_class_variant_option type.
 

Common property

void bt_field_class_set_user_attributes (bt_field_class *field_class, const bt_value *user_attributes)
 Sets the user attributes of the field class field_class to user_attributes.
 
bt_valuebt_field_class_borrow_user_attributes (bt_field_class *field_class)
 Borrows the user attributes of the field class field_class.
 
const bt_valuebt_field_class_borrow_user_attributes_const (const bt_field_class *field_class)
 Borrows the user attributes of the field class field_class (const version).
 

Effective Message Interchange Protocol (MIP) version access

uint64_t bt_field_class_get_graph_mip_version (const bt_field_class *field_class)
 Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which field_class was created.
 

Boolean field class

bt_field_classbt_field_class_bool_create (bt_trace_class *trace_class)
 Creates a boolean field class from the trace class trace_class.
 

Unsigned integer field class

bt_field_classbt_field_class_integer_unsigned_create (bt_trace_class *trace_class)
 Creates an unsigned integer field class from the trace class trace_class.
 

Signed integer field class

bt_field_classbt_field_class_integer_signed_create (bt_trace_class *trace_class)
 Creates an signed integer field class from the trace class trace_class.
 

Single-precision real field class

bt_field_classbt_field_class_real_single_precision_create (bt_trace_class *trace_class)
 Creates a single-precision real field class from the trace class trace_class.
 

Double-precision real field class

bt_field_classbt_field_class_real_double_precision_create (bt_trace_class *trace_class)
 Creates a double-precision real field class from the trace class trace_class.
 

Unsigned enumeration field class

bt_field_classbt_field_class_enumeration_unsigned_create (bt_trace_class *trace_class)
 Creates an unsigned enumeration field class from the trace class trace_class.
 
bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_unsigned_add_mapping (bt_field_class *field_class, const char *label, const bt_integer_range_set_unsigned *ranges)
 Adds a mapping to the unsigned enumeration field class field_class having the label label and the unsigned integer ranges ranges.
 
const bt_field_class_enumeration_unsigned_mappingbt_field_class_enumeration_unsigned_borrow_mapping_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the mapping at index index from the unsigned enumeration field class field_class.
 
const bt_field_class_enumeration_unsigned_mappingbt_field_class_enumeration_unsigned_borrow_mapping_by_label_const (const bt_field_class *field_class, const char *label)
 Borrows the mapping having the label label from the unsigned enumeration field class field_class.
 
bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_unsigned_get_mapping_labels_for_value (const bt_field_class *field_class, uint64_t value, bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count)
 Returns an array of all the labels of the mappings of the unsigned enumeration field class field_class of which the unsigned integer ranges contain the integral value value.
 

Signed enumeration field class

bt_field_classbt_field_class_enumeration_signed_create (bt_trace_class *trace_class)
 Creates a signed enumeration field class from the trace class trace_class.
 
bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_signed_add_mapping (bt_field_class *field_class, const char *label, const bt_integer_range_set_signed *ranges)
 Adds a mapping to the signed enumeration field class field_class having the label label and the signed integer ranges ranges.
 
const bt_field_class_enumeration_signed_mappingbt_field_class_enumeration_signed_borrow_mapping_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the mapping at index index from the signed enumeration field class field_class.
 
const bt_field_class_enumeration_signed_mappingbt_field_class_enumeration_signed_borrow_mapping_by_label_const (const bt_field_class *field_class, const char *label)
 Borrows the mapping having the label label from the signed enumeration field class field_class.
 
bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_signed_get_mapping_labels_for_value (const bt_field_class *field_class, int64_t value, bt_field_class_enumeration_mapping_label_array *labels, uint64_t *count)
 Returns an array of all the labels of the mappings of the signed enumeration field class field_class of which the signed integer ranges contain the integral value value.
 

String field class

bt_field_classbt_field_class_string_create (bt_trace_class *trace_class)
 Creates a string field class from the trace class trace_class.
 

Array field class

bt_field_classbt_field_class_array_borrow_element_field_class (bt_field_class *field_class)
 Borrows the element field class from the array field class field_class.
 
const bt_field_classbt_field_class_array_borrow_element_field_class_const (const bt_field_class *field_class)
 Borrows the element field class from the array field class field_class (const version).
 

Static array field class

bt_field_classbt_field_class_array_static_create (bt_trace_class *trace_class, bt_field_class *element_field_class, uint64_t length)
 Creates a static array field class having the element field class element_field_class and the length length from the trace class trace_class.
 
uint64_t bt_field_class_array_static_get_length (const bt_field_class *field_class)
 Returns the length of the static array field class field_class.
 

Dynamic array field class

bt_field_classbt_field_class_array_dynamic_create (bt_trace_class *trace_class, bt_field_class *element_field_class, bt_field_class *length_field_class)
 Creates a dynamic array field class having the element field class element_field_class from the trace class trace_class.
 
bt_field_classbt_field_class_array_dynamic_without_length_field_location_create (bt_trace_class *trace_class, bt_field_class *element_field_class)
 Creates a dynamic array field class (instances without a linked length field) having the element field class element_field_class from the trace class trace_class.
 

Dynamic array field class: instances with linked length field

bt_field_classbt_field_class_array_dynamic_with_length_field_location_create (bt_trace_class *trace_class, bt_field_class *element_field_class, const bt_field_location *length_field_location)
 Creates a dynamic array field class (instances with a linked length field) having the element field class element_field_class and the length field location length_field_location from the trace class trace_class.
 
const bt_field_pathbt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const (const bt_field_class *field_class)
 Borrows the length field path from the dynamic array field class (instances with a linked length field) field_class.
 
const bt_field_location * bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const (const bt_field_class *field_class)
 Borrows the length field location from the dynamic array field class (instances with a linked length field) field_class.
 

Option field class

bt_field_classbt_field_class_option_borrow_field_class (bt_field_class *field_class)
 Borrows the optional field class from the option field class field_class.
 
const bt_field_classbt_field_class_option_borrow_field_class_const (const bt_field_class *field_class)
 Borrows the optional field class from the option field class field_class (const version).
 

Option field class: instances without a linked selector field

bt_field_classbt_field_class_option_without_selector_create (bt_trace_class *trace_class, bt_field_class *optional_field_class)
 Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.
 
bt_field_classbt_field_class_option_without_selector_field_location_create (bt_trace_class *trace_class, bt_field_class *optional_field_class)
 Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.
 

Option field class: instances with a linked selector field

const bt_field_pathbt_field_class_option_with_selector_field_borrow_selector_field_path_const (const bt_field_class *field_class)
 Borrows the selector field path from the option field class (instances with a linked selector field) field_class.
 
const bt_field_location * bt_field_class_option_with_selector_field_borrow_selector_field_location_const (const bt_field_class *field_class)
 Borrows the selector field location from the option field class (instances with a linked selector field) field_class.
 

Option field class: instances with a linked boolean selector field

bt_field_classbt_field_class_option_with_selector_field_bool_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class)
 Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class from the trace class trace_class.
 
bt_field_classbt_field_class_option_with_selector_field_location_bool_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location)
 Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
 
void bt_field_class_option_with_selector_field_bool_set_selector_is_reversed (bt_field_class *field_class, bt_bool selector_is_reversed)
 Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed.
 
bt_bool bt_field_class_option_with_selector_field_bool_selector_is_reversed (const bt_field_class *field_class)
 Returns whether or not the selector of the option field class (with a boolean selector field) is reversed.
 

Option field class: instances with a linked unsigned integer selector field

bt_field_classbt_field_class_option_with_selector_field_integer_unsigned_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class, const bt_integer_range_set_unsigned *ranges)
 Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class.
 
bt_field_classbt_field_class_option_with_selector_field_location_integer_unsigned_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_unsigned *ranges)
 Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
 
const bt_integer_range_set_unsignedbt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const (const bt_field_class *field_class)
 Borrows the unsigned integer ranges from the option field class (with an unsigned integer selector field) field_class.
 

Option field class: instances with a linked signed integer selector field

bt_field_classbt_field_class_option_with_selector_field_integer_signed_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class, const bt_integer_range_set_signed *ranges)
 Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class from the trace class trace_class.
 
bt_field_classbt_field_class_option_with_selector_field_location_integer_signed_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_signed *ranges)
 Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
 
const bt_integer_range_set_signedbt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const (const bt_field_class *field_class)
 Borrows the signed integer ranges from the option field class (with a signed integer selector field) field_class.
 

Variant field class

bt_field_classbt_field_class_variant_create (bt_trace_class *trace_class, bt_field_class *selector_field_class)
 Creates an empty variant field class from the trace class trace_class.
 
uint64_t bt_field_class_variant_get_option_count (const bt_field_class *field_class)
 Returns the number of options contained in the variant field class field_class.
 
bt_field_class_variant_optionbt_field_class_variant_borrow_option_by_index (bt_field_class *field_class, uint64_t index)
 Borrows the option at index index from the variant field class field_class.
 
const bt_field_class_variant_optionbt_field_class_variant_borrow_option_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the option at index index from the variant field class field_class (const version).
 
bt_field_class_variant_optionbt_field_class_variant_borrow_option_by_name (bt_field_class *field_class, const char *name)
 Borrows the option having the name name from the variant field class field_class.
 
const bt_field_class_variant_optionbt_field_class_variant_borrow_option_by_name_const (const bt_field_class *field_class, const char *name)
 Borrows the option having the name name from the variant field class field_class (const version).
 

Variant field class: instances with a linked unsigned integer selector field

bt_field_classbt_field_class_variant_with_selector_field_location_integer_unsigned_create (bt_trace_class *trace_class, const bt_field_location *selector_field_location)
 Creates an empty variant field class (instances with a linked unsigned integer selector field) having the selector field location selector_field_location from the trace class trace_class.
 
bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_unsigned_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_unsigned *ranges)
 Appends an option to the variant field class (instances with a linked unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges.
 
const bt_field_class_variant_with_selector_field_integer_unsigned_optionbt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the option at index index from the variant field class (instances with a linked unsigned integer selector field) field_class.
 
const bt_field_class_variant_with_selector_field_integer_unsigned_optionbt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const (const bt_field_class *field_class, const char *name)
 Borrows the option having the name name from the variant field class (instances with a linked unsigned integer selector field) field_class.
 

Variant field class: instances with a linked signed integer selector field

bt_field_classbt_field_class_variant_with_selector_field_location_integer_signed_create (bt_trace_class *trace_class, const bt_field_location *selector_field_location)
 Creates an empty variant field class (instances with a linked signed integer selector field) having the selector field location selector_field_location from the trace class trace_class.
 
bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_signed_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_signed *ranges)
 Appends an option to the variant field class (instances with a linked signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges.
 
const bt_field_class_variant_with_selector_field_integer_signed_optionbt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const (const bt_field_class *field_class, uint64_t index)
 Borrows the option at index index from the variant field class (instances with a linked signed integer selector field) field_class.
 
const bt_field_class_variant_with_selector_field_integer_signed_optionbt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const (const bt_field_class *field_class, const char *name)
 Borrows the option having the name name from the variant field class (instances with a linked signed integer selector field) field_class.
 

Reference count

void bt_field_class_get_ref (const bt_field_class *field_class)
 Increments the reference count of the field class field_class.
 
void bt_field_class_put_ref (const bt_field_class *field_class)
 Decrements the reference count of the field class field_class.
 
#define BT_FIELD_CLASS_PUT_REF_AND_RESET(_field_class)
 Decrements the reference count of the field class _field_class, and then sets _field_class to NULL.
 
#define BT_FIELD_CLASS_MOVE_REF(_dst, _src)
 Decrements the reference count of the field class _dst, sets _dst to _src, and then sets _src to NULL.
 

Typedef Documentation

◆ bt_field_class_bit_array_add_flag_status

◆ bt_field_class_bit_array_flag_label_array

typedef char const* const* bt_field_class_bit_array_flag_label_array

Array of const bit array field class flag labels.

Returned by bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().

Since
Babeltrace 2.1

◆ bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status

◆ bt_field_class_integer_field_value_hint

Integer field class field value hint.

Since
Babeltrace 2.1

◆ bt_field_class_enumeration_mapping_label_array

◆ bt_field_class_blob_set_media_type_status

Enumeration Type Documentation

◆ bt_field_class_type

Field class type enumerators.

Enumerator
BT_FIELD_CLASS_TYPE_BOOL 

Boolean field class.

BT_FIELD_CLASS_TYPE_BIT_ARRAY 

Bit array field class.

BT_FIELD_CLASS_TYPE_INTEGER 

Integer field class.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER 

Unsigned integer field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_INTEGER.

BT_FIELD_CLASS_TYPE_SIGNED_INTEGER 

Signed integer field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_INTEGER.

BT_FIELD_CLASS_TYPE_ENUMERATION 

Enumeration field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_INTEGER.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_UNSIGNED_ENUMERATION 

Unsigned enumeration field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_ENUMERATION and BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER.

BT_FIELD_CLASS_TYPE_SIGNED_ENUMERATION 

Signed enumeration field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_ENUMERATION and BT_FIELD_CLASS_TYPE_SIGNED_INTEGER.

BT_FIELD_CLASS_TYPE_REAL 

Real field class.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_SINGLE_PRECISION_REAL 

Single-precision real field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_REAL.

BT_FIELD_CLASS_TYPE_DOUBLE_PRECISION_REAL 

Double-precision real field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_REAL.

BT_FIELD_CLASS_TYPE_STRING 

String field class..

BT_FIELD_CLASS_TYPE_BLOB 

BLOB field class.

No field class has this type: use it with bt_field_class_type_is().

Since
Babeltrace 2.1
BT_FIELD_CLASS_TYPE_STATIC_BLOB 

Static BLOB field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_BLOB.

Since
Babeltrace 2.1
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB 

Dynamic BLOB field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_BLOB.

No field class has this type: use it with bt_field_class_type_is().

Since
Babeltrace 2.1
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD 

Dynamic BLOB field class (instances without a linked length field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB.

Since
Babeltrace 2.1
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITH_LENGTH_FIELD 

Dynamic BLOB field class (instances with a linked length field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB.

Since
Babeltrace 2.1
BT_FIELD_CLASS_TYPE_STRUCTURE 

Structure field class.

BT_FIELD_CLASS_TYPE_ARRAY 

Array field class.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_STATIC_ARRAY 

Static array field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_ARRAY.

BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY 

Dynamic array field class.

This type conceptually inherits BT_FIELD_CLASS_TYPE_ARRAY.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD 

Dynamic array field class (instances without a linked length field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY.

BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD 

Dynamic array field class (instances with a linked length field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY.

BT_FIELD_CLASS_TYPE_OPTION 

Option field class.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD 

Option field class (instances without a linked selector field).

BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD 

Option field class (instances with a linked selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD 

Option field class (instances with a linked boolean selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD.

BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD 

Option field class (instances with a linked integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD 

Option field class (instances with a linked unsigned integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD.

BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD 

Option field class (instances with a linked signed integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD.

BT_FIELD_CLASS_TYPE_VARIANT 

Variant field class.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD 

Variant field class (instances without a linked selector field).

BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD 

Variant field class (instances with a linked selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD 

Variant field class (instances with a linked integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD.

No field class has this type: use it with bt_field_class_type_is().

BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD 

Option field class (instances with a linked unsigned integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD.

BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD 

Option field class (instances with a linked signed integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD.

◆ bt_field_class_bit_array_add_flag_status

Status codes for bt_field_class_bit_array_add_flag().

Since
Babeltrace 2.1
Enumerator
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_OK 

Success.

BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status

Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().

Since
Babeltrace 2.1
Enumerator
BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_OK 

Success.

BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_integer_field_value_hint

Integer field class field value hint.

Since
Babeltrace 2.1
Enumerator
BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL 

Expect small integer field values.

◆ bt_field_class_integer_preferred_display_base

Integer field class preferred display bases.

Enumerator
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY 

Binary (2).

BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL 

Octal (8).

BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL 

Decimal (10).

BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL 

Hexadecimal (16).

◆ bt_field_class_enumeration_get_mapping_labels_for_value_status

Status codes for bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().

Enumerator
BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_OK 

Success.

BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_enumeration_add_mapping_status

Status codes for bt_field_class_enumeration_unsigned_add_mapping() and bt_field_class_enumeration_signed_add_mapping().

Enumerator
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OK 

Success.

BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_blob_set_media_type_status

Status codes for bt_field_class_blob_set_media_type().

Since
Babeltrace 2.1
Enumerator
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OK 

Success.

BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_structure_append_member_status

Status codes for bt_field_class_structure_append_member().

Enumerator
BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK 

Success.

BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_variant_without_selector_append_option_status

Status codes for bt_field_class_variant_without_selector_append_option().

Enumerator
BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK 

Success.

BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROR 

Out of memory.

◆ bt_field_class_variant_with_selector_field_integer_append_option_status

Status codes for bt_field_class_variant_with_selector_field_integer_unsigned_append_option() and bt_field_class_variant_with_selector_field_integer_signed_append_option().

Enumerator
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK 

Success.

BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROR 

Out of memory.

Macro Definition Documentation

◆ BT_FIELD_CLASS_PUT_REF_AND_RESET

#define BT_FIELD_CLASS_PUT_REF_AND_RESET ( _field_class)

Decrements the reference count of the field class _field_class, and then sets _field_class to NULL.

Parameters
_field_class

Field class of which to decrement the reference count.

Can contain NULL.

Precondition
_field_class is an assignable expression.

◆ BT_FIELD_CLASS_MOVE_REF

#define BT_FIELD_CLASS_MOVE_REF ( _dst,
_src )

Decrements the reference count of the field class _dst, sets _dst to _src, and then sets _src to NULL.

This macro effectively moves a field class reference from the expression _src to the expression _dst, putting the existing _dst reference.

Parameters
_dst

Destination expression.

Can contain NULL.

_src

Source expression.

Can contain NULL.

Precondition
_dst is an assignable expression.
_src is an assignable expression.

Function Documentation

◆ bt_field_class_get_type()

bt_field_class_type bt_field_class_get_type ( const bt_field_class * field_class)
extern

Returns the type enumerator of the field class field_class.

Parameters
[in]field_classField class of which to get the type enumerator
Returns
Type enumerator of field_class.
Precondition
field_class is not NULL.
See also
bt_field_class_type_is() — Returns whether or not the type of a field class conceptually is a given type.

◆ bt_field_class_type_is()

static bt_bool bt_field_class_type_is ( const bt_field_class_type type,
const bt_field_class_type other_type )
inlinestatic

Returns whether or not the field class type type conceptually is the field class type other_type.

For example, an unsigned integer field class conceptually is an integer field class, so

static bt_bool bt_field_class_type_is(const bt_field_class_type type, const bt_field_class_type other_type)
Returns whether or not the field class type type conceptually is the field class type other_type.
Definition field-class.h:2015
@ BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER
Unsigned integer field class.
Definition field-class.h:1661
@ BT_FIELD_CLASS_TYPE_INTEGER
Integer field class.
Definition field-class.h:1653

returns BT_TRUE.

Parameters
[in]typeField class type to check against other_type.
[in]other_typeField class type against which to check type.
Returns
BT_TRUE if type conceptually is other_type.
See also
bt_field_class_get_type() — Returns the type enumerator of a field class.

◆ bt_field_class_set_user_attributes()

void bt_field_class_set_user_attributes ( bt_field_class * field_class,
const bt_value * user_attributes )
extern

Sets the user attributes of the field class field_class to user_attributes.

See the user attributes property.

Note
When you create a field class with one of the bt_field_class_*_create() functions, the initial user attributes of the field class is an empty map value. Therefore you can borrow it with bt_field_class_borrow_user_attributes() and fill it directly instead of setting a new one with this function.
Parameters
[in]field_classField class of which to set the user attributes to user_attributes.
[in]user_attributesNew user attributes of field_class.
Precondition
field_class is not NULL.
field_class is not frozen.
user_attributes is not NULL.
user_attributes is a map value (bt_value_is_map() returns BT_TRUE).
See also
bt_field_class_borrow_user_attributes() — Borrows the user attributes of a field class.

◆ bt_field_class_borrow_user_attributes()

bt_value * bt_field_class_borrow_user_attributes ( bt_field_class * field_class)
extern

Borrows the user attributes of the field class field_class.

See the user attributes property.

Note
When you create a field class with one of the bt_field_class_*_create() functions, the initial user attributes of the field class is an empty map value.
Parameters
[in]field_classField class from which to borrow the user attributes.
Returns
User attributes of field_class (a map value).
Precondition
field_class is not NULL.
See also
bt_field_class_set_user_attributes() — Sets the user attributes of a field class.
bt_field_class_borrow_user_attributes_const()const version of this function.

◆ bt_field_class_borrow_user_attributes_const()

const bt_value * bt_field_class_borrow_user_attributes_const ( const bt_field_class * field_class)
extern

Borrows the user attributes of the field class field_class (const version).

See bt_field_class_borrow_user_attributes().

◆ bt_field_class_get_graph_mip_version()

uint64_t bt_field_class_get_graph_mip_version ( const bt_field_class * field_class)
extern

Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which field_class was created.

Parameters
[in]field_classField class of which to get the effective MIP version.
Returns
Effective MIP version of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
See also
bt_self_component_get_graph_mip_version() — Returns the effective MIP version of the trace processing graph which contains a given component.

◆ bt_field_class_bool_create()

bt_field_class * bt_field_class_bool_create ( bt_trace_class * trace_class)
extern

Creates a boolean field class from the trace class trace_class.

On success, the returned boolean field class has the following property value:

Property Value
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a boolean field class.
Returns
New boolean field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_bit_array_create()

bt_field_class * bt_field_class_bit_array_create ( bt_trace_class * trace_class,
uint64_t length )
extern

Creates a bit array field class with the length length from the trace class trace_class.

On success, the returned bit array field class has the following property values:

Property Value
Length length
Message Interchange Protocol version 1: flags (available since Babeltrace 2.1) None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a bit array field class.
[in]lengthLength (number of bits) of the instances of the bit array field class to create.
Returns
New bit array field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
0 < length ≤ 64.

◆ bt_field_class_bit_array_get_length()

uint64_t bt_field_class_bit_array_get_length ( const bt_field_class * field_class)
extern

Returns the length of the bit array field class field_class.

See the length property.

Parameters
[in]field_classBit array field class of which to get the length.
Returns
Length of field_class.
Precondition
field_class is not NULL.
field_class is a bit array field class.

◆ bt_field_class_bit_array_add_flag()

bt_field_class_bit_array_add_flag_status bt_field_class_bit_array_add_flag ( bt_field_class * field_class,
const char * label,
const bt_integer_range_set_unsigned * index_ranges )
extern

Adds a flag to the bit array field class field_class having the label label and the bit index ranges index_ranges.

See the flags property.

Parameters
[in]field_classBit array field class to which to add a flag having the label label and the bit index ranges index_ranges.
[in]labelLabel of the flag to add to field_class (copied).
[in]index_rangesBit index ranges of the flag to add to field_class.
Return values
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_OKSuccess.
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_MEMORY_ERROROut of memory.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a bit array field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
label is not NULL.
field_class has no flag with the label label.
ranges is not NULL.
index_ranges contains one or more unsigned integer ranges.
No upper value of any range in index_ranges is greater than or equal to the length of field_class.

◆ bt_field_class_bit_array_get_flag_count()

uint64_t bt_field_class_bit_array_get_flag_count ( const bt_field_class * field_class)
extern

Returns the number of flags contained in the bit array field class field_class.

See the flags property.

Parameters
[in]field_classBit array field class of which to get the number of contained flags.
Returns
Number of contained flags in field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a bit array field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_bit_array_borrow_flag_by_index_const()

const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the flag at index index from the bit array field class field_class.

See the flags property.

Parameters
[in]field_classBit array field class from which to borrow the flag at index index.
[in]indexIndex of the flag to borrow from field_class.
Returns

Borrowed reference of the flag of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a bit array field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
index is less than the number of flags in field_class.
See also
bt_field_class_bit_array_get_flag_count() — Returns the number of flags contained in a bit array field class.

◆ bt_field_class_bit_array_borrow_flag_by_label_const()

const bt_field_class_bit_array_flag * bt_field_class_bit_array_borrow_flag_by_label_const ( const bt_field_class * field_class,
const char * label )
extern

Borrows the flag having the label label from the bit array field class field_class.

See the flags property.

If there's no flag having the label label in field_class, then this function returns NULL.

Parameters
[in]field_classBit array field class from which to borrow the flag having the label label.
[in]labelLabel of the flag to borrow from field_class.
Returns

Borrowed reference of the flag of field_class having the label label, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a bit array field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
label is not NULL.

◆ bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer()

bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer ( const bt_field_class * field_class,
uint64_t value_as_integer,
bt_field_class_bit_array_flag_label_array * labels,
uint64_t * count )
extern

Returns the labels of all the active flags of the bit array field class field_class for the set bits of value_as_integer (a bit array field value as an integer).

See the flags property.

This function sets *labels to the resulting array and *count to the number of labels in *labels.

On success, if there's no active flags for value_as_integer, *count is 0.

Parameters
[in]field_classBit array field class from which to get the labels of the active flags for value_as_integer.
[in]value_as_integer

Bits, as an integer, for which to get the labels of the active flags of field_class.

In this integral value, the index of the least significant bit is 0.

[out]labels

On success, *labels is an array of labels of the active flags of field_class for value.

The number of labels in *labels is *count.

The array is owned by field_class and remains valid as long as:

  • field_class isn't modified.
  • You don't call this function again with field_class.
[out]countOn success, *count is the number of labels in *labels (can be 0).
Return values
BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_OKSuccess.
BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_MEMORY_ERROROut of memory.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a bit array field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
labels is not NULL.
count is not NULL.

◆ bt_field_class_bit_array_flag_get_label()

const char * bt_field_class_bit_array_flag_get_label ( const bt_field_class_bit_array_flag * flag)
extern

Returns the label of the bit array field class flag flag.

See the flags property.

Parameters
[in]flagBit array field class flag of which to get the label.
Returns

Label of flag.

The returned pointer remains valid as long as flag exists.

Since
Babeltrace 2.1
Precondition
flag is not NULL.

◆ bt_field_class_bit_array_flag_borrow_index_ranges_const()

const bt_integer_range_set_unsigned * bt_field_class_bit_array_flag_borrow_index_ranges_const ( const bt_field_class_bit_array_flag * flag)
extern

Borrows the bit index ranges from the bit array field class flag flag.

See the flags property.

Parameters
[in]flagBit array field class flag from which to borrow the bit index ranges.
Returns
Bit index ranges of flag.
Since
Babeltrace 2.1
Precondition
flag is not NULL.

◆ bt_field_class_integer_set_field_value_range()

void bt_field_class_integer_set_field_value_range ( bt_field_class * field_class,
uint64_t n )
extern

Sets the field value range of the integer field class field_class to n.

See the field value range property.

Parameters
[in]field_classInteger field class of which to set the field value range to n.
[in]n

N in:

Unsigned integer field class

[0, 2N − 1]

Signed integer field class
[−2N − 1, 2N − 1 − 1]
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an integer field class.
1 ≤ n ≤ 64.
See also
bt_field_class_integer_get_field_value_range() — Returns the field value range of an integer field class.

◆ bt_field_class_integer_get_field_value_range()

uint64_t bt_field_class_integer_get_field_value_range ( const bt_field_class * field_class)
extern

Returns the field value range of the integer field class field_class.

See the field value range property.

Parameters
[in]field_classInteger field class of which to get the field value range.
Returns

Field value range of field_class, that is, N in:

Unsigned integer field class

[0, 2N − 1]

Signed integer field class
[−2N, 2N − 1]
Precondition
field_class is not NULL.
field_class is an integer field class.
See also
bt_field_class_integer_set_field_value_range() — Sets the field value range of an integer field class.

◆ bt_field_class_integer_set_field_value_hints()

void bt_field_class_integer_set_field_value_hints ( bt_field_class * field_class,
uint64_t hints )

Sets the field value hints of the integer field class field_class to a bitwise disjunction (OR) of bt_field_class_integer_field_value_hint enumerators.

See the field value hints property.

Parameters
[in]field_classInteger field class of which to set the field value hints to hints.
[in]hintsBitwise disjunction (OR) of of bt_field_class_integer_field_value_hint enumerators.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an integer field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
hints is 0 or BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL.
See also
bt_field_class_integer_get_field_value_hints() — Returns the field value hints of an integer field class.
bt_field_class_integer_has_field_value_hint() — Returns whether or not an integer field class has a given field value hint.

◆ bt_field_class_integer_get_field_value_hints()

uint64_t bt_field_class_integer_get_field_value_hints ( const bt_field_class * field_class)

Returns the field value hints of the integer field class field_class.

See the field value hints property.

Parameters
[in]field_classInteger field class of which to get the field value hints.
Returns
Field value hints of field_class as a bitwise disjunction (OR) of bt_field_class_integer_field_value_hint enumerators.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is an integer field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_integer_set_field_value_hints() — Sets the field value hints of an integer field class.
bt_field_class_integer_has_field_value_hint() — Returns whether or not an integer field class has a given field value hint.

◆ bt_field_class_integer_has_field_value_hint()

static bt_bool bt_field_class_integer_has_field_value_hint ( const bt_field_class *const field_class,
const bt_field_class_integer_field_value_hint hint )
inlinestatic

Returns whether or not the integer field class field_class has the field value hint hint.

See the field value hints property.

Parameters
[in]field_classInteger field class of which to get whether or not it has the field value hint hint.
[in]hintField value hint to check.
Return values
BT_TRUEfield_class has the field value hint hint.
BT_FALSEfield_class doesn't have the field value hint hint.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is an integer field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
hint is 0 or BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL.
See also
bt_field_class_integer_set_field_value_hints() — Sets the field value hints of an integer field class.
bt_field_class_integer_get_field_value_hints() — Returns the field value hints of an integer field class.

◆ bt_field_class_integer_set_preferred_display_base()

void bt_field_class_integer_set_preferred_display_base ( bt_field_class * field_class,
bt_field_class_integer_preferred_display_base preferred_display_base )
extern

Sets the preferred display base of the integer field class field_class to preferred_display_base.

See the preferred display base property.

Parameters
[in]field_classInteger field class of which to set the preferred display base to preferred_display_base.
[in]preferred_display_baseNew preferred display base of field_class.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an integer field class.
See also
bt_field_class_integer_get_preferred_display_base() — Returns the preferred display base of an integer field class.

◆ bt_field_class_integer_get_preferred_display_base()

bt_field_class_integer_preferred_display_base bt_field_class_integer_get_preferred_display_base ( const bt_field_class * field_class)
extern

Returns the preferred display base of the integer field class field_class.

See the preferred display base property.

Parameters
[in]field_classInteger field class of which to get the preferred display base.
Return values
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_BINARY2 (binary)
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_OCTAL8 (octal)
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL10 (decimal)
BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_HEXADECIMAL16 (hexadecimal)
Precondition
field_class is not NULL.
field_class is an integer field class.
See also
bt_field_class_integer_set_preferred_display_base() — Sets the preferred display base of an integer field class.

◆ bt_field_class_integer_unsigned_create()

bt_field_class * bt_field_class_integer_unsigned_create ( bt_trace_class * trace_class)
extern

Creates an unsigned integer field class from the trace class trace_class.

On success, the returned unsigned integer field class has the following property values:

Property Value
Field value range [0, 264 − 1]
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) None
Preferred display base BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an unsigned integer field class.
Returns
New unsigned integer field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_integer_signed_create()

bt_field_class * bt_field_class_integer_signed_create ( bt_trace_class * trace_class)
extern

Creates an signed integer field class from the trace class trace_class.

On success, the returned signed integer field class has the following property values:

Property Value
Field value range [−263, 263 − 1]
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) None
Preferred display base BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a signed integer field class.
Returns
New signed integer field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_real_single_precision_create()

bt_field_class * bt_field_class_real_single_precision_create ( bt_trace_class * trace_class)
extern

Creates a single-precision real field class from the trace class trace_class.

On success, the returned single-precision real field class has the following property value:

Property Value
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a single-preicision real field class.
Returns
New single-precision real field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_real_double_precision_create()

bt_field_class * bt_field_class_real_double_precision_create ( bt_trace_class * trace_class)
extern

Creates a double-precision real field class from the trace class trace_class.

On success, the returned double-precision real field class has the following property value:

Property Value
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a double-preicision real field class.
Returns
New double-precision real field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_enumeration_get_mapping_count()

uint64_t bt_field_class_enumeration_get_mapping_count ( const bt_field_class * field_class)
extern

Returns the number of mappings contained in the enumeration field class field_class.

See the mappings property.

Parameters
[in]field_classEnumeration field class of which to get the number of contained mappings.
Returns
Number of contained mappings in field_class.
Precondition
field_class is not NULL.
field_class is an enumeration field class.

◆ bt_field_class_enumeration_mapping_get_label()

const char * bt_field_class_enumeration_mapping_get_label ( const bt_field_class_enumeration_mapping * mapping)
extern

Returns the label of the enumeration field class mapping mapping.

See the mappings property.

Parameters
[in]mappingEnumeration field class mapping of which to get the label.
Returns

Label of mapping.

The returned pointer remains valid as long as mapping exists.

Precondition
mapping is not NULL.

◆ bt_field_class_enumeration_unsigned_create()

bt_field_class * bt_field_class_enumeration_unsigned_create ( bt_trace_class * trace_class)
extern

Creates an unsigned enumeration field class from the trace class trace_class.

On success, the returned unsigned enumeration field class has the following property values:

Property Value
Field value range [0, 264 − 1]
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) None
Preferred display base BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL
Mappings None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an unsigned enumeration field class.
Returns
New unsigned enumeration field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_enumeration_unsigned_add_mapping()

bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_unsigned_add_mapping ( bt_field_class * field_class,
const char * label,
const bt_integer_range_set_unsigned * ranges )
extern

Adds a mapping to the unsigned enumeration field class field_class having the label label and the unsigned integer ranges ranges.

See the mappings property.

Parameters
[in]field_classUnsigned enumeration field class to which to add a mapping having the label label and the integer ranges ranges.
[in]labelLabel of the mapping to add to field_class (copied).
[in]rangesUnsigned integer ranges of the mapping to add to field_class.
Return values
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OKSuccess.
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an unsigned enumeration field class.
label is not NULL.
field_class has no mapping with the label label.
ranges is not NULL.
ranges contains one or more unsigned integer ranges.

◆ bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const()

const bt_field_class_enumeration_unsigned_mapping * bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the mapping at index index from the unsigned enumeration field class field_class.

See the mappings property.

Parameters
[in]field_classUnsigned enumeration field class from which to borrow the mapping at index index.
[in]indexIndex of the mapping to borrow from field_class.
Returns

Borrowed reference of the mapping of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is an unsigned enumeration field class.
index is less than the number of mappings in field_class (as returned by bt_field_class_enumeration_get_mapping_count()).
See also
bt_field_class_enumeration_get_mapping_count() — Returns the number of mappings contained in an enumeration field class.

◆ bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const()

const bt_field_class_enumeration_unsigned_mapping * bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const ( const bt_field_class * field_class,
const char * label )
extern

Borrows the mapping having the label label from the unsigned enumeration field class field_class.

See the mappings property.

If there's no mapping having the label label in field_class, then this function returns NULL.

Parameters
[in]field_classUnsigned enumeration field class from which to borrow the mapping having the label label.
[in]labelLabel of the mapping to borrow from field_class.
Returns

Borrowed reference of the mapping of field_class having the label label, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is an unsigned enumeration field class.
label is not NULL.

◆ bt_field_class_enumeration_unsigned_get_mapping_labels_for_value()

bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_unsigned_get_mapping_labels_for_value ( const bt_field_class * field_class,
uint64_t value,
bt_field_class_enumeration_mapping_label_array * labels,
uint64_t * count )
extern

Returns an array of all the labels of the mappings of the unsigned enumeration field class field_class of which the unsigned integer ranges contain the integral value value.

See the mappings property.

This function sets *labels to the resulting array and *count to the number of labels in *labels.

On success, if there's no mapping ranges containing the value value, *count is 0.

Parameters
[in]field_classUnsigned enumeration field class from which to get the labels of the mappings of which the ranges contain value.
[in]valueValue for which to get the mapped labels in field_class.
[out]labels

On success, *labels is an array of labels of the mappings of field_class containing value.

The number of labels in *labels is *count.

The array is owned by field_class and remains valid as long as:

  • field_class isn't modified.
  • You don't call this function again with field_class.
[out]countOn success, *count is the number of labels in *labels (can be 0).
Return values
BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_OKSuccess.
BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is an unsigned enumeration field class.
labels is not NULL.
count is not NULL.

◆ bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const()

const bt_integer_range_set_unsigned * bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const ( const bt_field_class_enumeration_unsigned_mapping * mapping)
extern

Borrows the unsigned integer ranges from the unsigned enumeration field class mapping mapping.

See the mappings property.

Parameters
[in]mappingUnsigned enumeration field class mapping from which to borrow the unsigned integer ranges.
Returns
Unsigned integer ranges of mapping.
Precondition
mapping is not NULL.

◆ bt_field_class_enumeration_unsigned_mapping_as_mapping_const()

static const bt_field_class_enumeration_mapping * bt_field_class_enumeration_unsigned_mapping_as_mapping_const ( const bt_field_class_enumeration_unsigned_mapping * mapping)
inlinestatic

Upcasts the unsigned enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.

See the mappings property.

Parameters
[in]mapping

Unsigned enumeration field class mapping to upcast.

Can be NULL.

Returns
mapping as a common enumeration field class mapping.

◆ bt_field_class_enumeration_signed_create()

bt_field_class * bt_field_class_enumeration_signed_create ( bt_trace_class * trace_class)
extern

Creates a signed enumeration field class from the trace class trace_class.

On success, the returned signed enumeration field class has the following property values:

Property Value
Field value range [−263, 263 − 1]
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) None
Preferred display base BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL
Mappings None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a signed enumeration field class.
Returns
New signed enumeration field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_enumeration_signed_add_mapping()

bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_signed_add_mapping ( bt_field_class * field_class,
const char * label,
const bt_integer_range_set_signed * ranges )
extern

Adds a mapping to the signed enumeration field class field_class having the label label and the signed integer ranges ranges.

See the mappings property.

Parameters
[in]field_classSigned enumeration field class to which to add a mapping having the label label and the integer ranges ranges.
[in]labelLabel of the mapping to add to field_class (copied).
[in]rangesSigned integer ranges of the mapping to add to field_class.
Return values
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OKSuccess.
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a signed enumeration field class.
label is not NULL.
field_class has no mapping with the label label.
ranges is not NULL.
ranges contains one or more signed integer ranges.

◆ bt_field_class_enumeration_signed_borrow_mapping_by_index_const()

const bt_field_class_enumeration_signed_mapping * bt_field_class_enumeration_signed_borrow_mapping_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the mapping at index index from the signed enumeration field class field_class.

See the mappings property.

Parameters
[in]field_classSigned enumeration field class from which to borrow the mapping at index index.
[in]indexIndex of the mapping to borrow from field_class.
Returns

Borrowed reference of the mapping of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a signed enumeration field class.
index is less than the number of mappings in field_class (as returned by bt_field_class_enumeration_get_mapping_count()).
See also
bt_field_class_enumeration_get_mapping_count() — Returns the number of mappings contained in an enumeration field class.

◆ bt_field_class_enumeration_signed_borrow_mapping_by_label_const()

const bt_field_class_enumeration_signed_mapping * bt_field_class_enumeration_signed_borrow_mapping_by_label_const ( const bt_field_class * field_class,
const char * label )
extern

Borrows the mapping having the label label from the signed enumeration field class field_class.

See the mappings property.

If there's no mapping having the label label in field_class, then this function returns NULL.

Parameters
[in]field_classSigned enumeration field class from which to borrow the mapping having the label label.
[in]labelLabel of the mapping to borrow from field_class.
Returns

Borrowed reference of the mapping of field_class having the label label, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a signed enumeration field class.
label is not NULL.

◆ bt_field_class_enumeration_signed_get_mapping_labels_for_value()

bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_signed_get_mapping_labels_for_value ( const bt_field_class * field_class,
int64_t value,
bt_field_class_enumeration_mapping_label_array * labels,
uint64_t * count )
extern

Returns an array of all the labels of the mappings of the signed enumeration field class field_class of which the signed integer ranges contain the integral value value.

See the mappings property.

This function sets *labels to the resulting array and *count to the number of labels in *labels.

On success, if there's no mapping ranges containing the value value, *count is 0.

Parameters
[in]field_classSigned enumeration field class from which to get the labels of the mappings of which the ranges contain value.
[in]valueValue for which to get the mapped labels in field_class.
[out]labels

On success, *labels is an array of labels of the mappings of field_class containing value.

The number of labels in *labels is *count.

The array is owned by field_class and remains valid as long as:

  • field_class isn't modified.
  • You don't call this function again with field_class.
[out]countOn success, *count is the number of labels in *labels (can be 0).
Return values
BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_OKSuccess.
BT_FIELD_CLASS_ENUMERATION_GET_MAPPING_LABELS_BY_VALUE_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is a signed enumeration field class.
labels is not NULL.
count is not NULL.

◆ bt_field_class_enumeration_signed_mapping_borrow_ranges_const()

const bt_integer_range_set_signed * bt_field_class_enumeration_signed_mapping_borrow_ranges_const ( const bt_field_class_enumeration_signed_mapping * mapping)
extern

Borrows the signed integer ranges from the signed enumeration field class mapping mapping.

See the mappings property.

Parameters
[in]mappingSigned enumeration field class mapping from which to borrow the signed integer ranges.
Returns
Signed integer ranges of mapping.
Precondition
mapping is not NULL.

◆ bt_field_class_enumeration_signed_mapping_as_mapping_const()

static const bt_field_class_enumeration_mapping * bt_field_class_enumeration_signed_mapping_as_mapping_const ( const bt_field_class_enumeration_signed_mapping * mapping)
inlinestatic

Upcasts the signed enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.

See the mappings property.

Parameters
[in]mapping

Signed enumeration field class mapping to upcast.

Can be NULL.

Returns
mapping as a common enumeration field class mapping.

◆ bt_field_class_string_create()

bt_field_class * bt_field_class_string_create ( bt_trace_class * trace_class)
extern

Creates a string field class from the trace class trace_class.

On success, the returned string field class has the following property value:

Property Value
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a string field class.
Returns
New string field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_blob_static_create()

bt_field_class * bt_field_class_blob_static_create ( bt_trace_class * trace_class,
uint64_t length )
extern

Creates a static BLOB field class having the length length from the trace class trace_class.

On success, the returned static BLOB field class has the following property values:

Property Value
Length length
Media type application/octet-stream
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a static BLOB field class.
[in]lengthLength (number of bytes) of the instances of the static BLOB field class to create.
Returns
New static BLOB field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_blob_dynamic_without_length_field_location_create() — Creates a class of dynamic BLOB field without a linked length field.
bt_field_class_blob_dynamic_with_length_field_location_create() — Creates a class of dynamic BLOB field with a linked length field.

◆ bt_field_class_blob_dynamic_without_length_field_location_create()

bt_field_class * bt_field_class_blob_dynamic_without_length_field_location_create ( bt_trace_class * trace_class)
extern

Creates a dynamic BLOB field class (instances without a linked length field) from the trace class trace_class.

On success, the returned dynamic BLOB field class has the following property values:

Property Value
Length field location None
Media type application/octet-stream
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a dynamic BLOB field class.
Returns
New dynamic BLOB field class reference (without a length field), or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_blob_dynamic_with_length_field_location_create() — Creates a class of dynamic BLOB field with a linked length field.

◆ bt_field_class_blob_dynamic_with_length_field_location_create()

bt_field_class * bt_field_class_blob_dynamic_with_length_field_location_create ( bt_trace_class * trace_class,
const bt_field_location * length_field_location )
extern

Creates a dynamic BLOB field class (instances with a linked length field) having the length field location length_field_location from the trace class trace_class.

On success, the returned dynamic BLOB field class has the following property values:

Property Value
Length field location

length_field_location.

See Fields with links to other fields to learn more.

Media type application/octet-stream
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a dynamic BLOB field class.
[in]length_field_locationLength field location of the dynamic BLOB field class to create.
Returns
New dynamic BLOB field class reference (instances with a linked length field), or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
length_field_location is not NULL.
See also
bt_field_class_blob_dynamic_without_length_field_location_create() — Creates a class of dynamic BLOB field without a linked length field.

◆ bt_field_class_blob_static_get_length()

uint64_t bt_field_class_blob_static_get_length ( const bt_field_class * field_class)
extern

Returns the length of the static BLOB field class field_class.

See the length property.

Parameters
[in]field_classStatic BLOB field class of which to get the length (number of bytes in instances).
Returns
Length of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a static BLOB field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const()

const bt_field_location * bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const ( const bt_field_class * field_class)
extern

Borrows the length field location from the dynamic BLOB field class (instances with a linked length field) field_class.

See the length field location property.

Parameters
[in]field_classDynamic BLOB field class from which to borrow the length field location.
Returns
Length field location of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a dynamic BLOB field class (instances with a linked length field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_blob_set_media_type()

bt_field_class_blob_set_media_type_status bt_field_class_blob_set_media_type ( bt_field_class * field_class,
const char * media_type )
extern

Sets the IANA media type of the BLOB field class field_class to a copy of media_type.

See the media type property.

Parameters
[in]field_classBLOB field class of which to set the media type to a copy of media_type.
[in]media_typeNew media type of field_class (copied).
Return values
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OKSuccess.
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROROut of memory.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a BLOB field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_blob_get_media_type() — Returns the IANA media type of BLOB field class.

◆ bt_field_class_blob_get_media_type()

const char * bt_field_class_blob_get_media_type ( const bt_field_class * field_class)
extern

Returns the IANA media type of the BLOB field class field_class.

See the media type property.

If field_class has no media type, then this function returns NULL.

Parameters
[in]field_classBLOB field class of which to get the media type.
Returns

Media type of field_class.

The returned pointer remains valid as long as field_class isn't modified.

Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a BLOB field class.
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_blob_set_media_type() — Sets the media type of a BLOB field class.

◆ bt_field_class_array_borrow_element_field_class()

bt_field_class * bt_field_class_array_borrow_element_field_class ( bt_field_class * field_class)
extern

Borrows the element field class from the array field class field_class.

See the element field class property.

Parameters
[in]field_classArray field class from which to borrow the element field class.
Returns
Element field class of field_class.
Precondition
field_class is not NULL.
field_class is an array field class.
See also
bt_field_class_array_borrow_element_field_class_const()const version of this function.

◆ bt_field_class_array_borrow_element_field_class_const()

const bt_field_class * bt_field_class_array_borrow_element_field_class_const ( const bt_field_class * field_class)
extern

Borrows the element field class from the array field class field_class (const version).

See bt_field_class_array_borrow_element_field_class().

◆ bt_field_class_array_static_create()

bt_field_class * bt_field_class_array_static_create ( bt_trace_class * trace_class,
bt_field_class * element_field_class,
uint64_t length )
extern

Creates a static array field class having the element field class element_field_class and the length length from the trace class trace_class.

On success, the returned static array field class has the following property values:

Property Value
Element field class element_field_class
Length length
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a static array field class.
[in]element_field_classClass of the element fields of the instances of the static array field class to create.
[in]lengthLength of the instances of the static array field class to create.
Returns
New static array field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
element_field_class is not NULL.
element_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, element_field_class is frozen.

◆ bt_field_class_array_static_get_length()

uint64_t bt_field_class_array_static_get_length ( const bt_field_class * field_class)
extern

Returns the length of the static array field class field_class.

See the length property.

Parameters
[in]field_classStatic array field class of which to get the length.
Returns
Length of field_class.
Precondition
field_class is not NULL.
field_class is a static array field class.

◆ bt_field_class_array_dynamic_create()

bt_field_class * bt_field_class_array_dynamic_create ( bt_trace_class * trace_class,
bt_field_class * element_field_class,
bt_field_class * length_field_class )
extern

Creates a dynamic array field class having the element field class element_field_class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a dynamic array field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_array_dynamic_without_length_field_location_create() or bt_field_class_array_dynamic_with_length_field_location_create().

If length_field_class isn't NULL, then an instance of the created dynamic array field class has a linked length field. See Fields with links to other fields to learn more.

On success, the returned dynamic array field class has the following property values:

Property Value
Element field class element_field_class
Length field path None (if length_field_class isn't NULL, this property becomes available when the returned field class becomes part of an event class or of a stream class)
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a dynamic array field class.
[in]element_field_classClass of the element fields of the instances of the dynamic array field class to create.
[in]length_field_class

Class of a linked length field of an instance of the dynamic array field class to create.

Can be NULL.

Returns
New dynamic array field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
element_field_class is not NULL.
element_field_class isn't already part of another field class, an event class, or a stream class.
If length_field_class isn't NULL, length_field_class is an unsigned integer field class.
Postcondition
On success, element_field_class is frozen.
On success, length_field_class is frozen.
See also
bt_field_class_array_dynamic_without_length_field_location_create() — Creates a class of dynamic array field without a linked length field (Message Interchange Protocol version 1).
bt_field_class_array_dynamic_with_length_field_location_create() — Creates a class of dynamic array field with a linked length field (Message Interchange Protocol version 1).

◆ bt_field_class_array_dynamic_without_length_field_location_create()

bt_field_class * bt_field_class_array_dynamic_without_length_field_location_create ( bt_trace_class * trace_class,
bt_field_class * element_field_class )
extern

Creates a dynamic array field class (instances without a linked length field) having the element field class element_field_class from the trace class trace_class.

On success, the returned dynamic array field class has the following property values:

Property Value
Element field class element_field_class
Length field location None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a dynamic array field class.
[in]element_field_classClass of the element fields of the instances of the dynamic array field class to create.
Returns
New dynamic array field class reference (without a length field), or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
element_field_class is not NULL.
element_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, element_field_class is frozen.
See also
bt_field_class_array_dynamic_with_length_field_location_create() — Creates a class of dynamic array field with a linked length field.

◆ bt_field_class_array_dynamic_with_length_field_location_create()

bt_field_class * bt_field_class_array_dynamic_with_length_field_location_create ( bt_trace_class * trace_class,
bt_field_class * element_field_class,
const bt_field_location * length_field_location )
extern

Creates a dynamic array field class (instances with a linked length field) having the element field class element_field_class and the length field location length_field_location from the trace class trace_class.

On success, the returned dynamic array field class has the following property values:

Property Value
Element field class element_field_class
Length field location

length_field_location.

See Fields with links to other fields to learn more.

User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a dynamic array field class.
[in]element_field_classClass of the element fields of the instances of the dynamic array field class to create.
[in]length_field_locationLength field location of the dynamic array field class to create.
Returns
New dynamic array field class reference (instances with a linked length field), or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
element_field_class is not NULL.
element_field_class isn't already part of another field class, an event class, or a stream class.
length_field_location is not NULL.
Postcondition
On success, element_field_class is frozen.
See also
bt_field_class_array_dynamic_without_length_field_location_create() — Creates a class of dynamic array field without a linked length field.

◆ bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const()

const bt_field_path * bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const ( const bt_field_class * field_class)
extern

Borrows the length field path from the dynamic array field class (instances with a linked length field) field_class.

See the length field path property.

This property is only available when all the following are true:

Parameters
[in]field_classDynamic array field class from which to borrow the length field path.
Returns
Length field path of field_class.
Precondition
field_class is not NULL.
field_class is a dynamic array field class (instances with a linked length field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.

◆ bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const()

const bt_field_location * bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const ( const bt_field_class * field_class)
extern

Borrows the length field location from the dynamic array field class (instances with a linked length field) field_class.

See the length field location property.

This property is only available when field_class was created with bt_field_class_array_dynamic_with_length_field_location_create().

Parameters
[in]field_classDynamic array field class from which to borrow the length field location.
Returns
Length field location of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a dynamic array field class (instances with a linked length field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_structure_create()

bt_field_class * bt_field_class_structure_create ( bt_trace_class * trace_class)
extern

Creates a structure field class from the trace class trace_class.

On success, the returned structure field class has the following property values:

Property Value
Members None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a structure field class.
Returns
New structure field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.

◆ bt_field_class_structure_append_member()

bt_field_class_structure_append_member_status bt_field_class_structure_append_member ( bt_field_class * field_class,
const char * name,
bt_field_class * member_field_class )
extern

Appends a member to the structure field class field_class having the name name and the field class member_field_class.

See the members property.

Parameters
[in]field_classStructure field class to which to append a member having the name name and the field class member_field_class.
[in]nameName of the member to append to field_class (copied).
[in]member_field_classField class of the member to append to field_class.
Return values
BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OKSuccess.
BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a structure field class.
field_class has no member with the name name.
name is not NULL.
member_field_class is not NULL.
member_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, member_field_class is frozen.

◆ bt_field_class_structure_get_member_count()

uint64_t bt_field_class_structure_get_member_count ( const bt_field_class * field_class)
extern

Returns the number of members contained in the structure field class field_class.

See the members property.

Parameters
[in]field_classStructure field class of which to get the number of contained members.
Returns
Number of contained members in field_class.
Precondition
field_class is not NULL.
field_class is a structure field class.

◆ bt_field_class_structure_borrow_member_by_index()

bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_index ( bt_field_class * field_class,
uint64_t index )
extern

Borrows the member at index index from the structure field class field_class.

See the members property.

Parameters
[in]field_classStructure field class from which to borrow the member at index index.
[in]indexIndex of the member to borrow from field_class.
Returns

Borrowed reference of the member of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a structure field class.
index is less than the number of members in field_class (as returned by bt_field_class_structure_get_member_count()).
See also
bt_field_class_structure_get_member_count() — Returns the number of members contained in a structure field class.
bt_field_class_structure_borrow_member_by_index_const()const version of this function.

◆ bt_field_class_structure_borrow_member_by_index_const()

const bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the member at index index from the structure field class field_class (const version).

See bt_field_class_structure_borrow_member_by_index().

◆ bt_field_class_structure_borrow_member_by_name()

bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_name ( bt_field_class * field_class,
const char * name )
extern

Borrows the member having the name name from the structure field class field_class.

See the members property.

If there's no member having the name name in field_class, then this function returns NULL.

Parameters
[in]field_classStructure field class from which to borrow the member having the name name.
[in]nameName of the member to borrow from field_class.
Returns

Borrowed reference of the member of field_class having the name name, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a structure field class.
name is not NULL.
See also
bt_field_class_structure_borrow_member_by_name_const()const version of this function.

◆ bt_field_class_structure_borrow_member_by_name_const()

const bt_field_class_structure_member * bt_field_class_structure_borrow_member_by_name_const ( const bt_field_class * field_class,
const char * name )
extern

Borrows the member having the name name from the structure field class field_class (const version).

See bt_field_class_structure_borrow_member_by_name().

◆ bt_field_class_structure_member_get_name()

const char * bt_field_class_structure_member_get_name ( const bt_field_class_structure_member * member)
extern

Returns the name of the structure field class member member.

See the members property.

Parameters
[in]memberStructure field class member of which to get the name.
Returns

Name of member.

The returned pointer remains valid as long as member exists.

Precondition
member is not NULL.

◆ bt_field_class_structure_member_borrow_field_class()

bt_field_class * bt_field_class_structure_member_borrow_field_class ( bt_field_class_structure_member * member)
extern

Borrows the field class from the structure field class member member.

See the members property.

Parameters
[in]memberStructure field class member from which to borrow the field class.
Returns
Field class of member.
Precondition
member is not NULL.
See also
bt_field_class_structure_member_borrow_field_class_const()const version of this function.

◆ bt_field_class_structure_member_borrow_field_class_const()

const bt_field_class * bt_field_class_structure_member_borrow_field_class_const ( const bt_field_class_structure_member * member)
extern

Borrows the field class from the structure field class member member (const version).

See bt_field_class_structure_member_borrow_field_class().

◆ bt_field_class_structure_member_set_user_attributes()

void bt_field_class_structure_member_set_user_attributes ( bt_field_class_structure_member * member,
const bt_value * user_attributes )
extern

Sets the user attributes of the structure field class member member to user_attributes.

See the members property.

Note
When you append a member to a structure field class with bt_field_class_structure_append_member(), the initial user attributes of the member is an empty map value. Therefore you can borrow it with bt_field_class_structure_member_borrow_user_attributes() and fill it directly instead of setting a new one with this function.
Parameters
[in]memberStructure field class member of which to set the user attributes to user_attributes.
[in]user_attributesNew user attributes of member.
Precondition
member is not NULL.
member is not frozen.
user_attributes is not NULL.
user_attributes is a map value (bt_value_is_map() returns BT_TRUE).
See also
bt_field_class_structure_member_borrow_user_attributes() — Borrows the user attributes of a structure field class member.

◆ bt_field_class_structure_member_borrow_user_attributes()

bt_value * bt_field_class_structure_member_borrow_user_attributes ( bt_field_class_structure_member * member)
extern

Borrows the user attributes of the structure field class member member.

See the members property.

Note
When you append a member to a structure field class with bt_field_class_structure_append_member(), the initial user attributes of the member is an empty map value.
Parameters
[in]memberStructure field class member from which to borrow the user attributes.
Returns
User attributes of member (a map value).
Precondition
member is not NULL.
See also
bt_field_class_structure_member_set_user_attributes() — Sets the user attributes of a structure field class member.
bt_field_class_structure_member_borrow_user_attributes_const()const version of this function.

◆ bt_field_class_structure_member_borrow_user_attributes_const()

const bt_value * bt_field_class_structure_member_borrow_user_attributes_const ( const bt_field_class_structure_member * member)
extern

Borrows the user attributes of the structure field class member member (const version).

See bt_field_class_structure_member_borrow_user_attributes().

◆ bt_field_class_option_borrow_field_class()

bt_field_class * bt_field_class_option_borrow_field_class ( bt_field_class * field_class)
extern

Borrows the optional field class from the option field class field_class.

See the optional field class property.

Parameters
[in]field_classOption field class from which to borrow the optional field class.
Returns
Optional field class of field_class.
Precondition
field_class is not NULL.
field_class is an option field class.
See also
bt_field_class_option_borrow_field_class_const()const version of this function.

◆ bt_field_class_option_borrow_field_class_const()

const bt_field_class * bt_field_class_option_borrow_field_class_const ( const bt_field_class * field_class)
extern

Borrows the optional field class from the option field class field_class (const version).

See bt_field_class_option_borrow_field_class().

◆ bt_field_class_option_without_selector_create()

bt_field_class * bt_field_class_option_without_selector_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class )
extern

Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_without_selector_field_location_create().

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, optional_field_class is frozen.
See also
bt_field_class_option_without_selector_field_location_create() — Creates a class of option field without a linked selector field (Message Interchange Protocol version 1).

◆ bt_field_class_option_without_selector_field_location_create()

bt_field_class * bt_field_class_option_without_selector_field_location_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class )
extern

Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, optional_field_class is frozen.
See also
bt_field_class_option_with_selector_field_location_bool_create() — Creates a class of option field with a linked boolean selector field.
bt_field_class_option_with_selector_field_location_integer_unsigned_create() — Creates a class of option field with a linked unsigned integer selector field.
bt_field_class_option_with_selector_field_location_integer_signed_create() — Creates a class of option field with a linked signed integer selector field.

◆ bt_field_class_option_with_selector_field_borrow_selector_field_path_const()

const bt_field_path * bt_field_class_option_with_selector_field_borrow_selector_field_path_const ( const bt_field_class * field_class)
extern

Borrows the selector field path from the option field class (instances with a linked selector field) field_class.

See the selector field path property.

This property is only available when all the following are true:

Parameters
[in]field_classOption field class from which to borrow the selector field path.
Returns
Selector field path of field_class.
Precondition
field_class is not NULL.
field_class is an option field class (instances with a linked selector field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.

◆ bt_field_class_option_with_selector_field_borrow_selector_field_location_const()

const bt_field_location * bt_field_class_option_with_selector_field_borrow_selector_field_location_const ( const bt_field_class * field_class)
extern

Borrows the selector field location from the option field class (instances with a linked selector field) field_class.

See the selector field location property.

This property is only available when field_class was created with bt_field_class_option_with_selector_field_location_bool_create().

Parameters
[in]field_classOption field class from which to borrow the selector field location.
Returns
Selector field location of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is an option field class (instances with a linked selector field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_option_with_selector_field_bool_create()

bt_field_class * bt_field_class_option_with_selector_field_bool_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
bt_field_class * selector_field_class )
extern

Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_bool_create().

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field path None (this property becomes available when the returned field class becomes part of an event class or of a stream class)
Selector is reversed? BT_FALSE
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_classClass of a linked boolean selector field of an instance of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_class is not NULL.
selector_field_class is a boolean field class.
Postcondition
On success, optional_field_class is frozen.
On success, selector_field_class is frozen.
See also
bt_field_class_option_with_selector_field_location_bool_create() — Creates a class of option field with a linked boolean selector field (Message Interchange Protocol version 1).

◆ bt_field_class_option_with_selector_field_location_bool_create()

bt_field_class * bt_field_class_option_with_selector_field_location_bool_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
const bt_field_location * selector_field_location )
extern

Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field location

selector_field_location.

See Fields with links to other fields to learn more.

Selector is reversed? BT_FALSE
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_locationSelector field location of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_location is not NULL.
Postcondition
On success, optional_field_class is frozen.
On success, selector_field_class is frozen.
See also
bt_field_class_option_without_selector_field_location_create() — Creates a class of option field without a linked selector field.
bt_field_class_option_with_selector_field_location_integer_unsigned_create() — Creates a class of option field with a linked unsigned integer selector field.
bt_field_class_option_with_selector_field_location_integer_signed_create() — Creates a class of option field with a linked signed integer selector field.

◆ bt_field_class_option_with_selector_field_bool_set_selector_is_reversed()

void bt_field_class_option_with_selector_field_bool_set_selector_is_reversed ( bt_field_class * field_class,
bt_bool selector_is_reversed )
extern

Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed.

See the selector is reversed? property.

Parameters
[in]field_classOption field class of which to set whether or not its selector is reversed.
[in]selector_is_reversedBT_TRUE to make field_class have a reversed selector.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an option field class (instances with a linked boolean selector field).
See also
bt_field_class_option_with_selector_field_bool_selector_is_reversed() — Returns whether or not the selector of an option field class (with a boolean selector field) is reversed.

◆ bt_field_class_option_with_selector_field_bool_selector_is_reversed()

bt_bool bt_field_class_option_with_selector_field_bool_selector_is_reversed ( const bt_field_class * field_class)
extern

Returns whether or not the selector of the option field class (with a boolean selector field) is reversed.

See the selector is reversed? property.

Parameters
[in]field_classOption field class of which to get whether or not its selector is reversed.
Returns
BT_TRUE if the selector of field_class is reversed.
Precondition
field_class is not NULL.
field_class is an option field class (instances with a linked boolean selector field).
See also
bt_field_class_option_with_selector_field_bool_set_selector_is_reversed() — Sets whether or not the selector of an option field class (with a boolean selector field) is reversed.

◆ bt_field_class_option_with_selector_field_integer_unsigned_create()

bt_field_class * bt_field_class_option_with_selector_field_integer_unsigned_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
bt_field_class * selector_field_class,
const bt_integer_range_set_unsigned * ranges )
extern

Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_integer_unsigned_create().

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field path None (this property becomes available when the returned field class becomes part of an event class or of a stream class)
Unsigned integer ranges of selector ranges
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_classLinked selector field class of the option field class to create.
[in]rangesUnsigned integer ranges of selector of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_class is not NULL.
selector_field_class is an unsigned integer field class.
ranges is not NULL.
ranges contains one or more unsigned integer ranges.
Postcondition
On success, optional_field_class is frozen.
On success, selector_field_class is frozen.
On success, ranges is frozen.
See also
bt_field_class_option_with_selector_field_location_integer_unsigned_create() — Creates a class of option field with a linked unsigned integer selector field (Message Interchange Protocol version 1).

◆ bt_field_class_option_with_selector_field_location_integer_unsigned_create()

bt_field_class * bt_field_class_option_with_selector_field_location_integer_unsigned_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
const bt_field_location * selector_field_location,
const bt_integer_range_set_unsigned * ranges )
extern

Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field location

selector_field_location.

See Fields with links to other fields to learn more.

Unsigned integer ranges of selector ranges
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_locationSelector field location of the option field class to create.
[in]rangesUnsigned integer ranges of selector of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_location is not NULL.
ranges is not NULL.
ranges contains one or more unsigned integer ranges.
Postcondition
On success, optional_field_class is frozen.
On success, ranges is frozen.
See also
bt_field_class_option_without_selector_field_location_create() — Creates a class of option field without a linked selector field.
bt_field_class_option_with_selector_field_location_bool_create() — Creates a class of option field with a linked boolean selector field.
bt_field_class_option_with_selector_field_location_integer_signed_create() — Creates a class of option field with a linked signed integer selector field.

◆ bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const()

const bt_integer_range_set_unsigned * bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const ( const bt_field_class * field_class)
extern

Borrows the unsigned integer ranges from the option field class (with an unsigned integer selector field) field_class.

See the Unsigned integer ranges of selector property.

Parameters
[in]field_classOption field class from which to borrow the unsigned integer ranges.
Returns
Unsigned integer ranges of field_class.
Precondition
field_class is not NULL.
field_class is an option field class (instances with a linked unsigned integer selector field).

◆ bt_field_class_option_with_selector_field_integer_signed_create()

bt_field_class * bt_field_class_option_with_selector_field_integer_signed_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
bt_field_class * selector_field_class,
const bt_integer_range_set_signed * ranges )
extern

Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_integer_signed_create().

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field path None (this property becomes available when the returned field class becomes part of an event class or of a stream class)
Signed integer ranges of selector ranges
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_classLinked selector field class of the option field class to create.
[in]rangesSigned integer ranges of selector of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_class is not NULL.
selector_field_class is an unsigned integer field class.
ranges is not NULL.
ranges contains one or more unsigned integer ranges.
Postcondition
On success, optional_field_class is frozen.
On success, selector_field_class is frozen.
On success, ranges is frozen.
See also
bt_field_class_option_with_selector_field_location_integer_signed_create() — Creates an option field class with a linked signed integer selector field (Message Interchange Protocol version 1).

◆ bt_field_class_option_with_selector_field_location_integer_signed_create()

bt_field_class * bt_field_class_option_with_selector_field_location_integer_signed_create ( bt_trace_class * trace_class,
bt_field_class * optional_field_class,
const bt_field_location * selector_field_location,
const bt_integer_range_set_signed * ranges )
extern

Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.

On success, the returned option field class has the following property values:

Property Value
Optional field class optional_field_class
Selector field location

selector_field_location.

See Fields with links to other fields to learn more.

Signed integer ranges of selector ranges
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create an option field class.
[in]optional_field_classClass of the optional fields of the instances of the option field class to create.
[in]selector_field_locationSelector field location of the option field class to create.
[in]rangesSigned integer ranges of selector of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
optional_field_class is not NULL.
optional_field_class isn't already part of another field class, an event class, or a stream class.
selector_field_location is not NULL.
ranges is not NULL.
ranges contains one or more unsigned integer ranges.
Postcondition
On success, optional_field_class is frozen.
On success, ranges is frozen.
See also
bt_field_class_variant_without_selector_field_location_create() — Creates a class of option field without a linked selector field.
bt_field_class_option_with_selector_field_location_bool_create() — Creates a class of option field with a linked boolean selector field.
bt_field_class_option_with_selector_field_location_integer_unsigned_create() — Creates a class of option field with a linked unsigned integer selector field.

◆ bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const()

const bt_integer_range_set_signed * bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const ( const bt_field_class * field_class)
extern

Borrows the signed integer ranges from the option field class (with a signed integer selector field) field_class.

See the Signed integer ranges of selector property.

Parameters
[in]field_classOption field class from which to borrow the signed integer ranges.
Returns
Signed integer ranges of field_class.
Precondition
field_class is not NULL.
field_class is an option field class (instances with a linked signed integer selector field).

◆ bt_field_class_variant_create()

bt_field_class * bt_field_class_variant_create ( bt_trace_class * trace_class,
bt_field_class * selector_field_class )
extern

Creates an empty variant field class from the trace class trace_class.

Note

This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.

To create a variant field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_variant_without_selector_field_location_create(), bt_field_class_variant_with_selector_field_location_integer_unsigned_create(), or bt_field_class_variant_with_selector_field_location_integer_signed_create().

If selector_field_class isn't NULL, then an instance of the created variant field class has a linked selector field. See Fields with links to other fields to learn more.

On success, the returned variant field class has the following property values:

Property Value
Selector field path None (if selector_field_class isn't NULL, this property becomes available when the returned field class becomes part of an event class or of a stream class)
Options None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a variant field class.
[in]selector_field_class

Class of a linked selector field of an instance of the variant field class to create.

Can be NULL.

Returns
New variant field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.
If selector_field_class isn't NULL, then selector_field_class is an integer field class.
Postcondition
On success, element_field_class is frozen.
On success, selector_field_class is frozen.
See also
bt_field_class_variant_without_selector_field_location_create() — Creates a class of variant field without a linked selector field (Message Interchange Protocol version 1).
bt_field_class_variant_with_selector_field_location_integer_unsigned_create() — Creates a class of variant field with a linked unsigned integer selector field (Message Interchange Protocol version 1).
bt_field_class_variant_with_selector_field_location_integer_signed_create() — Creates a class of variant field with a linked signed integer selector field (Message Interchange Protocol version 1).

◆ bt_field_class_variant_get_option_count()

uint64_t bt_field_class_variant_get_option_count ( const bt_field_class * field_class)
extern

Returns the number of options contained in the variant field class field_class.

See the options property.

Parameters
[in]field_classVariant field class of which to get the number of contained options.
Returns
Number of contained options in field_class.
Precondition
field_class is not NULL.
field_class is a variant field class.

◆ bt_field_class_variant_borrow_option_by_index()

bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_index ( bt_field_class * field_class,
uint64_t index )
extern

Borrows the option at index index from the variant field class field_class.

See the options property.

Parameters
[in]field_classVariant field class from which to borrow the option at index index.
[in]indexIndex of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class.
index is less than the number of options in field_class (as returned by bt_field_class_variant_get_option_count()).
See also
bt_field_class_variant_get_option_count() — Returns the number of options contained in a variant field class.
bt_field_class_variant_borrow_option_by_index_const()const version of this function.

◆ bt_field_class_variant_borrow_option_by_index_const()

const bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the option at index index from the variant field class field_class (const version).

See bt_field_class_variant_borrow_option_by_index().

◆ bt_field_class_variant_borrow_option_by_name()

bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_name ( bt_field_class * field_class,
const char * name )
extern

Borrows the option having the name name from the variant field class field_class.

See the options property.

If there's no option having the name name in field_class, then this function returns NULL.

Parameters
[in]field_classVariant field class from which to borrow the option having the name name.
[in]nameName of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class having the name name, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class.
name is not NULL.
See also
bt_field_class_variant_borrow_option_by_name_const()const version of this function.

◆ bt_field_class_variant_borrow_option_by_name_const()

const bt_field_class_variant_option * bt_field_class_variant_borrow_option_by_name_const ( const bt_field_class * field_class,
const char * name )
extern

Borrows the option having the name name from the variant field class field_class (const version).

See bt_field_class_variant_borrow_option_by_name().

◆ bt_field_class_variant_option_get_name()

const char * bt_field_class_variant_option_get_name ( const bt_field_class_variant_option * option)
extern

Returns the name of the variant field class option option.

See the options property.

This function may return NULL when the following are true:

  • The variant field class containing option was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 1 (available since Babeltrace 2.1).
  • option has no name.
Parameters
[in]optionVariant field class option of which to get the name.
Returns

Name of option, or NULL if none (possible under MIP 1; available since Babeltrace 2.1).

The returned pointer remains valid as long as option exists.

Precondition
option is not NULL.

◆ bt_field_class_variant_option_borrow_field_class()

bt_field_class * bt_field_class_variant_option_borrow_field_class ( bt_field_class_variant_option * option)
extern

Borrows the field class from the variant field class option option.

See the options property.

Parameters
[in]optionVariant field class option from which to borrow the field class.
Returns
Field class of option.
Precondition
option is not NULL.
See also
bt_field_class_variant_option_borrow_field_class_const()const version of this function.

◆ bt_field_class_variant_option_borrow_field_class_const()

const bt_field_class * bt_field_class_variant_option_borrow_field_class_const ( const bt_field_class_variant_option * option)
extern

Borrows the field class from the variant field class option option (const version).

See bt_field_class_variant_option_borrow_field_class().

◆ bt_field_class_variant_option_set_user_attributes()

void bt_field_class_variant_option_set_user_attributes ( bt_field_class_variant_option * option,
const bt_value * user_attributes )
extern

Sets the user attributes of the variant field class option option to user_attributes.

See the options property.

Note
When you append an option to a variant field class with bt_field_class_variant_without_selector_append_option(), bt_field_class_variant_with_selector_field_integer_unsigned_append_option(), or bt_field_class_variant_with_selector_field_integer_signed_append_option(), the initial user attributes of the option is an empty map value. Therefore you can borrow it with bt_field_class_variant_option_borrow_user_attributes() and fill it directly instead of setting a new one with this function.
Parameters
[in]optionVariant field class option of which to set the user attributes to user_attributes.
[in]user_attributesNew user attributes of option.
Precondition
option is not NULL.
option is not frozen.
user_attributes is not NULL.
user_attributes is a map value (bt_value_is_map() returns BT_TRUE).
See also
bt_field_class_variant_option_borrow_user_attributes() — Borrows the user attributes of a variant field class option.

◆ bt_field_class_variant_option_borrow_user_attributes()

bt_value * bt_field_class_variant_option_borrow_user_attributes ( bt_field_class_variant_option * option)
extern

Borrows the user attributes of the variant field class option option.

See the options property.

Note
When you append an option to a variant field class with bt_field_class_variant_without_selector_append_option(), bt_field_class_variant_with_selector_field_integer_unsigned_append_option(), or bt_field_class_variant_with_selector_field_integer_signed_append_option(), the initial user attributes of the option is an empty map value.
Parameters
[in]optionVariant field class option from which to borrow the user attributes.
Returns
User attributes of option (a map value).
Precondition
option is not NULL.
See also
bt_field_class_variant_option_set_user_attributes() — Sets the user attributes of a variant field class option.
bt_field_class_variant_option_borrow_user_attributes_const()const version of this function.

◆ bt_field_class_variant_option_borrow_user_attributes_const()

const bt_value * bt_field_class_variant_option_borrow_user_attributes_const ( const bt_field_class_variant_option * option)
extern

Borrows the user attributes of the variant field class option option (const version).

See bt_field_class_variant_option_borrow_user_attributes().

◆ bt_field_class_variant_without_selector_field_location_create()

bt_field_class * bt_field_class_variant_without_selector_field_location_create ( bt_trace_class * trace_class)
extern

Creates an empty variant field class (instances without a linked selector field) from the trace class trace_class.

On success, the returned variant field class has the following property values:

Property Value
Selector field location None
Options None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a variant field class.
Returns
New option field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
See also
bt_field_class_variant_with_selector_field_location_integer_unsigned_create() — Creates a class of variant field with a linked unsigned integer selector field.
bt_field_class_variant_with_selector_field_location_integer_signed_create() — Creates a class of variant field with a linked signed integer selector field.

◆ bt_field_class_variant_without_selector_append_option()

bt_field_class_variant_without_selector_append_option_status bt_field_class_variant_without_selector_append_option ( bt_field_class * field_class,
const char * name,
bt_field_class * option_field_class )
extern

Appends an option to the variant field class (instances without a linked selector field) field_class having the name name and the field class option_field_class.

See the options property.

Parameters
[in]field_classVariant field class to which to append an option having the name name and the field class option_field_class.
[in]name

Name of the option to append to field_class (copied).

Can be NULL when the effective Message Interchange Protocol version of the trace processing graph is 1 (available since Babeltrace 2.1).

[in]option_field_classField class of the option to append to field_class.
Return values
BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_OKSuccess.
BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a variant field class (instances without a linked selector field).
If name isn't NULL, then field_class has no option with the name name.
If field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0, then name is not NULL.
option_field_class is not NULL.
option_field_class isn't already part of another field class, an event class, or a stream class.
Postcondition
On success, option_field_class is frozen.

◆ bt_field_class_variant_with_selector_field_borrow_selector_field_path_const()

const bt_field_path * bt_field_class_variant_with_selector_field_borrow_selector_field_path_const ( const bt_field_class * field_class)
extern

Borrows the selector field path from the variant field class (instances with a linked selector field) field_class.

See the selector field path property.

This property is only available when all the following are true:

Parameters
[in]field_classVariant field class from which to borrow the selector field path.
Returns
Selector field path of field_class.
Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked selector field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  0.

◆ bt_field_class_variant_with_selector_field_borrow_selector_field_location_const()

const bt_field_location * bt_field_class_variant_with_selector_field_borrow_selector_field_location_const ( const bt_field_class * field_class)
extern

Borrows the selector field location from the variant field class (instances with a linked selector field) field_class.

See the selector field location property.

This property is only available when field_class was created with bt_field_class_variant_with_selector_field_location_integer_unsigned_create() or bt_field_class_variant_with_selector_field_location_integer_signed_create().

Parameters
[in]field_classOption field class from which to borrow the selector field location.
Returns
Selector field location of field_class.
Since
Babeltrace 2.1
Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked selector field).
field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.

◆ bt_field_class_variant_with_selector_field_location_integer_unsigned_create()

bt_field_class * bt_field_class_variant_with_selector_field_location_integer_unsigned_create ( bt_trace_class * trace_class,
const bt_field_location * selector_field_location )
extern

Creates an empty variant field class (instances with a linked unsigned integer selector field) having the selector field location selector_field_location from the trace class trace_class.

On success, the returned variant field class has the following property values:

Property Value
Selector field location

selector_field_location.

See Fields with links to other fields to learn more.

Options None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a variant field class.
[in]selector_field_locationSelector field location of the variant field class to create.
Returns
New variant field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
selector_field_location is not NULL.
See also
bt_field_class_variant_without_selector_field_location_create() — Creates a class of variant field without a linked selector field.
bt_field_class_option_with_selector_field_location_integer_signed_create() — Creates a class of variant field with a linked signed integer selector field.

◆ bt_field_class_variant_with_selector_field_integer_unsigned_append_option()

bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_unsigned_append_option ( bt_field_class * field_class,
const char * name,
bt_field_class * option_field_class,
const bt_integer_range_set_unsigned * ranges )
extern

Appends an option to the variant field class (instances with a linked unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges.

See the options property.

Parameters
[in]field_classVariant field class to which to append an option having the name name, the field class option_field_class, and the unsigned integer ranges ranges.
[in]name

Name of the option to append to field_class (copied).

Can be NULL when the effective Message Interchange Protocol version of the trace processing graph is 1 (available since Babeltrace 2.1).

[in]option_field_classField class of the option to append to field_class.
[in]rangesUnsigned integer ranges of the option to append to field_class.
Return values
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_OKSuccess.
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a variant field class (instances with a linked unsigned integer selector field).
If name isn't NULL, then field_class has no option with the name name.
If field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0, then name is not NULL.
option_field_class is not NULL.
option_field_class isn't already part of another field class, an event class, or a stream class.
ŗanges is not NULL.
ranges contains one or more unsigned integer ranges.
The unsigned integer ranges in ranges don't overlap any unsigned integer range of any existing option in field_class.
Postcondition
On success, option_field_class is frozen.

◆ bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const()

const bt_field_class_variant_with_selector_field_integer_unsigned_option * bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the option at index index from the variant field class (instances with a linked unsigned integer selector field) field_class.

See the options property.

Parameters
[in]field_classVariant field class from which to borrow the option at index index.
[in]indexIndex of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked unsigned integer selector field).
index is less than the number of options in field_class (as returned by bt_field_class_variant_get_option_count()).
See also
bt_field_class_variant_get_option_count() — Returns the number of options contained in a variant field class.

◆ bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const()

const bt_field_class_variant_with_selector_field_integer_unsigned_option * bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const ( const bt_field_class * field_class,
const char * name )
extern

Borrows the option having the name name from the variant field class (instances with a linked unsigned integer selector field) field_class.

See the options property.

If there's no option having the name name in field_class, then this function returns NULL.

Parameters
[in]field_classVariant field class from which to borrow the option having the name name.
[in]nameName of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class having the name name, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked unsigned integer selector field).
name is not NULL.
See also
bt_field_class_variant_borrow_option_by_name_const() — Borrows an option by name from a variant field class.

◆ bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const()

const bt_integer_range_set_unsigned * bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const ( const bt_field_class_variant_with_selector_field_integer_unsigned_option * option)
extern

Borrows the unsigned integer ranges from the variant field class option (instances with a linked unsigned integer selector field) option.

See the options property.

Parameters
[in]optionVariant field class option from which to borrow the unsigned integer ranges.
Returns
Unsigned integer ranges of option.
Precondition
option is not NULL.

◆ bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const()

static const bt_field_class_variant_option * bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const ( const bt_field_class_variant_with_selector_field_integer_unsigned_option * option)
inlinestatic

Upcasts the variant field class option (instances with a linked unsigned integer selector field) option to the common bt_field_class_variant_option type.

See the options property.

Parameters
[in]option

Variant field class option to upcast.

Can be NULL.

Returns
option as a common variant field class option.

◆ bt_field_class_variant_with_selector_field_location_integer_signed_create()

bt_field_class * bt_field_class_variant_with_selector_field_location_integer_signed_create ( bt_trace_class * trace_class,
const bt_field_location * selector_field_location )
extern

Creates an empty variant field class (instances with a linked signed integer selector field) having the selector field location selector_field_location from the trace class trace_class.

On success, the returned variant field class has the following property values:

Property Value
Selector field location

selector_field_location.

See Fields with links to other fields to learn more.

Options None
User attributes Empty map value
Parameters
[in]trace_classTrace class from which to create a variant field class.
[in]selector_field_locationSelector field location of the variant field class to create.
Returns
New variant field class reference, or NULL on memory error.
Since
Babeltrace 2.1
Precondition
trace_class is not NULL.
trace_class was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version  1.
selector_field_location is not NULL.
See also
bt_field_class_variant_without_selector_field_location_create() — Creates a class of variant field without a linked selector field.
bt_field_class_option_with_selector_field_location_integer_unsigned_create() — Creates a class of variant field with a linked unsigned integer selector field.

◆ bt_field_class_variant_with_selector_field_integer_signed_append_option()

bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_signed_append_option ( bt_field_class * field_class,
const char * name,
bt_field_class * option_field_class,
const bt_integer_range_set_signed * ranges )
extern

Appends an option to the variant field class (instances with a linked signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges.

See the options property.

Parameters
[in]field_classVariant field class to which to append an option having the name name and the field class option_field_class, and the signed integer ranges ranges.
[in]name

Name of the option to append to field_class (copied).

Can be NULL when the effective Message Interchange Protocol version of the trace processing graph is 1 (available since Babeltrace 2.1).

[in]option_field_classField class of the option to append to field_class.
[in]rangesSigned integer ranges of the option to append to field_class.
Return values
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_OKSuccess.
BT_FIELD_CLASS_VARIANT_WITH_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROROut of memory.
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is a variant field class (instances with a linked signed integer selector field).
If name isn't NULL, then field_class has no option with the name name.
If field_class was created from a trace class which was created from a component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0, then name is not NULL.
option_field_class is not NULL.
option_field_class isn't already part of another field class, an event class, or a stream class.
ŗanges is not NULL.
ranges contains one or more signed integer ranges.
The signed integer ranges in ranges don't overlap with any signed integer range of any existing option in field_class.
Postcondition
On success, option_field_class is frozen.

◆ bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const()

const bt_field_class_variant_with_selector_field_integer_signed_option * bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const ( const bt_field_class * field_class,
uint64_t index )
extern

Borrows the option at index index from the variant field class (instances with a linked signed integer selector field) field_class.

See the options property.

Parameters
[in]field_classVariant field class from which to borrow the option at index index.
[in]indexIndex of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class at index index.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked signed integer selector field).
index is less than the number of options in field_class (as returned by bt_field_class_variant_get_option_count()).
See also
bt_field_class_variant_get_option_count() — Returns the number of options contained in a variant field class.

◆ bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const()

const bt_field_class_variant_with_selector_field_integer_signed_option * bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const ( const bt_field_class * field_class,
const char * name )
extern

Borrows the option having the name name from the variant field class (instances with a linked signed integer selector field) field_class.

See the options property.

If there's no option having the name name in field_class, then this function returns NULL.

Parameters
[in]field_classVariant field class from which to borrow the option having the name name.
[in]nameName of the option to borrow from field_class.
Returns

Borrowed reference of the option of field_class having the name name, or NULL if none.

The returned pointer remains valid as long as field_class isn't modified.

Precondition
field_class is not NULL.
field_class is a variant field class (instances with a linked signed integer selector field).
name is not NULL.
See also
bt_field_class_variant_borrow_option_by_name_const() — Borrows an option by name from a variant field class.

◆ bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const()

const bt_integer_range_set_signed * bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const ( const bt_field_class_variant_with_selector_field_integer_signed_option * option)
extern

Borrows the signed integer ranges from the variant field class option (instances with a linked signed integer selector field) option.

See the options property.

Parameters
[in]optionVariant field class option from which to borrow the signed integer ranges.
Returns
Signed integer ranges of option.
Precondition
option is not NULL.

◆ bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const()

static const bt_field_class_variant_option * bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const ( const bt_field_class_variant_with_selector_field_integer_signed_option * option)
inlinestatic

Upcasts the variant field class option (instances with a linked signed integer selector field) option to the common bt_field_class_variant_option type.

See the options property.

Parameters
[in]option

Variant field class option to upcast.

Can be NULL.

Returns
option as a common variant field class option.

◆ bt_field_class_get_ref()

void bt_field_class_get_ref ( const bt_field_class * field_class)
extern

Increments the reference count of the field class field_class.

Parameters
[in]field_class

Field class of which to increment the reference count.

Can be NULL.

See also
bt_field_class_put_ref() — Decrements the reference count of a field class.

◆ bt_field_class_put_ref()

void bt_field_class_put_ref ( const bt_field_class * field_class)
extern

Decrements the reference count of the field class field_class.

Parameters
[in]field_class

Field class of which to decrement the reference count.

Can be NULL.

See also
bt_field_class_get_ref() — Increments the reference count of a field class.