|
Babeltrace 2 C API
2.0.3
Open-source trace manipulation framework
|
Private views of components for instance methods.
The bt_self_component, bt_self_component_source, bt_self_component_filter, bt_self_component_sink types are private views of a component from within a component class instance method.
Add a port to a component with bt_self_component_source_add_output_port(), bt_self_component_filter_add_input_port(), bt_self_component_filter_add_output_port(), and bt_self_component_sink_add_input_port().
When you add a port to a component, you can attach custom user data to it (void *). You can retrieve this user data afterwards with bt_self_component_port_get_data().
Borrow a self component port from a component by index with bt_self_component_source_borrow_output_port_by_index(), bt_self_component_filter_borrow_input_port_by_index(), bt_self_component_filter_borrow_output_port_by_index(), and bt_self_component_sink_borrow_input_port_by_index().
Borrow a self component port from a component by name with bt_self_component_source_borrow_output_port_by_name(), bt_self_component_filter_borrow_input_port_by_name(), bt_self_component_filter_borrow_output_port_by_name(), and bt_self_component_sink_borrow_input_port_by_name().
Set and get user data attached to a component with bt_self_component_set_data() and bt_self_component_get_data().
Get a component's owning trace processing graph's effective Message Interchange Protocol version with bt_self_component_get_graph_mip_version().
Check whether or not a sink component is interrupted with bt_self_component_sink_is_interrupted().
Upcast the "self" (private) types to the public and common self component types with the bt_self_component*_as_component*() and bt_self_component_*_as_self_component() functions.
Modules | |
| Self component ports | |
| Private views of ports for component class instance methods. | |
Types | |
| typedef struct bt_self_component | bt_self_component |
| Self component. | |
| typedef struct bt_self_component_source | bt_self_component_source |
| Self source component. | |
| typedef struct bt_self_component_filter | bt_self_component_filter |
| Self filter component. | |
| typedef struct bt_self_component_sink | bt_self_component_sink |
| Self sink component. | |
| typedef struct bt_self_component_source_configuration | bt_self_component_source_configuration |
| Self source component configuration. | |
| typedef struct bt_self_component_filter_configuration | bt_self_component_filter_configuration |
| Self filter component configuration. | |
| typedef struct bt_self_component_sink_configuration | bt_self_component_sink_configuration |
| Self sink component configuration. | |
User data | |
| void | bt_self_component_set_data (bt_self_component *self_component, void *user_data) |
| Sets the user data of the component self_component to data. More... | |
| void * | bt_self_component_get_data (const bt_self_component *self_component) |
| Returns the user data of the component self_component. More... | |
Trace processing graph's effective MIP version access | |
| uint64_t | bt_self_component_get_graph_mip_version (bt_self_component *self_component) |
| Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph which contains the component self_component. More... | |
Sink component's interruption query | |
| bt_bool | bt_self_component_sink_is_interrupted (const bt_self_component_sink *self_component) |
| Returns whether or not the sink component self_component is interrupted, that is, whether or not any of its interrupters is set. More... | |
Self to public upcast | |
| static const bt_component * | bt_self_component_as_component (bt_self_component *self_component) |
| Upcasts the self component self_component to the public bt_component type. More... | |
| static const bt_component_source * | bt_self_component_source_as_component_source (bt_self_component_source *self_component) |
| Upcasts the self source component self_component to the public bt_component_source type. More... | |
| static const bt_component_filter * | bt_self_component_filter_as_component_filter (bt_self_component_filter *self_component) |
| Upcasts the self filter component self_component to the public bt_component_filter type. More... | |
| static const bt_component_sink * | bt_self_component_sink_as_component_sink (bt_self_component_sink *self_component) |
| Upcasts the self sink component self_component to the public bt_component_sink type. More... | |
Self to common self upcast | |
| static bt_self_component * | bt_self_component_source_as_self_component (bt_self_component_source *self_component) |
| Upcasts the self source component self_component to the common bt_self_component type. More... | |
| static bt_self_component * | bt_self_component_filter_as_self_component (bt_self_component_filter *self_component) |
| Upcasts the self filter component self_component to the common bt_self_component type. More... | |
| static bt_self_component * | bt_self_component_sink_as_self_component (bt_self_component_sink *self_component) |
| Upcasts the self sink component self_component to the common bt_self_component type. More... | |
Status codes for bt_self_component_source_add_output_port(), bt_self_component_filter_add_input_port(), bt_self_component_filter_add_output_port(), and bt_self_component_sink_add_input_port().
| Enumerator | |
|---|---|
| BT_SELF_COMPONENT_ADD_PORT_STATUS_OK |
Success. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR |
Out of memory. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR |
Other error. |
| bt_self_component_add_port_status bt_self_component_source_add_output_port | ( | bt_self_component_source * | self_component, |
| const char * | name, | ||
| void * | user_data, | ||
| bt_self_component_port_output ** | self_component_port | ||
| ) |
Adds an output port named name and having the user data user_data to the source component self_component, and sets *self_component_port to the resulting port.
| [in] | self_component | Source component instance. |
| [in] | name | Name of the output port to add to self_component (copied). |
| [in] | user_data | User data of the output port to add to self_component. |
| [out] | self_component_port | On success, if not NULL, *self_component_port is a borrowed reference of the created port. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_OK | Success. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR | Out of memory. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR | Other error. |
NULL. NULL. | bt_self_component_add_port_status bt_self_component_filter_add_input_port | ( | bt_self_component_filter * | self_component, |
| const char * | name, | ||
| void * | user_data, | ||
| bt_self_component_port_input ** | self_component_port | ||
| ) |
Adds an input port named name and having the user data user_data to the filter component self_component, and sets *self_component_port to the resulting port.
| [in] | self_component | Filter component instance. |
| [in] | name | Name of the input port to add to self_component (copied). |
| [in] | user_data | User data of the input port to add to self_component. |
| [out] | self_component_port | On success, if not NULL, *self_component_port is a borrowed reference of the created port. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_OK | Success. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR | Out of memory. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR | Other error. |
NULL. NULL. | bt_self_component_add_port_status bt_self_component_filter_add_output_port | ( | bt_self_component_filter * | self_component, |
| const char * | name, | ||
| void * | user_data, | ||
| bt_self_component_port_output ** | self_component_port | ||
| ) |
Adds an output port named name and having the user data user_data to the filter component self_component, and sets *self_component_port to the resulting port.
| [in] | self_component | Filter component instance. |
| [in] | name | Name of the output port to add to self_component (copied). |
| [in] | user_data | User data of the output port to add to self_component. |
| [out] | self_component_port | On success, if not NULL, *self_component_port is a borrowed reference of the created port. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_OK | Success. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR | Out of memory. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR | Other error. |
NULL. NULL. | bt_self_component_add_port_status bt_self_component_sink_add_input_port | ( | bt_self_component_sink * | self_component, |
| const char * | name, | ||
| void * | user_data, | ||
| bt_self_component_port_input ** | self_component_port | ||
| ) |
Adds an input port named name and having the user data user_data to the sink component self_component, and sets *self_component_port to the resulting port.
| [in] | self_component | Sink component instance. |
| [in] | name | Name of the input port to add to self_component (copied). |
| [in] | user_data | User data of the input port to add to self_component. |
| [out] | self_component_port | On success, if not NULL, *self_component_port is a borrowed reference of the created port. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_OK | Success. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR | Out of memory. |
| BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR | Other error. |
NULL. NULL. | bt_self_component_port_output* bt_self_component_source_borrow_output_port_by_index | ( | bt_self_component_source * | self_component, |
| uint64_t | index | ||
| ) |
Borrows the self component output port at index index from the source component self_component.
| [in] | self_component | Source component instance. |
| [in] | index | Index of the output port to borrow from self_component. |
Borrowed reference of the output port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
NULL. | bt_self_component_port_input* bt_self_component_filter_borrow_input_port_by_index | ( | bt_self_component_filter * | self_component, |
| uint64_t | index | ||
| ) |
Borrows the self component input port at index index from the filter component self_component.
| [in] | self_component | Filter component instance. |
| [in] | index | Index of the input port to borrow from self_component. |
Borrowed reference of the input port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
NULL. | bt_self_component_port_output* bt_self_component_filter_borrow_output_port_by_index | ( | bt_self_component_filter * | self_component, |
| uint64_t | index | ||
| ) |
Borrows the self component output port at index index from the filter component self_component.
| [in] | self_component | Filter component instance. |
| [in] | index | Index of the output port to borrow from self_component. |
Borrowed reference of the output port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
NULL. | bt_self_component_port_input* bt_self_component_sink_borrow_input_port_by_index | ( | bt_self_component_sink * | self_component, |
| uint64_t | index | ||
| ) |
Borrows the self component input port at index index from the sink component self_component.
| [in] | self_component | Sink component instance. |
| [in] | index | Index of the input port to borrow from self_component. |
Borrowed reference of the input port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
NULL. | bt_self_component_port_output* bt_self_component_source_borrow_output_port_by_name | ( | bt_self_component_source * | self_component, |
| const char * | name | ||
| ) |
Borrows the self component output port named name from the source component self_component.
If self_component has no output port named name, this function returns NULL.
| [in] | self_component | Source component instance. |
| [in] | name | Name of the output port to borrow from self_component. |
Borrowed reference of the output port of self_component named name, or NULL if none.
The returned pointer remains valid as long as self_component exists.
NULL. NULL. | bt_self_component_port_input* bt_self_component_filter_borrow_input_port_by_name | ( | bt_self_component_filter * | self_component, |
| const char * | name | ||
| ) |
Borrows the self component input port named name from the filter component self_component.
If self_component has no input port named name, this function returns NULL.
| [in] | self_component | Filter component instance. |
| [in] | name | Name of the input port to borrow from self_component. |
Borrowed reference of the input port of self_component named name, or NULL if none.
The returned pointer remains valid as long as self_component exists.
NULL. NULL. | bt_self_component_port_output* bt_self_component_filter_borrow_output_port_by_name | ( | bt_self_component_filter * | self_component, |
| const char * | name | ||
| ) |
Borrows the self component output port named name from the filter component self_component.
If self_component has no output port named name, this function returns NULL.
| [in] | self_component | Filter component instance. |
| [in] | name | Name of the output port to borrow from self_component. |
Borrowed reference of the output port of self_component named name, or NULL if none.
The returned pointer remains valid as long as self_component exists.
NULL. NULL. | bt_self_component_port_input* bt_self_component_sink_borrow_input_port_by_name | ( | bt_self_component_sink * | self_component, |
| const char * | name | ||
| ) |
Borrows the self component input port named name from the sink component self_component.
If self_component has no input port named name, this function returns NULL.
| [in] | self_component | Sink component instance. |
| [in] | name | Name of the input port to borrow from self_component. |
Borrowed reference of the input port of self_component named name, or NULL if none.
The returned pointer remains valid as long as self_component exists.
NULL. NULL. | void bt_self_component_set_data | ( | bt_self_component * | self_component, |
| void * | user_data | ||
| ) |
Sets the user data of the component self_component to data.
| [in] | self_component | Component instance. |
| [in] | user_data | New user data of self_component. |
NULL.| void* bt_self_component_get_data | ( | const bt_self_component * | self_component | ) |
Returns the user data of the component self_component.
| [in] | self_component | Component instance. |
NULL.| uint64_t bt_self_component_get_graph_mip_version | ( | bt_self_component * | self_component | ) |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph which contains the component self_component.
| [in] | self_component | Component instance. |
NULL. | bt_bool bt_self_component_sink_is_interrupted | ( | const bt_self_component_sink * | self_component | ) |
Returns whether or not the sink component self_component is interrupted, that is, whether or not any of its interrupters is set.
| [in] | self_component | Component instance. |
NULL.
|
inlinestatic |
Upcasts the self component self_component to the public bt_component type.
| [in] | self_component | Component to upcast. Can be |
|
inlinestatic |
Upcasts the self source component self_component to the public bt_component_source type.
| [in] | self_component | Source component to upcast. Can be |
|
inlinestatic |
Upcasts the self filter component self_component to the public bt_component_filter type.
| [in] | self_component | Filter component to upcast. Can be |
|
inlinestatic |
Upcasts the self sink component self_component to the public bt_component_sink type.
| [in] | self_component | Sink component to upcast. Can be |
|
inlinestatic |
Upcasts the self source component self_component to the common bt_self_component type.
| [in] | self_component | Source component to upcast. Can be |
|
inlinestatic |
Upcasts the self filter component self_component to the common bt_self_component type.
| [in] | self_component | Filter component to upcast. Can be |
|
inlinestatic |
Upcasts the self sink component self_component to the common bt_self_component type.
| [in] | self_component | Sink component to upcast. Can be |
1.8.10