added updates manually
This commit is contained in:
@ -6,37 +6,34 @@
|
||||
"""
|
||||
import struct
|
||||
from typing import Tuple
|
||||
from config.object_ids import ObjectIds
|
||||
from tmtccmd.pus_tm.service_3_housekeeping import Service3Base
|
||||
from tmtccmd.utility.tmtcc_logger import get_logger
|
||||
|
||||
from config.object_ids import TEST_DEVICE_0_OBJ_ID, TEST_DEVICE_1_OBJ_ID
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def service_3_hk_handling(
|
||||
object_id: int, set_id: int, hk_data: bytearray, service3_packet: Service3Base
|
||||
object_id: bytearray, 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: Expects a tuple, consisting of two lists, a bytearray and an integer
|
||||
:param object_id:
|
||||
:param set_id:
|
||||
:param hk_data:
|
||||
:param service3_packet:
|
||||
: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.
|
||||
"""
|
||||
if object_id == ObjectIds.TEST_DEVICE_0.value or \
|
||||
object_id == ObjectIds.TEST_DEVICE_1.value:
|
||||
if set_id:
|
||||
pass
|
||||
if service3_packet:
|
||||
pass
|
||||
if object_id == TEST_DEVICE_0_OBJ_ID or \
|
||||
object_id == TEST_DEVICE_1_OBJ_ID:
|
||||
return handle_test_set_deserialization(hk_data=hk_data)
|
||||
else:
|
||||
LOGGER.info("Service3TM: Parsing for this SID has not been implemented.")
|
||||
|
Reference in New Issue
Block a user