Babeltrace 2 C API  2.0.0
Open-source trace manipulation framework
Modules
Components

Detailed Description

Source, filter, and sink components: nodes in a trace processing graph.

A component is a node within a trace processing graph:

A component is component class instance. Borrow the class of a component with bt_component_borrow_class_const(), bt_component_source_borrow_class_const(), bt_component_filter_borrow_class_const(), and bt_component_sink_borrow_class_const().

A component is a shared object: get a new reference with bt_component_get_ref() and put an existing reference with bt_component_put_ref().

The common C type of a port is bt_component.

There are three types of components, which come from the three types of component classes:

Source component

A source component's message iterator emits fresh messages.

A source component's specific type is bt_component_source and its class's type enumerator is BT_COMPONENT_CLASS_TYPE_SOURCE.

Upcast the bt_component_source type to the bt_component type with bt_component_source_as_component_const().

Get a new source component reference with bt_component_source_get_ref() and put an existing one with bt_component_source_put_ref().

A source component has output ports only.

Get the number of output ports a source component has with bt_component_source_get_output_port_count().

Borrow a source component's output port by index with bt_component_source_borrow_output_port_by_index_const() or by name with bt_component_source_borrow_output_port_by_name_const().

Filter component

A filter component's message iterator emits fresh and transformed messages. It can also discard existing messages.

A filter component's specific type is bt_component_filter and its class's type enumerator is BT_COMPONENT_CLASS_TYPE_FILTER.

Upcast the bt_component_filter type to the bt_component type with bt_component_filter_as_component_const().

Get a new filter component reference with bt_component_filter_get_ref() and put an existing one with bt_component_filter_put_ref().

A filter component has input ports and output ports.

Get the number of output ports a filter component has with bt_component_filter_get_output_port_count().

Borrow a filter component's output port by index with bt_component_filter_borrow_output_port_by_index_const() or by name with bt_component_filter_borrow_output_port_by_name_const().

Get the number of input ports a filter component has with bt_component_filter_get_input_port_count().

Borrow a filter component's input port by index with bt_component_filter_borrow_input_port_by_index_const() or by name with bt_component_filter_borrow_input_port_by_name_const().

Sink component

A sink component consumes messages from a source or filter message iterator.

A filter component's specific type is bt_component_sink and its class's type enumerator is BT_COMPONENT_CLASS_TYPE_SINK.

Upcast the bt_component_sink type to the bt_component type with bt_component_sink_as_component_const().

Get a new sink component reference with bt_component_sink_get_ref() and put an existing one with bt_component_sink_put_ref().

A sink component has input ports only.

Get the number of input ports a sink component has with bt_component_sink_get_input_port_count().

Borrow a sink component's input port by index with bt_component_sink_borrow_input_port_by_index_const() or by name with bt_component_sink_borrow_input_port_by_name_const().

Get a component's class type enumerator with bt_component_get_class_type(). You can also use the bt_component_is_source(), bt_component_is_filter(), and bt_component_is_sink() helper functions.

You cannot directly create a component: there are no bt_component_*_create() functions. A trace processing graph creates a component from a component class when you call one of the bt_graph_add_*_component*() functions. Those functions also return a borrowed reference of the created component through their component parameter.

Properties

A component has the following common properties:

Name

Name of the component.

Each component has a unique name within a given trace processing graph.

A component's name is set when you add it to a graph with one of the bt_graph_add_*_component*() functions (name parameter); you cannot change it afterwards.

Get a component's name with bt_component_get_name().

Logging level

Logging level of the component (and its message iterators, if any).

A component's logging level is set when you add it to a trace processing graph with one of the bt_graph_add_*_component*() functions (logging_level parameter); as of Babeltrace 2.0, you cannot change it afterwards.

Get a component's logging level with bt_component_get_logging_level().

Modules

 Ports
 Component input and output ports.
 

Types

typedef struct bt_component bt_component
 Component.
 
typedef struct bt_component_source bt_component_source
 Source component.
 
typedef struct bt_component_filter bt_component_filter
 Filter component.
 
typedef struct bt_component_sink bt_component_sink
 Sink component.
 

Class type query

bt_component_class_type bt_component_get_class_type (const bt_component *component)
 Returns the type enumerator of the class of the component component. More...
 
