Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
|
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:
Classes of fields which contain a simple value.
The scalar field classes are:
Classes of fields which contain other fields.
The container field classes are:
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:
bt_field_class_*_create()
function.A field class with a pale background is an abstract field class: you cannot create it, but it has properties, therefore there are functions which apply to it.
For example, bt_field_class_integer_set_preferred_display_base() applies to any integer field class.
Field classes are shared objects: get a new reference with bt_field_class_get_ref() and put an existing reference with bt_field_class_put_ref().
Some library functions freeze field classes on success. The documentation of those functions indicate this postcondition.
All the field class types share the same C type, bt_field_class.
Get the type enumerator of a field class with bt_field_class_get_type(). Get whether or not a field class type conceptually is a given type with the inline bt_field_class_type_is() function.
Since Babeltrace 2.1, get the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which a field class was created with bt_field_class_get_graph_mip_version().
The following table shows the available type enumerators and creation functions for each type of concrete (non-abstract) field class:
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.
A field class has the following common property:
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().
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.
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:
Number of bits contained in the instances (bit array fields) of the bit array field class.
As of Babeltrace 2.0, the maximum length of a bit array field is 64.
You cannot change the length once the bit array field class is created.
Get the length of instances of a bit array field class with bt_field_class_bit_array_get_length().
Set of flags of the bit array field class.
A bit array field class flag is a label (string) and an unsigned integer range set, a set of bit index ranges. In the value of an instance (a bit array field) returned by bt_field_bit_array_get_value_as_integer(), the index of the least significant bit is 0.
The integer ranges of a given flag or of multiple flags of the same bit array field class can overlap. For example, a bit array field class can have those two flags:
GALLERY
: [1, 4], [8, 14]LUNCH
: [3, 6]In that case, the bit indexes 2 and 12 correspond to the label GALLERY
, the bit index 5 to the label LUNCH
, and the bit index 3 to the labels GALLERY
and LUNCH
.
Given some bit flag field value (as an integer), a flag is said to be active when at least one of its bit indexes is the index of a set bit of the value. For example, given the 8-bit bit array field value
where the first element is the first bit of the bit array field (the value as an integer being 0xad):
Two flags of the same bit array field class cannot have the same label.
Add a flag to a bit array field class with bt_field_class_bit_array_add_flag().
Get the number of flags in a bit array field class with bt_field_class_bit_array_get_flag_count().
Borrow a flag from a bit array field class with bt_field_class_bit_array_borrow_flag_by_index_const() and bt_field_class_bit_array_borrow_flag_by_label_const().
A bit array field class flag is a unique object: it belongs to the bit array field class which contains it.
The type of a bit array field class flag is bt_field_class_bit_array_flag.
Get the label of a bit array field class flag with bt_field_class_bit_array_flag_get_label().
Borrow the bit index range set of a bit array field class flag with bt_field_class_bit_array_flag_borrow_index_ranges_const().
Get the labels of all the active flags of a bit array field class for the set bits of some integral value with bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
Integer field classes 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:
Its instances (unsigned integer fields) contain an unsigned integral value (uint64_t
).
Create with bt_field_class_integer_unsigned_create().
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:
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().
Hints about the values of the instances (integer fields) integer field class.
As of Babeltrace 2.0, the only available hint is BT_FIELD_CLASS_INTEGER_FIELD_VALUE_HINT_SMALL which means that instances are expected to hold small integer values.
Use bt_field_class_integer_set_field_value_hints(), bt_field_class_integer_get_field_value_hints(), and bt_field_class_integer_has_field_value_hint().
Preferred 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 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:
Its instances (unsigned enumeration fields) contain an unsigned value (uint64_t
).
Create with bt_field_class_enumeration_unsigned_create().
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:
Set of mappings of the enumeration field class.
An enumeration field class mapping is a label (string) and an integer range set.
The integer ranges of a given mapping or of multiple mappings of the same enumeration field class can overlap. For example, an enumeration field class can have those two mappings:
CALORIES
: [1, 11], [15, 37]SODIUM
: [7, 13]In that case, the values 2 and 30 correspond to the label CALORIES
, the value 12 to the label SODIUM
, and the value 10 to the labels CALORIES
and SODIUM
.
Two mappings of the same enumeration field class cannot have the same label.
Add a mapping to an enumeration field class with bt_field_class_enumeration_unsigned_add_mapping() or bt_field_class_enumeration_signed_add_mapping().
Get the number of mappings in an enumeration field class with bt_field_class_enumeration_get_mapping_count().
Borrow a mapping from an enumeration field class with bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const(), bt_field_class_enumeration_signed_borrow_mapping_by_index_const(), bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const(), and bt_field_class_enumeration_signed_borrow_mapping_by_label_const().
An enumeration field class mapping is a unique object: it belongs to the enumeration field class which contains it.
There are two enumeration field class mapping types, depending on the type of the field class: bt_field_class_enumeration_unsigned_mapping and bt_field_class_enumeration_signed_mapping.
There's also the bt_field_class_enumeration_mapping type for common properties and operations (for example, bt_field_class_enumeration_mapping_get_label()). Upcast a specific enumeration field class mapping to the bt_field_class_enumeration_mapping type with bt_field_class_enumeration_unsigned_mapping_as_mapping_const() or bt_field_class_enumeration_signed_mapping_as_mapping_const().
Get all the enumeration field class labels mapped to a given integer value with bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().
Real field classes 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:
Its instances (single-precision real fields) contain a float
value.
Create with bt_field_class_real_single_precision_create().
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.
A string field class is the class of string fields.
A string field contains an UTF-8 string value.
Create a string field class with bt_field_class_string_create().
A string field class has no specific properties.
BLOB field classes are classes of BLOB fields.
BLOB fields contain zero or more bytes of binary data.
A BLOB field class is an abstract field class: you cannot create one. The concrete BLOB field classes are:
Its instances (static BLOB fields) contain a fixed number of bytes.
Create with bt_field_class_blob_static_create().
A static BLOB field class has the following specific property:
Number of bytes contained in the instances (static BLOB fields) of the static BLOB field class.
You cannot change the length once the static BLOB field class is created.
Get the length of instances of a static BLOB field class with bt_field_class_blob_static_get_length().
Its instances (dynamic BLOB fields) contain a variable number of bytes.
There are two types of dynamic BLOB field classes: instances without or with a linked length field. See Fields with links to other fields to learn more.
Create with bt_field_class_blob_dynamic_without_length_field_location_create() or bt_field_class_blob_dynamic_with_length_field_location_create().
The class of a dynamic BLOB field with a linked length field has the following specific property:
Field location to locate the linked length field of an instance.
Borrow the length field location of a dynamic BLOB field class with bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const().
BLOB field classes have the following common property:
IANA media type of instances of the BLOB field class.
Use bt_field_class_blob_set_media_type() and bt_field_class_blob_get_media_type().
Array field classes 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:
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:
Number of fields contained in the instances (static array fields) of the static array field class.
You cannot change the length once the static array field class is created.
Get the length of instances of a static array field class with bt_field_class_array_static_get_length().
Its instances (dynamic array fields) contain a variable number of fields.
There are two types of dynamic array field classes: instances without or with a linked length field. See Fields with links to other fields to learn more.
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
The class of a dynamic array field with a linked length field has one of the following specific properties, depending on the effective MIP version of the trace processing graph:
Field path to locate the linked length field of an instance.
Borrow the length field path of a dynamic array field class with bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const().
Field location to locate the linked length field of an instance.
Borrow the length field location of a dynamic array field class with bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const().
Array field classes have the following common property:
Class of the fields contained in the instances (array fields) of the array field class.
You cannot change the element field class once the array field class is created.
Borrow the element field class of an array field class with bt_field_class_array_borrow_element_field_class() and bt_field_class_array_borrow_element_field_class_const().
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:
Ordered list of members (zero or more) of the structure field class.
Each member has:
The instances (structure fields) of a structure field class have members which are instances of the corresponding structure field class members.
Append a member to a structure field class with bt_field_class_structure_append_member().
Borrow a member from a structure field class with bt_field_class_structure_borrow_member_by_index(), bt_field_class_structure_borrow_member_by_name(), bt_field_class_structure_borrow_member_by_index_const(), and bt_field_class_structure_borrow_member_by_name_const().
A structure field class member is a unique object: it belongs to the structure field class which contains it.
The type of a structure field class member is bt_field_class_structure_member.
Get the name of a structure field class member with bt_field_class_structure_member_get_name().
Borrow the field class of a structure field class member with bt_field_class_structure_member_borrow_field_class() and bt_field_class_structure_member_borrow_field_class_const().
Set the user attributes of a structure field class member with bt_field_class_structure_member_set_user_attributes().
Borrow the user attributes of a structure field class member with bt_field_class_structure_member_borrow_user_attributes() and bt_field_class_structure_member_borrow_user_attributes_const().
Option field classes are classes of option fields.
An option field either does or doesn't contain a field, called its optional field.
An option field class is an abstract field class: you cannot create one. An instance of an option field class either has a linked selector field (see Fields with links to other fields) or none. Therefore, the concrete option field classes are:
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
The class of an option field without a linked selector field has no specific properties.
The linked selector field of an option field class instance (an option field) is a boolean field.
Create with, depending on the effective Message Interchange Protocol (MIP) version:
The class of an option field with a linked boolean selector field has the following specific property:
Whether or not the linked boolean selector field make the option field class instance (an option field) contain a field when it's BT_TRUE or when it's BT_FALSE.
If this property is BT_TRUE, then if the linked selector field has the value BT_FALSE, the option field contains a field.
Use bt_field_class_option_with_selector_field_bool_set_selector_is_reversed() and bt_field_class_option_with_selector_field_bool_selector_is_reversed().
The linked selector field of an option field class instance (an option field) is an unsigned integer field.
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
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.
The class of an option field with a linked unsigned integer selector field has the following specific property:
If the linked unsigned integer selector field of an option field class instance (an option field) has a value which intersects with the unsigned integer ranges of the selector, then the option field contains a field.
You cannot change the unsigned integer ranges of the selector once the option field class is created.
Borrow the unsigned integer ranges of the selector from such an option field class with bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const().
The linked selector field of an option field class instance (an option field) is a signed integer field.
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
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.
The class of an option field class with a linked signed integer selector field has the following specific property:
If the linked signed integer selector field of an option field class instance (an option field) has a value which intersects with the signed integer ranges of the selector, then the option field contains a field.
You cannot change the signed integer ranges of the selector once the option field class is created.
Borrow the signed integer ranges of the selector from such an option field class with bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const().
The classes of option fields with a linked selector field have one of the following common properties, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
Field path to locate the linked selector field of an instance.
Borrow the selector field path of such an option field class with bt_field_class_option_with_selector_field_borrow_selector_field_path_const().
Field location to locate the linked selector field of an instance.
Borrow the selector field location of such an option field class with bt_field_class_option_with_selector_field_borrow_selector_field_location_const().
Option field classes have the following common property:
Class of the optional field of an instance (option field) of the option field class.
You cannot change the optional field class once the option field class is created.
Borrow the optional field class of an option field class with bt_field_class_option_borrow_field_class() and bt_field_class_option_borrow_field_class_const().
Variant field classes are classes of variant fields.
A variant field contains a field amongst one or more possible fields.
Variant field classes contain one or more options. Each variant field class option has a name, a field class, user attributes, and integer ranges, depending on the exact type.
A variant field class is an abstract field class: you cannot create one. An instance of a variant field class either has a linked selector field (see Fields with links to other fields) or none. Therefore, the concrete variant field classes are:
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
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().
The class of a variant field without a linked selector field has no specific properties.
The linked selector field of a variant field class instance (a variant field) is an unsigned integer field.
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
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 an option of such a variant field class with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const().
The linked selector field of a variant field class instance (a variant field) is a signed integer field.
Create with, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
bt_field_class_variant_create(), passing an 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 an option of such a variant field class with bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const().
The classes of variant fields with a linked selector field have one of the following common properties, depending on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
Field path to locate the linked selector field of an instance.
Borrow the selector field path of such a variant field class with bt_field_class_variant_with_selector_field_borrow_selector_field_path_const().
Field location to locate the linked selector field of an instance.
Borrow the selector field location of such a variant field class with bt_field_class_variant_with_selector_field_borrow_selector_field_location_const().
Variant field classes have the following common property:
Options of the variant field class.
Each option has:
A name, unique amongst all the option names of the same variant field class.
The name is optional when the effective Message Interchange Protocol version of the trace processing graph is 1 (available since Babeltrace 2.1).
If an instance of the variant field class is linked to a selector field, then each option also has an integer range set. In that case, the ranges of a given option cannot overlap any range of any other option.
A variant field class must contain at least one option.
Depending on whether or not an instance of the variant field class has a linked selector field, append an option to a variant field class with bt_field_class_variant_without_selector_append_option(), bt_field_class_variant_with_selector_field_integer_unsigned_append_option(), or bt_field_class_variant_with_selector_field_integer_signed_append_option().
Get the number of options contained in a variant field class with bt_field_class_variant_get_option_count().
A variant field class option is a unique object: it belongs to the variant field class which contains it.
Borrow an option of any variant field class with bt_field_class_variant_borrow_option_by_index(), bt_field_class_variant_borrow_option_by_name(), bt_field_class_variant_borrow_option_by_index_const(), and bt_field_class_variant_borrow_option_by_name_const().
Those functions return the common bt_field_class_variant_option type. Get the name of a variant field class option with bt_field_class_variant_option_get_name(). Borrow the field class of a variant field class option with bt_field_class_variant_option_borrow_field_class() and bt_field_class_variant_option_borrow_field_class_const().
Borrow the option of the class of a variant field with a linked selector field with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const(), bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const(), bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const(), or bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const(), depending on the type of the selector field class.
Those functions return the bt_field_class_variant_with_selector_field_integer_unsigned_option or bt_field_class_variant_with_selector_field_integer_signed_option type. Upcast those types to the bt_field_class_variant_option type with bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const() or bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const().
Borrow ranges of an option from the class of a variant field with a linked selector field with bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const() or bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const().
Set the user attributes of a variant field class option with bt_field_class_variant_option_set_user_attributes().
Borrow the user attributes of a variant field class option with bt_field_class_variant_option_borrow_user_attributes() and bt_field_class_variant_option_borrow_user_attributes_const().
An instance of a dynamic BLOB field class (available since Babeltrace 2.1), a dynamic array field class, a option field class, or a variant field class may have a link to another, anterior field within the same packet or event.
This feature exists so that the linked field can contain the value of a dynamic property of the "dependent" field. Those properties are:
The linked field, a unsigned integer field, contains the length (number of bytes) of the dynamic BLOB field.
The linked field, a unsigned integer field, contains the length (number of elements) of the dynamic array field.
The linked field, either a boolean field or an integer field, indicates whether or not the option field has a field.
Having a linked field is optional: you always set the field properties with a dedicated function anyway. For example, even if a dynamic array field is linked to an anterior length field, you must still set its integral length with bt_field_array_dynamic_set_length(). In that case, the value of the linked length field must match what you pass to bt_field_array_dynamic_set_length().
The purpose of this feature is to eventually save space when a sink component writes trace files: if, for example, the trace format can convey that an anterior, existing field represents the length of a dynamic array field, then the sink component doesn't need to write the length of the dynamic array field twice. This is the case of the Common Trace Format, for example.
How exactly you link a dependent field to another field at the field class level depends on the effective Message Interchange Protocol (MIP) version of the trace processing graph:
Pass the class of the linked field when you create the class of the dependent field.
For example, pass the unsigned integer length field class to bt_field_class_array_dynamic_create() to create a class of dynamic array field with a linked length field.
Then, when you call bt_stream_class_set_packet_context_field_class(), bt_stream_class_set_event_common_context_field_class(), bt_event_class_set_specific_context_field_class(), or bt_event_class_set_payload_field_class() with a field class containing a dependent field class with the class a linked field, the path to the linked field becomes available in the dependent field class. The functions to borrow said field path are:
Pass the field location when you create the class of the dependent field.
For example, pass the length field location to bt_field_class_array_dynamic_with_length_field_location_create() to create a class of dynamic array field with a linked length field.
The functions to borrow the field location of a field class are:
Both field paths (MIP 0 API) and field locations (MIP 1 API; available since Babeltrace 2.1) indicate how to reach the linked field of a dependent field from some specific root scope (the starting point). The available scopes are:
Context field of the current packet.
Common context field of the current event.
Specific context field of the current event.
Payload field of the current event.
The difference between a field path and a field location is that a field path works with structure field member indexes while a field location works with structure field member names. The latter is more versatile because many fields may be candidates for the length/selector field of a dependent field (when they're all part of the same variant field).
The rules regarding the dependent field A vs. the linked field B are:
If A is within some packet context field, then B must also be in the same packet context field.
If A is within some common event context field, then B must be in one of:
If A is within some specific event context field, then B must be in one of:
If A is within some event payload field, then B must be in one of:
B must precede A.
Considering that the members of a structure field are ordered, then B must be part of a member that's before the member which contains A in their lowest common ancestor structure field.
BLOB field class (available since Babeltrace 2.1) | |
enum | bt_field_class_blob_set_media_type_status { BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OK , BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROR } |
Status codes for bt_field_class_blob_set_media_type(). More... | |
typedef enum bt_field_class_blob_set_media_type_status | bt_field_class_blob_set_media_type_status |
Status codes for bt_field_class_blob_set_media_type(). | |
bt_field_class * | bt_field_class_blob_static_create (bt_trace_class *trace_class, uint64_t length) |
Creates a static BLOB field class having the length length from the trace class trace_class. | |
bt_field_class * | bt_field_class_blob_dynamic_without_length_field_location_create (bt_trace_class *trace_class) |
Creates a dynamic BLOB field class (instances without a linked length field) from the trace class trace_class. | |
bt_field_class * | bt_field_class_blob_dynamic_with_length_field_location_create (bt_trace_class *trace_class, const bt_field_location *length_field_location) |
Creates a dynamic BLOB field class (instances with a linked length field) having the length field location length_field_location from the trace class trace_class. | |
uint64_t | bt_field_class_blob_static_get_length (const bt_field_class *field_class) |
Returns the length of the static BLOB field class field_class. | |
const bt_field_location * | bt_field_class_blob_dynamic_with_length_field_borrow_length_field_location_const (const bt_field_class *field_class) |
Borrows the length field location from the dynamic BLOB field class (instances with a linked length field) field_class. | |
bt_field_class_blob_set_media_type_status | bt_field_class_blob_set_media_type (bt_field_class *field_class, const char *media_type) |
Sets the IANA media type of the BLOB field class field_class to a copy of media_type. | |
const char * | bt_field_class_blob_get_media_type (const bt_field_class *field_class) |
Returns the IANA media type of the BLOB field class field_class. | |
Type | |
typedef struct bt_field_class | bt_field_class |
Field class. | |
Enumeration field class mapping | |
typedef struct bt_field_class_enumeration_mapping | bt_field_class_enumeration_mapping |
Enumeration field class mapping. | |
uint64_t | bt_field_class_enumeration_get_mapping_count (const bt_field_class *field_class) |
Returns the number of mappings contained in the enumeration field class field_class. | |
const char * | bt_field_class_enumeration_mapping_get_label (const bt_field_class_enumeration_mapping *mapping) |
Returns the label of the enumeration field class mapping mapping. | |
Unsigned enumeration field class mapping | |
typedef struct bt_field_class_enumeration_unsigned_mapping | bt_field_class_enumeration_unsigned_mapping |
Unsigned enumeration field class mapping. | |
const bt_integer_range_set_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. | |
static const bt_field_class_enumeration_mapping * | bt_field_class_enumeration_unsigned_mapping_as_mapping_const (const bt_field_class_enumeration_unsigned_mapping *mapping) |
Upcasts the unsigned enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type. | |
Signed enumeration field class mapping | |
typedef struct bt_field_class_enumeration_signed_mapping | bt_field_class_enumeration_signed_mapping |
Signed enumeration field class mapping. | |
const bt_integer_range_set_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. | |
static const bt_field_class_enumeration_mapping * | bt_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. | |
Common property | |
void | bt_field_class_set_user_attributes (bt_field_class *field_class, const bt_value *user_attributes) |
Sets the user attributes of the field class field_class to user_attributes. | |
bt_value * | bt_field_class_borrow_user_attributes (bt_field_class *field_class) |
Borrows the user attributes of the field class field_class. | |
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). | |
Effective Message Interchange Protocol (MIP) version access | |
uint64_t | bt_field_class_get_graph_mip_version (const bt_field_class *field_class) |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which field_class was created. | |
Boolean field class | |
bt_field_class * | bt_field_class_bool_create (bt_trace_class *trace_class) |
Creates a boolean field class from the trace class trace_class. | |
Unsigned integer field class | |
bt_field_class * | bt_field_class_integer_unsigned_create (bt_trace_class *trace_class) |
Creates an unsigned integer field class from the trace class trace_class. | |
Signed integer field class | |
bt_field_class * | bt_field_class_integer_signed_create (bt_trace_class *trace_class) |
Creates an signed integer field class from the trace class trace_class. | |
Single-precision real field class | |
bt_field_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. | |
Double-precision real field class | |
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. | |
String field class | |
bt_field_class * | bt_field_class_string_create (bt_trace_class *trace_class) |
Creates a string field class from the trace class trace_class. | |
Array field class | |
bt_field_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. | |
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). | |
Static array field class | |
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. | |
uint64_t | bt_field_class_array_static_get_length (const bt_field_class *field_class) |
Returns the length of the static array field class field_class. | |
Dynamic array field class | |
bt_field_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. | |
bt_field_class * | bt_field_class_array_dynamic_without_length_field_location_create (bt_trace_class *trace_class, bt_field_class *element_field_class) |
Creates a dynamic array field class (instances without a linked length field) having the element field class element_field_class from the trace class trace_class. | |
Dynamic array field class: instances with linked length field | |
bt_field_class * | bt_field_class_array_dynamic_with_length_field_location_create (bt_trace_class *trace_class, bt_field_class *element_field_class, const bt_field_location *length_field_location) |
Creates a dynamic array field class (instances with a linked length field) having the element field class element_field_class and the length field location length_field_location from the trace class trace_class. | |
const bt_field_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 (instances with a linked length field) field_class. | |
const bt_field_location * | bt_field_class_array_dynamic_with_length_field_borrow_length_field_location_const (const bt_field_class *field_class) |
Borrows the length field location from the dynamic array field class (instances with a linked length field) field_class. | |
Option field class | |
bt_field_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. | |
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). | |
Option field class: instances without a linked selector field | |
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 (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class. | |
bt_field_class * | bt_field_class_option_without_selector_field_location_create (bt_trace_class *trace_class, bt_field_class *optional_field_class) |
Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class. | |
Option field class: instances with a linked selector field | |
const bt_field_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 (instances with a linked selector field) field_class. | |
const bt_field_location * | bt_field_class_option_with_selector_field_borrow_selector_field_location_const (const bt_field_class *field_class) |
Borrows the selector field location from the option field class (instances with a linked selector field) field_class. | |
Option field class: instances with a linked boolean selector field | |
bt_field_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 (instances with a linked boolean selector field) having the optional field class optional_field_class from the trace class trace_class. | |
bt_field_class * | bt_field_class_option_with_selector_field_location_bool_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location) |
Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class. | |
void | bt_field_class_option_with_selector_field_bool_set_selector_is_reversed (bt_field_class *field_class, bt_bool selector_is_reversed) |
Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed. | |
bt_bool | bt_field_class_option_with_selector_field_bool_selector_is_reversed (const bt_field_class *field_class) |
Returns whether or not the selector of the option field class (with a boolean selector field) is reversed. | |
Option field class: instances with a linked unsigned integer selector field | |
bt_field_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 (instances with a linked unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class. | |
bt_field_class * | bt_field_class_option_with_selector_field_location_integer_unsigned_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_unsigned *ranges) |
Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class. | |
const bt_integer_range_set_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. | |
Option field class: instances with a linked signed integer selector field | |
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 (instances with a linked signed integer selector field) having the optional field class optional_field_class from the trace class trace_class. | |
bt_field_class * | bt_field_class_option_with_selector_field_location_integer_signed_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, const bt_field_location *selector_field_location, const bt_integer_range_set_signed *ranges) |
Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class. | |
const bt_integer_range_set_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. | |
Variant field class | |
bt_field_class * | bt_field_class_variant_create (bt_trace_class *trace_class, bt_field_class *selector_field_class) |
Creates an empty variant field class from the trace class trace_class. | |
uint64_t | bt_field_class_variant_get_option_count (const bt_field_class *field_class) |
Returns the number of options contained in the variant field class field_class. | |
bt_field_class_variant_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. | |
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). | |
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. | |
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). | |
Variant field class: instances with a linked unsigned integer selector field | |
bt_field_class * | bt_field_class_variant_with_selector_field_location_integer_unsigned_create (bt_trace_class *trace_class, const bt_field_location *selector_field_location) |
Creates an empty variant field class (instances with a linked unsigned integer selector field) having the selector field location selector_field_location from the trace class trace_class. | |
bt_field_class_variant_with_selector_field_integer_append_option_status | bt_field_class_variant_with_selector_field_integer_unsigned_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_unsigned *ranges) |
Appends an option to the variant field class (instances with a linked unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges. | |
const bt_field_class_variant_with_selector_field_integer_unsigned_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 (instances with a linked unsigned integer selector field) field_class. | |
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 (instances with a linked unsigned integer selector field) field_class. | |
Variant field class: instances with a linked signed integer selector field | |
bt_field_class * | bt_field_class_variant_with_selector_field_location_integer_signed_create (bt_trace_class *trace_class, const bt_field_location *selector_field_location) |
Creates an empty variant field class (instances with a linked signed integer selector field) having the selector field location selector_field_location from the trace class trace_class. | |
bt_field_class_variant_with_selector_field_integer_append_option_status | bt_field_class_variant_with_selector_field_integer_signed_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class, const bt_integer_range_set_signed *ranges) |
Appends an option to the variant field class (instances with a linked signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges. | |
const bt_field_class_variant_with_selector_field_integer_signed_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 (instances with a linked signed integer selector field) field_class. | |
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 (instances with a linked signed integer selector field) field_class. | |
Reference count | |
void | bt_field_class_get_ref (const bt_field_class *field_class) |
Increments the reference count of the field class field_class. | |
void | bt_field_class_put_ref (const bt_field_class *field_class) |
Decrements the reference count of the field class field_class. | |
#define | BT_FIELD_CLASS_PUT_REF_AND_RESET(_field_class) |
Decrements the reference count of the field class _field_class, and then sets _field_class to NULL . | |
#define | BT_FIELD_CLASS_MOVE_REF(_dst, _src) |
Decrements the reference count of the field class _dst, sets _dst to _src, and then sets _src to NULL . | |
Status codes for bt_field_class_bit_array_add_flag().
typedef char const* const* bt_field_class_bit_array_flag_label_array |
Array of const
bit array field class flag labels.
Returned by bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
typedef enum bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer_status |
Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
Integer field class field value hint.
typedef char const* const* bt_field_class_enumeration_mapping_label_array |
Array of const
enumeration field class mapping labels.
Returned by bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().
Status codes for bt_field_class_blob_set_media_type().
enum bt_field_class_type |
Field class type enumerators.
Enumerator | |
---|---|
BT_FIELD_CLASS_TYPE_BOOL | |
BT_FIELD_CLASS_TYPE_BIT_ARRAY | |
BT_FIELD_CLASS_TYPE_INTEGER |
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 |
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 |
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 | |
BT_FIELD_CLASS_TYPE_BLOB |
No field class has this type: use it with bt_field_class_type_is().
|
BT_FIELD_CLASS_TYPE_STATIC_BLOB | Static BLOB field class. This type conceptually inherits BT_FIELD_CLASS_TYPE_BLOB.
|
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB | Dynamic BLOB field class. This type conceptually inherits BT_FIELD_CLASS_TYPE_BLOB. No field class has this type: use it with bt_field_class_type_is().
|
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITHOUT_LENGTH_FIELD | Dynamic BLOB field class (instances without a linked length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB.
|
BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB_WITH_LENGTH_FIELD | Dynamic BLOB field class (instances with a linked length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_BLOB.
|
BT_FIELD_CLASS_TYPE_STRUCTURE | |
BT_FIELD_CLASS_TYPE_ARRAY |
No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_STATIC_ARRAY | Static array field class. This type conceptually inherits BT_FIELD_CLASS_TYPE_ARRAY. |
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY | Dynamic array field class. This type conceptually inherits BT_FIELD_CLASS_TYPE_ARRAY. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITHOUT_LENGTH_FIELD | Dynamic array field class (instances without a linked length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY. |
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD | Dynamic array field class (instances with a linked length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY. |
BT_FIELD_CLASS_TYPE_OPTION |
No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD | Option field class (instances without a linked selector field). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD | Option field class (instances with a linked selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD | Option field class (instances with a linked boolean selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD | Option field class (instances with a linked integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD | Option field class (instances with a linked unsigned integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD | Option field class (instances with a linked signed integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_VARIANT |
No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD | Variant field class (instances without a linked selector field). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD | Variant field class (instances with a linked selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD | Variant field class (instances with a linked integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD | Option field class (instances with a linked unsigned integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD | Option field class (instances with a linked signed integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD. |
Status codes for bt_field_class_bit_array_add_flag().
Enumerator | |
---|---|
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_OK | Success. |
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_MEMORY_ERROR | Out of memory. |
Status codes for bt_field_class_bit_array_get_active_flag_labels_for_value_as_integer().
Integer field class preferred display bases.
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. |
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. |
Status codes for bt_field_class_blob_set_media_type().
Enumerator | |
---|---|
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OK | Success. |
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROR | Out of memory. |
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. |
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. |
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. |
#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
.
_field_class | Field class of which to decrement the reference count. Can contain |
#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.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
|
extern |
Returns the type enumerator of the field class field_class.
[in] | field_class | Field class of which to get the type enumerator |
NULL
.
|
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.
[in] | type | Field class type to check against other_type. |
[in] | other_type | Field class type against which to check type. |
|
extern |
Sets the user attributes of the field class field_class to user_attributes.
See the user attributes property.
bt_field_class_*_create()
functions, the initial user attributes of the field class is an empty map value. Therefore you can borrow it with bt_field_class_borrow_user_attributes() and fill it directly instead of setting a new one with this function.[in] | field_class | Field class of which to set the user attributes to user_attributes. |
[in] | user_attributes | New user attributes of field_class. |
NULL
. NULL
.
|
extern |
Borrows the user attributes of the field class field_class.
See the user attributes property.
bt_field_class_*_create()
functions, the initial user attributes of the field class is an empty map value.[in] | field_class | Field class from which to borrow the user attributes. |
NULL
.const
version of this function.
|
extern |
Borrows the user attributes of the field class field_class (const
version).
|
extern |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph containing the component from which field_class was created.
[in] | field_class | Field class of which to get the effective MIP version. |
NULL
.
|
extern |
Creates a boolean field class from the trace class trace_class.
On success, the returned boolean field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a boolean field class. |
NULL
on memory error.NULL
.
|
extern |
Creates a bit array field class with the length length from the trace class trace_class.
On success, the returned bit array field class has the following property values:
Property | Value |
---|---|
Length | length |
Message Interchange Protocol version 1: flags (available since Babeltrace 2.1) | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a bit array field class. |
[in] | length | Length (number of bits) of the instances of the bit array field class to create. |
NULL
on memory error.NULL
.
|
extern |
Returns the length of the bit array field class field_class.
See the length property.
[in] | field_class | Bit array field class of which to get the length. |
NULL
.
|
extern |
Adds a flag to the bit array field class field_class having the label label and the bit index ranges index_ranges.
See the flags property.
[in] | field_class | Bit array field class to which to add a flag having the label label and the bit index ranges index_ranges. |
[in] | label | Label of the flag to add to field_class (copied). |
[in] | index_ranges | Bit index ranges of the flag to add to field_class. |
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_OK | Success. |
BT_FIELD_CLASS_BIT_ARRAY_ADD_FLAG_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Returns the number of flags contained in the bit array field class field_class.
See the flags property.
[in] | field_class | Bit array field class of which to get the number of contained flags. |
NULL
.
|
extern |
Borrows the flag at index index from the bit array field class field_class.
See the flags property.
[in] | field_class | Bit array field class from which to borrow the flag at index index. |
[in] | index | Index of the flag to borrow from field_class. |
Borrowed reference of the flag of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the flag having the label label from the bit array field class field_class.
See the flags property.
If there's no flag having the label label in field_class, then this function returns NULL
.
[in] | field_class | Bit array field class from which to borrow the flag having the label label. |
[in] | label | Label of the flag to borrow from field_class. |
Borrowed reference of the flag of field_class having the label label, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.
|
extern |
Returns the labels of all the active flags of the bit array field class field_class for the set bits of value_as_integer (a bit array field value as an integer).
See the flags property.
This function sets *labels to the resulting array and *count to the number of labels in *labels.
On success, if there's no active flags for value_as_integer, *count is 0.
[in] | field_class | Bit array field class from which to get the labels of the active flags for value_as_integer. |
[in] | value_as_integer | Bits, as an integer, for which to get the labels of the active flags of field_class. In this integral value, the index of the least significant bit is 0. |
[out] | labels | On success, *labels is an array of labels of the active flags of field_class for value. The number of labels in *labels is *count. The array is owned by field_class and remains valid as long as:
|
[out] | count | On success, *count is the number of labels in *labels (can be 0). |
BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_OK | Success. |
BT_FIELD_CLASS_BIT_ARRAY_GET_ACTIVE_FLAG_LABELS_FOR_VALUE_AS_INTEGER_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Returns the label of the bit array field class flag flag.
See the flags property.
[in] | flag | Bit array field class flag of which to get the label. |
Label of flag.
The returned pointer remains valid as long as flag exists.
NULL
.
|
extern |
Borrows the bit index ranges from the bit array field class flag flag.
See the flags property.
[in] | flag | Bit array field class flag from which to borrow the bit index ranges. |
NULL
.
|
extern |
Sets the field value range of the integer field class field_class to n.
See the field value range property.
[in] | field_class | Integer field class of which to set the field value range to n. |
[in] | n | N in:
|
NULL
.
|
extern |
Returns the field value range of the integer field class field_class.
See the field value range property.
[in] | field_class | Integer field class of which to get the field value range. |
Field value range of field_class, that is, N in:
[0, 2N − 1]
NULL
. void bt_field_class_integer_set_field_value_hints | ( | bt_field_class * | field_class, |
uint64_t | hints ) |
Sets the field value hints of the integer field class field_class to a bitwise disjunction (OR) of bt_field_class_integer_field_value_hint enumerators.
See the field value hints property.
[in] | field_class | Integer field class of which to set the field value hints to hints. |
[in] | hints | Bitwise disjunction (OR) of of bt_field_class_integer_field_value_hint enumerators. |
NULL
. uint64_t bt_field_class_integer_get_field_value_hints | ( | const bt_field_class * | field_class | ) |
Returns the field value hints of the integer field class field_class.
See the field value hints property.
[in] | field_class | Integer field class of which to get the field value hints. |
NULL
.
|
inlinestatic |
Returns whether or not the integer field class field_class has the field value hint hint.
See the field value hints property.
[in] | field_class | Integer field class of which to get whether or not it has the field value hint hint. |
[in] | hint | Field value hint to check. |
BT_TRUE | field_class has the field value hint hint. |
BT_FALSE | field_class doesn't have the field value hint hint. |
NULL
.
|
extern |
Sets the preferred display base of the integer field class field_class to preferred_display_base.
See the preferred display base property.
[in] | field_class | Integer field class of which to set the preferred display base to preferred_display_base. |
[in] | preferred_display_base | New preferred display base of field_class. |
NULL
.
|
extern |
Returns the preferred display base of the integer field class field_class.
See the preferred display base property.
[in] | field_class | Integer field class of which to get the preferred display base. |
NULL
.
|
extern |
Creates an unsigned integer field class from the trace class trace_class.
On success, the returned unsigned integer field class has the following property values:
Property | Value |
---|---|
Field value range | [0, 264 − 1] |
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) | None |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an unsigned integer field class. |
NULL
on memory error.NULL
.
|
extern |
Creates an signed integer field class from the trace class trace_class.
On success, the returned signed integer field class has the following property values:
Property | Value |
---|---|
Field value range | [−263, 263 − 1] |
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) | None |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a signed integer field class. |
NULL
on memory error.NULL
.
|
extern |
Creates a single-precision real field class from the trace class trace_class.
On success, the returned single-precision real field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a single-preicision real field class. |
NULL
on memory error.NULL
.
|
extern |
Creates a double-precision real field class from the trace class trace_class.
On success, the returned double-precision real field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a double-preicision real field class. |
NULL
on memory error.NULL
.
|
extern |
Returns the number of mappings contained in the enumeration field class field_class.
See the mappings property.
[in] | field_class | Enumeration field class of which to get the number of contained mappings. |
NULL
.
|
extern |
Returns the label of the enumeration field class mapping mapping.
See the mappings property.
[in] | mapping | Enumeration field class mapping of which to get the label. |
Label of mapping.
The returned pointer remains valid as long as mapping exists.
NULL
.
|
extern |
Creates an unsigned enumeration field class from the trace class trace_class.
On success, the returned unsigned enumeration field class has the following property values:
Property | Value |
---|---|
Field value range | [0, 264 − 1] |
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) | None |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
Mappings | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an unsigned enumeration field class. |
NULL
on memory error.NULL
.
|
extern |
Adds a mapping to the unsigned enumeration field class field_class having the label label and the unsigned integer ranges ranges.
See the mappings property.
[in] | field_class | Unsigned enumeration field class to which to add a mapping having the label label and the integer ranges ranges. |
[in] | label | Label of the mapping to add to field_class (copied). |
[in] | ranges | Unsigned integer ranges of the mapping to add to field_class. |
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OK | Success. |
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Borrows the mapping at index index from the unsigned enumeration field class field_class.
See the mappings property.
[in] | field_class | Unsigned enumeration field class from which to borrow the mapping at index index. |
[in] | index | Index of the mapping to borrow from field_class. |
Borrowed reference of the mapping of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the mapping having the label label from the unsigned enumeration field class field_class.
See the mappings property.
If there's no mapping having the label label in field_class, then this function returns NULL
.
[in] | field_class | Unsigned enumeration field class from which to borrow the mapping having the label label. |
[in] | label | Label of the mapping to borrow from field_class. |
Borrowed reference of the mapping of field_class having the label label, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.
|
extern |
Returns an array of all the labels of the mappings of the unsigned enumeration field class field_class of which the unsigned integer ranges contain the integral value value.
See the mappings property.
This function sets *labels to the resulting array and *count to the number of labels in *labels.
On success, if there's no mapping ranges containing the value value, *count is 0.
[in] | field_class | Unsigned enumeration field class from which to get the labels of the mappings of which the ranges contain value. |
[in] | value | Value 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:
|
[out] | count | On success, *count is the number of labels in *labels (can be 0). |
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. |
NULL
. NULL
. NULL
.
|
extern |
Borrows the unsigned integer ranges from the unsigned enumeration field class mapping mapping.
See the mappings property.
[in] | mapping | Unsigned enumeration field class mapping from which to borrow the unsigned integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the unsigned enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.
See the mappings property.
[in] | mapping | Unsigned enumeration field class mapping to upcast. Can be |
|
extern |
Creates a signed enumeration field class from the trace class trace_class.
On success, the returned signed enumeration field class has the following property values:
Property | Value |
---|---|
Field value range | [−263, 263 − 1] |
Message Interchange Protocol version 1: field value hints (available since Babeltrace 2.1) | None |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
Mappings | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a signed enumeration field class. |
NULL
on memory error.NULL
.
|
extern |
Adds a mapping to the signed enumeration field class field_class having the label label and the signed integer ranges ranges.
See the mappings property.
[in] | field_class | Signed enumeration field class to which to add a mapping having the label label and the integer ranges ranges. |
[in] | label | Label of the mapping to add to field_class (copied). |
[in] | ranges | Signed integer ranges of the mapping to add to field_class. |
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_OK | Success. |
BT_FIELD_CLASS_ENUMERATION_ADD_MAPPING_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Borrows the mapping at index index from the signed enumeration field class field_class.
See the mappings property.
[in] | field_class | Signed enumeration field class from which to borrow the mapping at index index. |
[in] | index | Index of the mapping to borrow from field_class. |
Borrowed reference of the mapping of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the mapping having the label label from the signed enumeration field class field_class.
See the mappings property.
If there's no mapping having the label label in field_class, then this function returns NULL
.
[in] | field_class | Signed enumeration field class from which to borrow the mapping having the label label. |
[in] | label | Label of the mapping to borrow from field_class. |
Borrowed reference of the mapping of field_class having the label label, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.
|
extern |
Returns an array of all the labels of the mappings of the signed enumeration field class field_class of which the signed integer ranges contain the integral value value.
See the mappings property.
This function sets *labels to the resulting array and *count to the number of labels in *labels.
On success, if there's no mapping ranges containing the value value, *count is 0.
[in] | field_class | Signed enumeration field class from which to get the labels of the mappings of which the ranges contain value. |
[in] | value | Value 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:
|
[out] | count | On success, *count is the number of labels in *labels (can be 0). |
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. |
NULL
. NULL
. NULL
.
|
extern |
Borrows the signed integer ranges from the signed enumeration field class mapping mapping.
See the mappings property.
[in] | mapping | Signed enumeration field class mapping from which to borrow the signed integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the signed enumeration field class mapping mapping to the common bt_field_class_enumeration_mapping type.
See the mappings property.
[in] | mapping | Signed enumeration field class mapping to upcast. Can be |
|
extern |
Creates a string field class from the trace class trace_class.
On success, the returned string field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a string field class. |
NULL
on memory error.NULL
.
|
extern |
Creates a static BLOB field class having the length length from the trace class trace_class.
On success, the returned static BLOB field class has the following property values:
Property | Value |
---|---|
Length | length |
Media type | application/octet-stream |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a static BLOB field class. |
[in] | length | Length (number of bytes) of the instances of the static BLOB field class to create. |
NULL
on memory error.NULL
.
|
extern |
Creates a dynamic BLOB field class (instances without a linked length field) from the trace class trace_class.
On success, the returned dynamic BLOB field class has the following property values:
Property | Value |
---|---|
Length field location | None |
Media type | application/octet-stream |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a dynamic BLOB field class. |
NULL
on memory error.NULL
.
|
extern |
Creates a dynamic BLOB field class (instances with a linked length field) having the length field location length_field_location from the trace class trace_class.
On success, the returned dynamic BLOB field class has the following property values:
Property | Value |
---|---|
Length field location | length_field_location. See Fields with links to other fields to learn more. |
Media type | application/octet-stream |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a dynamic BLOB field class. |
[in] | length_field_location | Length field location of the dynamic BLOB field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Returns the length of the static BLOB field class field_class.
See the length property.
[in] | field_class | Static BLOB field class of which to get the length (number of bytes in instances). |
NULL
.
|
extern |
Borrows the length field location from the dynamic BLOB field class (instances with a linked length field) field_class.
See the length field location property.
[in] | field_class | Dynamic BLOB field class from which to borrow the length field location. |
NULL
.
|
extern |
Sets the IANA media type of the BLOB field class field_class to a copy of media_type.
See the media type property.
[in] | field_class | BLOB field class of which to set the media type to a copy of media_type. |
[in] | media_type | New media type of field_class (copied). |
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_OK | Success. |
BT_FIELD_CLASS_BLOB_SET_MEDIA_TYPE_STATUS_MEMORY_ERROR | Out of memory. |
NULL
.
|
extern |
Returns the IANA media type of the BLOB field class field_class.
See the media type property.
If field_class has no media type, then this function returns NULL
.
[in] | field_class | BLOB field class of which to get the media type. |
Media type of field_class.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the element field class from the array field class field_class.
See the element field class property.
[in] | field_class | Array field class from which to borrow the element field class. |
NULL
. const
version of this function.
|
extern |
Borrows the element field class from the array field class field_class (const
version).
|
extern |
Creates a static array field class having the element field class element_field_class and the length length from the trace class trace_class.
On success, the returned static array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length | length |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a static array field class. |
[in] | element_field_class | Class of the element fields of the instances of the static array field class to create. |
[in] | length | Length of the instances of the static array field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Returns the length of the static array field class field_class.
See the length property.
[in] | field_class | Static array field class of which to get the length. |
NULL
.
|
extern |
Creates a dynamic array field class having the element field class element_field_class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a dynamic array field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_array_dynamic_without_length_field_location_create() or bt_field_class_array_dynamic_with_length_field_location_create().
If length_field_class isn't NULL
, then an instance of the created dynamic array field class has a linked length field. See Fields with links to other fields to learn more.
On success, the returned dynamic array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length field path | None (if length_field_class isn't NULL , this property becomes available when the returned field class becomes part of an event class or of a stream class) |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a dynamic array field class. |
[in] | element_field_class | Class of the element fields of the instances of the dynamic array field class to create. |
[in] | length_field_class | Class of a linked length field of an instance of the dynamic array field class to create. Can be |
NULL
on memory error.NULL
. NULL
. NULL
, length_field_class is an unsigned integer field class.
|
extern |
Creates a dynamic array field class (instances without a linked length field) having the element field class element_field_class from the trace class trace_class.
On success, the returned dynamic array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length field location | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a dynamic array field class. |
[in] | element_field_class | Class of the element fields of the instances of the dynamic array field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Creates a dynamic array field class (instances with a linked length field) having the element field class element_field_class and the length field location length_field_location from the trace class trace_class.
On success, the returned dynamic array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length field location | length_field_location. See Fields with links to other fields to learn more. |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a dynamic array field class. |
[in] | element_field_class | Class of the element fields of the instances of the dynamic array field class to create. |
[in] | length_field_location | Length field location of the dynamic array field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
.
|
extern |
Borrows the length field path from the dynamic array field class (instances with a linked length field) field_class.
See the length field path property.
This property is only available when all the following are true:
NULL
).A structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Dynamic array field class from which to borrow the length field path. |
NULL
.
|
extern |
Borrows the length field location from the dynamic array field class (instances with a linked length field) field_class.
See the length field location property.
This property is only available when field_class was created with bt_field_class_array_dynamic_with_length_field_location_create().
[in] | field_class | Dynamic array field class from which to borrow the length field location. |
NULL
.
|
extern |
Creates a structure field class from the trace class trace_class.
On success, the returned structure field class has the following property values:
Property | Value |
---|---|
Members | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a structure field class. |
NULL
on memory error.NULL
.
|
extern |
Appends a member to the structure field class field_class having the name name and the field class member_field_class.
See the members property.
[in] | field_class | Structure field class to which to append a member having the name name and the field class member_field_class. |
[in] | name | Name of the member to append to field_class (copied). |
[in] | member_field_class | Field class of the member to append to field_class. |
BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_OK | Success. |
BT_FIELD_CLASS_STRUCTURE_APPEND_MEMBER_STATUS_MEMORY_ERROR | Out of memory. |
NULL
. NULL
. NULL
.
|
extern |
Returns the number of members contained in the structure field class field_class.
See the members property.
[in] | field_class | Structure field class of which to get the number of contained members. |
NULL
.
|
extern |
Borrows the member at index index from the structure field class field_class.
See the members property.
[in] | field_class | Structure field class from which to borrow the member at index index. |
[in] | index | Index of the member to borrow from field_class. |
Borrowed reference of the member of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. const
version of this function.
|
extern |
Borrows the member at index index from the structure field class field_class (const
version).
|
extern |
Borrows the member having the name name from the structure field class field_class.
See the members property.
If there's no member having the name name in field_class, then this function returns NULL
.
[in] | field_class | Structure field class from which to borrow the member having the name name. |
[in] | name | Name of the member to borrow from field_class. |
Borrowed reference of the member of field_class having the name name, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.const
version of this function.
|
extern |
Borrows the member having the name name from the structure field class field_class (const
version).
|
extern |
Returns the name of the structure field class member member.
See the members property.
[in] | member | Structure field class member of which to get the name. |
Name of member.
The returned pointer remains valid as long as member exists.
NULL
.
|
extern |
Borrows the field class from the structure field class member member.
See the members property.
[in] | member | Structure field class member from which to borrow the field class. |
NULL
.const
version of this function.
|
extern |
Borrows the field class from the structure field class member member (const
version).
|
extern |
Sets the user attributes of the structure field class member member to user_attributes.
See the members property.
[in] | member | Structure field class member of which to set the user attributes to user_attributes. |
[in] | user_attributes | New user attributes of member. |
NULL
. NULL
.
|
extern |
Borrows the user attributes of the structure field class member member.
See the members property.
[in] | member | Structure field class member from which to borrow the user attributes. |
NULL
.const
version of this function.
|
extern |
Borrows the user attributes of the structure field class member member (const
version).
See bt_field_class_structure_member_borrow_user_attributes().
|
extern |
Borrows the optional field class from the option field class field_class.
See the optional field class property.
[in] | field_class | Option field class from which to borrow the optional field class. |
NULL
. const
version of this function.
|
extern |
Borrows the optional field class from the option field class field_class (const
version).
|
extern |
Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_without_selector_field_location_create().
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Creates an option field class (instances without a linked selector field) having the optional field class optional_field_class from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Borrows the selector field path from the option field class (instances with a linked selector field) field_class.
See the selector field path property.
This property is only available when all the following are true:
A structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Option field class from which to borrow the selector field path. |
NULL
.
|
extern |
Borrows the selector field location from the option field class (instances with a linked selector field) field_class.
See the selector field location property.
This property is only available when field_class was created with bt_field_class_option_with_selector_field_location_bool_create().
[in] | field_class | Option field class from which to borrow the selector field location. |
NULL
.
|
extern |
Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_bool_create().
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Selector is reversed? | BT_FALSE |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_class | Class of a linked boolean selector field of an instance of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
.
|
extern |
Creates an option field class (instances with a linked boolean selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field location | selector_field_location. See Fields with links to other fields to learn more. |
Selector is reversed? | BT_FALSE |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_location | Selector field location of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
.
|
extern |
Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed.
See the selector is reversed? property.
[in] | field_class | Option field class of which to set whether or not its selector is reversed. |
[in] | selector_is_reversed | BT_TRUE to make field_class have a reversed selector. |
NULL
.
|
extern |
Returns whether or not the selector of the option field class (with a boolean selector field) is reversed.
See the selector is reversed? property.
[in] | field_class | Option field class of which to get whether or not its selector is reversed. |
NULL
.
|
extern |
Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_integer_unsigned_create().
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Unsigned integer ranges of selector | ranges |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_class | Linked selector field class of the option field class to create. |
[in] | ranges | Unsigned integer ranges of selector of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
.
|
extern |
Creates an option field class (instances with a linked unsigned integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field location | selector_field_location. See Fields with links to other fields to learn more. |
Unsigned integer ranges of selector | ranges |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_location | Selector field location of the option field class to create. |
[in] | ranges | Unsigned integer ranges of selector of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
.
|
extern |
Borrows the unsigned integer ranges from the option field class (with an unsigned integer selector field) field_class.
See the Unsigned integer ranges of selector property.
[in] | field_class | Option field class from which to borrow the unsigned integer ranges. |
NULL
.
|
extern |
Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a similar option field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_option_with_selector_field_location_integer_signed_create().
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Signed integer ranges of selector | ranges |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_class | Linked selector field class of the option field class to create. |
[in] | ranges | Signed integer ranges of selector of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
.
|
extern |
Creates an option field class (instances with a linked signed integer selector field) having the optional field class optional_field_class and the selector field location selector_field_location from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field location | selector_field_location. See Fields with links to other fields to learn more. |
Signed integer ranges of selector | ranges |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an option field class. |
[in] | optional_field_class | Class of the optional fields of the instances of the option field class to create. |
[in] | selector_field_location | Selector field location of the option field class to create. |
[in] | ranges | Signed integer ranges of selector of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
.
|
extern |
Borrows the signed integer ranges from the option field class (with a signed integer selector field) field_class.
See the Signed integer ranges of selector property.
[in] | field_class | Option field class from which to borrow the signed integer ranges. |
NULL
.
|
extern |
Creates an empty variant field class from the trace class trace_class.
This function is only available when trace_class was created from a self component which belongs to a trace processing graph with the effective Message Interchange Protocol version 0.
To create a variant field class from a trace class which was created from a self component which belongs to a trace processing graph with the effective MIP version 1 (available since Babeltrace 2.1), use bt_field_class_variant_without_selector_field_location_create(), bt_field_class_variant_with_selector_field_location_integer_unsigned_create(), or bt_field_class_variant_with_selector_field_location_integer_signed_create().
If selector_field_class isn't NULL
, then an instance of the created variant field class has a linked selector field. See Fields with links to other fields to learn more.
On success, the returned variant field class has the following property values:
Property | Value |
---|---|
Selector field path | None (if selector_field_class isn't NULL , this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Options | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a variant field class. |
[in] | selector_field_class | Class of a linked selector field of an instance of the variant field class to create. Can be |
NULL
on memory error.NULL
. NULL
, then selector_field_class is an integer field class.
|
extern |
Returns the number of options contained in the variant field class field_class.
See the options property.
[in] | field_class | Variant field class of which to get the number of contained options. |
NULL
.
|
extern |
Borrows the option at index index from the variant field class field_class.
See the options property.
[in] | field_class | Variant field class from which to borrow the option at index index. |
[in] | index | Index of the option to borrow from field_class. |
Borrowed reference of the option of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. const
version of this function.
|
extern |
Borrows the option at index index from the variant field class field_class (const
version).
|
extern |
Borrows the option having the name name from the variant field class field_class.
See the options property.
If there's no option having the name name in field_class, then this function returns NULL
.
[in] | field_class | Variant field class from which to borrow the option having the name name. |
[in] | name | Name of the option to borrow from field_class. |
Borrowed reference of the option of field_class having the name name, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.const
version of this function.
|
extern |
Borrows the option having the name name from the variant field class field_class (const
version).
|
extern |
Returns the name of the variant field class option option.
See the options property.
This function may return NULL
when the following are true:
[in] | option | Variant field class option of which to get the name. |
Name of option, or NULL
if none (possible under MIP 1; available since Babeltrace 2.1).
The returned pointer remains valid as long as option exists.
NULL
.
|
extern |
Borrows the field class from the variant field class option option.
See the options property.
[in] | option | Variant field class option from which to borrow the field class. |
NULL
.const
version of this function.
|
extern |
Borrows the field class from the variant field class option option (const
version).
|
extern |
Sets the user attributes of the variant field class option option to user_attributes.
See the options property.
[in] | option | Variant field class option of which to set the user attributes to user_attributes. |
[in] | user_attributes | New user attributes of option. |
NULL
. NULL
.
|
extern |
Borrows the user attributes of the variant field class option option.
See the options property.
[in] | option | Variant field class option from which to borrow the user attributes. |
NULL
.const
version of this function.
|
extern |
Borrows the user attributes of the variant field class option option (const
version).
|
extern |
Creates an empty variant field class (instances without a linked selector field) from the trace class trace_class.
On success, the returned variant field class has the following property values:
Property | Value |
---|---|
Selector field location | None |
Options | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a variant field class. |
NULL
on memory error.NULL
.
|
extern |
Appends an option to the variant field class (instances without a linked selector field) field_class having the name name and the field class option_field_class.
See the options property.
[in] | field_class | Variant field class to which to append an option having the name name and the field class option_field_class. |
[in] | name | Name of the option to append to field_class (copied). Can be |
[in] | option_field_class | Field class of the option to append to field_class. |
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. |
NULL
. NULL
, then field_class has no option with the name name. NULL
. NULL
.
|
extern |
Borrows the selector field path from the variant field class (instances with a linked selector field) field_class.
See the selector field path property.
This property is only available when all the following are true:
NULL
).A structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Variant field class from which to borrow the selector field path. |
NULL
.
|
extern |
Borrows the selector field location from the variant field class (instances with a linked selector field) field_class.
See the selector field location property.
This property is only available when field_class was created with bt_field_class_variant_with_selector_field_location_integer_unsigned_create() or bt_field_class_variant_with_selector_field_location_integer_signed_create().
[in] | field_class | Option field class from which to borrow the selector field location. |
NULL
.
|
extern |
Creates an empty variant field class (instances with a linked unsigned integer selector field) having the selector field location selector_field_location from the trace class trace_class.
On success, the returned variant field class has the following property values:
Property | Value |
---|---|
Selector field location | selector_field_location. See Fields with links to other fields to learn more. |
Options | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a variant field class. |
[in] | selector_field_location | Selector field location of the variant field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Appends an option to the variant field class (instances with a linked unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges.
See the options property.
[in] | field_class | Variant field class to which to append an option having the name name, the field class option_field_class, and the unsigned integer ranges ranges. |
[in] | name | Name of the option to append to field_class (copied). Can be |
[in] | option_field_class | Field class of the option to append to field_class. |
[in] | ranges | Unsigned integer ranges of the option to append to field_class. |
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. |
NULL
. NULL
, then field_class has no option with the name name. NULL
. NULL
. NULL
.
|
extern |
Borrows the option at index index from the variant field class (instances with a linked unsigned integer selector field) field_class.
See the options property.
[in] | field_class | Variant field class from which to borrow the option at index index. |
[in] | index | Index of the option to borrow from field_class. |
Borrowed reference of the option of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the option having the name name from the variant field class (instances with a linked unsigned integer selector field) field_class.
See the options property.
If there's no option having the name name in field_class, then this function returns NULL
.
[in] | field_class | Variant field class from which to borrow the option having the name name. |
[in] | name | Name of the option to borrow from field_class. |
Borrowed reference of the option of field_class having the name name, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.
|
extern |
Borrows the unsigned integer ranges from the variant field class option (instances with a linked unsigned integer selector field) option.
See the options property.
[in] | option | Variant field class option from which to borrow the unsigned integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the variant field class option (instances with a linked unsigned integer selector field) option to the common bt_field_class_variant_option type.
See the options property.
[in] | option | Variant field class option to upcast. Can be |
|
extern |
Creates an empty variant field class (instances with a linked signed integer selector field) having the selector field location selector_field_location from the trace class trace_class.
On success, the returned variant field class has the following property values:
Property | Value |
---|---|
Selector field location | selector_field_location. See Fields with links to other fields to learn more. |
Options | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a variant field class. |
[in] | selector_field_location | Selector field location of the variant field class to create. |
NULL
on memory error.NULL
. NULL
.
|
extern |
Appends an option to the variant field class (instances with a linked signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges.
See the options property.
[in] | field_class | Variant field class to which to append an option having the name name and the field class option_field_class, and the signed integer ranges ranges. |
[in] | name | Name of the option to append to field_class (copied). Can be |
[in] | option_field_class | Field class of the option to append to field_class. |
[in] | ranges | Signed integer ranges of the option to append to field_class. |
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. |
NULL
. NULL
, then field_class has no option with the name name. NULL
. NULL
. NULL
.
|
extern |
Borrows the option at index index from the variant field class (instances with a linked signed integer selector field) field_class.
See the options property.
[in] | field_class | Variant field class from which to borrow the option at index index. |
[in] | index | Index of the option to borrow from field_class. |
Borrowed reference of the option of field_class at index index.
The returned pointer remains valid as long as field_class isn't modified.
NULL
.
|
extern |
Borrows the option having the name name from the variant field class (instances with a linked signed integer selector field) field_class.
See the options property.
If there's no option having the name name in field_class, then this function returns NULL
.
[in] | field_class | Variant field class from which to borrow the option having the name name. |
[in] | name | Name of the option to borrow from field_class. |
Borrowed reference of the option of field_class having the name name, or NULL
if none.
The returned pointer remains valid as long as field_class isn't modified.
NULL
. NULL
.
|
extern |
Borrows the signed integer ranges from the variant field class option (instances with a linked signed integer selector field) option.
See the options property.
[in] | option | Variant field class option from which to borrow the signed integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the variant field class option (instances with a linked signed integer selector field) option to the common bt_field_class_variant_option type.
See the options property.
[in] | option | Variant field class option to upcast. Can be |
|
extern |
Increments the reference count of the field class field_class.
[in] | field_class | Field class of which to increment the reference count. Can be |
|
extern |
Decrements the reference count of the field class field_class.
[in] | field_class | Field class of which to decrement the reference count. Can be |