diff --git a/pus_tm/service_8_hook.py b/pus_tm/service_8_hook.py index 4d50c4a..358be86 100644 --- a/pus_tm/service_8_hook.py +++ b/pus_tm/service_8_hook.py @@ -3,6 +3,7 @@ from typing import Tuple from config.object_ids import * from pus_tc.imtq import ImtqActionIds from pus_tc.ploc_mpsoc import PlocReplyIds +from pus_tc.ploc_supervisor import SupvActionIds def user_analyze_service_8_data( @@ -32,6 +33,8 @@ def user_analyze_service_8_data( return handle_imtq_replies(action_id, custom_data) elif object_id == PLOC_MPSOC_ID: return handle_ploc_replies(action_id, custom_data) + elif object_id == PLOC_SUPV_ID: + return handle_supervisor_replies(action_id, custom_data) else: header_list = [] content_list = [] @@ -56,3 +59,12 @@ def handle_ploc_replies(action_id: int, custom_data: bytearray) -> Tuple[list, l header_list = ['PLOC Memory Address', 'PLOC Mem Len', 'PLOC Read Memory Data'] content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]] return header_list, content_list + + +def handle_supervisor_replies(action_id: int, custom_data: bytearray) -> Tuple[list, list]: + header_list = [] + content_list = [] + if action_id == SupvActionIds.DUMP_MRAM: + header_list = ['MRAM Dump'] + content_list = [custom_data[:len(custom_data)]] + return header_list, content_list