1#ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_H
2#define BABELTRACE2_GRAPH_SELF_COMPONENT_H
26#ifndef __BT_IN_BABELTRACE_H
27# error "Please include <babeltrace2/babeltrace.h> instead."
30#include <babeltrace2/types.h>
201 bt_self_component_source *self_component,
202 const char *name,
void *user_data,
203 bt_self_component_port_output **self_component_port);
245 bt_self_component_filter *self_component,
246 const char *name,
void *user_data,
247 bt_self_component_port_input **self_component_port);
289 bt_self_component_filter *self_component,
290 const char *name,
void *user_data,
291 bt_self_component_port_output **self_component_port);
334 bt_self_component_sink *self_component,
335 const char *name,
void *user_data,
336 bt_self_component_port_input **self_component_port);
373extern bt_self_component_port_output *
375 bt_self_component_source *self_component,
406extern bt_self_component_port_input *
408 bt_self_component_filter *self_component,
439extern bt_self_component_port_output *
441 bt_self_component_filter *self_component,
472extern bt_self_component_port_input *
474 bt_self_component_sink *self_component, uint64_t index);
501extern bt_self_component_port_output *
503 bt_self_component_source *self_component,
531extern bt_self_component_port_input *
533 bt_self_component_filter *self_component,
561extern bt_self_component_port_output *
563 bt_self_component_filter *self_component,
591extern bt_self_component_port_input *
593 bt_self_component_sink *self_component,
619 bt_self_component *self_component,
void *user_data);
637 const bt_self_component *self_component);
666 bt_self_component *self_component);
696 const bt_self_component_sink *self_component);
722 bt_self_component *self_component)
724 return __BT_UPCAST(bt_component, self_component);
744const bt_component_source *
746 bt_self_component_source *self_component)
748 return __BT_UPCAST_CONST(bt_component_source, self_component);
768const bt_component_filter *
770 bt_self_component_filter *self_component)
772 return __BT_UPCAST_CONST(bt_component_filter, self_component);
792const bt_component_sink *
794 bt_self_component_sink *self_component)
796 return __BT_UPCAST_CONST(bt_component_sink, self_component);
824 bt_self_component_source *self_component)
826 return __BT_UPCAST(bt_self_component, self_component);
847 bt_self_component_filter *self_component)
849 return __BT_UPCAST(bt_self_component, self_component);
870 bt_self_component_sink *self_component)
872 return __BT_UPCAST(bt_self_component, self_component);
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:140
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...
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 ...
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.
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.
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.
Definition self-component.h:721
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.
Definition self-component.h:745
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.
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.
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.
Definition self-component.h:793
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_compone...
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.
Definition self-component.h:869
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.
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_compon...
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 ...
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_compon...
void * bt_self_component_get_data(const bt_self_component *self_component)
Returns the user data of the component self_component.
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.
Definition self-component.h:846
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.
bt_self_component_add_port_status
Status codes for bt_self_component_source_add_output_port(), bt_self_component_filter_add_input_port(...
Definition self-component.h:141
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.
Definition self-component.h:823
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.
Definition self-component.h:769
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.
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.
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.
@ BT_SELF_COMPONENT_ADD_PORT_STATUS_OK
Success.
Definition self-component.h:146
@ BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR
Other error.
Definition self-component.h:158
@ BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR
Out of memory.
Definition self-component.h:152