From 07b6a9df18baff999ca52c2f2781f8f77f8dcb65 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 17 Dec 2020 19:37:34 +0100 Subject: [PATCH 1/5] core update --- tmtc_core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc_core b/tmtc_core index c51a2ba..bdb8d55 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit c51a2ba18817c0dc7053ee6d7e15a00ef344b0ab +Subproject commit bdb8d5533a40c8396dedafc1844fe3645bcf8de3 From 4b0d45793720df05c6a79990b84038b140c093b0 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Wed, 30 Dec 2020 23:38:20 +0100 Subject: [PATCH 2/5] tmtc core update --- tmtc_core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc_core b/tmtc_core index bdb8d55..ed4b25a 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit bdb8d5533a40c8396dedafc1844fe3645bcf8de3 +Subproject commit ed4b25ab449cae31ac720f52ad43d13b9d7ce4c5 From 2b85ece07195ee905c35b35494bc7a86b94335f5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 14 Feb 2021 12:19:17 +0100 Subject: [PATCH 3/5] core update --- tmtc_core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc_core b/tmtc_core index 4b41bf4..081cb43 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 4b41bf458e9e724ad395afac537cad98adcba187 +Subproject commit 081cb43e1d932dd3776363dbdf130edff5d5cc32 From 90c45ea0c77f04677322b3c8c9077db841fc3129 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 23 Feb 2021 22:07:21 +0100 Subject: [PATCH 4/5] adapted object IDs --- config/tmtcc_object_ids.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/tmtcc_object_ids.py b/config/tmtcc_object_ids.py index 7372866..99fa0d0 100644 --- a/config/tmtcc_object_ids.py +++ b/config/tmtcc_object_ids.py @@ -16,10 +16,12 @@ class ObjectIds(enum.Enum): P60DOCK_HANDLER_ID = auto() PDU1_HANDLER_ID = auto() PDU2_HANDLER_ID = auto() + PCDU_HANDLER = auto() ACU_HANDLER_ID = auto() TMP1075_1_HANDLER_ID = auto() TMP1075_2_HANDLER_ID = auto() HEATER = auto() + SOLAR_ARRAY_DEPLOYMENT = auto() def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]): @@ -34,6 +36,8 @@ def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]): o_ids.TMP1075_1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x5]), o_ids.TMP1075_2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x6]), o_ids.HEATER: bytearray([0x54, 0x00, 0x00, 0x1]), + o_ids.PCDU_HANDLER: bytearray([0x44, 0x00, 0x10, 0x00]), + o_ids.SOLAR_ARRAY_DEPLOYMENT: bytearray([0x44, 0x00, 0x10, 0x01]), o_ids.INVALID: bytearray([0xFF, 0xFF, 0xFF, 0xFF]), } - ) + ) \ No newline at end of file From d1899ef1816aa7531b142f87d8b9ea91ef4011fd Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sat, 27 Feb 2021 13:13:12 +0100 Subject: [PATCH 5/5] updated hk handling --- pus_tm/tmtcc_pus_hk_handling.py | 22 +++++++++++++++++----- tmtc_core | 2 +- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/pus_tm/tmtcc_pus_hk_handling.py b/pus_tm/tmtcc_pus_hk_handling.py index 73eede3..b1eb4c7 100644 --- a/pus_tm/tmtcc_pus_hk_handling.py +++ b/pus_tm/tmtcc_pus_hk_handling.py @@ -6,21 +6,33 @@ """ 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: bytearray, hk_data: bytearray, - service3_packet: Service3Base) -> Tuple[list, list, bytearray]: +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: + @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() + return [], [], bytearray(), 0 diff --git a/tmtc_core b/tmtc_core index 081cb43..dd623a5 160000 --- a/tmtc_core +++ b/tmtc_core @@ -1 +1 @@ -Subproject commit 081cb43e1d932dd3776363dbdf130edff5d5cc32 +Subproject commit dd623a5ef72c46cdb99334bc7fd166e45bb2dd56