api update done
This commit is contained in:
@ -6,6 +6,7 @@
|
||||
import struct
|
||||
|
||||
from config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
||||
|
||||
from tmtccmd.tc import QueueHelper
|
||||
from tmtccmd.tc.pus_3_fsfw_hk import (
|
||||
@ -19,7 +20,7 @@ from gomspace.gomspace_common import Info as GsInfo
|
||||
from config.object_ids import ACU_HANDLER_ID
|
||||
from pus_tc.devs.p60dock import P60DockConfigTable
|
||||
from tmtccmd.tc.pus_8_funccmd import generate_action_command
|
||||
from tmtccmd.utility import ObjectId
|
||||
from tmtccmd.utility import ObjectIdU32
|
||||
|
||||
|
||||
class ACUConfigTable:
|
||||
@ -47,43 +48,37 @@ class Info:
|
||||
TEST = "ACU Test"
|
||||
|
||||
|
||||
def add_acu_cmds(cmd_dict: ServiceOpCodeDictT):
|
||||
op_code_dict = dict()
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
def add_acu_cmds(defs: TmTcDefWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE,
|
||||
info=GsInfo.REQUEST_CORE_HK_ONCE,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.REQUEST_AUX_HK_ONCE,
|
||||
info=GsInfo.REQUEST_AUX_HK_ONCE,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.GET_PARAM,
|
||||
info=GsInfo.GET_PARAMETER,
|
||||
)
|
||||
add_op_code_entry(
|
||||
op_code_dict=op_code_dict,
|
||||
oce.add(
|
||||
keys=GomspaceOpCodes.SET_PARAM,
|
||||
info=GsInfo.SET_PARAMETER,
|
||||
)
|
||||
add_op_code_entry(op_code_dict=op_code_dict, keys=OpCodes.TEST, info=Info.TEST)
|
||||
add_service_op_code_entry(
|
||||
srv_op_code_dict=cmd_dict,
|
||||
op_code_entry=op_code_dict,
|
||||
oce.add(keys=OpCodes.TEST, info=Info.TEST)
|
||||
defs.add_service(
|
||||
name=CustomServiceList.ACU.value,
|
||||
info="ACU Device",
|
||||
op_code_entry=oce,
|
||||
)
|
||||
|
||||
|
||||
def pack_acu_commands(object_id: ObjectId, q: QueueHelper, op_code: str) -> TcQueueT:
|
||||
def pack_acu_commands(object_id: ObjectIdU32, q: QueueHelper, op_code: str):
|
||||
q.add_log_cmd("Handling ACU command")
|
||||
if op_code in GomspaceOpCodes.PRINT_SWITCH_V_I:
|
||||
q.add_log_cmd("ACU: Print channel stats")
|
||||
@ -124,8 +119,6 @@ def pack_acu_commands(object_id: ObjectId, q: QueueHelper, op_code: str) -> TcQu
|
||||
)
|
||||
pack_test_cmds(object_id=object_id, q=q)
|
||||
|
||||
return q
|
||||
|
||||
|
||||
class ACUTestProcedure:
|
||||
"""
|
||||
@ -150,7 +143,7 @@ class ACUTestProcedure:
|
||||
off = False
|
||||
|
||||
|
||||
def pack_test_cmds(object_id: ObjectId, q: QueueHelper):
|
||||
def pack_test_cmds(object_id: ObjectIdU32, q: QueueHelper):
|
||||
if ACUTestProcedure.all or ACUTestProcedure.reboot:
|
||||
q.add_log_cmd("ACU: Reboot")
|
||||
q.add_pus_tc(gs.pack_reboot_command(object_id))
|
||||
|
Reference in New Issue
Block a user