fixed merge conflicts
This commit is contained in:
commit
cf572c311c
@ -16,11 +16,12 @@ class ObjectIds(enum.Enum):
|
||||
P60DOCK_HANDLER_ID = auto()
|
||||
PDU1_HANDLER_ID = auto()
|
||||
PDU2_HANDLER_ID = auto()
|
||||
PCDU_HANDLER = auto()
|
||||
ACU_HANDLER_ID = auto()
|
||||
TMP1075_1_HANDLER_ID = auto()
|
||||
TMP1075_2_HANDLER_ID = auto()
|
||||
HEATER = auto()
|
||||
SOLAR_ARRAY_DEPLOYMENT_HANDLER = auto()
|
||||
SOLAR_ARRAY_DEPLOYMENT = auto()
|
||||
SYRLINKS_HK_HANDLER = auto()
|
||||
|
||||
|
||||
@ -35,8 +36,9 @@ def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
|
||||
o_ids.ACU_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x4]),
|
||||
o_ids.TMP1075_1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x5]),
|
||||
o_ids.TMP1075_2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x6]),
|
||||
o_ids.HEATER: bytearray([0x54, 0x00, 0x00, 0x3]),
|
||||
o_ids.SOLAR_ARRAY_DEPLOYMENT_HANDLER: bytearray([0x44, 0x00, 0x00, 0x8]),
|
||||
o_ids.HEATER: bytearray([0x54, 0x00, 0x00, 0x1]),
|
||||
o_ids.PCDU_HANDLER: bytearray([0x44, 0x00, 0x10, 0x00]),
|
||||
o_ids.SOLAR_ARRAY_DEPLOYMENT: bytearray([0x44, 0x00, 0x10, 0x01]),
|
||||
o_ids.SYRLINKS_HK_HANDLER: bytearray([0x44, 0x00, 0x00, 0x9]),
|
||||
o_ids.INVALID: bytearray([0xFF, 0xFF, 0xFF, 0xFF]),
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
@file tmtcc_tc_p60dock.py
|
||||
@brief P60 Dock tests
|
||||
@file tmtcc_tc_syrlinks_hk_handler.py
|
||||
@brief Syrlinks Hk Handler tests
|
||||
@author J. Meier
|
||||
@date 13.12.2020
|
||||
"""
|
||||
@ -9,7 +9,7 @@
|
||||
from tmtc_core.core.tmtc_core_definitions import QueueCommands
|
||||
from tmtc_core.pus_tc.tmtcc_pus_tc_packer import TcQueueT
|
||||
from tmtc_core.pus_tc.tmtcc_pus_tc_base import PusTelecommand
|
||||
from tmtc_core.pus_tc.tmtcc_tc_service_3_housekeeping import *
|
||||
from tmtc_core.pus_tc.tmtcc_tm_service3_base import *
|
||||
|
||||
|
||||
class SetIds:
|
@ -7,31 +7,44 @@
|
||||
import struct
|
||||
from typing import Tuple
|
||||
|
||||
from tmtc_core.pus_tm.tmtcc_pus_service_3 import Service3Base
|
||||
from config.tmtcc_object_ids import ObjectIds
|
||||
from tmtc_core.pus_tm.tmtcc_tm_service3_base import Service3Base
|
||||
from tmtc_core.utility.tmtcc_logger import get_logger
|
||||
from config.tmtcc_object_ids import ObjectIds
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
||||
|
||||
def handle_user_hk_packet(
|
||||
object_id: bytearray, hk_data: bytearray,
|
||||
service3_packet: Service3Base) -> Tuple[list, list, bytearray]:
|
||||
def handle_user_hk_packet(object_id: ObjectIds, 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:
|
||||
@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.SYRLINKS_HK_HANDLER.value:
|
||||
if set_id ==
|
||||
return handle_syrlinks_hk_data(hk_data)
|
||||
else:
|
||||
LOGGER.info("Service 3 TM: Parsing for this SID has not been implemented.")
|
||||
return [], [], bytearray(), 0
|
||||
|
||||
|
||||
def handle_syrlinks_hk_data(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
def handle_syrlinks_rx_registers_dataset(hk_data: bytearray) -> Tuple[list, list, bytearray, int]:
|
||||
hk_header = []
|
||||
hk_content = []
|
||||
validity_buffer = bytearray()
|
||||
@ -49,4 +62,3 @@ def handle_syrlinks_hk_data(hk_data: bytearray) -> Tuple[list, list, bytearray,
|
||||
rx_data_rate]
|
||||
validity_buffer.append(hk_data[26:])
|
||||
return hk_header, hk_content, validity_buffer, 8
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 4b41bf458e9e724ad395afac537cad98adcba187
|
||||
Subproject commit c51a2ba18817c0dc7053ee6d7e15a00ef344b0ab
|
Loading…
x
Reference in New Issue
Block a user