+ def can_seek_ns_from_origin(self, ns_from_origin):
+ utils._check_int64(ns_from_origin)
+ (status, res) = native_bt.message_iterator_can_seek_ns_from_origin(
+ self._ptr, ns_from_origin
+ )
+ utils._handle_func_status(
+ status,
+ 'cannot check whether or not message iterator can seek given ns from origin',
+ )
+ return res != 0
+
+ def seek_ns_from_origin(self, ns_from_origin):
+ utils._check_int64(ns_from_origin)
+
+ # Forget about buffered messages, they won't be valid after seeking.
+ self._current_msgs.clear()
+ self._at = 0
+
+ status = native_bt.message_iterator_seek_ns_from_origin(
+ self._ptr, ns_from_origin
+ )
+ utils._handle_func_status(
+ status, 'message iterator cannot seek given ns from origin'
+ )
+
+ @property
+ def can_seek_forward(self):
+ return native_bt.message_iterator_can_seek_forward(self._ptr)
+
+
+class _MessageIteratorConfiguration:
+ def __init__(self, ptr):
+ self._ptr = ptr
+
+ def can_seek_forward(self, value):
+ utils._check_bool(value)
+ native_bt.self_message_iterator_configuration_set_can_seek_forward(
+ self._ptr, value
+ )