+ return self._create_field_class_from_ptr_and_get_ref(fc_ptr)
+
+
+class _EventClass(_EventClassConst):
+ _borrow_stream_class_ptr = staticmethod(native_bt.event_class_borrow_stream_class)
+ _borrow_specific_context_field_class_ptr = staticmethod(
+ native_bt.event_class_borrow_specific_context_field_class
+ )
+ _borrow_payload_field_class_ptr = staticmethod(
+ native_bt.event_class_borrow_payload_field_class
+ )
+ _borrow_user_attributes_ptr = staticmethod(
+ native_bt.event_class_borrow_user_attributes
+ )
+ _create_field_class_from_ptr_and_get_ref = staticmethod(
+ bt2_field_class._create_field_class_from_ptr_and_get_ref
+ )
+ _create_value_from_ptr_and_get_ref = staticmethod(
+ bt2_value._create_from_ptr_and_get_ref
+ )
+ _stream_class_pycls = property(lambda s: _bt2_stream_class()._StreamClass)
+
+ def _user_attributes(self, user_attributes):
+ value = bt2_value.create_value(user_attributes)
+ native_bt.event_class_set_user_attributes(self._ptr, value._ptr)
+
+ _user_attributes = property(fset=_user_attributes)
+
+ def _name(self, name):
+ return native_bt.event_class_set_name(self._ptr, name)
+
+ _name = property(fset=_name)
+
+ def _log_level(self, log_level):
+ native_bt.event_class_set_log_level(self._ptr, log_level)
+
+ _log_level = property(fset=_log_level)
+
+ def _emf_uri(self, emf_uri):
+ status = native_bt.event_class_set_emf_uri(self._ptr, emf_uri)
+ utils._handle_func_status(status, "cannot set event class object's EMF URI")
+
+ _emf_uri = property(fset=_emf_uri)
+
+ def _specific_context_field_class(self, context_field_class):
+ status = native_bt.event_class_set_specific_context_field_class(
+ self._ptr, context_field_class._ptr
+ )
+ utils._handle_func_status(
+ status, "cannot set event class object's context field class"
+ )
+
+ _specific_context_field_class = property(fset=_specific_context_field_class)