Merge remote-tracking branch 'origin/main' into mueller_new_switcher_hk

This commit is contained in:
2023-02-14 16:10:55 +01:00
94 changed files with 3828 additions and 2542 deletions

View File

@ -1,44 +1,45 @@
"""HK Handling for EIVE OBSW"""
import logging
# from pus_tm.tcp_server_objects import TCP_SEVER_SENSOR_TEMPERATURES
from eive_tmtc.tmtc.acs.acs_ctrl import handle_raw_mgm_data, handle_acs_ctrl_hk_data
from eive_tmtc.pus_tm.devs.plpcdu import handle_plpcdu_hk
from eive_tmtc.pus_tm.devs.rad_sensor import handle_rad_sensor_data
from eive_tmtc.pus_tm.devs.sus import handle_sus_hk
from eive_tmtc.pus_tm.system.tcs import handle_thermal_controller_hk_data
from eive_tmtc.tmtc.power.plpcdu import handle_plpcdu_hk
from eive_tmtc.tmtc.payload.rad_sensor import handle_rad_sensor_data
from eive_tmtc.tmtc.acs.sus import handle_sus_hk
from eive_tmtc.tmtc.payload.ploc_supervisor import handle_supv_hk_data
from eive_tmtc.tmtc.acs.reaction_wheels import handle_rw_hk_data
from eive_tmtc.tmtc.com.syrlinks_handler import handle_syrlinks_hk_data
from eive_tmtc.tmtc.tcs import handle_thermal_controller_hk_data
from tmtccmd.tm.pus_3_fsfw_hk import (
Service3Base,
HkContentType,
Service3FsfwTm,
)
from tmtccmd.util.obj_id import ObjectIdU32, ObjectIdDictT
from tmtccmd.logging import get_console_logger
from eive_tmtc.pus_tm.devs.bpx_bat import handle_bpx_hk_data
from eive_tmtc.pus_tm.devs.gps import handle_gps_data
from eive_tmtc.pus_tm.devs.gyros import handle_gyros_hk_data
from eive_tmtc.tmtc.power.bpx_batt import handle_bpx_hk_data
from eive_tmtc.tmtc.acs.gps import handle_gps_data
from eive_tmtc.tmtc.acs.gyros import handle_gyros_hk_data
from eive_tmtc.tmtc.power.tm import (
handle_pdu_data,
handle_p60_hk_data,
handle_acu_hk_data,
handle_pcdu_hk,
)
from eive_tmtc.pus_tm.devs.syrlinks import handle_syrlinks_hk_data
from eive_tmtc.tmtc.acs.imtq import (
ImtqSetIds,
ImtqSetId,
handle_self_test_data,
handle_eng_set,
handle_calibrated_mtm_measurement,
handle_raw_mtm_measurement,
)
from eive_tmtc.pus_tm.defs import FsfwTmTcPrinter
from eive_tmtc.pus_tm.system.core import handle_core_hk_data
from eive_tmtc.pus_tm.devs.mgms import handle_mgm_hk_data
from eive_tmtc.tmtc.core import handle_core_hk_data
from eive_tmtc.tmtc.acs.mgms import handle_mgm_hk_data
import eive_tmtc.config.object_ids as obj_ids
LOGGER = get_console_logger()
_LOGGER = logging.getLogger(__name__)
FORWARD_SENSOR_TEMPS = False
@ -75,11 +76,11 @@ def handle_hk_packet(
hk_data=hk_data,
)
except ValueError as e:
LOGGER.exception(
_LOGGER.exception(
f"{e} error when parsing HK data coming from {named_obj_id}"
)
if tm_packet.subservice == 10 or tm_packet.subservice == 12:
LOGGER.warning("HK definitions printout not implemented yet")
_LOGGER.warning("HK definitions printout not implemented yet")
def handle_regular_hk_print(
@ -96,18 +97,18 @@ def handle_regular_hk_print(
elif objb == obj_ids.SYRLINKS_HANDLER_ID:
handle_syrlinks_hk_data(printer=printer, hk_data=hk_data, set_id=set_id)
elif objb == obj_ids.IMTQ_HANDLER_ID:
if (set_id >= ImtqSetIds.POSITIVE_X_TEST) and (
set_id <= ImtqSetIds.NEGATIVE_Z_TEST
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 == ImtqSetIds.ENG_HK_SET:
elif set_id == ImtqSetId.ENG_HK_SET:
return handle_eng_set(printer, hk_data)
elif set_id == ImtqSetIds.CAL_MTM_SET:
elif set_id == ImtqSetId.CAL_MTM_SET:
return handle_calibrated_mtm_measurement(printer, hk_data)
elif set_id == ImtqSetIds.RAW_MTM_SET:
elif set_id == ImtqSetId.RAW_MTM_SET:
return handle_raw_mtm_measurement(printer, hk_data)
else:
LOGGER.info("Service 3 TM: IMTQ handler reply with unknown set id")
_LOGGER.info("Service 3 TM: IMTQ handler reply with unknown 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:
@ -180,7 +181,7 @@ def handle_regular_hk_print(
elif objb == obj_ids.ACS_CONTROLLER:
handle_acs_ctrl_hk_data(printer, set_id, hk_data)
else:
LOGGER.info(
_LOGGER.info(
f"Service 3 TM: Parsing for object {object_id} and set ID {set_id} "
f"has not been implemented."
)