- def _packets_have_end_default_clock_snapshot(self, value):
- utils._check_bool(value)
- native_bt.stream_class_set_packets_have_end_default_clock_snapshot(self._ptr, value)
+ def _set_supports_packets(self, supports, with_begin_cs=False, with_end_cs=False):
+ utils._check_bool(supports)
+ utils._check_bool(with_begin_cs)
+ utils._check_bool(with_end_cs)
+
+ if not supports and (with_begin_cs or with_end_cs):
+ raise ValueError('cannot not support packets, but have default clock snapshots')
+
+ if not supports and self.packet_context_field_class is not None:
+ raise ValueError('stream class already has a packet context field class')