use new decorator to add tmtc definitions now
This commit is contained in:
@ -8,15 +8,15 @@ from pus_tc.devs.common_power import (
|
||||
PowerInfo,
|
||||
)
|
||||
from config.definitions import CustomServiceList
|
||||
from tmtccmd.config import TmTcDefWrapper, OpCodeEntry
|
||||
from tmtccmd.config import TmtcDefinitionWrapper, OpCodeEntry
|
||||
|
||||
from pus_tc.devs.p60dock import P60OpCodes, GomspaceOpCodes, P60Info
|
||||
from pus_tc.devs.acu import add_acu_cmds
|
||||
from tmtccmd.config.tmtc import register_tmtc_definitions
|
||||
from tmtccmd.config.tmtc import tmtc_definitions_provider
|
||||
|
||||
|
||||
@register_tmtc_definitions
|
||||
def add_p60_cmds(defs: TmTcDefWrapper):
|
||||
@tmtc_definitions_provider
|
||||
def add_p60_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
oce.add(keys=P60OpCodes.STACK_3V3_ON, info=P60Info.STACK_3V3_ON)
|
||||
oce.add(keys=P60OpCodes.STACK_3V3_OFF, info=P60Info.STACK_3V3_OFF)
|
||||
@ -35,8 +35,8 @@ def add_p60_cmds(defs: TmTcDefWrapper):
|
||||
)
|
||||
|
||||
|
||||
@register_tmtc_definitions
|
||||
def add_power_cmd_defs(defs: TmTcDefWrapper):
|
||||
@tmtc_definitions_provider
|
||||
def add_power_cmd_defs(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu1_common_defs(oce)
|
||||
add_pdu2_common_defs(oce)
|
||||
@ -50,8 +50,8 @@ def add_power_cmd_defs(defs: TmTcDefWrapper):
|
||||
)
|
||||
|
||||
|
||||
@register_tmtc_definitions
|
||||
def add_pdu1_cmds(defs: TmTcDefWrapper):
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu1_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu1_common_defs(oce)
|
||||
oce.add(keys=GomspaceOpCodes.REQUEST_CORE_HK_ONCE, info=GsInfo.REQUEST_CORE_HK_ONCE)
|
||||
@ -69,8 +69,8 @@ def add_pdu1_cmds(defs: TmTcDefWrapper):
|
||||
)
|
||||
|
||||
|
||||
@register_tmtc_definitions
|
||||
def add_pdu2_cmds(defs: TmTcDefWrapper):
|
||||
@tmtc_definitions_provider
|
||||
def add_pdu2_cmds(defs: TmtcDefinitionWrapper):
|
||||
oce = OpCodeEntry()
|
||||
add_pdu2_common_defs(oce)
|
||||
oce.add(
|
||||
@ -96,8 +96,7 @@ def add_pdu2_cmds(defs: TmTcDefWrapper):
|
||||
)
|
||||
|
||||
|
||||
@register_tmtc_definitions
|
||||
def add_pcdu_cmds(defs: TmTcDefWrapper):
|
||||
def add_pcdu_cmds(defs: TmtcDefinitionWrapper):
|
||||
add_p60_cmds(defs)
|
||||
add_pdu1_cmds(defs)
|
||||
add_pdu2_cmds(defs)
|
||||
|
Reference in New Issue
Block a user