update tmtc python program
Some checks failed
fsfw/fsfw example hosted/pipeline/head There was a failure building this commit
Some checks failed
fsfw/fsfw example hosted/pipeline/head There was a failure building this commit
This commit is contained in:
parent
0a923a38a6
commit
044d56e96a
@ -5,7 +5,7 @@
|
||||
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" />
|
||||
<configuration PROFILE_NAME="Debug Linux" ENABLED="false" GENERATION_DIR="cmake-build-debug" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DFSFW_OSAL=linux" />
|
||||
<configuration PROFILE_NAME="Release" ENABLED="true" CONFIG_NAME="Release" />
|
||||
<configuration PROFILE_NAME="Debug Clang" ENABLED="true" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=cmake/ClangToolchain.cmake" />
|
||||
<configuration PROFILE_NAME="Debug Clang" ENABLED="false" CONFIG_NAME="Debug" GENERATION_OPTIONS="-DCMAKE_TOOLCHAIN_FILE=cmake/ClangToolchain.cmake" />
|
||||
</configurations>
|
||||
</component>
|
||||
</project>
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 576414438c81b43d18ac0472c4baa8bc545f8d3f
|
||||
Subproject commit 64e7d4bb5e61c5ce2ece0bedddaffde086d7fe99
|
@ -15,7 +15,7 @@
|
||||
<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" />
|
||||
<option name="EMULATE_TERMINAL" value="true" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 59a80fed91f2ba9cc7918f7aa32f475f27b0738c
|
||||
Subproject commit d30889992044602b316212a2d6dc378ac8c4a114
|
6
tmtc/tmtc_conf.json
Normal file
6
tmtc/tmtc_conf.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"com_if": "tcp",
|
||||
"tcpip_tcp_ip_addr": "127.0.0.1",
|
||||
"tcpip_tcp_port": 7301,
|
||||
"tcpip_tcp_recv_max_size": 1500
|
||||
}
|
@ -1,67 +1,20 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
@brief TMTC Commander entry point for command line mode.
|
||||
@details
|
||||
This client was developed by KSat for the SOURCE project to test the on-board software but
|
||||
has evolved into a more generic tool for satellite developers to perform TMTC (Telemetry and Telecommand)
|
||||
handling and testing via different communication interfaces. Currently, only the PUS standard is
|
||||
implemented as a packet standard.
|
||||
|
||||
Run this file with the -h flag to display options.
|
||||
|
||||
@license
|
||||
Copyright 2020 KSat e.V. Stuttgart
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@author R. Mueller
|
||||
"""
|
||||
import sys
|
||||
|
||||
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.ccsds.handler import CcsdsTmHandler
|
||||
from tmtccmd.utility.logger import TMTC_LOGGER_NAME
|
||||
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'
|
||||
)
|
||||
sys.exit(0)
|
||||
"""TMTC commander for FSFW Example"""
|
||||
from common_tmtc.tmtcc import (
|
||||
tmtcc_post_args,
|
||||
tmtcc_pre_args,
|
||||
create_default_args_parser,
|
||||
add_default_tmtccmd_args,
|
||||
parse_default_input_arguments,
|
||||
)
|
||||
|
||||
|
||||
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
|
||||
)
|
||||
add_ccsds_handler(ccsds_handler)
|
||||
set_custom_console_logger_name(TMTC_LOGGER_NAME)
|
||||
run_tmtc_commander(use_gui=False, app_name="TMTC Commander FSFW")
|
||||
hook_obj = tmtcc_pre_args()
|
||||
arg_parser = create_default_args_parser()
|
||||
add_default_tmtccmd_args(arg_parser)
|
||||
args = parse_default_input_arguments(arg_parser, hook_obj)
|
||||
tmtcc_post_args(hook_obj=hook_obj, use_gui=False, args=args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 524e004d0abe828e1727565a2e059242455207e2
|
||||
Subproject commit e81e6dbd594c1cdf51cd355a724cbd267d9dee38
|
@ -1,64 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
@brief TMTC Commander entry point for command line mode.
|
||||
@details
|
||||
This client was developed by KSat for the SOURCE project to test the on-board software but
|
||||
has evolved into a more generic tool for satellite developers to perform TMTC (Telemetry and Telecommand)
|
||||
handling and testing via different communication interfaces. Currently, only the PUS standard is
|
||||
implemented as a packet standard.
|
||||
|
||||
Run this file with the -h flag to display options.
|
||||
|
||||
@license
|
||||
Copyright 2020 KSat e.V. Stuttgart
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
@author R. Mueller
|
||||
"""
|
||||
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.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'
|
||||
)
|
||||
sys.exit(0)
|
||||
"""TMTC commander for the FSFW Example"""
|
||||
from common_tmtc.tmtcc import tmtcc_post_args, tmtcc_pre_args
|
||||
|
||||
|
||||
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
|
||||
)
|
||||
add_ccsds_handler(ccsds_handler)
|
||||
run_tmtc_commander(use_gui=True, app_name="TMTC Commander FSFW")
|
||||
hook_obj = tmtcc_pre_args()
|
||||
tmtcc_post_args(hook_obj=hook_obj, use_gui=True, args=None)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
Loading…
Reference in New Issue
Block a user