32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
|
from typing import Tuple
|
||
|
from config.tmtcc_object_ids import ObjectIds
|
||
|
|
||
|
|
||
|
def user_analyze_service_8_data(
|
||
|
object_id: ObjectIds, action_id: int, custom_data: bytearray) -> Tuple[list, list]:
|
||
|
"""
|
||
|
This function is called by the TMTC core if a Service 8 data reply (subservice 130)
|
||
|
is received. The user can return a tuple of two lists, where the first list
|
||
|
is a list of header strings to print and the second list is a list of values to print.
|
||
|
The TMTC core will take care of printing both lists and logging them.
|
||
|
|
||
|
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 action_id:
|
||
|
@param custom_data:
|
||
|
@return:
|
||
|
"""
|
||
|
if object_id.value == ObjectIds.PDU2_HANDLER_ID.value:
|
||
|
header_list = ['Housekeeping Table']
|
||
|
content_list = [custom_data]
|
||
|
else:
|
||
|
header_list = []
|
||
|
content_list = []
|
||
|
return header_list, content_list
|