added processing of mram dump tm in service 8 hook

This commit is contained in:
Jakob.Meier 2021-07-31 08:32:14 +02:00
parent 1b1f26ac3a
commit 6fcd52daa6

View File

@ -3,6 +3,7 @@ from typing import Tuple
from config.object_ids import * from config.object_ids import *
from pus_tc.imtq import ImtqActionIds from pus_tc.imtq import ImtqActionIds
from pus_tc.ploc_mpsoc import PlocReplyIds from pus_tc.ploc_mpsoc import PlocReplyIds
from pus_tc.ploc_supervisor import SupvActionIds
def user_analyze_service_8_data( def user_analyze_service_8_data(
@ -32,6 +33,8 @@ def user_analyze_service_8_data(
return handle_imtq_replies(action_id, custom_data) return handle_imtq_replies(action_id, custom_data)
elif object_id == PLOC_MPSOC_ID: elif object_id == PLOC_MPSOC_ID:
return handle_ploc_replies(action_id, custom_data) return handle_ploc_replies(action_id, custom_data)
elif object_id == PLOC_SUPV_ID:
return handle_supervisor_replies(action_id, custom_data)
else: else:
header_list = [] header_list = []
content_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'] 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]] content_list = [custom_data[:4], custom_data[4:6], custom_data[6:10]]
return header_list, content_list 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