static bt_bool bt_component_is_source (const bt_component *component)
 Returns whether or not the component component is a source component. More...
 
static bt_bool bt_component_is_filter (const bt_component *component)
 Returns whether or not the component component is a filter component. More...
 
static bt_bool bt_component_is_sink (const bt_component *component)
 Returns whether or not the component component is a sink component. More...
 

Common class access

const bt_component_classbt_component_borrow_class_const (const bt_component *component)
 Borrows the class of the component component. More...
 

Common properties

const char * bt_component_get_name (const bt_component *component)
 Returns the name of the component component. More...
 
bt_logging_level bt_component_get_logging_level (const bt_component *component)
 Returns the logging level of the component component and its message iterators, if any. More...
 

Common reference count

void bt_component_get_ref (const bt_component *component)
 Increments the reference count of the component component. More...
 
void bt_component_put_ref (const bt_component *component)
 Decrements the reference count of the component component. More...
 
#define BT_COMPONENT_PUT_REF_AND_RESET(_component)
 Decrements the reference count of the component _component, and then sets _component to NULL. More...
 
#define BT_COMPONENT_MOVE_REF(_dst, _src)
 Decrements the reference count of the component _dst, sets _dst to _src, and then sets _src to NULL. More...
 

Source component class access

const bt_component_class_sourcebt_component_source_borrow_class_const (const bt_component_source *component)
 Borrows the class of the source component component. More...
 

Source component upcast

static const bt_componentbt_component_source_as_component_const (const bt_component_source *component)
 Upcasts the source component component to the common bt_component type. More...
 

Source component port access

uint64_t bt_component_source_get_output_port_count (const bt_component_source *component)
 Returns the number of output ports that the source component component has. More...
 
const bt_port_outputbt_component_source_borrow_output_port_by_index_const (const bt_component_source *component, uint64_t index)
 Borrows the output port at index index from the source component component. More...
 
const bt_port_outputbt_component_source_borrow_output_port_by_name_const (const bt_component_source *component, const char *name)
 Borrows the output port named name from the source component component. More...
 

Source component reference count

void bt_component_source_get_ref (const bt_component_source *component)
 Increments the reference count of the source component component. More...
 
void bt_component_source_put_ref (const bt_component_source *component)
 Decrements the reference count of the source component component. More...
 
#define BT_COMPONENT_SOURCE_PUT_REF_AND_RESET(_component)
 Decrements the reference count of the source component _component, and then sets _component to NULL. More...
 
#define BT_COMPONENT_SOURCE_MOVE_REF(_dst, _src)
 Decrements the reference count of the source component _dst, sets _dst to _src, and then sets _src to NULL. More...
 

Filter component class access

const bt_component_class_filterbt_component_filter_borrow_class_const (const bt_component_filter *component)
 Borrows the class of the filter component component. More...
 

Filter component upcast

static const bt_componentbt_component_filter_as_component_const (const bt_component_filter *component)
 Upcasts the filter component component to the common bt_component type. More...
 

Filter component port access

uint64_t bt_component_filter_get_input_port_count (const bt_component_filter *component)
 Returns the number of input ports that the filter component component has. More...
 
const bt_port_inputbt_component_filter_borrow_input_port_by_index_const (const bt_component_filter *component, uint64_t index)
 Borrows the input port at index index from the filter component component. More...
 
const bt_port_inputbt_component_filter_borrow_input_port_by_name_const (const bt_component_filter *component, const char *name)
 Borrows the input port named name from the filter component component. More...
 
uint64_t bt_component_filter_get_output_port_count (const bt_component_filter *component)
 Returns the number of output ports that the filter component component has. More...
 
const bt_port_outputbt_component_filter_borrow_output_port_by_index_const (const bt_component_filter *component, uint64_t index)
 Borrows the output port at index index from the filter component component. More...
 
const bt_port_outputbt_component_filter_borrow_output_port_by_name_const (const bt_component_filter *component, const char *name)
 Borrows the output port named name from the filter component component. More...
 

Filter component reference count

void bt_component_filter_get_ref (const bt_component_filter *component)
 Increments the reference count of the filter component component. More...
 
void bt_component_filter_put_ref (const bt_component_filter *component)
 Decrements the reference count of the filter component component. More...
 
