added commands to request HKs from GOmSpace devices

This commit is contained in:
2022-03-14 10:03:50 +01:00
parent 3f1ee29d1f
commit 7898dc2c16
8 changed files with 80 additions and 45 deletions

View File

@ -7,7 +7,9 @@
"""
from tmtccmd.config.definitions import QueueCommands
from tmtccmd.tc.packer import TcQueueT
from tmtccmd.tc.service_3_housekeeping import generate_one_hk_command, make_sid
from gomspace.gomspace_common import *
from config.object_ids import P60_DOCK_HANDLER
class P60OpCodes(enum.Enum):
@ -110,6 +112,11 @@ def pack_p60dock_test_into(object_id: bytearray, tc_queue: TcQueueT, op_code: st
Channel.off,
)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.REQUEST_HK_ONCE.value:
tc_queue.appendleft((QueueCommands.PRINT, "P60 Dock: Requesting HK Table Once"))
hk_sid = make_sid(object_id=P60_DOCK_HANDLER, set_id=SetIds.P60_DOCK)
command = generate_one_hk_command(sid=hk_sid, ssc=0)
tc_queue.appendleft(command.pack_command_tuple())
if op_code == GomspaceOpCodes.PRINT_SWITCH_V_I.value:
tc_queue.appendleft(
(QueueCommands.PRINT, "P60 Dock: Print Switches, Voltages, Currents")