Babeltrace 2 C API
2.0.0
Open-source trace manipulation framework
|
A connection is a link between an output port and an input port.
A connection is a shared object: get a new reference with bt_connection_get_ref() and put an existing reference with bt_connection_put_ref().
The type of a connection is bt_connection.
Borrow the upstream (output) port and downstream (input) port of a connection with bt_connection_borrow_upstream_port_const() and bt_connection_borrow_downstream_port_const().
Type | |
typedef struct bt_connection | bt_connection |
Connection. | |
Port access | |
const bt_port_input * | bt_connection_borrow_downstream_port_const (const bt_connection *connection) |
Borrows the upstream input port of the connection connection. More... | |
const bt_port_output * | bt_connection_borrow_upstream_port_const (const bt_connection *connection) |
Borrows the downstream output port of the connection connection. More... | |
Reference count | |
void | bt_connection_get_ref (const bt_connection *connection) |
Increments the reference count of the connection connection. More... | |
void | bt_connection_put_ref (const bt_connection *connection) |
Decrements the reference count of the connection connection. More... | |
#define | BT_CONNECTION_PUT_REF_AND_RESET(_connection) |
Decrements the reference count of the connection _connection, and then sets _connection to NULL . More... | |
#define | BT_CONNECTION_MOVE_REF(_dst, _src) |
Decrements the reference count of the connection _dst, sets _dst to _src, and then sets _src to NULL . More... | |
#define BT_CONNECTION_PUT_REF_AND_RESET | ( | _connection | ) |
Decrements the reference count of the connection _connection, and then sets _connection to NULL
.
_connection | Connection of which to decrement the reference count. Can contain |
#define BT_CONNECTION_MOVE_REF | ( | _dst, | |
_src | |||
) |
Decrements the reference count of the connection _dst, sets _dst to _src, and then sets _src to NULL
.
This macro effectively moves a connection reference from the expression _src to the expression _dst, putting the existing _dst reference.
_dst | Destination expression. Can contain |
_src | Source expression. Can contain |
const bt_port_input* bt_connection_borrow_downstream_port_const | ( | const bt_connection * | connection | ) |
Borrows the upstream input port of the connection connection.
[in] | connection | Connection of which to borrow the upstream port. |
NULL
. const bt_port_output* bt_connection_borrow_upstream_port_const | ( | const bt_connection * | connection | ) |
Borrows the downstream output port of the connection connection.
[in] | connection | Connection of which to borrow the downstream port. |
NULL
. void bt_connection_get_ref | ( | const bt_connection * | connection | ) |
Increments the reference count of the connection connection.
[in] | connection | Connection of which to increment the reference count. Can be |
void bt_connection_put_ref | ( | const bt_connection * | connection | ) |
Decrements the reference count of the connection connection.
[in] | connection | Connection of which to decrement the reference count. Can be |