Babeltrace 2 C API  2.0.0
Open-source trace manipulation framework

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.

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
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 array BT_FIELD_CLASS_TYPE_STATIC_ARRAY bt_field_class_array_static_create()
Dynamic array (no length field) BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD bt_field_class_array_dynamic_create()
Dynamic array (with length field) BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD bt_field_class_array_dynamic_create()
Structure BT_FIELD_CLASS_TYPE_STRUCTURE bt_field_class_structure_create()
Option (no selector field) BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD bt_field_class_option_without_selector_create()
Option (boolean selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD bt_field_class_option_with_selector_field_bool_create()
Option (unsigned integer selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD bt_field_class_option_with_selector_field_integer_unsigned_create()
Option (signed integer selector field) BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD bt_field_class_option_with_selector_field_integer_signed_create()
Variant (no selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD bt_field_class_variant_create()
Variant (unsigned integer selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD bt_field_class_variant_create()
Variant (signed integer selector field) BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD bt_field_class_variant_create()

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 a bit array field class's length with bt_field_class_bit_array_get_length().

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().

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 correpond 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 field class's type: bt_field_class_enumeration_unsigned_mapping and bt_field_class_enumeration_signed_mapping.

There is 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.

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 a static array field class's length with bt_field_class_array_static_get_length().

Dynamic array field class

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

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

Dynamic array field class with a length field.

Create with bt_field_class_array_dynamic_create().

A dynamic array field class with a length field has the specific property:

Length field path

Field path of the linked length field class.

Get a dynamic array field class's length field path with bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_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 an array field class's element field class with Use 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 a structure field class member's name with bt_field_class_structure_member_get_name().

Borrow a structure field class member's field class with bt_field_class_structure_member_borrow_field_class() and bt_field_class_structure_member_borrow_field_class_const().

Set a structure field class member's user attributes with bt_field_class_structure_member_set_user_attributes().

Borrow a structure field class member's user attributes 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 option field class either has a selector field (it's linked to a selector field class; see Field classes with links to other field classes) or none. Therefore, the concrete option field classes are:

Option field class without a selector field

Create with bt_field_class_option_without_selector_create().

An option field class without a selector field has no specific properties.

Option field class with a boolean selector field

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

Consequently, the option field class's selector field class is a boolean field class.

Option field class with a boolean selector field.

Create with bt_field_class_option_with_selector_field_bool_create().

An option field class with a boolean selector field has the following specific property:

Selector is reversed?

Whether or not the linked boolean selector field makes the option field class's 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 with an unsigned selector field

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

Consequently, the option field class's selector field class is an unsigned integer field class.

Create with bt_field_class_option_with_selector_field_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.

An option field class with an unsigned integer selector field has the following specific property:

Selector's unsigned integer ranges

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

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

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

Option field class with a signed selector field

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

Consequently, the option field class's selector field class is a signed integer field class.

Create with bt_field_class_option_with_selector_field_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.

An option field class with a signed integer selector field has the following specific property:

Selector's signed integer ranges

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

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

Borrow the selector's signed integer ranges from an option field class with a signed integer selector field with bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const().

Option field classes with a selector have the following common property:

Selector field path

Field path of the linked selector field class.

Borrow such an option field class's selector field path with bt_field_class_option_with_selector_field_borrow_selector_field_path_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 an option field class's optional field class with Use 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. A variant field class either has a selector field (it's linked to a selector field class; see Field classes with links to other field classes) or none. Therefore, the concrete variant field classes are:

Variant field class without a selector field

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

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

A variant field class without a selector field has no specific properties.

Variant field class with an unsigned selector field

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

Consequently, the variant field class's selector field class is an unsigned integer field class.

Variant field class with an unsigned integer selector field.

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

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 such a variant field class's option 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 with a signed selector field

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

Consequently, the variant field class's selector field class is a signed integer field class.

Create with bt_field_class_variant_create(), passing a signed integer field class as the selector field class.

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 such a variant field class's option 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().

Variant field classes with a selector have the following common property:

Selector field path

Field path of the linked selector field class.

Borrow such a variant field class's selector field path with bt_field_class_variant_with_selector_field_borrow_selector_field_path_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.
  • A field class.
  • User attributes.

If the variant field class is linked to a selector field class, 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 the variant field class has a selector field class, 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 any variant field class's option 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 a variant field class option's field class with bt_field_class_variant_option_borrow_field_class() and bt_field_class_variant_option_borrow_field_class_const().

Borrow the option of a variant field classes with a selector field class 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 selector field class's type.

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 the option's ranges from a variant field class with a selector field class 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 a variant field class option's user attributes with bt_field_class_variant_option_set_user_attributes().

Borrow a variant field class option's user attributes with bt_field_class_variant_option_borrow_user_attributes() and bt_field_class_variant_option_borrow_user_attributes_const().

Field classes with links to other field classes

Dynamic array field classes, option field classes, and variant field classes can have links to other, preceding field classes.

When a field class A has a link to another field class B, then an instance (field) of A has a link to an instance of B.

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

Dynamic array field

The linked field, a unsigned integer field, contains the length 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 variant field's current selected field.

Having a linked field class is optional: you always set the field properties with a dedicated function anyway. For example, even if a dynamic array field is linked to a preceding length field, you must still set its length with bt_field_array_dynamic_set_length(). In that case, the value of the 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 the trace format can convey that a preceding, existing field represents the length of a dynamic array field, then the sink component doesn't need to write the dynamic array field's length twice. This is the case of the Common Trace Format, for example.

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

To link a field class A to a preceding field class B, pass field class B when you create field class A. For example, pass the unsigned integer field class to bt_field_class_array_dynamic_create() to create a dynamic array field class with a length field.

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 field class A with a linked field class B, the path to B becomes available in A. The functions to borrow this field path are:

A field path indicates how to reach a linked field from a given root scope. The available scopes are:

BT_FIELD_PATH_SCOPE_PACKET_CONTEXT

Packet context field.

See bt_packet_borrow_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_COMMON_CONTEXT

Event common context field.

See bt_event_borrow_common_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_SPECIFIC_CONTEXT

Event specific context field.

See bt_event_borrow_specific_context_field_const().

BT_FIELD_PATH_SCOPE_EVENT_PAYLOAD

Event payload field.

See bt_event_borrow_payload_field_const().

The rules regarding field class A vs. field class B (linked field class) are:

Type

typedef struct bt_field_class bt_field_class
 Field class.
 

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_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
}
 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. More...
 
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. More...
 

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. More...
 
bt_valuebt_field_class_borrow_user_attributes (bt_field_class *field_class)
 Borrows the user attributes of the field class field_class. More...
 
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). More...
 

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. More...
 

Bit array field class

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. More...
 
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. More...
 

Integer field class

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_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. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 

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. More...
 

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. More...
 

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. More...
 

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 const char *const * bt_field_class_enumeration_mapping_label_array
 Array of const enumeration field class labels. More...
 
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().
 

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. More...
 
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. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
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. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

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. More...
 
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. More...
 

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. More...
 

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. More...
 
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). More...
 

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. More...
 
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. More...
 

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. More...
 

Dynamic array field class with length field

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 (with a length field) field_class. More...
 

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
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). More...
 

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. More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 
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). More...
 

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. More...
 
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). More...
 

