p60 print command
This commit is contained in:
parent
f3a2e755fd
commit
53bf650838
@ -90,7 +90,8 @@ class EiveHookObject(TmTcHookBase):
|
|||||||
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
||||||
from pus_tc.pdu1 import Pdu1OpCodes
|
from pus_tc.pdu1 import Pdu1OpCodes
|
||||||
from pus_tc.pdu2 import Pdu2OpCodes
|
from pus_tc.pdu2 import Pdu2OpCodes
|
||||||
from gomspace.gomspace_common import PduOpCodes
|
from pus_tc.p60dock import P60OpCodes
|
||||||
|
from gomspace.gomspace_common import GomspaceOpCodes
|
||||||
from pus_tc.gps import GpsOpCodes
|
from pus_tc.gps import GpsOpCodes
|
||||||
op_code_dict = {
|
op_code_dict = {
|
||||||
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
|
'reboot': ('Reboot with Prompt', {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
@ -126,8 +127,12 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
|||||||
|
|
||||||
op_code_dict_srv_p60 = {
|
op_code_dict_srv_p60 = {
|
||||||
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
"0": ("P60 Tests", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
"1": ("P60 Dock: Turn stack 3V3 on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
P60OpCodes.STACK_3V3_ON.value:
|
||||||
"2": ("P60 Dock: Turn stack 3V3 off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("P60 Dock: Turn stack 3V3 on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
P60OpCodes.STACK_3V3_OFF.value:
|
||||||
|
("P60 Dock: Turn stack 3V3 off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
|
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
|
("P60 Dock: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
}
|
}
|
||||||
service_p60_tuple = ("P60 Device", op_code_dict_srv_p60)
|
service_p60_tuple = ("P60 Device", op_code_dict_srv_p60)
|
||||||
|
|
||||||
@ -146,8 +151,8 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
|||||||
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn ACS Side A on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
Pdu1OpCodes.ACS_A_SIDE_OFF.value:
|
||||||
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU1: Turn ACS Side A off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
PduOpCodes.PRINT_HK_TABLE.value:
|
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
("PDU1: Print Info", {OpCodeDictKeys.TIMEOUT: 2.0})
|
("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||||
}
|
}
|
||||||
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
service_pdu1_tuple = ("PDU1 Device", op_code_dict_srv_pdu1)
|
||||||
|
|
||||||
@ -165,8 +170,8 @@ def get_eive_service_op_code_dict(service_op_code_dict: ServiceOpCodeDictT):
|
|||||||
("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn reaction wheels on", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
Pdu2OpCodes.RW_OFF.value:
|
Pdu2OpCodes.RW_OFF.value:
|
||||||
("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
("PDU2: Turn reaction wheels off", {OpCodeDictKeys.TIMEOUT: 2.0}),
|
||||||
PduOpCodes.PRINT_HK_TABLE.value:
|
GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
("PDU1: Print Info", {OpCodeDictKeys.TIMEOUT: 2.0})
|
("PDU1: Print Switches, Voltages, Currents", {OpCodeDictKeys.TIMEOUT: 2.0})
|
||||||
}
|
}
|
||||||
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
service_pdu2_tuple = ("PDU2 Device", op_code_dict_srv_pdu2)
|
||||||
|
|
||||||
|
@ -19,11 +19,11 @@ class GomspaceDeviceActionIds(enum.IntEnum):
|
|||||||
PARAM_SET = 255
|
PARAM_SET = 255
|
||||||
WDT_RESET = 9
|
WDT_RESET = 9
|
||||||
REQUEST_HK_TABLE = 16
|
REQUEST_HK_TABLE = 16
|
||||||
PRINT_HK_TABLE = 32
|
PRINT_SWITCH_V_I = 32
|
||||||
|
|
||||||
|
|
||||||
class PduOpCodes(enum.Enum):
|
class GomspaceOpCodes(enum.Enum):
|
||||||
PRINT_HK_TABLE = "32"
|
PRINT_SWITCH_V_I = "32"
|
||||||
|
|
||||||
|
|
||||||
class TableIds:
|
class TableIds:
|
||||||
|
@ -7,10 +7,15 @@
|
|||||||
"""
|
"""
|
||||||
from tmtccmd.config.definitions import QueueCommands
|
from tmtccmd.config.definitions import QueueCommands
|
||||||
from tmtccmd.tc.packer import TcQueueT
|
from tmtccmd.tc.packer import TcQueueT
|
||||||
from tmtccmd.ecss.tc import PusTelecommand
|
|
||||||
from gomspace.gomspace_common import *
|
from gomspace.gomspace_common import *
|
||||||
|
|
||||||
|
|
||||||
|
class P60OpCodes(enum.Enum):
|
||||||
|
TEST = "0"
|
||||||
|
STACK_3V3_ON = "1"
|
||||||
|
STACK_3V3_OFF = "2"
|
||||||
|
|
||||||
|
|
||||||
class P60DockTestProcedure:
|
class P60DockTestProcedure:
|
||||||
"""
|
"""
|
||||||
@brief Use this class to define the tests to perform for the P60Dock.
|
@brief Use this class to define the tests to perform for the P60Dock.
|
||||||
@ -57,27 +62,30 @@ class P60DockHkTable:
|
|||||||
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
wdt_gnd_left = TableEntry(bytearray([0x00, 0xA8]), TableEntry.uint32_size)
|
||||||
|
|
||||||
|
|
||||||
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -> TcQueueT:
|
def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
||||||
|
if op_code == P60OpCodes.STACK_3V3_ON.value:
|
||||||
if op_code == "1":
|
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on"))
|
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 on"))
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||||
P60DockConfigTable.out_en_9.parameter_size, Channel.on
|
P60DockConfigTable.out_en_9.parameter_size, Channel.on
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
return tc_queue
|
return
|
||||||
if op_code == "2":
|
if op_code == P60OpCodes.STACK_3V3_OFF.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off"))
|
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Turning stack 3V3 off"))
|
||||||
command = pack_set_param_command(
|
command = pack_set_param_command(
|
||||||
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
object_id, P60DockConfigTable.out_en_9.parameter_address,
|
||||||
P60DockConfigTable.out_en_9.parameter_size, Channel.off
|
P60DockConfigTable.out_en_9.parameter_size, Channel.off
|
||||||
)
|
)
|
||||||
# command = PusTelecommand(service=8, subservice=128, ssc=20, app_data=command)
|
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
return tc_queue
|
return
|
||||||
|
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
|
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents"))
|
||||||
|
command = generate_action_command(
|
||||||
|
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
|
)
|
||||||
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
return
|
||||||
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
if P60DockTestProcedure.all or P60DockTestProcedure.reboot:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Reboot"))
|
||||||
command = pack_reboot_command(object_id)
|
command = pack_reboot_command(object_id)
|
||||||
|
@ -91,10 +91,10 @@ def pack_pdu1_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str):
|
|||||||
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
PDUConfigTable.out_en_4.parameter_size, Channel.off
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU1: Print Switches, Voltages, Currents"))
|
||||||
command = generate_action_command(
|
command = generate_action_command(
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
@ -84,10 +84,10 @@ def pack_pdu2_commands(object_id: bytearray, tc_queue: TcQueueT, op_code: str) -
|
|||||||
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
command = pack_set_param_command(object_id, PDUConfigTable.out_en_2.parameter_address,
|
||||||
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
PDUConfigTable.out_en_2.parameter_size, Channel.off)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
if op_code == PduOpCodes.PRINT_HK_TABLE.value:
|
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
|
||||||
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Info"))
|
tc_queue.appendleft((QueueCommands.PRINT, "PDU2: Print Switches, Currents, Voltahes"))
|
||||||
command = generate_action_command(
|
command = generate_action_command(
|
||||||
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_HK_TABLE
|
object_id=object_id, action_id=GomspaceDeviceActionIds.PRINT_SWITCH_V_I
|
||||||
)
|
)
|
||||||
tc_queue.appendleft(command.pack_command_tuple())
|
tc_queue.appendleft(command.pack_command_tuple())
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user