X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Fport.py;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Fport.py;h=a84edf56d7a117c9ca0d835ce341c733c08d4de7;hp=8ec04657f9dfdd09637278adcda05c00a820e8f6;hb=5f25509b06eb8dd0a76d3068894d9f8fefd63178;hpb=8cc56726828daf6e193dc131435948d2c9a2cb4e diff --git a/bindings/python/bt2/bt2/port.py b/bindings/python/bt2/bt2/port.py index 8ec04657..a84edf56 100644 --- a/bindings/python/bt2/bt2/port.py +++ b/bindings/python/bt2/bt2/port.py @@ -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)