bt2: let components attach "user data" to ports
[babeltrace.git] / bindings / python / bt2 / bt2 / port.py
index a84edf56d7a117c9ca0d835ce341c733c08d4de7..f7c236692e23d35951c00b85375ef58a887d9831 100644 (file)
@@ -103,6 +103,11 @@ class _UserComponentPort(_Port):
 
         return bt2.connection._Connection._create_from_ptr_and_get_ref(conn_ptr)
 
+    @property
+    def user_data(self):
+        ptr = self._as_self_port_ptr(self._ptr)
+        return native_bt.self_component_port_get_data(ptr)
+
 
 class _UserComponentInputPort(_UserComponentPort, _InputPort):
     _as_self_port_ptr = staticmethod(native_bt.self_component_port_input_as_self_component_port)
This page took 0.035095 seconds and 4 git commands to generate.