""" @brief This file transfers control of housekeeping handling (PUS service 3) to the developer @details Template configuration file. Copy this folder to the TMTC commander root and adapt it to your needs. """ from typing import Tuple from config.tmtcc_object_ids import ObjectIds from tmtc_core.pus_tm.tmtcc_pus_service_3 import Service3Base from tmtc_core.utility.tmtcc_logger import get_logger LOGGER = get_logger() def handle_user_hk_packet(object_id: ObjectIds, set_id: int, hk_data: bytearray, service3_packet: Service3Base) -> Tuple[list, list, bytearray, int]: """ This function is called when a Service 3 Housekeeping packet is received. Please note that the object IDs should be compared by value because direct comparison of enumerations does not work in Python. For example use: if object_id.value == ObjectIds.TEST_OBJECT.value to test equality based on the object ID list. @param object_id: @param set_id: @param hk_data: @param service3_packet: @return: Expects a tuple, consisting of two lists, a bytearray and an integer The first list contains the header columns, the second list the list with the corresponding values. The bytearray is the validity buffer, which is usually appended at the end of the housekeeping packet. The last value is the number of parameters. """ LOGGER.info("Service3TM: Parsing for this SID has not been implemented.") return [], [], bytearray(), 0