- msg_iter_ptr = native_bt.py3_create_output_port_msg_iter(int(self._ptr),
- colander_component_name,
- msg_types)
-
- if msg_iter_ptr is None:
- raise bt2.CreationError('cannot create output port message iterator')
-
- return bt2.message_iterator._OutputPortMessageIterator._create_from_ptr(msg_iter_ptr)
-
-
-class _PrivatePort(_Port):
- @property
- def name(self):
- return self._name(self._pub_ptr)
+class _UserComponentPort(_Port):
+ @classmethod
+ def _as_port_ptr(cls, ptr):
+ ptr = cls._as_self_port_ptr(ptr)
+ return native_bt.self_component_port_as_port(ptr)