import uuid import dataclasses import datetime import sqlite3 from spacepackets.ecss.tm import CdsShortTimestamp, PusTm @dataclasses.dataclass class HkTmInfo: packet_uuid: uuid.UUID hk_packet: PusTm set_id: int db_con: sqlite3.Connection hk_data: bytes @property def packet_datetime(self) -> datetime.datetime: return CdsShortTimestamp.unpack(self.hk_packet.timestamp).as_datetime()