#define BT_COMPONENT_FILTER_PUT_REF_AND_RESET(_component)
 Decrements the reference count of the filter component _component, and then sets _component to NULL. More...
 
#define BT_COMPONENT_FILTER_MOVE_REF(_dst, _src)
 Decrements the reference count of the filter component _dst, sets _dst to _src, and then sets _src to NULL. More...
 

Sink component class access

const bt_component_class_sinkbt_component_sink_borrow_class_const (const bt_component_sink *component)
 Borrows the class of the sink component component. More...
 

Sink component upcast

static const bt_componentbt_component_sink_as_component_const (const bt_component_sink *component)
 Upcasts the sink component component to the common bt_component type. More...
 

Sink component port access

uint64_t bt_component_sink_get_input_port_count (const bt_component_sink *component)
 Returns the number of input ports that the sink component component has. More...
 
const bt_port_inputbt_component_sink_borrow_input_port_by_index_const (const bt_component_sink *component, uint64_t index)
 Borrows the input port at index index from the sink component component. More...
 
const bt_port_inputbt_component_sink_borrow_input_port_by_name_const (const bt_component_sink *component, const char *name)
 Borrows the output port named name from the sink component component. More...
 

Sink component reference count

void bt_component_sink_get_ref (const bt_component_sink *component)
 Increments the reference count of the sink component component. More...
 
void bt_component_sink_put_ref (const bt_component_sink *component)
 Decrements the reference count of the sink component component. More...
 
#define BT_COMPONENT_SINK_PUT_REF_AND_RESET(_component)
 Decrements the reference count of the sink component _component, and then sets _component to NULL. More...
 
#define BT_COMPONENT_SINK_MOVE_REF(_dst, _src)
 Decrements the reference count of the sink component _dst, sets _dst to _src, and then sets _src to NULL. More...
 

Macro Definition Documentation

◆ BT_COMPONENT_PUT_REF_AND_RESET

#define BT_COMPONENT_PUT_REF_AND_RESET (   _component)

Decrements the reference count of the component _component, and then sets _component to NULL.

Parameters
_component

Component of which to decrement the reference count.

Can contain NULL.

Precondition
_component is an assignable expression.

◆ BT_COMPONENT_MOVE_REF

#define BT_COMPONENT_MOVE_REF (   _dst,
  _src 
)

Decrements the reference count of the component _dst, sets _dst to _src, and then sets _src to NULL.

This macro effectively moves a component reference from the expression _src to the expression _dst, putting the existing _dst reference.

Parameters
_dst

Destination expression.

Can contain NULL.

_src

Source expression.

Can contain NULL.

Precondition
_dst is an assignable expression.
_src is an assignable expression.

◆ BT_COMPONENT_SOURCE_PUT_REF_AND_RESET

#define BT_COMPONENT_SOURCE_PUT_REF_AND_RESET (   _component)

Decrements the reference count of the source component _component, and then sets _component to NULL.

Parameters
_component

Source component of which to decrement the reference count.

Can contain NULL.

Precondition
_component is an assignable expression.

◆ BT_COMPONENT_SOURCE_MOVE_REF

#define BT_COMPONENT_SOURCE_MOVE_REF (   _dst,
  _src 
)

Decrements the reference count of the source component _dst, sets _dst to _src, and then sets _src to NULL.

This macro effectively moves a source component reference from the expression _src to the expression _dst, putting the existing _dst reference.

Parameters
_dst

Destination expression.

Can contain NULL.

_src

Source expression.

Can contain NULL.

Precondition
_dst is an assignable expression.
_src is an assignable expression.

◆ BT_COMPONENT_FILTER_PUT_REF_AND_RESET

#define BT_COMPONENT_FILTER_PUT_REF_AND_RESET (   _component)

Decrements the reference count of the filter component _component, and then sets _component to NULL.

Parameters
_component

Filter component of which to decrement the reference count.

Can contain NULL.

Precondition
_component is an assignable expression.

◆ BT_COMPONENT_FILTER_MOVE_REF

#define BT_COMPONENT_FILTER_MOVE_REF (   _dst,
  _src 
)

Decrements the reference count of the filter component _dst, sets _dst to _src, and then sets _src to NULL.

