@property
def can_seek_beginning(self):
- res = self._can_seek_beginning(self._ptr)
+ status, res = self._can_seek_beginning(self._ptr)
+ utils._handle_func_status(
+ status,
+ 'cannot check whether or not message iterator can seek its beginning',
+ )
return res != 0
def seek_beginning(self):
def _component(self):
return native_bt.bt2_get_user_component_from_user_msg_iter(self._bt_ptr)
+ @property
+ def _port(self):
+ port_ptr = native_bt.self_message_iterator_borrow_port(self._bt_ptr)
+ assert port_ptr is not None
+ return bt2_port._create_self_from_ptr_and_get_ref(
+ port_ptr, native_bt.PORT_TYPE_OUTPUT
+ )
+
@property
def addr(self):
return int(self._bt_ptr)
except Exception:
raise
- utils._check_type(msg, bt2_message._Message)
+ utils._check_type(msg, bt2_message._MessageConst)
# The reference we return will be given to the message array.
# However, the `msg` Python object may stay alive, if the user has kept