+ @property
+ def emf_uri(self):
+ return native_bt.event_class_get_emf_uri(self._ptr)
+
+ @property
+ def specific_context_field_class(self):
+ fc_ptr = self._borrow_specific_context_field_class_ptr(self._ptr)
+
+ if fc_ptr is None:
+ return
+
+ return self._create_field_class_from_ptr_and_get_ref(fc_ptr)
+
+ @property
+ def payload_field_class(self):
+ fc_ptr = self._borrow_payload_field_class_ptr(self._ptr)
+
+ if fc_ptr is None:
+ return
+
+ 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)
+ utils._check_type(value, bt2_value.MapValue)
+ native_bt.event_class_set_user_attributes(self._ptr, value._ptr)
+
+ _user_attributes = property(fset=_user_attributes)
+
+ def _name(self, name):
+ utils._check_str(name)
+ return native_bt.event_class_set_name(self._ptr, name)
+
+ _name = property(fset=_name)
+