This macro effectively moves a filter component reference from the expression _src to the expression _dst, putting the existing _dst reference.

Parameters
_dst

Destination expression.

Can contain NULL.

_src

Source expression.

Can contain NULL.

Precondition
_dst is an assignable expression.
_src is an assignable expression.

◆ BT_COMPONENT_SINK_PUT_REF_AND_RESET

#define BT_COMPONENT_SINK_PUT_REF_AND_RESET (   _component)

Decrements the reference count of the sink component _component, and then sets _component to NULL.

Parameters
_component

Sink component of which to decrement the reference count.

Can contain NULL.

Precondition
_component is an assignable expression.

◆ BT_COMPONENT_SINK_MOVE_REF

#define BT_COMPONENT_SINK_MOVE_REF (   _dst,
  _src 
)

Decrements the reference count of the sink component _dst, sets _dst to _src, and then sets _src to NULL.

This macro effectively moves a sink component reference from the expression _src to the expression _dst, putting the existing _dst reference.

Parameters
_dst

Destination expression.

Can contain NULL.

_src

Source expression.

Can contain NULL.

Precondition
_dst is an assignable expression.
_src is an assignable expression.

Function Documentation

◆ bt_component_get_class_type()

bt_component_class_type bt_component_get_class_type ( const bt_component component)

Returns the type enumerator of the class of the component component.

Parameters
[in]componentComponent of which to get the class's type enumerator.
Returns
Type enumerator of the class of component.
Precondition
component is not NULL.
See also
bt_component_is_source() — Returns whether or not a component is a source component.
bt_component_is_filter() — Returns whether or not a component is a filter component.
bt_component_is_sink() — Returns whether or not a component is a sink component.

◆ bt_component_is_source()

static bt_bool bt_component_is_source ( const bt_component component)
inlinestatic

Returns whether or not the component component is a source component.

Parameters
[in]componentComponent to check.
Returns
BT_TRUE if component is a source component.
Precondition
component is not NULL.
See also
bt_component_get_class_type() — Returns the type enumerator of a component's class.

◆ bt_component_is_filter()

static bt_bool bt_component_is_filter ( const bt_component component)
inlinestatic

Returns whether or not the component component is a filter component.

Parameters
[in]componentComponent to check.
Returns
BT_TRUE if component is a filter component.
Precondition
component is not NULL.
See also
bt_component_get_class_type() — Returns the type enumerator of a component's class.

◆ bt_component_is_sink()

static bt_bool bt_component_is_sink ( const bt_component component)
inlinestatic

Returns whether or not the component component is a sink component.

Parameters
[in]componentComponent to check.
Returns
BT_TRUE if component is a sink component.
Precondition
component is not NULL.
See also
bt_component_get_class_type() — Returns the type enumerator of a component's class.

◆ bt_component_borrow_class_const()

const bt_component_class* bt_component_borrow_class_const ( const bt_component component)

Borrows the class of the component component.

Parameters
[in]componentComponent of which to borrow the class.
Returns
Borrowed reference of the class of component.
Precondition
component is not NULL.

◆ bt_component_get_name()

const char* bt_component_get_name ( const bt_component component)

Returns the name of the component component.

See the name property.

Parameters
[in]componentComponent of which to get the name.
Returns

Name of component.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.

◆ bt_component_get_logging_level()

bt_logging_level bt_component_get_logging_level ( const bt_component component)

Returns the logging level of the component component and its message iterators, if any.

See the logging level property.

Parameters
[in]componentComponent of which to get the logging level.
Returns
Logging level of component.
Precondition
component is not NULL.

◆ bt_component_get_ref()

void bt_component_get_ref ( const bt_component component)

Increments the reference count of the component component.

Parameters
[in]component

Component of which to increment the reference count.

Can be NULL.

See also
bt_component_put_ref() — Decrements the reference count of a component.

◆ bt_component_put_ref()

void bt_component_put_ref ( const bt_component component)

Decrements the reference count of the component component.

Parameters
[in]component

Component of which to decrement the reference count.

Can be NULL.

See also
bt_component_get_ref() — Increments the reference count of a component.

◆ bt_component_source_borrow_class_const()

const bt_component_class_source* bt_component_source_borrow_class_const ( const bt_component_source component)

Borrows the class of the source component component.

