now only arg param to proc conversion missing
This commit is contained in:
parent
0e27436284
commit
27c1002d25
23
common.py
23
common.py
@ -68,13 +68,7 @@ from examples.tmtcc import (
|
||||
CFDP_LOCAL_ENTITY_ID,
|
||||
CFDP_REMOTE_ENTITY_ID,
|
||||
)
|
||||
from tmtccmd import (
|
||||
TcHandlerBase,
|
||||
get_console_logger,
|
||||
TmTcCfgHookBase,
|
||||
BackendBase,
|
||||
DefProcedureParams,
|
||||
)
|
||||
from tmtccmd import TcHandlerBase, get_console_logger, TmTcCfgHookBase, BackendBase
|
||||
from tmtccmd.pus import VerificationWrapper
|
||||
from tmtccmd.tc import (
|
||||
ProcedureHelper,
|
||||
@ -415,9 +409,7 @@ class TcHandler(TcHandlerBase):
|
||||
)
|
||||
|
||||
|
||||
def setup_params(
|
||||
hook_obj: TmTcCfgHookBase, proc_param_wrapper: ProcedureParamsWrapper
|
||||
) -> SetupWrapper:
|
||||
def setup_params(hook_obj: TmTcCfgHookBase) -> SetupWrapper:
|
||||
print(f"-- eive TMTC Commander --")
|
||||
print(f"-- spacepackets v{spacepackets.__version__} --")
|
||||
params = SetupParams()
|
||||
@ -428,12 +420,15 @@ def setup_params(
|
||||
post_arg_parsing_wrapper = parser_wrapper.parse(hook_obj)
|
||||
tmtccmd.init_printout(post_arg_parsing_wrapper.use_gui)
|
||||
use_prompts = not post_arg_parsing_wrapper.use_gui
|
||||
proc_param_wrapper = ProcedureParamsWrapper()
|
||||
if use_prompts:
|
||||
post_arg_parsing_wrapper.set_params_with_prompts(params, proc_param_wrapper)
|
||||
else:
|
||||
post_arg_parsing_wrapper.set_params_without_prompts(params, proc_param_wrapper)
|
||||
params.apid = EXAMPLE_PUS_APID
|
||||
setup_wrapper = SetupWrapper(hook_obj=hook_obj, setup_params=params)
|
||||
setup_wrapper = SetupWrapper(
|
||||
hook_obj=hook_obj, setup_params=params, proc_param_wrapper=proc_param_wrapper
|
||||
)
|
||||
return setup_wrapper
|
||||
|
||||
|
||||
@ -496,8 +491,12 @@ def setup_backend(
|
||||
tc_handler: TcHandler,
|
||||
ccsds_handler: CcsdsTmHandler,
|
||||
) -> BackendBase:
|
||||
# TODO: Convert procedure params to procedure
|
||||
tmtc_backend = tmtccmd.create_default_tmtc_backend(
|
||||
setup_wrapper=setup_wrapper, tm_handler=ccsds_handler, tc_handler=tc_handler
|
||||
setup_wrapper=setup_wrapper,
|
||||
tm_handler=ccsds_handler,
|
||||
tc_handler=tc_handler,
|
||||
init_procedure=None,
|
||||
)
|
||||
tmtccmd.start(tmtc_backend=tmtc_backend, hook_obj=setup_wrapper.hook_obj)
|
||||
return tmtc_backend
|
||||
|
Loading…
x
Reference in New Issue
Block a user