parse ploc supv HK
All checks were successful
EIVE/-/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-08-15 14:15:06 +02:00
parent bc1a1774a6
commit 72def77d40
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F

View File

@ -722,10 +722,42 @@ def get_event_buffer_path() -> str:
return file return file
class SocState(enum.IntEnum):
OFF = 0
BOOTING = 1
OPERATIONAL = 2
SHUTDOWN = 3
def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper): def handle_supv_hk_data(set_id: int, hk_data: bytes, pw: PrintWrapper):
current_idx = 0 current_idx = 0
if set_id == SetIds.HK_REPORT: if set_id == SetIds.HK_REPORT:
pass fmt_str = "!IIIQIIIIIBBBB"
inc_len = struct.calcsize(fmt_str)
(
temp_ps,
temp_pl,
temp_sup,
uptime,
cpu_load,
avail_heap,
num_tcs,
num_tms,
soc_state,
nvm_0_1_state,
nvm_3_state,
mission_io_state,
fmc_state
) = struct.unpack(fmt_str, hk_data)
pw.dlog(f"Temp PS {temp_ps} | Temp PL {temp_pl} | Temp SUP {temp_sup}")
pw.dlog(f"Uptime {uptime} | CPU Load {cpu_load} | Avail Heap {avail_heap}")
pw.dlog(f"Number TCs {num_tcs} | Number TMs {num_tms}")
pw.dlog(f"SOC state {SocState(soc_state)}")
pw.dlog(f"NVM 01 State {nvm_0_1_state}")
pw.dlog(f"NVM 3 State {nvm_3_state}")
pw.dlog(f"Mission IO state {mission_io_state}")
pw.dlog(f"FMC state {fmc_state}")
FsfwTmTcPrinter.print_validity_buffer(hk_data[inc_len:], 13)
elif set_id == SetIds.BOOT_STATUS_REPORT: elif set_id == SetIds.BOOT_STATUS_REPORT:
fmt_str = "!BBIIBBBBBB" fmt_str = "!BBIIBBBBBB"
inc_len = struct.calcsize(fmt_str) inc_len = struct.calcsize(fmt_str)