X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fbt2%2Fstream_class.py;fp=bindings%2Fpython%2Fbt2%2Fbt2%2Fstream_class.py;h=20dd006c9880327098a8eec4d82ecd81c7d590c3;hp=fa13cb3b83c9b715fc5dc401068a4dac9c984838;hb=2e90378a2b94006e2743b06e7fe7a1f0e691a56e;hpb=7fe92073394104c8ffe575b1b05ee4fe1df356ea diff --git a/bindings/python/bt2/bt2/stream_class.py b/bindings/python/bt2/bt2/stream_class.py index fa13cb3b..20dd006c 100644 --- a/bindings/python/bt2/bt2/stream_class.py +++ b/bindings/python/bt2/bt2/stream_class.py @@ -148,6 +148,40 @@ class StreamClass(object._SharedObject, collections.abc.Mapping): _packets_have_default_end_clock_snapshot = property(fset=_packets_have_default_end_clock_snapshot) + @property + def supports_discarded_events(self): + return native_bt.stream_class_supports_discarded_events(self._ptr) + + def _set_supports_discarded_events(self, supports, with_cs=False): + utils._check_bool(supports) + utils._check_bool(with_cs) + + if not supports and with_cs: + raise ValueError('cannot not support discarded events, but have default clock snapshots') + + native_bt.stream_class_set_supports_discarded_events(self._ptr, supports, with_cs) + + @property + def discarded_events_have_default_clock_snapshots(self): + return native_bt.stream_class_discarded_events_have_default_clock_snapshots(self._ptr) + + @property + def supports_discarded_packets(self): + return native_bt.stream_class_supports_discarded_packets(self._ptr) + + def _set_supports_discarded_packets(self, supports, with_cs): + utils._check_bool(supports) + utils._check_bool(with_cs) + + if not supports and with_cs: + raise ValueError('cannot not support discarded packets, but have default clock snapshots') + + native_bt.stream_class_set_supports_discarded_packets(self._ptr, supports, with_cs) + + @property + def discarded_packets_have_default_clock_snapshots(self): + return native_bt.stream_class_discarded_packets_have_default_clock_snapshots(self._ptr) + @property def id(self): id = native_bt.stream_class_get_id(self._ptr)