Option field class without a 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 (without a selector field) having the optional field class optional_field_class from the trace class trace_class. More...
 

Option field class with a 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 (with a selector field) field_class. More...
 

Option field class with a 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 (with a boolean selector field) having the optional field class optional_field_class from the trace class trace_class. More...
 
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. More...
 
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. More...
 

Option field class with an 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 (with an unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class. More...
 
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. More...
 

Option field class with a 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 (with a signed integer selector field) having the optional field class optional_field_class from the trace class trace_class. More...
 
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. More...
 

Variant field class

bt_field_classbt_field_class_variant_create (bt_trace_class *trace_class, bt_field_class *selector_field_class)
 Creates a variant field class from the trace class trace_class. More...
 
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. More...
 
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. More...
 
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). More...
 
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. More...
 
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). More...
 

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. More...
 
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. More...
 
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). More...
 
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. More...
 
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. More...
 
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). More...
 

Variant field class without a 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_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 (without a selector field) field_class having the name name and the field class option_field_class. More...
 

Variant field class with a 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 (with a selector field) field_class. More...
 

Variant field class with an unsigned integer selector field

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 (with an unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges. More...
 
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 (with an unsigned integer selector field) field_class. More...
 
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 (with an unsigned integer selector field) field_class. More...
 

Variant field class (with an unsigned integer selector field) option

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 (with an unsigned integer selector field) option.
 
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 (with an unsigned integer selector field) option option. More...
 
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 (with an unsigned integer selector field) option option to the common bt_field_class_variant_option type. More...
 

Variant field class with a signed integer selector field

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 (with a signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges. More...
 
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 (with a signed integer selector field) field_class. More...
 
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 (with a signed integer selector field) field_class. More...
 

Variant field class (with a signed integer selector field) option

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 (with a signed integer selector field) option.
 
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 (with a signed integer selector field) option option. More...
 
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 (with a signed integer selector field) option option to the common bt_field_class_variant_option type. More...
 

Reference count

void bt_field_class_get_ref (const bt_field_class *field_class)
 Increments the reference count of the field class field_class. More...
 
void bt_field_class_put_ref (const bt_field_class *field_class)
 Decrements the reference count of the field class field_class. More...
 
#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. More...
 
#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. More...
 

Typedef Documentation

◆ bt_field_class_enumeration_mapping_label_array

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_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 (without a 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 (with a 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 (without a selector field).

BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD 

Option field class (with a 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 (with a 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 (with an 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 (with an 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 (with a 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 (without a selector field).

BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD 

Variant field class (with a 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 (with an 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 (with an 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 (with a signed integer selector field).

This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD.

◆ 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_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)

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

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 
)

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 field class's initial user attributes 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)

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 field class's initial user attributes 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)

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

See bt_field_class_borrow_user_attributes().

◆ bt_field_class_bool_create()

bt_field_class* bt_field_class_bool_create ( bt_trace_class trace_class)

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 
)

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
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)

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_integer_set_field_value_range()

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.

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, 2N - 1]
Precondition
field_class is not NULL.
field_class is not frozen.
field_class is an integer field class.
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)

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_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 
)

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)

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)

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]
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)

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]
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)

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)

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)

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)

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)

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]
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 
)

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 
)

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 is not 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 
)

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, 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 is not 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 
)

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 is not modified.

