eive-tmtc/config/object_ids.py
2021-04-11 11:08:52 +02:00

55 lines
1.9 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_ID = bytearray([0x53, 0x00, 0x00, 0x17])
TEST_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE])
P60_DOCK_HANDLER = bytearray([0x44, 0x00, 0x00, 0x1])
PDU_1_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x2])
PDU_2_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x3])
ACU_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x4])
TMP_1075_1_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x5])
TMP_1075_2_HANDLER_ID = bytearray([0x44, 0x00, 0x00, 0x6])
HEATER_ID = bytearray([0x54, 0x00, 0x00, 0x1])
PCDU_HANDLER_ID = bytearray([0x44, 0x00, 0x10, 0x00])
SOLAR_ARRAY_DEPLOYMENT_ID = bytearray([0x44, 0x00, 0x10, 0x01])
PLOC_ID = bytearray([0x44, 0x00, 0x00, 0x15])
class ObjIdIds(enum.IntEnum):
PUS_SERVICE_17_ID = 0
TEST_DEVICE_ID = 1
P60DOCK_HANDLER_ID = 2
PDU1_HANDLER_ID = 3
PDU2_HANDLER_ID = 4
PCDU_HANDLER_ID = 5
ACU_HANDLER_ID = 6
TMP1075_1_HANDLER_ID = 7
TMP1075_2_HANDLER_ID = 8
HEATER_ID = 9
SOLAR_ARRAY_DEPLOYMENT_ID = 10
PLOC_ID = 11
def set_object_ids() -> Dict[int, bytearray]:
object_id_dict = ({
ObjIdIds.PUS_SERVICE_17_ID: PUS_SERVICE_17_ID,
ObjIdIds.TEST_DEVICE_ID: TEST_DEVICE_ID,
ObjIdIds.P60DOCK_HANDLER_ID: P60_DOCK_HANDLER,
ObjIdIds.PDU1_HANDLER_ID: PDU_1_HANDLER_ID,
ObjIdIds.PDU2_HANDLER_ID: PDU_2_HANDLER_ID,
ObjIdIds.ACU_HANDLER_ID: ACU_HANDLER_ID,
ObjIdIds.TMP1075_1_HANDLER_ID: TMP_1075_1_HANDLER_ID,
ObjIdIds.TMP1075_2_HANDLER_ID: TMP_1075_2_HANDLER_ID,
ObjIdIds.HEATER_ID: HEATER_ID,
ObjIdIds.PCDU_HANDLER_ID: PCDU_HANDLER_ID,
ObjIdIds.SOLAR_ARRAY_DEPLOYMENT_ID: SOLAR_ARRAY_DEPLOYMENT_ID,
ObjIdIds.PLOC_ID: PLOC_ID,
})
return object_id_dict