7#ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_H
8#define BABELTRACE2_GRAPH_SELF_COMPONENT_H
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
16#include <babeltrace2/types.h>
187 bt_self_component_source *self_component,
188 const char *name,
void *user_data,
189 bt_self_component_port_output **self_component_port)
232 bt_self_component_filter *self_component,
233 const char *name,
void *user_data,
234 bt_self_component_port_input **self_component_port)
277 bt_self_component_filter *self_component,
278 const char *name,
void *user_data,
279 bt_self_component_port_output **self_component_port)
323 bt_self_component_sink *self_component,
324 const char *name,
void *user_data,
325 bt_self_component_port_input **self_component_port)
363extern bt_self_component_port_output *
365 bt_self_component_source *self_component,
366 uint64_t index) __BT_NOEXCEPT;
396extern bt_self_component_port_input *
398 bt_self_component_filter *self_component,
399 uint64_t index) __BT_NOEXCEPT;
429extern bt_self_component_port_output *
431 bt_self_component_filter *self_component,
432 uint64_t index) __BT_NOEXCEPT;
462extern bt_self_component_port_input *
464 bt_self_component_sink *self_component, uint64_t index)
492extern bt_self_component_port_output *
494 bt_self_component_source *self_component,
495 const char *name) __BT_NOEXCEPT;
522extern bt_self_component_port_input *
524 bt_self_component_filter *self_component,
525 const char *name) __BT_NOEXCEPT;
552extern bt_self_component_port_output *
554 bt_self_component_filter *self_component,
555 const char *name) __BT_NOEXCEPT;
582extern bt_self_component_port_input *
584 bt_self_component_sink *self_component,
585 const char *name) __BT_NOEXCEPT;
610 bt_self_component *self_component,
void *user_data)
629 const bt_self_component *self_component) __BT_NOEXCEPT;
654 bt_self_component *self_component) __BT_NOEXCEPT;
684 const bt_self_component_sink *self_component) __BT_NOEXCEPT;
710 bt_self_component *self_component) __BT_NOEXCEPT
712 return __BT_UPCAST(bt_component, self_component);
732const bt_component_source *
734 bt_self_component_source *self_component) __BT_NOEXCEPT
736 return __BT_UPCAST_CONST(bt_component_source, self_component);
756const bt_component_filter *
758 bt_self_component_filter *self_component) __BT_NOEXCEPT
760 return __BT_UPCAST_CONST(bt_component_filter, self_component);
780const bt_component_sink *
782 bt_self_component_sink *self_component) __BT_NOEXCEPT
784 return __BT_UPCAST_CONST(bt_component_sink, self_component);
812 bt_self_component_source *self_component) __BT_NOEXCEPT
814 return __BT_UPCAST(bt_self_component, self_component);
835 bt_self_component_filter *self_component) __BT_NOEXCEPT
837 return __BT_UPCAST(bt_self_component, self_component);
858 bt_self_component_sink *self_component) __BT_NOEXCEPT
860 return __BT_UPCAST(bt_self_component, self_component);
int bt_bool
Babeltrace 2 boolean type.
Definition types.h:126
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:709
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:733
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:781
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:857
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:834
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:127
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:811
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:757
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:132
@ BT_SELF_COMPONENT_ADD_PORT_STATUS_ERROR
Other error.
Definition self-component.h:144
@ BT_SELF_COMPONENT_ADD_PORT_STATUS_MEMORY_ERROR
Out of memory.
Definition self-component.h:138