Babeltrace 2 C API 2.1.0
Open-source trace manipulation framework
Loading...
Searching...
No Matches
self-component.h
1/*
2 * SPDX-License-Identifier: MIT
3 *
4 * Copyright (C) 2010-2019 EfficiOS Inc. and Linux Foundation
5 */
6
7#ifndef BABELTRACE2_GRAPH_SELF_COMPONENT_H
8#define BABELTRACE2_GRAPH_SELF_COMPONENT_H
9
10/* IWYU pragma: private, include <babeltrace2/babeltrace.h> */
11
12#ifndef __BT_IN_BABELTRACE_H
13# error "Please include <babeltrace2/babeltrace.h> instead."
14#endif
15
16#include <babeltrace2/types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
146
187 bt_self_component_source *self_component,
188 const char *name, void *user_data,
189 bt_self_component_port_output **self_component_port)
190 __BT_NOEXCEPT;
191
232 bt_self_component_filter *self_component,
233 const char *name, void *user_data,
234 bt_self_component_port_input **self_component_port)
235 __BT_NOEXCEPT;
236
277 bt_self_component_filter *self_component,
278 const char *name, void *user_data,
279 bt_self_component_port_output **self_component_port)
280 __BT_NOEXCEPT;
281
323 bt_self_component_sink *self_component,
324 const char *name, void *user_data,
325 bt_self_component_port_input **self_component_port)
326 __BT_NOEXCEPT;
327
365 bt_self_component_source *self_component,
366 uint64_t index) __BT_NOEXCEPT;
367
398 bt_self_component_filter *self_component,
399 uint64_t index) __BT_NOEXCEPT;
400
431 bt_self_component_filter *self_component,
432 uint64_t index) __BT_NOEXCEPT;
433
464 bt_self_component_sink *self_component, uint64_t index)
465 __BT_NOEXCEPT;
466
494 bt_self_component_source *self_component,
495 const char *name) __BT_NOEXCEPT;
496
524 bt_self_component_filter *self_component,
525 const char *name) __BT_NOEXCEPT;
526
554 bt_self_component_filter *self_component,
555 const char *name) __BT_NOEXCEPT;
556
584 bt_self_component_sink *self_component,
585 const char *name) __BT_NOEXCEPT;
586
610 bt_self_component *self_component, void *user_data)
611 __BT_NOEXCEPT;
612
629 const bt_self_component *self_component) __BT_NOEXCEPT;
630
652extern
654 bt_self_component *self_component) __BT_NOEXCEPT;
655
684 const bt_self_component_sink *self_component) __BT_NOEXCEPT;
685
708static inline
710 bt_self_component *self_component) __BT_NOEXCEPT
711{
712 return __BT_UPCAST(bt_component, self_component);
713}
714
731static inline
734 bt_self_component_source *self_component) __BT_NOEXCEPT
735{
736 return __BT_UPCAST_CONST(bt_component_source, self_component);
737}
738
755static inline
758 bt_self_component_filter *self_component) __BT_NOEXCEPT
759{
760 return __BT_UPCAST_CONST(bt_component_filter, self_component);
761}
762
779static inline
780const bt_component_sink *
782 bt_self_component_sink *self_component) __BT_NOEXCEPT
783{
784 return __BT_UPCAST_CONST(bt_component_sink, self_component);
785}
786
810static inline
812 bt_self_component_source *self_component) __BT_NOEXCEPT
813{
814 return __BT_UPCAST(bt_self_component, self_component);
815}
816
833static inline
835 bt_self_component_filter *self_component) __BT_NOEXCEPT
836{
837 return __BT_UPCAST(bt_self_component, self_component);
838}
839
856static inline
858 bt_self_component_sink *self_component) __BT_NOEXCEPT
859{
860 return __BT_UPCAST(bt_self_component, self_component);
861}
862
867#ifdef __cplusplus
868}
869#endif
870
871#endif /* BABELTRACE2_GRAPH_SELF_COMPONENT_H */
int bt_bool
Babeltrace&#160;2 boolean type.
Definition types.h:126
struct bt_component_filter bt_component_filter
Filter component.
Definition types.h:30
struct bt_component_source bt_component_source
Source component.
Definition types.h:32
struct bt_component bt_component
Component.
Definition types.h:24
struct bt_component_sink bt_component_sink
Sink component.
Definition types.h:31
struct bt_self_component_port_output bt_self_component_port_output
Self component output port.
Definition types.h:81
struct bt_self_component_port_input bt_self_component_port_input
Self component input port.
Definition types.h:79
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...
struct bt_self_component bt_self_component
Self component.
Definition types.h:71
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
struct bt_self_component_source bt_self_component_source
Self source component.
Definition types.h:84
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
struct bt_self_component_filter bt_self_component_filter
Self filter component.
Definition types.h:76
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.
struct bt_self_component_sink bt_self_component_sink
Self sink component.
Definition types.h:82
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