[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)

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)

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]
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 
)

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 
)

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 is not 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 
)

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, 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 is not 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 
)

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 is not modified.

[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)

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)

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_array_borrow_element_field_class()

bt_field_class* bt_field_class_array_borrow_element_field_class ( bt_field_class field_class)

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)

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 
)

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. bt_pre_fc_not_in_tc{element_field_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)

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 
)

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

If length_field_class is not NULL, then the created dynamic array field class has a linked length field class. See Field classes with links to other field classes 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 is not 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

Linked length field class 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.
element_field_class is not NULL.
element_field_class is not already part of another field class, an event class, or a stream class.
If length_field_class is not 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.

◆ 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)

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

See the length field path property.

This property is only available when a structure field class containing (recursively) field_class is passed to one of:

In the meantime, this function returns NULL.

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 (with a length field).

◆ bt_field_class_structure_create()

bt_field_class* bt_field_class_structure_create ( bt_trace_class trace_class)

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 
)

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 is not 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)

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 
)

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 is not 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 
)

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 
)

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, 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 is not 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 
)

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)

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)

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)

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 
)

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 member's initial user attributes 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)

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 member's initial user attributes 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)

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)

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)

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 
)

Creates an option field class (without a 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.
Precondition
trace_class is not NULL.
optional_field_class is not NULL.
optional_field_class is not already part of another field class, an event class, or a stream class.
Postcondition
On success, optional_field_class is frozen.

◆ 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)

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

See the selector field path property.

This property is only available when a structure field class containing (recursively) field_class is passed to one of:

