api update done

This commit is contained in:
2022-07-05 02:12:54 +02:00
parent 4a654857ce
commit e009167784
41 changed files with 547 additions and 1104 deletions

View File

@ -9,7 +9,7 @@ from tmtccmd.tm.pus_3_fsfw_hk import (
HkContentType,
Service3FsfwTm,
)
from tmtccmd.utility.obj_id import ObjectId, ObjectIdDictT
from tmtccmd.utility.obj_id import ObjectIdU32, ObjectIdDictT
from tmtccmd.logging import get_console_logger
from pus_tm.devs.bpx_bat import handle_bpx_hk_data
@ -72,14 +72,14 @@ def handle_hk_packet(
def handle_regular_hk_print(
printer: FsfwTmTcPrinter,
object_id: ObjectId,
object_id: ObjectIdU32,
hk_packet: Service3Base,
hk_data: bytes,
):
objb = object_id.as_bytes
set_id = hk_packet.set_id
"""This function is called when a Service 3 Housekeeping packet is received."""
if object_id in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:
if objb in [obj_ids.RW1_ID, obj_ids.RW2_ID, obj_ids.RW3_ID, obj_ids.RW4_ID]:
handle_rw_hk_data(printer, object_id, set_id, hk_data)
elif objb == obj_ids.SYRLINKS_HANDLER_ID:
handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)