eive-tmtc/config/object_ids.py

55 lines
1.9 KiB
Python
Raw Normal View History

2021-03-19 17:39:52 +01:00
"""
@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
2021-03-19 18:03:41 +01:00
PUS_SERVICE_17_ID = bytearray([0x53, 0x00, 0x00, 0x17])
TEST_DEVICE_ID = bytearray([0x44, 0x00, 0xAF, 0xFE])
2021-03-19 17:39:52 +01:00
P60_DOCK_HANDLER = bytearray([0x44, 0x00, 0x00, 0x1])
2021-03-19 18:03:41 +01:00
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])
2021-04-11 11:08:52 +02:00
PLOC_ID = bytearray([0x44, 0x00, 0x00, 0x15])
2021-03-19 17:39:52 +01:00
2021-03-19 18:03:41 +01:00
class ObjIdIds(enum.IntEnum):
2021-03-19 18:01:17 +01:00
PUS_SERVICE_17_ID = 0
TEST_DEVICE_ID = 1
2021-03-19 17:39:52 +01:00
P60DOCK_HANDLER_ID = 2
PDU1_HANDLER_ID = 3
PDU2_HANDLER_ID = 4
2021-03-19 18:01:17 +01:00
PCDU_HANDLER_ID = 5
2021-03-19 17:39:52 +01:00
ACU_HANDLER_ID = 6
TMP1075_1_HANDLER_ID = 7
TMP1075_2_HANDLER_ID = 8
2021-03-19 18:01:17 +01:00
HEATER_ID = 9
SOLAR_ARRAY_DEPLOYMENT_ID = 10
2021-04-11 11:08:52 +02:00
PLOC_ID = 11
2021-03-19 17:39:52 +01:00
def set_object_ids() -> Dict[int, bytearray]:
object_id_dict = ({
2021-03-19 18:03:41 +01:00
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,
2021-04-11 11:08:52 +02:00
ObjIdIds.PLOC_ID: PLOC_ID,
2021-03-19 17:39:52 +01:00
})
return object_id_dict