eive-tmtc/config/tmtcc_object_ids.py

36 lines
1.2 KiB
Python
Raw Normal View History

2020-12-17 17:50:00 +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
class ObjectIds(enum.Enum):
from enum import auto
PUS_SERVICE_17 = auto()
TEST_DEVICE = auto()
2020-12-29 11:29:03 +01:00
P60DOCK_HANDLER_ID = auto()
PDU1_HANDLER_ID = auto()
PDU2_HANDLER_ID = auto()
ACU_HANDLER_ID = auto()
2021-01-10 11:42:06 +01:00
TMP1075_1_HANDLER_ID = auto()
TMP1075_2_HANDLER_ID = auto()
2020-12-17 17:50:00 +01:00
def set_object_ids(object_id_dict: Dict[ObjectIds, bytearray]):
o_ids = ObjectIds
object_id_dict.update(
{o_ids.PUS_SERVICE_17: bytearray([0x53, 0x00, 0x00, 0x17]),
o_ids.TEST_DEVICE: bytearray([0x44, 0x00, 0xAF, 0xFE]),
2020-12-29 11:29:03 +01:00
o_ids.P60DOCK_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x1]),
o_ids.PDU1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x2]),
o_ids.PDU2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x3]),
o_ids.ACU_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x4]),
2021-01-10 11:42:06 +01:00
o_ids.TMP1075_1_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x5]),
o_ids.TMP1075_2_HANDLER_ID: bytearray([0x44, 0x00, 0x00, 0x6]),
2020-12-17 17:50:00 +01:00
}
)