getting complicated
This commit is contained in:
parent
061d62579b
commit
c4dcf0df76
18
common.py
18
common.py
@ -33,6 +33,7 @@ from tmtccmd.cfdp.user import (
|
||||
TransactionFinishedParams,
|
||||
)
|
||||
from tmtccmd.config.args import ProcedureParamsWrapper
|
||||
from tmtccmd.core import BackendState
|
||||
from tmtccmd.logging import get_current_time_string
|
||||
from tmtccmd.pus.pus_11_tc_sched import Subservices as Pus11Subservices
|
||||
from tmtccmd.tc.queue import DefaultPusQueueHelper
|
||||
@ -68,7 +69,13 @@ from examples.tmtcc import (
|
||||
CFDP_LOCAL_ENTITY_ID,
|
||||
CFDP_REMOTE_ENTITY_ID,
|
||||
)
|
||||
from tmtccmd import TcHandlerBase, get_console_logger, TmTcCfgHookBase, BackendBase
|
||||
from tmtccmd import (
|
||||
TcHandlerBase,
|
||||
get_console_logger,
|
||||
TmTcCfgHookBase,
|
||||
BackendBase,
|
||||
CcsdsTmtcBackend,
|
||||
)
|
||||
from tmtccmd.pus import VerificationWrapper
|
||||
from tmtccmd.tc import (
|
||||
ProcedureWrapper,
|
||||
@ -455,9 +462,7 @@ class TcHandler(TcHandlerBase):
|
||||
pdu_holder,
|
||||
packet,
|
||||
) = self.cfdp_in_ccsds_wrapper.pull_next_source_packet()
|
||||
self.queue_helper.add_log_cmd(
|
||||
f"CFDP Source: Sending EOF PDU"
|
||||
)
|
||||
self.queue_helper.add_log_cmd(f"CFDP Source: Sending EOF PDU")
|
||||
self.queue_helper.add_ccsds_tc(packet)
|
||||
|
||||
self.cfdp_in_ccsds_wrapper.confirm_source_packet_sent()
|
||||
@ -502,6 +507,7 @@ class TcHandler(TcHandlerBase):
|
||||
elif info.proc_type == TcProcedureType.CFDP:
|
||||
LOGGER.info(f"Finished CFDP queue")
|
||||
|
||||
|
||||
def setup_params(hook_obj: TmTcCfgHookBase) -> SetupWrapper:
|
||||
print(f"-- eive TMTC Commander --")
|
||||
print(f"-- spacepackets v{spacepackets.__version__} --")
|
||||
@ -583,7 +589,7 @@ def setup_backend(
|
||||
setup_wrapper: SetupWrapper,
|
||||
tc_handler: TcHandler,
|
||||
ccsds_handler: CcsdsTmHandler,
|
||||
) -> BackendBase:
|
||||
) -> CcsdsTmtcBackend:
|
||||
init_proc = params_to_procedure_conversion(setup_wrapper.proc_param_wrapper)
|
||||
tmtc_backend = tmtccmd.create_default_tmtc_backend(
|
||||
setup_wrapper=setup_wrapper,
|
||||
@ -592,4 +598,4 @@ def setup_backend(
|
||||
init_procedure=init_proc.base,
|
||||
)
|
||||
tmtccmd.start(tmtc_backend=tmtc_backend, hook_obj=setup_wrapper.hook_obj)
|
||||
return tmtc_backend
|
||||
return cast(CcsdsTmtcBackend, tmtc_backend)
|
||||
|
Loading…
x
Reference in New Issue
Block a user