correct and useful
This commit is contained in:
parent
14ed2415a4
commit
65839f5aec
@ -58,14 +58,31 @@ def pus_factory_hook(
|
|||||||
verif_wrapper.dlog("Received Ping Reply TM[17,2]")
|
verif_wrapper.dlog("Received Ping Reply TM[17,2]")
|
||||||
dedicated_handler = True
|
dedicated_handler = True
|
||||||
elif service == 20:
|
elif service == 20:
|
||||||
tm_packet = Service20FsfwTm.unpack(
|
param_packet = Service20FsfwTm.unpack(
|
||||||
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
|
raw_telemetry=packet, time_reader=CdsShortTimestamp.empty()
|
||||||
)
|
)
|
||||||
if tm_packet.subservice == ParamSubservice.TM_DUMP_REPLY:
|
if tm_packet.subservice == ParamSubservice.TM_DUMP_REPLY:
|
||||||
param_wrapper = Service20ParamDumpWrapper(param_tm=tm_packet)
|
param_wrapper = Service20ParamDumpWrapper(param_tm=param_packet)
|
||||||
try:
|
try:
|
||||||
param = param_wrapper.get_param()
|
param = param_wrapper.get_param()
|
||||||
pw.dlog(f"Parameters: {param}")
|
obj = obj_id_dict.get(param_wrapper.param_tm.object_id)
|
||||||
|
pw.dlog(f"Received parameter dump TM from {obj}")
|
||||||
|
pw.dlog(f"Parameter: {param}")
|
||||||
|
if param.row == 1 and param.column == 1:
|
||||||
|
try:
|
||||||
|
scalar_param = param.parse_scalar_param()
|
||||||
|
if isinstance(scalar_param, int):
|
||||||
|
pw.dlog(f"Scalar integer parameter: {scalar_param}")
|
||||||
|
elif isinstance(scalar_param, float):
|
||||||
|
pw.dlog(f"Scalar floating point parameter: {scalar_param}")
|
||||||
|
except ValueError as e:
|
||||||
|
pw.dlog("received {e} trying to parse scalar parameter")
|
||||||
|
else:
|
||||||
|
# TODO: Could improve display further by actually displaying a matrix as a
|
||||||
|
# matrix using row and column information
|
||||||
|
pw.dlog(
|
||||||
|
f"Received vector or matrix data: {param.param_data.hex(sep=',')}"
|
||||||
|
)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
pw.dlog(f"received {e} when trying to parse parameters")
|
pw.dlog(f"received {e} when trying to parse parameters")
|
||||||
except NotImplementedError as e:
|
except NotImplementedError as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user