Parameters
[in]componentSource component of which to borrow the class.
Returns
Borrowed reference of the class of component.
Precondition
component is not NULL.

◆ bt_component_source_as_component_const()

static const bt_component* bt_component_source_as_component_const ( const bt_component_source component)
inlinestatic

Upcasts the source component component to the common bt_component type.

Parameters
[in]component

Source component to upcast.

Can be NULL.

Returns
component as a common component.

◆ bt_component_source_get_output_port_count()

uint64_t bt_component_source_get_output_port_count ( const bt_component_source component)

Returns the number of output ports that the source component component has.

Parameters
[in]componentSource component of which to get the number of output ports.
Returns
Number of output ports that component has.
Precondition
component is not NULL.

◆ bt_component_source_borrow_output_port_by_index_const()

const bt_port_output* bt_component_source_borrow_output_port_by_index_const ( const bt_component_source component,
uint64_t  index 
)

Borrows the output port at index index from the source component component.

Parameters
[in]componentSource component from which to borrow the output port at index index.
[in]indexIndex of the output port to borrow from component.
Returns

Borrowed reference of the output port of component at index index.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
index is less than the number of output ports 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_component_source_borrow_output_port_by_name_const()

const bt_port_output* bt_component_source_borrow_output_port_by_name_const ( const bt_component_source component,
const char *  name 
)

Borrows the output port named name from the source component component.

If component has no output port named name, this function returns NULL.

Parameters
[in]componentSource component from which to borrow the output port named name.
[in]nameName of the output port to borrow from component.
Returns

Borrowed reference of the output port of component named name, or NULL if none.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
name is not NULL.

◆ bt_component_source_get_ref()

void bt_component_source_get_ref ( const bt_component_source component)

Increments the reference count of the source component component.

Parameters
[in]component

Source component of which to increment the reference count.

Can be NULL.

See also
bt_component_source_put_ref() — Decrements the reference count of a source component.

◆ bt_component_source_put_ref()

void bt_component_source_put_ref ( const bt_component_source component)

Decrements the reference count of the source component component.

Parameters
[in]component

Source component of which to decrement the reference count.

Can be NULL.

See also
bt_component_source_get_ref() — Increments the reference count of a source component.

◆ bt_component_filter_borrow_class_const()

const bt_component_class_filter* bt_component_filter_borrow_class_const ( const bt_component_filter component)

Borrows the class of the filter component component.

Parameters
[in]componentFilter component of which to borrow the class.
Returns
Borrowed reference of the class of component.
Precondition
component is not NULL.

◆ bt_component_filter_as_component_const()

static const bt_component* bt_component_filter_as_component_const ( const bt_component_filter component)
inlinestatic

Upcasts the filter component component to the common bt_component type.

Parameters
[in]component

Filter component to upcast.

Can be NULL.

Returns
component as a common component.

◆ bt_component_filter_get_input_port_count()

uint64_t bt_component_filter_get_input_port_count ( const bt_component_filter component)

Returns the number of input ports that the filter component component has.

Parameters
[in]componentFilter component of which to get the number of input ports.
Returns
Number of input ports that component has.
Precondition
component is not NULL.

◆ bt_component_filter_borrow_input_port_by_index_const()

const bt_port_input* bt_component_filter_borrow_input_port_by_index_const ( const bt_component_filter component,
uint64_t  index 
)

Borrows the input port at index index from the filter component component.

Parameters
[in]componentFilter component from which to borrow the input port at index index.
[in]indexIndex of the input port to borrow from component.
Returns

Borrowed reference of the input port of component at index index.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
index is less than the number of input ports 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_component_filter_borrow_input_port_by_name_const()

const bt_port_input* bt_component_filter_borrow_input_port_by_name_const ( const bt_component_filter component,
const char *  name 
)

Borrows the input port named name from the filter component component.

If component has no input port named name, this function returns NULL.

Parameters
[in]componentFilter component from which to borrow the input port named name.
[in]nameName of the input port to borrow from component.
Returns

Borrowed reference of the input port of component named name, or NULL if none.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
name is not NULL.

◆ bt_component_filter_get_output_port_count()

uint64_t bt_component_filter_get_output_port_count ( const bt_component_filter component)

Returns the number of output ports that the filter component component has.

