update tmtc code
fsfw/fsfw example hosted/pipeline/head This commit looks good Details

This commit is contained in:
Robin Müller 2021-12-14 16:00:46 +01:00
parent df16de69c0
commit f101352817
No known key found for this signature in database
GPG Key ID: BE6480244DFE612C
10 changed files with 38 additions and 20 deletions

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TMTC PUS 17 Generic" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<configuration default="false" name="PUS Mode Test" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -12,8 +12,8 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-s 17 -o 1 -l" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s 200 -o test -l" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TMTC PUS 17 Ping" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<configuration default="false" name="PUS Ping" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -12,7 +12,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s 17 -o 0 -l" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="PUS 3 One HK" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<configuration default="false" name="PUS Srv3 One HK" type="PythonConfigurationType" factoryName="Python" folderName="PUS">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -12,7 +12,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="-s 3 -o 1 -l" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />

View File

@ -12,7 +12,7 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtccli.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />

View File

@ -1,5 +1,5 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="TMTC Help" type="PythonConfigurationType" factoryName="Python">
<configuration default="false" name="TMTC GUI" type="PythonConfigurationType" factoryName="Python">
<module name="tmtc" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -12,8 +12,8 @@
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtc_client_cli.py" />
<option name="PARAMETERS" value="-h" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/tmtcgui.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />

@ -1 +1 @@
Subproject commit 99ca187b50ad9cd6ee1ba4bcbf9db981bed653ae
Subproject commit aa0dcdae1ac53cac007dff2dce5492a9d687b1e5

@ -1 +1 @@
Subproject commit 38d74744a759a0a89d5edf5155b95728ca96b3d2
Subproject commit 464274a91ce31a28e3493a05089fcdbe0bdf285b

15
tmtc/tmtc_client_cli.py → tmtc/tmtccli.py Executable file → Normal file
View File

@ -32,8 +32,13 @@ from spacepackets.log import set_custom_console_logger_name
from common_tmtc.config.hook_implementation import FsfwHookBase
from common_tmtc.config.definitions import PUS_APID
from common_tmtc.pus_tm.factory_hook import ccsds_tm_handler
try:
from tmtccmd.runner import run_tmtc_commander, initialize_tmtc_commander, add_ccsds_handler
from tmtccmd.runner import (
run_tmtc_commander,
initialize_tmtc_commander,
add_ccsds_handler,
)
from tmtccmd.ccsds.handler import CcsdsTmHandler
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
except ImportError as error:
@ -41,7 +46,9 @@ except ImportError as error:
initialize_tmtc_commander = None
print(error)
print("Python tmtccmd submodule could not be imported")
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
print(
'Install with "cd tmtccmd && python3 -m pip install -e ." for interactive installation'
)
sys.exit(0)
@ -49,7 +56,9 @@ def main():
hook_obj = FsfwHookBase()
initialize_tmtc_commander(hook_object=hook_obj)
ccsds_handler = CcsdsTmHandler()
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
ccsds_handler.add_tm_handler(
apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50
)
add_ccsds_handler(ccsds_handler)
set_custom_console_logger_name(TMTC_LOGGER_NAME)
run_tmtc_commander(use_gui=False, app_name="TMTC Commander FSFW")

@ -1 +1 @@
Subproject commit 4d71822fa1f1cfc16ccd4d0fb750eb2900a263b2
Subproject commit 75fda59ee1beb70a1413a7fa8b0089d8869fee69

View File

@ -31,15 +31,22 @@ import sys
from common_tmtc.config.hook_implementation import FsfwHookBase
from common_tmtc.config.definitions import PUS_APID
from common_tmtc.pus_tm.factory_hook import ccsds_tm_handler
try:
from tmtccmd.runner import run_tmtc_commander, initialize_tmtc_commander, add_ccsds_handler
from tmtccmd.runner import (
run_tmtc_commander,
initialize_tmtc_commander,
add_ccsds_handler,
)
from tmtccmd.ccsds.handler import CcsdsTmHandler
except ImportError as error:
run_tmtc_commander = None
initialize_tmtc_commander = None
print(error)
print("Python tmtccmd submodule could not be imported")
print("Install with \"cd tmtccmd && python3 -m pip install -e .\" for interactive installation")
print(
'Install with "cd tmtccmd && python3 -m pip install -e ." for interactive installation'
)
sys.exit(0)
@ -47,7 +54,9 @@ def main():
hook_obj = FsfwHookBase()
initialize_tmtc_commander(hook_object=hook_obj)
ccsds_handler = CcsdsTmHandler()
ccsds_handler.add_tm_handler(apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50)
ccsds_handler.add_tm_handler(
apid=PUS_APID, pus_tm_handler=ccsds_tm_handler, max_queue_len=50
)
add_ccsds_handler(ccsds_handler)
run_tmtc_commander(use_gui=True, app_name="TMTC Commander FSFW")