Merge pull request 'PLOC SUPV HK parsing' (#231) from parse-ploc-supv-hk into main
EIVE/-/pipeline/head This commit looks good Details

Reviewed-on: #231
This commit is contained in:
Robin Müller 2023-08-15 14:39:09 +02:00
commit b50c75c13c
3 changed files with 41 additions and 3 deletions

View File

@ -10,6 +10,12 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v5.4.3] 2023-08-15
## Added
- PLOC SUPV HK parsing.
# [v5.4.2] 2023-08-15
## Added

View File

@ -1,4 +1,4 @@
__version__ = "5.4.2"
__version__ = "5.4.3"
import logging
from pathlib import Path
@ -6,7 +6,7 @@ from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 5
VERSION_MINOR = 4
VERSION_REVISION = 2
VERSION_REVISION = 3
EIVE_TMTC_ROOT = Path(__file__).parent
PACKAGE_ROOT = EIVE_TMTC_ROOT.parent

View File

@ -722,10 +722,42 @@ def get_event_buffer_path() -> str:
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):
current_idx = 0
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[:inc_len])
pw.dlog(f"Temp PS {temp_ps} C | Temp PL {temp_pl} C | Temp SUP {temp_sup} C")
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}")
pw.dlog(FsfwTmTcPrinter.get_validity_buffer(hk_data[inc_len:], 13))
elif set_id == SetIds.BOOT_STATUS_REPORT:
fmt_str = "!BBIIBBBBBB"
inc_len = struct.calcsize(fmt_str)