Parameters
[in]componentFilter component of which to get the number of output ports.
Returns
Number of output ports that component has.
Precondition
component is not NULL.

◆ bt_component_filter_borrow_output_port_by_index_const()

const bt_port_output* bt_component_filter_borrow_output_port_by_index_const ( const bt_component_filter component,
uint64_t  index 
)

Borrows the output port at index index from the filter component component.

Parameters
[in]componentFilter component from which to borrow the output port at index index.
[in]indexIndex of the output port to borrow from component.
Returns

Borrowed reference of the output port of component at index index.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
index is less than the number of output ports 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_component_filter_borrow_output_port_by_name_const()

const bt_port_output* bt_component_filter_borrow_output_port_by_name_const ( const bt_component_filter component,
const char *  name 
)

Borrows the output port named name from the filter component component.

If component has no output port named name, this function returns NULL.

Parameters
[in]componentFilter component from which to borrow the output port named name.
[in]nameName of the output port to borrow from component.
Returns

Borrowed reference of the output port of component named name, or NULL if none.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
name is not NULL.

◆ bt_component_filter_get_ref()

void bt_component_filter_get_ref ( const bt_component_filter component)

Increments the reference count of the filter component component.

Parameters
[in]component

Filter component of which to increment the reference count.

Can be NULL.

See also
bt_component_filter_put_ref() — Decrements the reference count of a filter component.

◆ bt_component_filter_put_ref()

void bt_component_filter_put_ref ( const bt_component_filter component)

Decrements the reference count of the filter component component.

Parameters
[in]component

Filter component of which to decrement the reference count.

Can be NULL.

See also
bt_component_filter_get_ref() — Increments the reference count of a filter component.

◆ bt_component_sink_borrow_class_const()

const bt_component_class_sink* bt_component_sink_borrow_class_const ( const bt_component_sink component)

Borrows the class of the sink component component.

Parameters
[in]componentSink component of which to borrow the class.
Returns
Borrowed reference of the class of component.
Precondition
component is not NULL.

◆ bt_component_sink_as_component_const()

static const bt_component* bt_component_sink_as_component_const ( const bt_component_sink component)
inlinestatic

Upcasts the sink component component to the common bt_component type.

Parameters
[in]component

Sink component to upcast.

Can be NULL.

Returns
component as a common component.

◆ bt_component_sink_get_input_port_count()

uint64_t bt_component_sink_get_input_port_count ( const bt_component_sink component)

Returns the number of input ports that the sink component component has.

Parameters
[in]componentSink component of which to get the number of input ports.
Returns
Number of input ports that component has.
Precondition
component is not NULL.

◆ bt_component_sink_borrow_input_port_by_index_const()

const bt_port_input* bt_component_sink_borrow_input_port_by_index_const ( const bt_component_sink component,
uint64_t  index 
)

Borrows the input port at index index from the sink component component.

Parameters
[in]componentSink component from which to borrow the input port at index index.
[in]indexIndex of the input port to borrow from component.
Returns

Borrowed reference of the input port of component at index index.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
index is less than the number of input ports 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_component_sink_borrow_input_port_by_name_const()

const bt_port_input* bt_component_sink_borrow_input_port_by_name_const ( const bt_component_sink component,
const char *  name 
)

Borrows the output port named name from the sink component component.

If component has no output port named name, this function returns NULL.

Parameters
[in]componentSink component from which to borrow the output port named name.
[in]nameName of the output port to borrow from component.
Returns

Borrowed reference of the output port of component named name, or NULL if none.

The returned pointer remains valid as long as component exists.

Precondition
component is not NULL.
name is not NULL.

◆ bt_component_sink_get_ref()

void bt_component_sink_get_ref ( const bt_component_sink component)

Increments the reference count of the sink component component.

Parameters
[in]component

Sink component of which to increment the reference count.

Can be NULL.

See also
bt_component_sink_put_ref() — Decrements the reference count of a sink component.

◆ bt_component_sink_put_ref()

void bt_component_sink_put_ref ( const bt_component_sink component)

Decrements the reference count of the sink component component.

Parameters
[in]component

Sink component of which to decrement the reference count.

Can be NULL.

See also
bt_component_sink_get_ref() — Increments the reference count of a sink component.