Merge pull request 'More Switch Commands' (#22) from mueller/update-tmtc into develop
Reviewed-on: #22
This commit is contained in:
commit
9cdba610cd
@ -19,7 +19,9 @@ 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()
|
||||
|
||||
get_eive_service_op_code_dict(service_op_code_dict=service_op_code_dict)
|
||||
|
||||
return service_op_code_dict
|
||||
|
||||
def get_json_config_file_path(self) -> str:
|
||||
@ -148,10 +150,14 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||
|
||||
op_code_dict_srv_pdu2 = {
|
||||
"0": ("PDU2 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"1": ("PDU1: Turn ACS Side B on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("PDU1: Turn ACS Side B off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu2OpCodes.PRINT_SWITCH_STATE.value:
|
||||
("PDU2: Print switch states", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
"1": ("PDU2: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"2": ("PDU2: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"3": ("PDU2: Turn SUS redundant on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"4": ("PDU2: Turn SUS redundant off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"5": ("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
"6": ("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||
Pdu1OpCodes.PRINT_SWITCH_STATE.value:
|
||||
("PDU1: Print switch states", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||
}
|
||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||
|
||||
|
@ -83,6 +83,20 @@ def pack_pdu1_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_STATE
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "8":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "9":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Turn SUS nominal off"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
|
||||
if PDU1TestProcedure.all or PDU1TestProcedure.ping:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Ping Test"))
|
||||
|
@ -59,6 +59,27 @@ def pack_pdu2_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str)
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
return tc_queue
|
||||
if op_code == "3":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant on"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.on)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "4":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn SUS redundant off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_4.parameter_address,
|
||||
PDUConfigTable.out_en_4.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "5":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels on"))
|
||||
command = pack_set_param_command(
|
||||
object_id, PDUConfigTable.out_en_2.parameter_address, PDUConfigTable.out_en_2.parameter_size, Channel.on
|
||||
)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == "6":
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Turn reaction wheels off"))
|
||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||
tc_queue.appendleft(command.pack_command_tuple())
|
||||
if op_code == Pdu2OpCodes.PRINT_SWITCH_STATE.value:
|
||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switch Status"))
|
||||
command = generate_action_command(
|
||||
|
Loading…
Reference in New Issue
Block a user