From 98a1d0f856d537c64e8e29633bbd999a7395aee1 Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" <–meierj@irs.uni-stuttgart.de> Date: Sun, 8 Aug 2021 10:58:14 +0200 Subject: [PATCH] supervisor CAN loopback test --- config/hook_implementations.py | 1 + pus_tc/ploc_supervisor.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/config/hook_implementations.py b/config/hook_implementations.py index 584de70..49a6726 100644 --- a/config/hook_implementations.py +++ b/config/hook_implementations.py @@ -123,6 +123,7 @@ class EiveHookObject(TmTcHookBase): "38": ("PLOC Supervisor: Factory reset clear all", {OpCodeDictKeys.TIMEOUT: 2.0}), "39": ("PLOC Supervisor: Factory reset clear mirror entries", {OpCodeDictKeys.TIMEOUT: 2.0}), "40": ("PLOC Supervisor: Factory reset clear circular entries", {OpCodeDictKeys.TIMEOUT: 2.0}), + "41": ("PLOC Supervisor: CAN loopback test", {OpCodeDictKeys.TIMEOUT: 2.0}), } service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv) diff --git a/pus_tc/ploc_supervisor.py b/pus_tc/ploc_supervisor.py index b9a11b4..eb8a9b0 100644 --- a/pus_tc/ploc_supervisor.py +++ b/pus_tc/ploc_supervisor.py @@ -277,6 +277,11 @@ def pack_ploc_supv_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: command = command = object_id + struct.pack('!I', SupvActionIds.FACTORY_RESET_CLEAR_CIRCULAR) command = PusTelecommand(service=8, subservice=128, ssc=55, app_data=command) tc_queue.appendleft(command.pack_command_tuple()) + elif op_code == "41": + tc_queue.appendleft((QueueCommands.PRINT, "PLOC Supervisor: CAN loopback test")) + command = command = object_id + struct.pack('!I', SupvActionIds.CAN_LOOPBACK_TEST) + command = PusTelecommand(service=8, subservice=128, ssc=56, app_data=command) + tc_queue.appendleft(command.pack_command_tuple()) return tc_queue