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 the effective Message Interchange Protocol version of the owning trace processing graph of a component 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.
|
enum | bt_self_component_add_port_status {
BT_SELF_COMPONENT_ADD_PORT_STATUS_OK
,
BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR
,
BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR
} |
| 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(). More...
|
|
typedef enum bt_self_component_add_port_status | bt_self_component_add_port_status |
| 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().
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
◆ bt_self_component_add_port_status
◆ bt_self_component_source_add_output_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.
- Attention
- You may only call this function from within the initialization, "input port connected", and "output port connected" methods.
- Parameters
-
[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. |
- Return values
-
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
-
No other output port within self_component has the name name.
◆ bt_self_component_filter_add_input_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.
- Attention
- You may only call this function from within the initialization, "input port connected", and "output port connected" methods.
- Parameters
-
[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. |
- Return values
-
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
-
No other input port within self_component has the name name.
◆ bt_self_component_filter_add_output_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.
- Attention
- You may only call this function from within the initialization, "input port connected", and "output port connected" methods.
- Parameters
-
[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. |
- Return values
-
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
-
No other output port within self_component has the name name.
◆ bt_self_component_sink_add_input_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.
- Attention
- You may only call this function from within the initialization, "input port connected", and "output port connected" methods.
- Parameters
-
[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. |
- Return values
-
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
-
No other input port within self_component has the name name.
◆ bt_self_component_source_borrow_output_port_by_index()
Borrows the self component output port at index index from the source component self_component.
- Parameters
-
[in] | self_component | Source component instance. |
[in] | index | Index of the output port to borrow from self_component. |
- Returns
Borrowed reference of the output port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
- Precondition
- self_component is not
NULL
.
-
index is less than the number of output ports self_component has (as returned by bt_component_source_get_output_port_count()).
- See also
- bt_component_source_get_output_port_count() — Returns the number of output ports that a source component has.
◆ bt_self_component_filter_borrow_input_port_by_index()
Borrows the self component input port at index index from the filter component self_component.
- Parameters
-
[in] | self_component | Filter component instance. |
[in] | index | Index of the input port to borrow from self_component. |
- Returns
Borrowed reference of the input port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
- Precondition
- self_component is not
NULL
.
-
index is less than the number of input ports self_component has (as returned by bt_component_filter_get_input_port_count()).
- See also
- bt_component_filter_get_input_port_count() — Returns the number of input ports that a filter component has.
◆ bt_self_component_filter_borrow_output_port_by_index()
Borrows the self component output port at index index from the filter component self_component.
- Parameters
-
[in] | self_component | Filter component instance. |
[in] | index | Index of the output port to borrow from self_component. |
- Returns
Borrowed reference of the output port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
- Precondition
- self_component is not
NULL
.
-
index is less than the number of output ports self_component has (as returned by bt_component_filter_get_output_port_count()).
- See also
- bt_component_filter_get_output_port_count() — Returns the number of output ports that a filter component has.
◆ bt_self_component_sink_borrow_input_port_by_index()
Borrows the self component input port at index index from the sink component self_component.
- Parameters
-
[in] | self_component | Sink component instance. |
[in] | index | Index of the input port to borrow from self_component. |
- Returns
Borrowed reference of the input port of self_component at index index.
The returned pointer remains valid as long as self_component exists.
- Precondition
- self_component is not
NULL
.
-
index is less than the number of input ports self_component has (as returned by bt_component_sink_get_input_port_count()).
- See also
- bt_component_sink_get_input_port_count() — Returns the number of input ports that a sink component has.
◆ bt_self_component_source_borrow_output_port_by_name()
Borrows the self component output port named name from the source component self_component.
If self_component has no output port named name, then this function returns NULL
.
- Parameters
-
[in] | self_component | Source component instance. |
[in] | name | Name of the output port to borrow from self_component. |
- Returns
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.
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
◆ bt_self_component_filter_borrow_input_port_by_name()
Borrows the self component input port named name from the filter component self_component.
If self_component has no input port named name, then this function returns NULL
.
- Parameters
-
[in] | self_component | Filter component instance. |
[in] | name | Name of the input port to borrow from self_component. |
- Returns
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.
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
◆ bt_self_component_filter_borrow_output_port_by_name()
Borrows the self component output port named name from the filter component self_component.
If self_component has no output port named name, then this function returns NULL
.
- Parameters
-
[in] | self_component | Filter component instance. |
[in] | name | Name of the output port to borrow from self_component. |
- Returns
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.
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
◆ bt_self_component_sink_borrow_input_port_by_name()
Borrows the self component input port named name from the sink component self_component.
If self_component has no input port named name, then this function returns NULL
.
- Parameters
-
[in] | self_component | Sink component instance. |
[in] | name | Name of the input port to borrow from self_component. |
- Returns
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.
- Precondition
- self_component is not
NULL
.
-
name is not
NULL
.
◆ bt_self_component_set_data()
void bt_self_component_set_data |
( |
bt_self_component * | self_component, |
|
|
void * | user_data ) |
|
extern |
Sets the user data of the component self_component to data.
- Parameters
-
[in] | self_component | Component instance. |
[in] | user_data | New user data of self_component. |
- Precondition
- self_component is not
NULL
.
- See also
- bt_self_component_get_data() — Returns the user data of a component.
◆ bt_self_component_get_data()
Returns the user data of the component self_component.
- Parameters
-
[in] | self_component | Component instance. |
- Returns
- User data of self_component.
- Precondition
- self_component is not
NULL
.
- See also
- bt_self_component_set_data() — Sets the user data of a component.
◆ bt_self_component_get_graph_mip_version()
uint64_t bt_self_component_get_graph_mip_version |
( |
bt_self_component * | self_component | ) |
|
|
extern |
Returns the effective Message Interchange Protocol (MIP) version of the trace processing graph which contains the component self_component.
- Parameters
-
[in] | self_component | Component instance. |
- Returns
- Effective MIP version of the trace processing graph which contains self_component.
- Precondition
- self_component is not
NULL
.
◆ bt_self_component_sink_is_interrupted()
◆ bt_self_component_as_component()
Upcasts the self component self_component to the public bt_component type.
- Parameters
-
[in] | self_component | Component to upcast.
Can be NULL .
|
- Returns
- self_component as a public component.
◆ bt_self_component_source_as_component_source()
Upcasts the self source component self_component to the public bt_component_source type.
- Parameters
-
[in] | self_component | Source component to upcast.
Can be NULL .
|
- Returns
- self_component as a public source component.
◆ bt_self_component_filter_as_component_filter()
Upcasts the self filter component self_component to the public bt_component_filter type.
- Parameters
-
[in] | self_component | Filter component to upcast.
Can be NULL .
|
- Returns
- self_component as a public filter component.
◆ bt_self_component_sink_as_component_sink()
Upcasts the self sink component self_component to the public bt_component_sink type.
- Parameters
-
[in] | self_component | Sink component to upcast.
Can be NULL .
|
- Returns
- self_component as a public sink component.
◆ bt_self_component_source_as_self_component()
Upcasts the self source component self_component to the common bt_self_component type.
- Parameters
-
[in] | self_component | Source component to upcast.
Can be NULL .
|
- Returns
- self_component as a common self component.
◆ bt_self_component_filter_as_self_component()
Upcasts the self filter component self_component to the common bt_self_component type.
- Parameters
-
[in] | self_component | Filter component to upcast.
Can be NULL .
|
- Returns
- self_component as a common self component.
◆ bt_self_component_sink_as_self_component()
Upcasts the self sink component self_component to the common bt_self_component type.
- Parameters
-
[in] | self_component | Sink component to upcast.
Can be NULL .
|
- Returns
- self_component as a common self component.