+# An entry within the index of an LTTng data stream.
+class _LttngDataStreamIndexEntry:
+ def __init__(
+ self,
+ offset_bytes,
+ total_size_bits,
+ content_size_bits,
+ timestamp_begin,
+ timestamp_end,
+ events_discarded,
+ stream_class_id,
+ ):
+ self._offset_bytes = offset_bytes
+ self._total_size_bits = total_size_bits
+ self._content_size_bits = content_size_bits
+ self._timestamp_begin = timestamp_begin
+ self._timestamp_end = timestamp_end
+ self._events_discarded = events_discarded
+ self._stream_class_id = stream_class_id
+
+ @property
+ def offset_bytes(self):
+ return self._offset_bytes
+
+ @property
+ def total_size_bits(self):
+ return self._total_size_bits
+
+ @property
+ def total_size_bytes(self):
+ return self._total_size_bits // 8
+
+ @property
+ def content_size_bits(self):
+ return self._content_size_bits
+
+ @property
+ def content_size_bytes(self):
+ return self._content_size_bits // 8
+
+ @property
+ def timestamp_begin(self):
+ return self._timestamp_begin
+
+ @property
+ def timestamp_end(self):
+ return self._timestamp_end
+
+ @property
+ def events_discarded(self):
+ return self._events_discarded
+
+ @property
+ def stream_class_id(self):
+ return self._stream_class_id
+
+
+# An entry within the index of an LTTng data stream. While a stream beacon entry
+# is conceptually unrelated to an index, it is sent as a reply to a
+# LttngLiveViewerGetNextDataStreamIndexEntryCommand
+class _LttngDataStreamBeaconEntry:
+ def __init__(self, stream_class_id, timestamp):
+ self._stream_class_id = stream_class_id
+ self._timestamp = timestamp
+
+ @property
+ def timestamp(self):
+ return self._timestamp
+
+ @property
+ def stream_class_id(self):
+ return self._stream_class_id
+
+