54 lines
1.8 KiB
Python
54 lines
1.8 KiB
Python
"""
|
|
@brief This file transfers control of the object IDs to the user.
|
|
@details Template configuration file. Copy this folder to the TMTC commander root and adapt
|
|
it to your needs.
|
|
"""
|
|
|
|
import enum
|
|
from typing import Dict
|
|
|
|
PUS_SERVICE_17 = bytearray([0x53, 0x00, 0x00, 0x17])
|
|
TEST_DEVICE = bytearray([0x44, 0x00, 0xAF, 0xFE])
|
|
P60_DOCK_HANDLER = bytearray([0x44, 0x00, 0x00, 0x1])
|
|
PDU_1_HANDLER = bytearray([0x44, 0x00, 0x00, 0x2])
|
|
PDU_2_HANDLER = bytearray([0x44, 0x00, 0x00, 0x3])
|
|
ACU_HANDLER = bytearray([0x44, 0x00, 0x00, 0x4])
|
|
TMP_1075_1_HANDLER = bytearray([0x44, 0x00, 0x00, 0x5])
|
|
TMP_1075_2_HANDLER = bytearray([0x44, 0x00, 0x00, 0x6])
|
|
HEATER = bytearray([0x54, 0x00, 0x00, 0x1])
|
|
PCDU_HANDLER = bytearray([0x44, 0x00, 0x10, 0x00])
|
|
SOLAR_ARRAY_DEPLOYMENT = bytearray([0x44, 0x00, 0x10, 0x01])
|
|
|
|
|
|
class ObjectIds(enum.IntEnum):
|
|
from enum import auto
|
|
PUS_SERVICE_17 = 0
|
|
TEST_DEVICE = 1
|
|
P60DOCK_HANDLER_ID = 2
|
|
PDU1_HANDLER_ID = 3
|
|
PDU2_HANDLER_ID = 4
|
|
PCDU_HANDLER = 5
|
|
ACU_HANDLER_ID = 6
|
|
TMP1075_1_HANDLER_ID = 7
|
|
TMP1075_2_HANDLER_ID = 8
|
|
HEATER = 9
|
|
SOLAR_ARRAY_DEPLOYMENT = 10
|
|
|
|
|
|
def set_object_ids() -> Dict[int, bytearray]:
|
|
o_ids = ObjectIds
|
|
object_id_dict = ({
|
|
o_ids.PUS_SERVICE_17: PUS_SERVICE_17,
|
|
o_ids.TEST_DEVICE: TEST_DEVICE,
|
|
o_ids.P60DOCK_HANDLER_ID: P60_DOCK_HANDLER,
|
|
o_ids.PDU1_HANDLER_ID: PDU_1_HANDLER,
|
|
o_ids.PDU2_HANDLER_ID: PDU_2_HANDLER,
|
|
o_ids.ACU_HANDLER_ID: ACU_HANDLER,
|
|
o_ids.TMP1075_1_HANDLER_ID: TMP_1075_1_HANDLER,
|
|
o_ids.TMP1075_2_HANDLER_ID: TMP_1075_2_HANDLER,
|
|
o_ids.HEATER: HEATER,
|
|
o_ids.PCDU_HANDLER: PCDU_HANDLER,
|
|
o_ids.SOLAR_ARRAY_DEPLOYMENT: SOLAR_ARRAY_DEPLOYMENT,
|
|
})
|
|
return object_id_dict
|