- status = self._seek_beginning(self._ptr)
- utils._handle_func_status(status,
- 'cannot seek message iterator beginning')
-
-
-# This is created when a component wants to iterate on one of its input ports.
-class _UserComponentInputPortMessageIterator(_GenericMessageIterator):
- _get_msg_range = staticmethod(native_bt.bt2_self_component_port_input_get_msg_range)
- _get_ref = staticmethod(native_bt.self_component_port_input_message_iterator_get_ref)
- _put_ref = staticmethod(native_bt.self_component_port_input_message_iterator_put_ref)
- _can_seek_beginning = staticmethod(native_bt.self_component_port_input_message_iterator_can_seek_beginning)
- _seek_beginning = staticmethod(native_bt.self_component_port_input_message_iterator_seek_beginning)
-
-
-# This is created when the user wants to iterate on a component's output port,
-# from outside the graph.
-class _OutputPortMessageIterator(_GenericMessageIterator):
- _get_msg_range = staticmethod(native_bt.bt2_port_output_get_msg_range)
- _get_ref = staticmethod(native_bt.port_output_message_iterator_get_ref)
- _put_ref = staticmethod(native_bt.port_output_message_iterator_put_ref)
- _can_seek_beginning = staticmethod(native_bt.port_output_message_iterator_can_seek_beginning)
- _seek_beginning = staticmethod(native_bt.port_output_message_iterator_seek_beginning)
+ status = native_bt.self_component_port_input_message_iterator_seek_beginning(
+ self._ptr
+ )
+ utils._handle_func_status(status, 'cannot seek message iterator beginning')