In the meantime, this function returns NULL.

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 (with a selector field).

◆ 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 
)

Creates an option field class (with a boolean 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
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_classLinked selector field class of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
optional_field_class is not NULL.
optional_field_class is not 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.

◆ 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 
)

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 (with a 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)

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 (with a 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 
)

Creates an option field class (with an unsigned integer 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
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's unsigned integer ranges 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]rangesSelector's unsigned integer ranges of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
optional_field_class is not NULL.
optional_field_class is not already part of another field class, an event class, or a stream class.
selector_field_class is not NULL.
selector_field_class is a 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.

◆ 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)

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

See the selector's unsigned integer ranges 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 (with an 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 
)

Creates an option field class (with a signed integer 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
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's signed integer ranges 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]rangesSelector's signed integer ranges of the option field class to create.
Returns
New option field class reference, or NULL on memory error.
Precondition
trace_class is not NULL.
optional_field_class is not NULL.
optional_field_class is not already part of another field class, an event class, or a stream class.
selector_field_class is not NULL.
selector_field_class is a 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.

◆ 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)

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

See the selector's signed integer ranges 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 (with a 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 
)

Creates a variant field class from the trace class trace_class.

If selector_field_class is not NULL, then the created variant field class has a linked selector field class. See Field classes with links to other field classes 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 is not 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

Linked selector field class 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.
If selector_field_class is not NULL, selector_field_class is an integer field class.
Postcondition
On success, element_field_class is frozen.
On success, selector_field_class is frozen.

◆ bt_field_class_variant_get_option_count()

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.

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 
)

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 is not 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 
)

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 
)

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, 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 is not 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 
)

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)

Returns the name of the variant field class option option.

See the options property.

Parameters
[in]optionVariant field class option of which to get the name.
Returns

Name of option.

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)

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)

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 
)

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 option's initial user attributes 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)

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 option's initial user attributes 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)

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_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 
)

Appends an option to the variant field class (without a 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]nameName of the option to append to field_class (copied).
[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 (without a selector field).
field_class has no option with the name name.
name is not NULL.
option_field_class is not NULL.
option_field_class is not 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)

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

See the selector field path property.

This property is only available when a structure field class containing (recursively) field_class is passed to one of:

In the meantime, this function returns NULL.

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 (with a 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 
)

Appends an option to the variant field class (with an 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]nameName of the option to append to field_class (copied).
[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 (with an unsigned integer selector field).
field_class has no option with the name name.
name is not NULL.
option_field_class is not NULL.
option_field_class is not 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 do not 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 
)

Borrows the option at index index from the variant field class (with an 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 is not modified.

Precondition
field_class is not NULL.
field_class is a variant field class (with an 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 
)

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

See the options property.

If there's no option having the name name in field_class, 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 is not modified.

Precondition
field_class is not NULL.
field_class is a variant field class (with an 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)

Borrows the unsigned integer ranges from the variant field class (with an unsigned integer selector field) option 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 (with an unsigned integer selector field) option 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_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 
)

Appends an option to the variant field class (with a 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]nameName of the option to append to field_class (copied).
[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 (with a signed integer selector field).
field_class has no option with the name name.
name is not NULL.
option_field_class is not NULL.
option_field_class is not 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 do not 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 
)

Borrows the option at index index from the variant field class (with a 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 is not modified.

Precondition
field_class is not NULL.
field_class is a variant field class (with a 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 
)

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

See the options property.

If there's no option having the name name in field_class, 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 is not modified.

Precondition
field_class is not NULL.
field_class is a variant field class (with a 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)

Borrows the signed integer ranges from the variant field class (with a signed integer selector field) option 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 (with a signed integer selector field) option 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)

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)

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.
BT_FIELD_CLASS_TYPE_INTEGER
Integer field class.
Definition: field-class.h:1236
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)
Returns whether or not the field class type type conceptually is the field class type other_type.
Definition: field-class.h:1542
BT_FIELD_CLASS_TYPE_UNSIGNED_INTEGER
Unsigned integer field class.
Definition: field-class.h:1244