added reboot command

This commit is contained in:
2021-08-03 15:28:28 +02:00
parent 477743f626
commit bc32472d88
46 changed files with 382 additions and 104 deletions

View File

@ -29,3 +29,4 @@ class CustomServiceList(enum.Enum):
REACTION_WHEEL_4 = "reaction_wheel_4"
RAD_SENSOR = "rad_sensor"
PLOC_SUPV = "ploc_supv"
CORE = 'core'

View File

@ -20,16 +20,30 @@ class EiveHookObject(TmTcHookBase):
def get_service_op_code_dictionary(self) -> ServiceOpCodeDictT:
from tmtccmd.config.globals import get_default_service_op_code_dict
service_op_code_dict = get_default_service_op_code_dict()
op_code_dict_srv_acu = {
op_code_dict = {
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
'reboot_self': ('Reboot Self', {OpCodeDictKeys.TIMEOUT: 4.0}),
'reboot_0_0': ('Reboot 0 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
'reboot_0_1': ('Reboot 0 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
'reboot_1_0': ('Reboot 1 0', {OpCodeDictKeys.TIMEOUT: 4.0}),
'reboot_1_1': ('Reboot 1 1', {OpCodeDictKeys.TIMEOUT: 4.0}),
}
service_tuple = ('Core Controller', op_code_dict)
service_op_code_dict[CustomServiceList.CORE.value] = service_tuple
op_code_dict = {
"0": ("ACU Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
}
service_acu_tuple = ("ACU Devices", op_code_dict_srv_acu)
service_tuple = ("ACU Devices", op_code_dict)
service_op_code_dict[CustomServiceList.ACU.value] = service_tuple
op_code_dict_srv_tmp1075 = {
op_code_dict = {
"0": ("TMP1075 Tests", {OpCodeDictKeys.TIMEOUT: 2.2}),
}
service_tmp1075_1_tuple = ("TMP1075 1", op_code_dict_srv_tmp1075)
service_tmp1075_2_tuple = ("TMP1075 2", op_code_dict_srv_tmp1075)
service_tuple = ("TMP1075 1", op_code_dict)
service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tuple
service_tuple = ("TMP1075 2", op_code_dict)
service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tuple
op_code_dict_srv_p60 = {
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
@ -120,9 +134,6 @@ class EiveHookObject(TmTcHookBase):
}
service_ploc_supv_tuple = ("PLOC Supervisor", op_code_dict_srv_ploc_supv)
service_op_code_dict[CustomServiceList.ACU.value] = service_acu_tuple
service_op_code_dict[CustomServiceList.TMP1075_1.value] = service_tmp1075_1_tuple
service_op_code_dict[CustomServiceList.TMP1075_2.value] = service_tmp1075_2_tuple
service_op_code_dict[CustomServiceList.P60DOCK.value] = service_p60_tuple
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu1_tuple
service_op_code_dict[CustomServiceList.PDU1.value] = service_pdu2_tuple

View File

@ -26,6 +26,7 @@ RW4_ID = bytes([0x44, 0x12, 0x00, 0x4])
START_TRACKER_ID = bytes([0x44, 0x13, 0x00, 0x1])
RAD_SENSOR_ID = bytes([0x44, 0x32, 0x00, 0xA5])
PLOC_SUPV_ID = bytes([0x44, 0x33, 0x00, 0x16])
CORE_CONTROLLER_ID = bytes([0x43, 0x00, 0x00, 0x03])
def get_object_ids() -> Dict[bytes, list]:
@ -47,5 +48,6 @@ def get_object_ids() -> Dict[bytes, list]:
RW4_ID: "Reaction Wheel 4",
RAD_SENSOR_ID: "Radiation Sensor",
PLOC_SUPV_ID: "PLOC Supervisor",
CORE_CONTROLLER_ID: "Core Controller",
})
return object_id_dict