return self.cls.name
@property
- def id(self) -> typing.Optional[int]:
+ def id(self) -> int:
return self.cls.id
@property
@property
def stream_class(self) -> "bt2_stream_class._StreamClassConst":
- sc_ptr = self._borrow_stream_class_ptr(self._ptr)
-
- if sc_ptr is not None:
- return self._stream_class_pycls._create_from_ptr_and_get_ref(sc_ptr)
+ return self._stream_class_pycls._create_from_ptr_and_get_ref(
+ self._borrow_stream_class_ptr(self._ptr)
+ )
@property
def name(self) -> typing.Optional[str]:
@property
def id(self) -> int:
- id = native_bt.event_class_get_id(self._ptr)
- return id if id >= 0 else None
+ return native_bt.event_class_get_id(self._ptr)
@property
def log_level(self) -> typing.Optional[EventClassLogLevel]:
@property
def id(self) -> int:
- id = native_bt.stream_get_id(self._ptr)
- return id if id >= 0 else None
+ return native_bt.stream_get_id(self._ptr)
@property
def trace(self) -> "bt2_trace._TraceConst":
@property
def trace_class(self) -> "bt2_trace_class._TraceClassConst":
- tc_ptr = self._borrow_trace_class_ptr(self._ptr)
-
- if tc_ptr is not None:
- return self._trace_class_cls._create_from_ptr_and_get_ref(tc_ptr)
+ return self._trace_class_cls._create_from_ptr_and_get_ref(
+ self._borrow_trace_class_ptr(self._ptr)
+ )
@property
def name(self) -> typing.Optional[str]:
@property
def id(self) -> int:
- id = native_bt.stream_class_get_id(self._ptr)
-
- if id < 0:
- return
-
- return id
+ return native_bt.stream_class_get_id(self._ptr)
@property
def packet_context_field_class(