set IMTQ set HK handling
This commit is contained in:
parent
802757ba72
commit
a2d04b28fd
@ -32,6 +32,7 @@ from eive_tmtc.tmtc.acs.imtq import (
|
||||
handle_eng_set,
|
||||
handle_calibrated_mtm_measurement,
|
||||
handle_raw_mtm_measurement,
|
||||
handle_imtq_hk,
|
||||
)
|
||||
from eive_tmtc.pus_tm.defs import FsfwTmTcPrinter
|
||||
from eive_tmtc.tmtc.core import handle_core_hk_data
|
||||
@ -97,18 +98,7 @@ def handle_regular_hk_print(
|
||||
elif objb == obj_ids.SYRLINKS_HANDLER_ID:
|
||||
return handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.IMTQ_HANDLER_ID:
|
||||
if (set_id >= ImtqSetId.POSITIVE_X_TEST) and (
|
||||
set_id <= ImtqSetId.NEGATIVE_Z_TEST
|
||||
):
|
||||
return handle_self_test_data(printer, hk_data)
|
||||
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetId.CAL_MTM_SET:
|
||||
return handle_calibrated_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.RAW_MTM_NO_TORQUE:
|
||||
return handle_raw_mtm_measurement(printer, hk_data)
|
||||
else:
|
||||
_LOGGER.info("Service 3 TM: IMTQ handler reply with unknown set id")
|
||||
return handle_imtq_hk(printer=printer, hk_data=hk_data, set_id=set_id)
|
||||
elif objb == obj_ids.GPS_CONTROLLER:
|
||||
return handle_gps_data(printer=printer, hk_data=hk_data)
|
||||
elif objb == obj_ids.PCDU_HANDLER_ID:
|
||||
|
@ -5,6 +5,7 @@
|
||||
@author J. Meier
|
||||
@date 25.03.2021
|
||||
"""
|
||||
import logging
|
||||
import struct
|
||||
from typing import List
|
||||
|
||||
@ -302,6 +303,23 @@ ENG_HK_HEADERS = [
|
||||
]
|
||||
|
||||
|
||||
def handle_imtq_hk(printer: FsfwTmTcPrinter, hk_data: bytes, set_id: int):
|
||||
if (set_id >= ImtqSetId.POSITIVE_X_TEST) and (set_id <= ImtqSetId.NEGATIVE_Z_TEST):
|
||||
return handle_self_test_data(printer, hk_data)
|
||||
elif set_id == ImtqSetId.ENG_HK_NO_TORQUE:
|
||||
return handle_eng_set(printer, hk_data)
|
||||
elif set_id == ImtqSetId.CAL_MTM_SET:
|
||||
return handle_calibrated_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.RAW_MTM_NO_TORQUE:
|
||||
return handle_raw_mtm_measurement(printer, hk_data)
|
||||
elif set_id == ImtqSetId.STATUS_SET:
|
||||
return handle_status_set(printer, hk_data)
|
||||
else:
|
||||
logging.getLogger(__name__).info(
|
||||
"Service 3 TM: IMTQ handler reply with unknown set id"
|
||||
)
|
||||
|
||||
|
||||
def unpack_status_set(hk_data: bytes) -> List:
|
||||
status_mode = hk_data[0]
|
||||
status_error = hk_data[1]
|
||||
|
Loading…
Reference in New Issue
Block a user