|
Babeltrace 2 C API 2.0.6
Open-source trace manipulation framework
|
Set of descriptors of prospective components to use with bt_get_greatest_operative_mip_version().
A component descriptor set is an unordered set of component descriptors.
A component descriptor describes a prospective component, that is, everything that is needed to instantiate a component class within a trace processing graph without actually doing it:
bt_graph_add_*_component*() functions.bt_graph_add_*_component*() functions.bt_graph_add_*_component_with_initialize_method_data() functions.As of Babeltrace 2.0, the only use case of a component descriptor set is bt_get_greatest_operative_mip_version(). This function computes the greatest Message Interchange Protocol version which you can use to create a trace processing graph to which you intend to add components described by a set of component descriptors.
A component descriptor set is a shared object: get a new reference with bt_component_descriptor_set_get_ref() and put an existing reference with bt_component_descriptor_set_put_ref().
Create an empty component descriptor set with bt_component_descriptor_set_create().
Add a component descriptor to a component descriptor set with bt_component_descriptor_set_add_descriptor() and bt_component_descriptor_set_add_descriptor_with_initialize_method_data().
Creation | |
| enum | bt_component_descriptor_set_add_descriptor_status { BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_OK , BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_MEMORY_ERROR } |
| Status codes for bt_component_descriptor_set_add_descriptor() and bt_component_descriptor_set_add_descriptor_with_initialize_method_data(). More... | |
| typedef enum bt_component_descriptor_set_add_descriptor_status | bt_component_descriptor_set_add_descriptor_status |
| Status codes for bt_component_descriptor_set_add_descriptor() and bt_component_descriptor_set_add_descriptor_with_initialize_method_data(). | |
| bt_component_descriptor_set * | bt_component_descriptor_set_create (void) |
| Creates an empty component descriptor set. | |
Type | |
| typedef struct bt_component_descriptor_set | bt_component_descriptor_set |
| Component descriptor set. | |
Component descriptor adding | |
| bt_component_descriptor_set_add_descriptor_status | bt_component_descriptor_set_add_descriptor (bt_component_descriptor_set *component_descriptor_set, const bt_component_class *component_class, const bt_value *params) |
Alias of bt_component_descriptor_set_add_descriptor_with_initialize_method_data() with the initialize_method_data parameter set to NULL. | |
| bt_component_descriptor_set_add_descriptor_status | bt_component_descriptor_set_add_descriptor_with_initialize_method_data (bt_component_descriptor_set *component_descriptor_set, const bt_component_class *component_class, const bt_value *params, void *initialize_method_data) |
| Adds a descriptor of a component which would be an instance of the component class component_class, would receive the parameters params and the method data initialize_method_data at initialization time, to the component descriptor set component_descriptor_set. | |
Reference count | |
| void | bt_component_descriptor_set_get_ref (const bt_component_descriptor_set *component_descriptor_set) |
| Increments the reference count of the component descriptor set component_descriptor_set. | |
| void | bt_component_descriptor_set_put_ref (const bt_component_descriptor_set *component_descriptor_set) |
| Decrements the reference count of the component descriptor set component_descriptor_set. | |
| #define | BT_COMPONENT_DESCRIPTOR_SET_PUT_REF_AND_RESET(_component_descriptor_set) |
Decrements the reference count of the component descriptor set _component_descriptor_set, and then sets _component_descriptor_set to NULL. | |
| #define | BT_COMPONENT_DESCRIPTOR_SET_MOVE_REF(_dst, _src) |
Decrements the reference count of the component descriptor set _dst, sets _dst to _src, and then sets _src to NULL. | |
Status codes for bt_component_descriptor_set_add_descriptor() and bt_component_descriptor_set_add_descriptor_with_initialize_method_data().
| Enumerator | |
|---|---|
| BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_OK | Success. |
| BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_MEMORY_ERROR | Out of memory. |
| #define BT_COMPONENT_DESCRIPTOR_SET_PUT_REF_AND_RESET | ( | _component_descriptor_set | ) |
Decrements the reference count of the component descriptor set _component_descriptor_set, and then sets _component_descriptor_set to NULL.
| _component_descriptor_set | Component descriptor set of which to decrement the reference count. Can contain |
| #define BT_COMPONENT_DESCRIPTOR_SET_MOVE_REF | ( | _dst, | |
| _src ) |
Decrements the reference count of the component descriptor set _dst, sets _dst to _src, and then sets _src to NULL.
This macro effectively moves a component descriptor set reference from the expression _src to the expression _dst, putting the existing _dst reference.
| _dst | Destination expression. Can contain |
| _src | Source expression. Can contain |
|
extern |
Creates an empty component descriptor set.
NULL on memory error.
|
extern |
Adds a descriptor of a component which would be an instance of the component class component_class, would receive the parameters params and the method data initialize_method_data at initialization time, to the component descriptor set component_descriptor_set.
| [in] | component_descriptor_set | Component descriptor set to which to add a component descriptor. |
| [in] | component_class | Component class which would be instantiated to create the described component. |
| [in] | params | Parameters which would be passed to the initialization method of the described component as the params parameter. Can be |
| [in] | initialize_method_data | User data which would be passed to the initialization method of the described component as the initialize_method_data parameter. |
| BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_OK | Success. |
| BT_COMPONENT_DESCRIPTOR_SET_ADD_DESCRIPTOR_STATUS_MEMORY_ERROR | Out of memory. |
NULL. NULL. NULL.
|
extern |
Increments the reference count of the component descriptor set component_descriptor_set.
| [in] | component_descriptor_set | Component descriptor set of which to increment the reference count. Can be |
|
extern |
Decrements the reference count of the component descriptor set component_descriptor_set.
| [in] | component_descriptor_set | Component descriptor set of which to decrement the reference count. Can be |