new send_cb argument
This commit is contained in:
parent
350afc7ee7
commit
2482a79db7
2
deps/tmtccmd
vendored
2
deps/tmtccmd
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 7ba0dd3bc5a328a7445c40cf801f587624b46652
|
Subproject commit 5627f6c99f7a277d514f7b48e540f575c08031b6
|
9
tmtcc.py
9
tmtcc.py
@ -4,6 +4,8 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
from tmtccmd.tc.handler import SendCbParams
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import spacepackets
|
import spacepackets
|
||||||
except ImportError as error:
|
except ImportError as error:
|
||||||
@ -26,7 +28,6 @@ except ImportError as error:
|
|||||||
|
|
||||||
from spacepackets.ecss import PusVerificator
|
from spacepackets.ecss import PusVerificator
|
||||||
from tmtccmd import get_console_logger, TcHandlerBase, BackendBase
|
from tmtccmd import get_console_logger, TcHandlerBase, BackendBase
|
||||||
from tmtccmd.com_if import ComInterface
|
|
||||||
from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider
|
from tmtccmd.util import FileSeqCountProvider, PusFileSeqCountProvider
|
||||||
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
from tmtccmd.util.tmtc_printer import FsfwTmTcPrinter
|
||||||
|
|
||||||
@ -43,7 +44,6 @@ from tmtccmd.tc import (
|
|||||||
ProcedureHelper,
|
ProcedureHelper,
|
||||||
FeedWrapper,
|
FeedWrapper,
|
||||||
TcProcedureType,
|
TcProcedureType,
|
||||||
QueueEntryHelper,
|
|
||||||
TcQueueEntryType,
|
TcQueueEntryType,
|
||||||
)
|
)
|
||||||
from tmtccmd.config import default_json_path, SetupWrapper
|
from tmtccmd.config import default_json_path, SetupWrapper
|
||||||
@ -101,7 +101,8 @@ class TcHandler(TcHandlerBase):
|
|||||||
if info.proc_type == TcProcedureType.DEFAULT:
|
if info.proc_type == TcProcedureType.DEFAULT:
|
||||||
handle_default_procedure(info.to_def_procedure(), wrapper, self.gui)
|
handle_default_procedure(info.to_def_procedure(), wrapper, self.gui)
|
||||||
|
|
||||||
def send_cb(self, entry_helper: QueueEntryHelper, com_if: ComInterface):
|
def send_cb(self, send_params: SendCbParams):
|
||||||
|
entry_helper = send_params.entry
|
||||||
if entry_helper.is_tc:
|
if entry_helper.is_tc:
|
||||||
if entry_helper.entry_type == TcQueueEntryType.PUS_TC:
|
if entry_helper.entry_type == TcQueueEntryType.PUS_TC:
|
||||||
pus_tc_wrapper = entry_helper.to_pus_tc_entry()
|
pus_tc_wrapper = entry_helper.to_pus_tc_entry()
|
||||||
@ -118,7 +119,7 @@ class TcHandler(TcHandlerBase):
|
|||||||
self.file_logger.info(
|
self.file_logger.info(
|
||||||
f"{get_current_time_string(True)}: {tc_info_string}"
|
f"{get_current_time_string(True)}: {tc_info_string}"
|
||||||
)
|
)
|
||||||
com_if.send(raw_tc)
|
send_params.com_if.send(raw_tc)
|
||||||
elif entry_helper.entry_type == TcQueueEntryType.LOG:
|
elif entry_helper.entry_type == TcQueueEntryType.LOG:
|
||||||
log_entry = entry_helper.to_log_entry()
|
log_entry = entry_helper.to_log_entry()
|
||||||
LOGGER.info(log_entry.log_str)
|
LOGGER.info(log_entry.log_str)
|
||||||
|
Loading…
Reference in New Issue
Block a user