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.
|
|
|
|
"""
|
2022-03-04 11:56:42 +01:00
|
|
|
import os.path
|
2022-05-05 16:15:53 +02:00
|
|
|
from tmtccmd.utility.obj_id import ObjectIdDictT
|
2022-04-04 22:32:15 +02:00
|
|
|
from tmtccmd.fsfw import parse_fsfw_objects_csv
|
2022-04-05 00:51:52 +02:00
|
|
|
from tmtccmd.logging import get_console_logger
|
2022-03-04 11:56:42 +01:00
|
|
|
|
|
|
|
|
2022-03-04 14:27:19 +01:00
|
|
|
LOGGER = get_console_logger()
|
2022-03-04 11:56:42 +01:00
|
|
|
DEFAULT_OBJECTS_CSV_PATH = "config/objects.csv"
|
|
|
|
__OBJECT_ID_DICT = None
|
|
|
|
|
2021-03-19 17:39:52 +01:00
|
|
|
|
2021-09-13 18:06:25 +02:00
|
|
|
# Core Object IDs
|
|
|
|
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
|
2022-03-16 19:20:53 +01:00
|
|
|
SOLAR_ARRAY_DEPLOYMENT_ID = bytes([0x44, 0x41, 0x00, 0xA2])
|
2021-09-13 18:06:25 +02:00
|
|
|
|
|
|
|
# Power Object IDs
|
|
|
|
PCDU_HANDLER_ID = bytes([0x44, 0x20, 0x00, 0xA1])
|
2021-06-24 16:42:58 +02:00
|
|
|
P60_DOCK_HANDLER = bytes([0x44, 0x25, 0x00, 0x00])
|
|
|
|
PDU_1_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x01])
|
|
|
|
PDU_2_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x02])
|
|
|
|
ACU_HANDLER_ID = bytes([0x44, 0x25, 0x00, 0x03])
|
2022-02-03 15:03:02 +01:00
|
|
|
BPX_HANDLER_ID = bytes([0x44, 0x26, 0x00, 0x00])
|
2021-09-13 18:06:25 +02:00
|
|
|
|
|
|
|
# Thermal Object IDs
|
|
|
|
HEATER_ID = bytes([0x44, 0x41, 0x00, 0xA4])
|
2021-06-24 16:42:58 +02:00
|
|
|
TMP_1075_1_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x04])
|
|
|
|
TMP_1075_2_HANDLER_ID = bytes([0x44, 0x42, 0x00, 0x05])
|
2021-09-13 18:06:25 +02:00
|
|
|
|
|
|
|
# Communication Object IDs
|
2021-12-02 09:25:31 +01:00
|
|
|
SYRLINKS_HANDLER_ID = bytes([0x44, 0x53, 0x00, 0xA3])
|
2021-09-13 18:06:25 +02:00
|
|
|
|
|
|
|
# ACS Object IDs
|
|
|
|
MGM_0_HANDLER_ID = bytes([0x44, 0x12, 0x00, 0x06])
|
|
|
|
MGM_1_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x07])
|
|
|
|
MGM_2_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x08])
|
|
|
|
MGM_3_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x09])
|
|
|
|
GYRO_0_HANDLER_ID = bytes([0x44, 0x12, 0x00, 0x10])
|
|
|
|
GYRO_1_HANDLER_ID = bytes([0x44, 0x12, 0x01, 0x11])
|
|
|
|
GYRO_2_HANDLER_ID = bytes([0x44, 0x12, 0x02, 0x12])
|
|
|
|
GYRO_3_HANDLER_ID = bytes([0x44, 0x12, 0x03, 0x13])
|
2021-08-11 19:16:08 +02:00
|
|
|
GPS_HANDLER_0_ID = bytes([0x44, 0x13, 0x00, 0x45])
|
|
|
|
GPS_HANDLER_1_ID = bytes([0x44, 0x13, 0x01, 0x46])
|
2021-08-17 19:48:55 +02:00
|
|
|
RW1_ID = bytes([0x44, 0x12, 0x00, 0x47])
|
|
|
|
RW2_ID = bytes([0x44, 0x12, 0x01, 0x48])
|
|
|
|
RW3_ID = bytes([0x44, 0x12, 0x02, 0x49])
|
|
|
|
RW4_ID = bytes([0x44, 0x12, 0x03, 0x50])
|
2021-09-13 18:06:25 +02:00
|
|
|
IMTQ_HANDLER_ID = bytes([0x44, 0x14, 0x00, 0x14])
|
|
|
|
|
|
|
|
# Misc Object IDs
|
|
|
|
PUS_SERVICE_17_ID = bytes([0x53, 0x00, 0x00, 0x17])
|
|
|
|
TEST_DEVICE_ID = bytes([0x54, 0x00, 0xAF, 0xFE])
|
2021-11-24 15:56:25 +01:00
|
|
|
CCSDS_HANDLER_ID = bytes([0x50, 0x00, 0x08, 0x00])
|
2022-04-27 16:43:38 +02:00
|
|
|
PDEC_HANDLER_ID = bytes([0x50, 0x00, 0x07, 0x00])
|
2021-09-13 18:06:25 +02:00
|
|
|
|
|
|
|
# Payload Object IDs
|
2021-08-16 10:03:40 +02:00
|
|
|
STAR_TRACKER_ID = bytes([0x44, 0x13, 0x00, 0x1])
|
2021-07-01 11:52:25 +02:00
|
|
|
RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
|
2021-07-11 14:29:11 +02:00
|
|
|
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
|
2021-08-31 11:17:01 +02:00
|
|
|
PLOC_MEMORY_DUMPER_ID = bytes([0x44, 0x33, 0x00, 0x01])
|
2021-12-02 08:01:18 +01:00
|
|
|
STR_IMG_HELPER_ID = bytes([0x44, 0x33, 0x00, 0x02])
|
2021-09-13 18:06:25 +02:00
|
|
|
PLOC_MPSOC_ID = bytes([0x44, 0x33, 0x00, 0x15])
|
2022-02-25 19:21:32 +01:00
|
|
|
PL_PCDU_ID = bytes([0x44, 0x30, 0x00, 0x00])
|
2021-07-01 11:52:25 +02:00
|
|
|
|
2022-05-05 14:30:28 +02:00
|
|
|
# Other
|
|
|
|
HEATER_0_OBC_BRD = bytes([0x60, 0x00, 0x00, 0x00])
|
|
|
|
HEATER_1_PLOC_PROC_BRD = bytes([0x60, 0x00, 0x00, 0x01])
|
|
|
|
HEATER_2_ACS_BRD = bytes([0x60, 0x00, 0x00, 0x02])
|
|
|
|
HEATER_3_PCDU_BRD = bytes([0x60, 0x00, 0x00, 0x03])
|
|
|
|
HEATER_4_CAMERA = bytes([0x60, 0x00, 0x00, 0x04])
|
|
|
|
HEATER_5_STR = bytes([0x60, 0x00, 0x00, 0x05])
|
|
|
|
HEATER_6_DRO = bytes([0x60, 0x00, 0x00, 0x06])
|
|
|
|
HEATER_7_HPA = bytes([0x60, 0x00, 0x00, 0x07])
|
|
|
|
|
2022-03-07 10:24:45 +01:00
|
|
|
# System and Assembly Objects
|
|
|
|
ACS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x01])
|
2022-03-22 10:14:22 +01:00
|
|
|
SUS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x02])
|
2022-03-22 19:29:55 +01:00
|
|
|
TCS_BOARD_ASS_ID = bytes([0x73, 0x00, 0x00, 0x03])
|
2022-05-05 01:21:57 +02:00
|
|
|
RW_ASSEMBLY = bytes([0x73, 0x00, 0x00, 0x04])
|
2022-03-07 10:24:45 +01:00
|
|
|
|
2021-03-19 17:39:52 +01:00
|
|
|
|
2022-03-04 11:56:42 +01:00
|
|
|
def get_object_ids() -> ObjectIdDictT:
|
|
|
|
global __OBJECT_ID_DICT
|
2022-03-04 14:27:19 +01:00
|
|
|
if not os.path.exists(DEFAULT_OBJECTS_CSV_PATH):
|
|
|
|
LOGGER.warning(f"No Objects CSV file found at {DEFAULT_OBJECTS_CSV_PATH}")
|
|
|
|
if __OBJECT_ID_DICT is None:
|
|
|
|
if os.path.exists(DEFAULT_OBJECTS_CSV_PATH):
|
|
|
|
__OBJECT_ID_DICT = parse_fsfw_objects_csv(csv_file=DEFAULT_OBJECTS_CSV_PATH)
|
|
|
|
else:
|
|
|
|
__OBJECT_ID_DICT = dict()
|
2022-03-04 11:56:42 +01:00
|
|
|
return __OBJECT_ID_DICT
|