reworked param TM handling
This commit is contained in:
parent
fb6d5eeb80
commit
14ed2415a4
@ -9,7 +9,9 @@ from tmtccmd import get_console_logger
|
||||
from tmtccmd.logging.pus import RawTmtcTimedLogWrapper
|
||||
from tmtccmd.pus import VerificationWrapper
|
||||
from tmtccmd.tm import Service20FsfwTm, Service200FsfwTm
|
||||
from tmtccmd.tm.pus_200_fsfw_modes import Subservice as ModeSubservices
|
||||
from tmtccmd.tm.pus_20_fsfw_params import Service20ParamDumpWrapper
|
||||
from tmtccmd.pus.s20_fsfw_params_defs import CustomSubservice as ParamSubservice
|
||||
from tmtccmd.tm.pus_200_fsfw_modes import Subservice as ModeSubservice
|
||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||
from .defs import PrintWrapper
|
||||
|
||||
@ -59,12 +61,22 @@ def pus_factory_hook(
|
||||
tm_packet = Service20FsfwTm.unpack(
|
||||
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
|
||||
)
|
||||
dedicated_handler = False
|
||||
if tm_packet.subservice == ParamSubservice.TM_DUMP_REPLY:
|
||||
param_wrapper = Service20ParamDumpWrapper(param_tm=tm_packet)
|
||||
try:
|
||||
param = param_wrapper.get_param()
|
||||
pw.dlog(f"Parameters: {param}")
|
||||
except ValueError as e:
|
||||
pw.dlog(f"received {e} when trying to parse parameters")
|
||||
except NotImplementedError as e:
|
||||
pw.dlog(f"received {e} when trying to parse parameters")
|
||||
else:
|
||||
pw.dlog(f"unknown subservice {tm_packet.subservice} for parameter service")
|
||||
elif service == 200:
|
||||
tm_packet = Service200FsfwTm.unpack(
|
||||
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
|
||||
)
|
||||
if tm_packet.subservice == ModeSubservices.TM_CANT_REACH_MODE:
|
||||
if tm_packet.subservice == ModeSubservice.TM_CANT_REACH_MODE:
|
||||
obj_id = tm_packet.object_id
|
||||
obj_id_obj = obj_id_dict.get(obj_id)
|
||||
retval = tm_packet.return_value
|
||||
|
Loading…
Reference in New Issue
Block a user