Babeltrace 2 C API
2.0.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.
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 a bit array field class's length with bt_field_class_bit_array_get_length().
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().
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 correpond to the label CALORIES
, the value 12 to the label SODIUM
, and the value 10 to the labels CALORIES
and SODIUM
.
Two mappings of the same enumeration field class cannot have the same label.
Add a mapping to an enumeration field class with bt_field_class_enumeration_unsigned_add_mapping() or bt_field_class_enumeration_signed_add_mapping().
Get the number of mappings in an enumeration field class with bt_field_class_enumeration_get_mapping_count().
Borrow a mapping from an enumeration field class with bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const(), bt_field_class_enumeration_signed_borrow_mapping_by_index_const(), bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const(), and bt_field_class_enumeration_signed_borrow_mapping_by_label_const().
An enumeration field class mapping is a unique object: it belongs to the enumeration field class which contains it.
There are two enumeration field class mapping types, depending on the field class's type: bt_field_class_enumeration_unsigned_mapping and bt_field_class_enumeration_signed_mapping.
There is also the bt_field_class_enumeration_mapping type for common properties and operations (for example, bt_field_class_enumeration_mapping_get_label()). Upcast a specific enumeration field class mapping to the bt_field_class_enumeration_mapping type with bt_field_class_enumeration_unsigned_mapping_as_mapping_const() or bt_field_class_enumeration_signed_mapping_as_mapping_const().
Get all the enumeration field class labels mapped to a given integer value with bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().
Real field classes 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.
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 a static array field class's length with bt_field_class_array_static_get_length().
Its instances (dynamic array fields) contain a variable number array of fields.
There are two types of dynamic array field classes: without or with a length field. See Field classes with links to other field classes to learn more.
Create with bt_field_class_array_dynamic_create().
A dynamic array field class with a length field has the specific property:
Field path of the linked length field class.
Get a dynamic array field class's length field path with bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const().
Array field classes have the following common property:
Class of the fields contained in the instances (array fields) of the array field class.
You cannot change the element field class once the array field class is created.
Borrow an array field class's element field class with Use bt_field_class_array_borrow_element_field_class() and bt_field_class_array_borrow_element_field_class_const().
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 a structure field class member's name with bt_field_class_structure_member_get_name().
Borrow a structure field class member's field class with bt_field_class_structure_member_borrow_field_class() and bt_field_class_structure_member_borrow_field_class_const().
Set a structure field class member's user attributes with bt_field_class_structure_member_set_user_attributes().
Borrow a structure field class member's user attributes with bt_field_class_structure_member_borrow_user_attributes() and bt_field_class_structure_member_borrow_user_attributes_const().
Option field classes are classes of option fields.
An option field either does or doesn't contain a field, called its optional field.
An option field class is an abstract field class: you cannot create one. An option field class either has a selector field (it's linked to a selector field class; see Field classes with links to other field classes) or none. Therefore, the concrete option field classes are:
Create with bt_field_class_option_without_selector_create().
An option field class without a selector field has no specific properties.
The linked selector field of an option field class's instance (an option field) is a boolean field.
Consequently, the option field class's selector field class is a boolean field class.
Create with bt_field_class_option_with_selector_field_bool_create().
An option field class with a boolean selector field has the following specific property:
Whether or not the linked boolean selector field makes the option field class's instance (an option field) contain a field when it's BT_TRUE or when it's BT_FALSE.
If this property is BT_TRUE, then if the linked selector field has the value BT_FALSE, the option field contains a field.
Use bt_field_class_option_with_selector_field_bool_set_selector_is_reversed() and bt_field_class_option_with_selector_field_bool_selector_is_reversed().
The linked selector field of an option field class's instance (an option field) is an unsigned integer field.
Consequently, the option field class's selector field class is an unsigned integer field class.
Create with bt_field_class_option_with_selector_field_integer_unsigned_create().
Pass an unsigned integer range set on creation to set which values of the selector field can make the option field contain a field.
An option field class with an unsigned integer selector field has the following specific property:
If the linked unsigned integer selector field of an option field class's instance (an option field) has a value which intersects with the selector's unsigned integer ranges, then the option field contains a field.
You cannot change the selector's unsigned integer ranges once the option field class is created.
Borrow the selector's unsigned integer ranges from an option field class with an unsigned integer selector field with bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const().
The linked selector field of an option field class's instance (an option field) is a signed integer field.
Consequently, the option field class's selector field class is a signed integer field class.
Create with bt_field_class_option_with_selector_field_integer_signed_create().
Pass a signed integer range set on creation to set which values of the selector field can make the option field contain a field.
An option field class with a signed integer selector field has the following specific property:
If the linked signed integer selector field of an option field class's instance (an option field) has a value which intersects with the selector's signed integer ranges, then the option field contains a field.
You cannot change the selector's signed integer ranges once the option field class is created.
Borrow the selector's signed integer ranges from an option field class with a signed integer selector field with bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const().
Option field classes with a selector have the following common property:
Field path of the linked selector field class.
Borrow such an option field class's selector field path with bt_field_class_option_with_selector_field_borrow_selector_field_path_const().
Option field classes have the following common property:
Class of the optional field of an instance (option field) of the option field class.
You cannot change the optional field class once the option field class is created.
Borrow an option field class's optional field class with Use bt_field_class_option_borrow_field_class() and bt_field_class_option_borrow_field_class_const().
Variant field classes are classes of variant fields.
A variant field contains a field amongst one or more possible fields.
Variant field classes contain one or more options. Each variant field class option has a name, a field class, user attributes, and integer ranges, depending on the exact type.
A variant field class is an abstract field class: you cannot create one. A variant field class either has a selector field (it's linked to a selector field class; see Field classes with links to other field classes) or none. Therefore, the concrete variant field classes are:
Create with bt_field_class_variant_create(), passing NULL
as the selector field class.
Append an option to such a variant field class with bt_field_class_variant_without_selector_append_option().
A variant field class without a selector field has no specific properties.
The linked selector field of a variant field class's instance (a variant field) is an unsigned integer field.
Consequently, the variant field class's selector field class is an unsigned integer field class.
Create with bt_field_class_variant_create(), passing an unsigned integer field class as the selector field class.
Append an option to such a variant field class with bt_field_class_variant_with_selector_field_integer_unsigned_append_option().
Pass an unsigned integer range set when you append an option to set which values of the selector field can make the variant field have a given current option.
Borrow such a variant field class's option with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const().
The linked selector field of a variant field class's instance (a variant field) is a signed integer field.
Consequently, the variant field class's selector field class is a signed integer field class.
Create with bt_field_class_variant_create(), passing a signed integer field class as the selector field class.
Append an option to such a variant field class with bt_field_class_variant_with_selector_field_integer_signed_append_option().
Pass a signed integer range set when you append an option to set which values of the selector field can make the variant field have a given current option.
Borrow such a variant field class's option with bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const() and bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const().
Variant field classes with a selector have the following common property:
Field path of the linked selector field class.
Borrow such a variant field class's selector field path with bt_field_class_variant_with_selector_field_borrow_selector_field_path_const().
Variant field classes have the following common property:
Options of the variant field class.
Each option has:
If the variant field class is linked to a selector field class, then each option also has an integer range set. In that case, the ranges of a given option cannot overlap any range of any other option.
A variant field class must contain at least one option.
Depending on whether or not the variant field class has a selector field class, append an option to a variant field class with bt_field_class_variant_without_selector_append_option(), bt_field_class_variant_with_selector_field_integer_unsigned_append_option(), or bt_field_class_variant_with_selector_field_integer_signed_append_option().
Get the number of options contained in a variant field class with bt_field_class_variant_get_option_count().
A variant field class option is a unique object: it belongs to the variant field class which contains it.
Borrow any variant field class's option with bt_field_class_variant_borrow_option_by_index(), bt_field_class_variant_borrow_option_by_name(), bt_field_class_variant_borrow_option_by_index_const(), and bt_field_class_variant_borrow_option_by_name_const().
Those functions return the common bt_field_class_variant_option type. Get the name of a variant field class option with bt_field_class_variant_option_get_name(). Borrow a variant field class option's field class with bt_field_class_variant_option_borrow_field_class() and bt_field_class_variant_option_borrow_field_class_const().
Borrow the option of a variant field classes with a selector field class with bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const(), bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const(), bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const(), or bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const(), depending on the selector field class's type.
Those functions return the bt_field_class_variant_with_selector_field_integer_unsigned_option or bt_field_class_variant_with_selector_field_integer_signed_option type. Upcast those types to the bt_field_class_variant_option type with bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const() or bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const().
Borrow the option's ranges from a variant field class with a selector field class with bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const() or bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const().
Set a variant field class option's user attributes with bt_field_class_variant_option_set_user_attributes().
Borrow a variant field class option's user attributes with bt_field_class_variant_option_borrow_user_attributes() and bt_field_class_variant_option_borrow_user_attributes_const().
Dynamic array field classes, option field classes, and variant field classes can have links to other, preceding field classes.
When a field class A has a link to another field class B, then an instance (field) of A has a link to an instance of B.
This feature exists so that the linked field can contain the value of a dynamic property of the field. Those properties are:
The linked field, a unsigned integer field, contains the length 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 class is optional: you always set the field properties with a dedicated function anyway. For example, even if a dynamic array field is linked to a preceding length field, you must still set its length with bt_field_array_dynamic_set_length(). In that case, the value of the length field must match what you pass to bt_field_array_dynamic_set_length().
The purpose of this feature is to eventually save space when a sink component writes trace files: if the trace format can convey that a preceding, existing field represents the length of a dynamic array field, then the sink component doesn't need to write the dynamic array field's length twice. This is the case of the Common Trace Format, for example.
To link a field class A to a preceding field class B, pass field class B when you create field class A. For example, pass the unsigned integer field class to bt_field_class_array_dynamic_create() to create a dynamic array field class with a length field.
When you call bt_stream_class_set_packet_context_field_class(), bt_stream_class_set_event_common_context_field_class(), bt_event_class_set_specific_context_field_class(), or bt_event_class_set_payload_field_class() with a field class containing a field class A with a linked field class B, the path to B becomes available in A. The functions to borrow this field path are:
A field path indicates how to reach a linked field from a given root scope. The available scopes are:
Packet context field.
Event common context field.
Event specific context field.
Event payload field.
The rules regarding field class A vs. field class B (linked field class) are:
If A is within a packet context field class, B must also be in the same packet context field class.
If A is within a event common context field class, B must be in one of:
If A is within an event specific context field class, B must be in one of:
If A is within an event payload field class, B must be in one of:
B must precede A.
Considering that the members of a structure field class 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 class.
Type | |
typedef struct bt_field_class | bt_field_class |
Field class. | |
Common property | |
void | bt_field_class_set_user_attributes (bt_field_class *field_class, const bt_value *user_attributes) |
Sets the user attributes of the field class field_class to user_attributes. More... | |
bt_value * | bt_field_class_borrow_user_attributes (bt_field_class *field_class) |
Borrows the user attributes of the field class field_class. More... | |
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). More... | |
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. More... | |
Bit array field class | |
bt_field_class * | bt_field_class_bit_array_create (bt_trace_class *trace_class, uint64_t length) |
Creates a bit array field class with the length length from the trace class trace_class. More... | |
uint64_t | bt_field_class_bit_array_get_length (const bt_field_class *field_class) |
Returns the length of the bit array field class field_class. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Enumeration field class mapping | |
typedef struct bt_field_class_enumeration_mapping | bt_field_class_enumeration_mapping |
Enumeration field class mapping. | |
uint64_t | bt_field_class_enumeration_get_mapping_count (const bt_field_class *field_class) |
Returns the number of mappings contained in the enumeration field class field_class. More... | |
const char * | bt_field_class_enumeration_mapping_get_label (const bt_field_class_enumeration_mapping *mapping) |
Returns the label of the enumeration field class mapping mapping. More... | |
Unsigned enumeration field class 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. More... | |
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. More... | |
Signed enumeration field class mapping | |
typedef struct bt_field_class_enumeration_signed_mapping | bt_field_class_enumeration_signed_mapping |
Signed enumeration field class mapping. | |
const bt_integer_range_set_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. More... | |
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. More... | |
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. More... | |
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. More... | |
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). More... | |
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. More... | |
uint64_t | bt_field_class_array_static_get_length (const bt_field_class *field_class) |
Returns the length of the static array field class field_class. More... | |
Dynamic array field class | |
bt_field_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. More... | |
Dynamic array field class with length field | |
const bt_field_path * | bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const (const bt_field_class *field_class) |
Borrows the length field path from the dynamic array field class (with a length field) field_class. More... | |
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. More... | |
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). More... | |
Option field class without a 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 (without a selector field) having the optional field class optional_field_class from the trace class trace_class. More... | |
Option field class with a selector field | |
const bt_field_path * | bt_field_class_option_with_selector_field_borrow_selector_field_path_const (const bt_field_class *field_class) |
Borrows the selector field path from the option field class (with a selector field) field_class. More... | |
Option field class with a 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 (with a boolean selector field) having the optional field class optional_field_class from the trace class trace_class. More... | |
void | bt_field_class_option_with_selector_field_bool_set_selector_is_reversed (bt_field_class *field_class, bt_bool selector_is_reversed) |
Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed. More... | |
bt_bool | bt_field_class_option_with_selector_field_bool_selector_is_reversed (const bt_field_class *field_class) |
Returns whether or not the selector of the option field class (with a boolean selector field) is reversed. More... | |
Option field class with an unsigned integer selector field | |
bt_field_class * | bt_field_class_option_with_selector_field_integer_unsigned_create (bt_trace_class *trace_class, bt_field_class *optional_field_class, bt_field_class *selector_field_class, const bt_integer_range_set_unsigned *ranges) |
Creates an option field class (with an unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class. More... | |
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. More... | |
Option field class with a 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 (with a signed integer selector field) having the optional field class optional_field_class from the trace class trace_class. More... | |
const bt_integer_range_set_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. More... | |
Variant field class | |
bt_field_class * | bt_field_class_variant_create (bt_trace_class *trace_class, bt_field_class *selector_field_class) |
Creates a variant field class from the trace class trace_class. More... | |
uint64_t | bt_field_class_variant_get_option_count (const bt_field_class *field_class) |
Returns the number of options contained in the variant field class field_class. More... | |
bt_field_class_variant_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. More... | |
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). More... | |
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. More... | |
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). More... | |
Variant field class without a selector field | |
enum | bt_field_class_variant_without_selector_append_option_status { BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_OK, BT_FIELD_CLASS_VARIANT_WITHOUT_SELECTOR_FIELD_APPEND_OPTION_STATUS_MEMORY_ERROR } |
Status codes for bt_field_class_variant_without_selector_append_option(). More... | |
typedef enum bt_field_class_variant_without_selector_append_option_status | bt_field_class_variant_without_selector_append_option_status |
Status codes for bt_field_class_variant_without_selector_append_option(). | |
bt_field_class_variant_without_selector_append_option_status | bt_field_class_variant_without_selector_append_option (bt_field_class *field_class, const char *name, bt_field_class *option_field_class) |
Appends an option to the variant field class (without a selector field) field_class having the name name and the field class option_field_class. More... | |
Variant field class (with an unsigned integer selector field) option | |
typedef struct bt_field_class_variant_with_selector_field_integer_unsigned_option | bt_field_class_variant_with_selector_field_integer_unsigned_option |
Variant field class (with an unsigned integer selector field) option. | |
const bt_integer_range_set_unsigned * | bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const (const bt_field_class_variant_with_selector_field_integer_unsigned_option *option) |
Borrows the unsigned integer ranges from the variant field class (with an unsigned integer selector field) option option. More... | |
static const bt_field_class_variant_option * | bt_field_class_variant_with_selector_field_integer_unsigned_option_as_option_const (const bt_field_class_variant_with_selector_field_integer_unsigned_option *option) |
Upcasts the variant field class (with an unsigned integer selector field) option option to the common bt_field_class_variant_option type. More... | |
Variant field class (with a signed integer selector field) option | |
typedef struct bt_field_class_variant_with_selector_field_integer_signed_option | bt_field_class_variant_with_selector_field_integer_signed_option |
Variant field class (with a signed integer selector field) option. | |
const bt_integer_range_set_signed * | bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const (const bt_field_class_variant_with_selector_field_integer_signed_option *option) |
Borrows the signed integer ranges from the variant field class (with a signed integer selector field) option option. More... | |
static const bt_field_class_variant_option * | bt_field_class_variant_with_selector_field_integer_signed_option_as_option_const (const bt_field_class_variant_with_selector_field_integer_signed_option *option) |
Upcasts the variant field class (with a signed integer selector field) option option to the common bt_field_class_variant_option type. More... | |
Reference count | |
void | bt_field_class_get_ref (const bt_field_class *field_class) |
Increments the reference count of the field class field_class. More... | |
void | bt_field_class_put_ref (const bt_field_class *field_class) |
Decrements the reference count of the field class field_class. More... | |
#define | BT_FIELD_CLASS_PUT_REF_AND_RESET(_field_class) |
Decrements the reference count of the field class _field_class, and then sets _field_class to NULL . More... | |
#define | BT_FIELD_CLASS_MOVE_REF(_dst, _src) |
Decrements the reference count of the field class _dst, sets _dst to _src, and then sets _src to NULL . More... | |
typedef const char* const * bt_field_class_enumeration_mapping_label_array |
Array of const
enumeration field class labels.
Returned by bt_field_class_enumeration_unsigned_get_mapping_labels_for_value() and bt_field_class_enumeration_signed_get_mapping_labels_for_value().
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_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 (without a length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY. |
BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY_WITH_LENGTH_FIELD | Dynamic array field class (with a length field). This type conceptually inherits BT_FIELD_CLASS_TYPE_DYNAMIC_ARRAY. |
BT_FIELD_CLASS_TYPE_OPTION |
No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITHOUT_SELECTOR_FIELD | Option field class (without a selector field). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD | Option field class (with a selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_BOOL_SELECTOR_FIELD | Option field class (with a boolean selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD | Option field class (with an integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_SELECTOR_FIELD. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_OPTION_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD | Option field class (with an unsigned integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_OPTION_WITH_SIGNED_INTEGER_SELECTOR_FIELD | Option field class (with a signed integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_OPTION_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_VARIANT |
No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITHOUT_SELECTOR_FIELD | Variant field class (without a selector field). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD | Variant field class (with a selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD | Variant field class (with an integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_SELECTOR_FIELD. No field class has this type: use it with bt_field_class_type_is(). |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_UNSIGNED_INTEGER_SELECTOR_FIELD | Option field class (with an unsigned integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD. |
BT_FIELD_CLASS_TYPE_VARIANT_WITH_SIGNED_INTEGER_SELECTOR_FIELD | Option field class (with a signed integer selector field). This type conceptually inherits BT_FIELD_CLASS_TYPE_VARIANT_WITH_INTEGER_SELECTOR_FIELD. |
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_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 |
bt_field_class_type bt_field_class_get_type | ( | const bt_field_class * | field_class | ) |
Returns the type enumerator of the field class field_class.
[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. |
void bt_field_class_set_user_attributes | ( | bt_field_class * | field_class, |
const bt_value * | user_attributes | ||
) |
Sets the user attributes of the field class field_class to user_attributes.
See the user attributes property.
bt_field_class_*_create()
functions, the field class's initial user attributes is an empty map value. Therefore you can borrow it with bt_field_class_borrow_user_attributes() and fill it directly instead of setting a new one with this function.[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
. bt_value* bt_field_class_borrow_user_attributes | ( | bt_field_class * | field_class | ) |
Borrows the user attributes of the field class field_class.
See the user attributes property.
bt_field_class_*_create()
functions, the field class's initial user attributes is an empty map value.[in] | field_class | Field class from which to borrow the user attributes. |
NULL
.const
version of this function. 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).
bt_field_class* bt_field_class_bool_create | ( | bt_trace_class * | trace_class | ) |
Creates a boolean field class from the trace class trace_class.
On success, the returned boolean field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a boolean field class. |
NULL
on memory error.NULL
. bt_field_class* bt_field_class_bit_array_create | ( | bt_trace_class * | trace_class, |
uint64_t | length | ||
) |
Creates a bit array field class with the length length from the trace class trace_class.
On success, the returned bit array field class has the following property values:
Property | Value |
---|---|
Length | length |
User attributes | Empty map value |
[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
. uint64_t bt_field_class_bit_array_get_length | ( | const bt_field_class * | field_class | ) |
Returns the length of the bit array field class field_class.
See the length property.
[in] | field_class | Bit array field class of which to get the length. |
NULL
. void bt_field_class_integer_set_field_value_range | ( | bt_field_class * | field_class, |
uint64_t | n | ||
) |
Sets the field value range of the integer field class field_class to n.
See the field value range property.
[in] | field_class | Integer field class of which to set the field value range to n. |
[in] | n | N in:
|
NULL
. uint64_t bt_field_class_integer_get_field_value_range | ( | const bt_field_class * | field_class | ) |
Returns the field value range of the integer field class field_class.
See the field value range property.
[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_preferred_display_base | ( | bt_field_class * | field_class, |
bt_field_class_integer_preferred_display_base | preferred_display_base | ||
) |
Sets the preferred display base of the integer field class field_class to preferred_display_base.
See the preferred display base property.
[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
. bt_field_class_integer_preferred_display_base bt_field_class_integer_get_preferred_display_base | ( | const bt_field_class * | field_class | ) |
Returns the preferred display base of the integer field class field_class.
See the preferred display base property.
[in] | field_class | Integer field class of which to get the preferred display base. |
NULL
. bt_field_class* bt_field_class_integer_unsigned_create | ( | bt_trace_class * | trace_class | ) |
Creates an unsigned integer field class from the trace class trace_class.
On success, the returned unsigned integer field class has the following property values:
Property | Value |
---|---|
Field value range | [0, 264 - 1] |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an unsigned integer field class. |
NULL
on memory error.NULL
. bt_field_class* bt_field_class_integer_signed_create | ( | bt_trace_class * | trace_class | ) |
Creates an signed integer field class from the trace class trace_class.
On success, the returned signed integer field class has the following property values:
Property | Value |
---|---|
Field value range | [-263, 263 - 1] |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a signed integer field class. |
NULL
on memory error.NULL
. bt_field_class* bt_field_class_real_single_precision_create | ( | bt_trace_class * | trace_class | ) |
Creates a single-precision real field class from the trace class trace_class.
On success, the returned single-precision real field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a single-preicision real field class. |
NULL
on memory error.NULL
. bt_field_class* bt_field_class_real_double_precision_create | ( | bt_trace_class * | trace_class | ) |
Creates a double-precision real field class from the trace class trace_class.
On success, the returned double-precision real field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a double-preicision real field class. |
NULL
on memory error.NULL
. uint64_t bt_field_class_enumeration_get_mapping_count | ( | const bt_field_class * | field_class | ) |
Returns the number of mappings contained in the enumeration field class field_class.
See the mappings property.
[in] | field_class | Enumeration field class of which to get the number of contained mappings. |
NULL
. const char* bt_field_class_enumeration_mapping_get_label | ( | const bt_field_class_enumeration_mapping * | mapping | ) |
Returns the label of the enumeration field class mapping mapping.
See the mappings property.
[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
. bt_field_class* bt_field_class_enumeration_unsigned_create | ( | bt_trace_class * | trace_class | ) |
Creates an unsigned enumeration field class from the trace class trace_class.
On success, the returned unsigned enumeration field class has the following property values:
Property | Value |
---|---|
Field value range | [0, 264 - 1] |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
Mappings | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create an unsigned enumeration field class. |
NULL
on memory error.NULL
. bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_unsigned_add_mapping | ( | bt_field_class * | field_class, |
const char * | label, | ||
const bt_integer_range_set_unsigned * | ranges | ||
) |
Adds a mapping to the unsigned enumeration field class field_class having the label label and the unsigned integer ranges ranges.
See the mappings property.
[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
. const bt_field_class_enumeration_unsigned_mapping* bt_field_class_enumeration_unsigned_borrow_mapping_by_index_const | ( | const bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the mapping at index index from the unsigned enumeration field class field_class.
See the mappings property.
[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 is not modified.
NULL
. const bt_field_class_enumeration_unsigned_mapping* bt_field_class_enumeration_unsigned_borrow_mapping_by_label_const | ( | const bt_field_class * | field_class, |
const char * | label | ||
) |
Borrows the mapping having the label label from the unsigned enumeration field class field_class.
See the mappings property.
If there's no mapping having the label label in field_class, this function returns NULL
.
[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 is not modified.
NULL
. NULL
. bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_unsigned_get_mapping_labels_for_value | ( | const bt_field_class * | field_class, |
uint64_t | value, | ||
bt_field_class_enumeration_mapping_label_array * | labels, | ||
uint64_t * | count | ||
) |
Returns an array of all the labels of the mappings of the unsigned enumeration field class field_class of which the unsigned integer ranges contain the integral value value.
See the mappings property.
This function sets *labels to the resulting array and *count to the number of labels in *labels.
On success, if there's no mapping ranges containing the value value, *count is 0.
[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 field_class is not modified. |
[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
. const bt_integer_range_set_unsigned* bt_field_class_enumeration_unsigned_mapping_borrow_ranges_const | ( | const bt_field_class_enumeration_unsigned_mapping * | mapping | ) |
Borrows the unsigned integer ranges from the unsigned enumeration field class mapping mapping.
See the mappings property.
[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 |
bt_field_class* bt_field_class_enumeration_signed_create | ( | bt_trace_class * | trace_class | ) |
Creates a signed enumeration field class from the trace class trace_class.
On success, the returned signed enumeration field class has the following property values:
Property | Value |
---|---|
Field value range | [-263, 263 - 1] |
Preferred display base | BT_FIELD_CLASS_INTEGER_PREFERRED_DISPLAY_BASE_DECIMAL |
Mappings | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a signed enumeration field class. |
NULL
on memory error.NULL
. bt_field_class_enumeration_add_mapping_status bt_field_class_enumeration_signed_add_mapping | ( | bt_field_class * | field_class, |
const char * | label, | ||
const bt_integer_range_set_signed * | ranges | ||
) |
Adds a mapping to the signed enumeration field class field_class having the label label and the signed integer ranges ranges.
See the mappings property.
[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
. const bt_field_class_enumeration_signed_mapping* bt_field_class_enumeration_signed_borrow_mapping_by_index_const | ( | const bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the mapping at index index from the signed enumeration field class field_class.
See the mappings property.
[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 is not modified.
NULL
. const bt_field_class_enumeration_signed_mapping* bt_field_class_enumeration_signed_borrow_mapping_by_label_const | ( | const bt_field_class * | field_class, |
const char * | label | ||
) |
Borrows the mapping having the label label from the signed enumeration field class field_class.
See the mappings property.
If there's no mapping having the label label in field_class, this function returns NULL
.
[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 is not modified.
NULL
. NULL
. bt_field_class_enumeration_get_mapping_labels_for_value_status bt_field_class_enumeration_signed_get_mapping_labels_for_value | ( | const bt_field_class * | field_class, |
int64_t | value, | ||
bt_field_class_enumeration_mapping_label_array * | labels, | ||
uint64_t * | count | ||
) |
Returns an array of all the labels of the mappings of the signed enumeration field class field_class of which the signed integer ranges contain the integral value value.
See the mappings property.
This function sets *labels to the resulting array and *count to the number of labels in *labels.
On success, if there's no mapping ranges containing the value value, *count is 0.
[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 field_class is not modified. |
[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
. const bt_integer_range_set_signed* bt_field_class_enumeration_signed_mapping_borrow_ranges_const | ( | const bt_field_class_enumeration_signed_mapping * | mapping | ) |
Borrows the signed integer ranges from the signed enumeration field class mapping mapping.
See the mappings property.
[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 |
bt_field_class* bt_field_class_string_create | ( | bt_trace_class * | trace_class | ) |
Creates a string field class from the trace class trace_class.
On success, the returned string field class has the following property value:
Property | Value |
---|---|
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a string field class. |
NULL
on memory error.NULL
. bt_field_class* bt_field_class_array_borrow_element_field_class | ( | bt_field_class * | field_class | ) |
Borrows the element field class from the array field class field_class.
See the element field class property.
[in] | field_class | Array field class from which to borrow the element field class. |
NULL
. const
version of this function. 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).
bt_field_class* bt_field_class_array_static_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | element_field_class, | ||
uint64_t | length | ||
) |
Creates a static array field class having the element field class element_field_class and the length length from the trace class trace_class.
On success, the returned static array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length | length |
User attributes | Empty map value |
[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
. bt_pre_fc_not_in_tc{element_field_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.
See the length property.
[in] | field_class | Static array field class of which to get the length. |
NULL
. bt_field_class* bt_field_class_array_dynamic_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | element_field_class, | ||
bt_field_class * | length_field_class | ||
) |
Creates a dynamic array field class having the element field class element_field_class from the trace class trace_class.
If length_field_class is not NULL
, then the created dynamic array field class has a linked length field class. See Field classes with links to other field classes to learn more.
On success, the returned dynamic array field class has the following property values:
Property | Value |
---|---|
Element field class | element_field_class |
Length field path | None (if length_field_class is not NULL , this property becomes available when the returned field class becomes part of an event class or of a stream class) |
User attributes | Empty map value |
[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 | Linked length field class 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.const bt_field_path* bt_field_class_array_dynamic_with_length_field_borrow_length_field_path_const | ( | const bt_field_class * | field_class | ) |
Borrows the length field path from the dynamic array field class (with a length field) field_class.
See the length field path property.
This property is only available when a structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Dynamic array field class from which to borrow the length field path. |
NULL
. bt_field_class* bt_field_class_structure_create | ( | bt_trace_class * | trace_class | ) |
Creates a structure field class from the trace class trace_class.
On success, the returned structure field class has the following property values:
Property | Value |
---|---|
Members | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a structure field class. |
NULL
on memory error.NULL
. bt_field_class_structure_append_member_status bt_field_class_structure_append_member | ( | bt_field_class * | field_class, |
const char * | name, | ||
bt_field_class * | member_field_class | ||
) |
Appends a member to the structure field class field_class having the name name and the field class member_field_class.
See the members property.
[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
. uint64_t bt_field_class_structure_get_member_count | ( | const bt_field_class * | field_class | ) |
Returns the number of members contained in the structure field class field_class.
See the members property.
[in] | field_class | Structure field class of which to get the number of contained members. |
NULL
. bt_field_class_structure_member* bt_field_class_structure_borrow_member_by_index | ( | bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the member at index index from the structure field class field_class.
See the members property.
[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 is not modified.
NULL
. const
version of this function. const bt_field_class_structure_member* bt_field_class_structure_borrow_member_by_index_const | ( | const bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the member at index index from the structure field class field_class (const
version).
bt_field_class_structure_member* bt_field_class_structure_borrow_member_by_name | ( | bt_field_class * | field_class, |
const char * | name | ||
) |
Borrows the member having the name name from the structure field class field_class.
See the members property.
If there's no member having the name name in field_class, this function returns NULL
.
[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 is not modified.
NULL
. NULL
.const
version of this function. const bt_field_class_structure_member* bt_field_class_structure_borrow_member_by_name_const | ( | const bt_field_class * | field_class, |
const char * | name | ||
) |
Borrows the member having the name name from the structure field class field_class (const
version).
const char* bt_field_class_structure_member_get_name | ( | const bt_field_class_structure_member * | member | ) |
Returns the name of the structure field class member member.
See the members property.
[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
. bt_field_class* bt_field_class_structure_member_borrow_field_class | ( | bt_field_class_structure_member * | member | ) |
Borrows the field class from the structure field class member member.
See the members property.
[in] | member | Structure field class member from which to borrow the field class. |
NULL
.const
version of this function. const bt_field_class* bt_field_class_structure_member_borrow_field_class_const | ( | const bt_field_class_structure_member * | member | ) |
Borrows the field class from the structure field class member member (const
version).
void bt_field_class_structure_member_set_user_attributes | ( | bt_field_class_structure_member * | member, |
const bt_value * | user_attributes | ||
) |
Sets the user attributes of the structure field class member member to user_attributes.
See the members property.
[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
. bt_value* bt_field_class_structure_member_borrow_user_attributes | ( | bt_field_class_structure_member * | member | ) |
Borrows the user attributes of the structure field class member member.
See the members property.
[in] | member | Structure field class member from which to borrow the user attributes. |
NULL
.const
version of this function. const bt_value* bt_field_class_structure_member_borrow_user_attributes_const | ( | const bt_field_class_structure_member * | member | ) |
Borrows the user attributes of the structure field class member member (const
version).
See bt_field_class_structure_member_borrow_user_attributes().
bt_field_class* bt_field_class_option_borrow_field_class | ( | bt_field_class * | field_class | ) |
Borrows the optional field class from the option field class field_class.
See the optional field class property.
[in] | field_class | Option field class from which to borrow the optional field class. |
NULL
. const
version of this function. 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).
bt_field_class* bt_field_class_option_without_selector_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | optional_field_class | ||
) |
Creates an option field class (without a selector field) having the optional field class optional_field_class from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
User attributes | Empty map value |
[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
. const bt_field_path* bt_field_class_option_with_selector_field_borrow_selector_field_path_const | ( | const bt_field_class * | field_class | ) |
Borrows the selector field path from the option field class (with a selector field) field_class.
See the selector field path property.
This property is only available when a structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Option field class from which to borrow the selector field path. |
NULL
. bt_field_class* bt_field_class_option_with_selector_field_bool_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | optional_field_class, | ||
bt_field_class * | selector_field_class | ||
) |
Creates an option field class (with a boolean selector field) having the optional field class optional_field_class from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Selector is reversed? | BT_FALSE |
User attributes | Empty map value |
[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. |
NULL
on memory error.NULL
. NULL
. NULL
. void bt_field_class_option_with_selector_field_bool_set_selector_is_reversed | ( | bt_field_class * | field_class, |
bt_bool | selector_is_reversed | ||
) |
Sets whether or not the selector of the option field class (with a boolean selector field) field_class is reversed.
See the selector is reversed? property.
[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
. bt_bool bt_field_class_option_with_selector_field_bool_selector_is_reversed | ( | const bt_field_class * | field_class | ) |
Returns whether or not the selector of the option field class (with a boolean selector field) is reversed.
See the selector is reversed? property.
[in] | field_class | Option field class of which to get whether or not its selector is reversed. |
NULL
. bt_field_class* bt_field_class_option_with_selector_field_integer_unsigned_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | optional_field_class, | ||
bt_field_class * | selector_field_class, | ||
const bt_integer_range_set_unsigned * | ranges | ||
) |
Creates an option field class (with an unsigned integer selector field) having the optional field class optional_field_class from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Selector's unsigned integer ranges | ranges |
User attributes | Empty map value |
[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 | Selector's unsigned integer ranges of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
. const bt_integer_range_set_unsigned* bt_field_class_option_with_selector_field_integer_unsigned_borrow_selector_ranges_const | ( | const bt_field_class * | field_class | ) |
Borrows the unsigned integer ranges from the option field class (with an unsigned integer selector field) field_class.
See the selector's unsigned integer ranges property.
[in] | field_class | Option field class from which to borrow the unsigned integer ranges. |
NULL
. bt_field_class* bt_field_class_option_with_selector_field_integer_signed_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | optional_field_class, | ||
bt_field_class * | selector_field_class, | ||
const bt_integer_range_set_signed * | ranges | ||
) |
Creates an option field class (with a signed integer selector field) having the optional field class optional_field_class from the trace class trace_class.
On success, the returned option field class has the following property values:
Property | Value |
---|---|
Optional field class | optional_field_class |
Selector field path | None (this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Selector's signed integer ranges | ranges |
User attributes | Empty map value |
[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 | Selector's signed integer ranges of the option field class to create. |
NULL
on memory error.NULL
. NULL
. NULL
. NULL
. const bt_integer_range_set_signed* bt_field_class_option_with_selector_field_integer_signed_borrow_selector_ranges_const | ( | const bt_field_class * | field_class | ) |
Borrows the signed integer ranges from the option field class (with a signed integer selector field) field_class.
See the selector's signed integer ranges property.
[in] | field_class | Option field class from which to borrow the signed integer ranges. |
NULL
. bt_field_class* bt_field_class_variant_create | ( | bt_trace_class * | trace_class, |
bt_field_class * | selector_field_class | ||
) |
Creates a variant field class from the trace class trace_class.
If selector_field_class is not NULL
, then the created variant field class has a linked selector field class. See Field classes with links to other field classes to learn more.
On success, the returned variant field class has the following property values:
Property | Value |
---|---|
Selector field path | None (if selector_field_class is not NULL , this property becomes available when the returned field class becomes part of an event class or of a stream class) |
Options | None |
User attributes | Empty map value |
[in] | trace_class | Trace class from which to create a variant field class. |
[in] | selector_field_class | Linked selector field class of the variant field class to create. Can be |
NULL
on memory error.NULL
. NULL
, selector_field_class is an integer field 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.
See the options property.
[in] | field_class | Variant field class of which to get the number of contained options. |
NULL
. bt_field_class_variant_option* bt_field_class_variant_borrow_option_by_index | ( | bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the option at index index from the variant field class field_class.
See the options property.
[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 is not modified.
NULL
. const
version of this function. 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.
See the options property.
If there's no option having the name name in field_class, 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 is not modified.
NULL
. NULL
.const
version of this function. 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).
const char* bt_field_class_variant_option_get_name | ( | const bt_field_class_variant_option * | option | ) |
Returns the name of the variant field class option option.
See the options property.
[in] | option | Variant field class option of which to get the name. |
Name of option.
The returned pointer remains valid as long as option exists.
NULL
. bt_field_class* bt_field_class_variant_option_borrow_field_class | ( | bt_field_class_variant_option * | option | ) |
Borrows the field class from the variant field class option option.
See the options property.
[in] | option | Variant field class option from which to borrow the field class. |
NULL
.const
version of this function. const bt_field_class* bt_field_class_variant_option_borrow_field_class_const | ( | const bt_field_class_variant_option * | option | ) |
Borrows the field class from the variant field class option option (const
version).
void bt_field_class_variant_option_set_user_attributes | ( | bt_field_class_variant_option * | option, |
const bt_value * | user_attributes | ||
) |
Sets the user attributes of the variant field class option option to user_attributes.
See the options property.
[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
. bt_value* bt_field_class_variant_option_borrow_user_attributes | ( | bt_field_class_variant_option * | option | ) |
Borrows the user attributes of the variant field class option option.
See the options property.
[in] | option | Variant field class option from which to borrow the user attributes. |
NULL
.const
version of this function. const bt_value* bt_field_class_variant_option_borrow_user_attributes_const | ( | const bt_field_class_variant_option * | option | ) |
Borrows the user attributes of the variant field class option option (const
version).
bt_field_class_variant_without_selector_append_option_status bt_field_class_variant_without_selector_append_option | ( | bt_field_class * | field_class, |
const char * | name, | ||
bt_field_class * | option_field_class | ||
) |
Appends an option to the variant field class (without a selector field) field_class having the name name and the field class option_field_class.
See the options property.
[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). |
[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
. NULL
. const bt_field_path* bt_field_class_variant_with_selector_field_borrow_selector_field_path_const | ( | const bt_field_class * | field_class | ) |
Borrows the selector field path from the variant field class (with a selector field) field_class.
See the selector field path property.
This property is only available when a structure field class containing (recursively) field_class is passed to one of:
In the meantime, this function returns NULL
.
[in] | field_class | Variant field class from which to borrow the selector field path. |
NULL
. bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_unsigned_append_option | ( | bt_field_class * | field_class, |
const char * | name, | ||
bt_field_class * | option_field_class, | ||
const bt_integer_range_set_unsigned * | ranges | ||
) |
Appends an option to the variant field class (with an unsigned integer selector field) field_class having the name name, the field class option_field_class, and the unsigned integer ranges ranges.
See the options property.
[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). |
[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
. NULL
. NULL
. const bt_field_class_variant_with_selector_field_integer_unsigned_option* bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_index_const | ( | const bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the option at index index from the variant field class (with an unsigned integer selector field) field_class.
See the options property.
[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 is not modified.
NULL
. const bt_field_class_variant_with_selector_field_integer_unsigned_option* bt_field_class_variant_with_selector_field_integer_unsigned_borrow_option_by_name_const | ( | const bt_field_class * | field_class, |
const char * | name | ||
) |
Borrows the option having the name name from the variant field class (with an unsigned integer selector field) field_class.
See the options property.
If there's no option having the name name in field_class, this function returns NULL
.
[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 is not modified.
NULL
. NULL
.const bt_integer_range_set_unsigned* bt_field_class_variant_with_selector_field_integer_unsigned_option_borrow_ranges_const | ( | const bt_field_class_variant_with_selector_field_integer_unsigned_option * | option | ) |
Borrows the unsigned integer ranges from the variant field class (with an unsigned integer selector field) option option.
See the options property.
[in] | option | Variant field class option from which to borrow the unsigned integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the variant field class (with an unsigned integer selector field) option option to the common bt_field_class_variant_option type.
See the options property.
[in] | option | Variant field class option to upcast. Can be |
bt_field_class_variant_with_selector_field_integer_append_option_status bt_field_class_variant_with_selector_field_integer_signed_append_option | ( | bt_field_class * | field_class, |
const char * | name, | ||
bt_field_class * | option_field_class, | ||
const bt_integer_range_set_signed * | ranges | ||
) |
Appends an option to the variant field class (with a signed integer selector field) field_class having the name name, the field class option_field_class, and the signed integer ranges ranges.
See the options property.
[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). |
[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
. NULL
. NULL
. const bt_field_class_variant_with_selector_field_integer_signed_option* bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_index_const | ( | const bt_field_class * | field_class, |
uint64_t | index | ||
) |
Borrows the option at index index from the variant field class (with a signed integer selector field) field_class.
See the options property.
[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 is not modified.
NULL
. const bt_field_class_variant_with_selector_field_integer_signed_option* bt_field_class_variant_with_selector_field_integer_signed_borrow_option_by_name_const | ( | const bt_field_class * | field_class, |
const char * | name | ||
) |
Borrows the option having the name name from the variant field class (with a signed integer selector field) field_class.
See the options property.
If there's no option having the name name in field_class, this function returns NULL
.
[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 is not modified.
NULL
. NULL
.const bt_integer_range_set_signed* bt_field_class_variant_with_selector_field_integer_signed_option_borrow_ranges_const | ( | const bt_field_class_variant_with_selector_field_integer_signed_option * | option | ) |
Borrows the signed integer ranges from the variant field class (with a signed integer selector field) option option.
See the options property.
[in] | option | Variant field class option from which to borrow the signed integer ranges. |
NULL
.
|
inlinestatic |
Upcasts the variant field class (with a signed integer selector field) option option to the common bt_field_class_variant_option type.
See the options property.
[in] | option | Variant field class option to upcast. Can be |
void bt_field_class_get_ref | ( | const bt_field_class * | field_class | ) |
Increments the reference count of the field class field_class.
[in] | field_class | Field class of which to increment the reference count. Can be |
void bt_field_class_put_ref | ( | const bt_field_class * | field_class | ) |
Decrements the reference count of the field class field_class.
[in] | field_class | Field class of which to decrement the reference count. Can be |