Babeltrace 2 C API  2.0.0
Open-source trace manipulation framework

Detailed Description

Private view of a message iterator for methods.

The bt_self_message_iterator type is a private view of a message iterator from within a message iterator class method.

Borrow the component which provides a message iterator with bt_self_message_iterator_borrow_component().

Borrow the output port on which a message iterator operates with bt_self_message_iterator_borrow_port().

Set and get user data attached to a message iterator with bt_self_message_iterator_set_data() and bt_self_message_iterator_get_data().

Check whether or not a message iterator is interrupted with bt_self_message_iterator_is_interrupted().

Set whether or not a message iterator can seek forward with bt_self_message_iterator_configuration_set_can_seek_forward().

Types

typedef struct bt_self_message_iterator bt_self_message_iterator
 Self message iterator.
 
typedef struct bt_self_message_iterator_configuration bt_self_message_iterator_configuration
 Self message iterator configuration.
 

Component access

bt_self_componentbt_self_message_iterator_borrow_component (bt_self_message_iterator *self_message_iterator)
 Borrows the component which provides the message iterator self_message_iterator. More...
 

Output port access

bt_self_component_port_outputbt_self_message_iterator_borrow_port (bt_self_message_iterator *self_message_iterator)
 Borrows the output port on which the message iterator self_message_iterator operates. More...
 

User data

void bt_self_message_iterator_set_data (bt_self_message_iterator *self_message_iterator, void *user_data)
 Sets the user data of the message iterator self_message_iterator to data. More...
 
void * bt_self_message_iterator_get_data (const bt_self_message_iterator *self_message_iterator)
 Returns the user data of the message iterator self_message_iterator. More...
 

Interruption query

bt_bool bt_self_message_iterator_is_interrupted (const bt_self_message_iterator *self_message_iterator)
 Returns whether or not the message iterator self_message_iterator is interrupted, that is, whether or not any of its interrupters is set. More...
 

Configuration

void bt_self_message_iterator_configuration_set_can_seek_forward (bt_self_message_iterator_configuration *configuration, bt_bool can_seek_forward)
 Sets whether or not the message iterator of which the configuration is configuration can seek forward. More...
 

Function Documentation

◆ bt_self_message_iterator_borrow_component()

bt_self_component* bt_self_message_iterator_borrow_component ( bt_self_message_iterator self_message_iterator)

Borrows the component which provides the message iterator self_message_iterator.

Parameters
[in]self_message_iteratorMessage iterator instance.
Returns
Component which provides self_message_iterator.
Precondition
self_message_iterator is not NULL.

◆ bt_self_message_iterator_borrow_port()

bt_self_component_port_output* bt_self_message_iterator_borrow_port ( bt_self_message_iterator self_message_iterator)

Borrows the output port on which the message iterator self_message_iterator operates.

Parameters
[in]self_message_iteratorMessage iterator instance.
Returns
Output port on which self_message_iterator operates.
Precondition
self_message_iterator is not NULL.

◆ bt_self_message_iterator_set_data()

void bt_self_message_iterator_set_data ( bt_self_message_iterator self_message_iterator,
void *  user_data 
)

Sets the user data of the message iterator self_message_iterator to data.

Parameters
[in]self_message_iteratorMessage iterator instance.
[in]user_dataNew user data of self_message_iterator.
Precondition
self_message_iterator is not NULL.
See also
bt_self_message_iterator_get_data() — Returns the user data of a message iterator.

◆ bt_self_message_iterator_get_data()

void* bt_self_message_iterator_get_data ( const bt_self_message_iterator self_message_iterator)

Returns the user data of the message iterator self_message_iterator.

Parameters
[in]self_message_iteratorMessage iterator instance.
Returns
User data of self_message_iterator.
Precondition
self_message_iterator is not NULL.
See also
bt_self_message_iterator_set_data() — Sets the user data of a message iterator.

◆ bt_self_message_iterator_is_interrupted()

bt_bool bt_self_message_iterator_is_interrupted ( const bt_self_message_iterator self_message_iterator)

Returns whether or not the message iterator self_message_iterator is interrupted, that is, whether or not any of its interrupters is set.

Parameters
[in]self_message_iteratorMessage iterator instance.
Returns
BT_TRUE if self_message_iterator is interrupted (any of its interrupters is set).
Precondition
self_message_iterator is not NULL.
See also
bt_graph_borrow_default_interrupter() — Borrows a trace processing graph's default interrupter.
bt_graph_add_interrupter() — Adds an interrupter to a graph.

◆ bt_self_message_iterator_configuration_set_can_seek_forward()

void bt_self_message_iterator_configuration_set_can_seek_forward ( bt_self_message_iterator_configuration configuration,
bt_bool  can_seek_forward 
)

Sets whether or not the message iterator of which the configuration is configuration can seek forward.

A message iterator can seek forward if all the messages of its message sequence have some clock snapshot.

Attention
You can only call this function during the execution of a message iterator's initialization method.
Parameters
[in]configurationConfiguration of the message iterator of which to set whether or not it can seek forward.
[in]can_seek_forwardBT_TRUE to make the message iterator of which the configuration is configuration forward-seekable.
Precondition
configuration is not NULL.
See also
bt_message_iterator_can_seek_forward() — Returns whether or not a message iterator can seek forward.