bt2: Adapt test_graph.py and make it pass
[babeltrace.git] / bindings / python / bt2 / bt2 / port.py
index 8ec04657f9dfdd09637278adcda05c00a820e8f6..a84edf56d7a117c9ca0d835ce341c733c08d4de7 100644 (file)
@@ -107,6 +107,13 @@ class _UserComponentPort(_Port):
 class _UserComponentInputPort(_UserComponentPort, _InputPort):
     _as_self_port_ptr = staticmethod(native_bt.self_component_port_input_as_self_component_port)
 
+    def create_message_iterator(self):
+        msg_iter_ptr = native_bt.self_component_port_input_message_iterator_create(self._ptr)
+        if msg_iter_ptr is None:
+            raise bt2.CreationError('cannot create message iterator object')
+
+        return bt2.message_iterator._UserComponentInputPortMessageIterator(msg_iter_ptr)
+
 
 class _UserComponentOutputPort(_UserComponentPort, _OutputPort):
     _as_self_port_ptr = staticmethod(native_bt.self_component_port_output_as_self_component_port)
This page took 0.02286 seconds and 4 git commands to generate.