form improvements

This commit is contained in:
Robin Müller 2022-05-17 14:34:05 +02:00
parent 963e9b7a5b
commit 8455490fe1
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
1 changed files with 6 additions and 39 deletions

View File

@ -1,31 +1,5 @@
#!/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
"""
"""EIVE TMTC Commander"""
import sys
import traceback
@ -59,22 +33,14 @@ except ImportError as error:
)
sys.exit(1)
from config.hook_implementations import EiveHookObject
from config.version import __version__
from config.definitions import PUS_APID
from pus_tc.tc_packer_hook import pre_tc_send_cb
from pus_tm.factory_hook import ccsds_tm_handler
from tmtcc import tmtcc_pre_args
from tmtccmd.core.globals_manager import (
get_global
)
def main():
print(f"-- eive tmtc version {__version__} --")
print(f"-- spacepackets version {spacepackets.__version__} --")
tmtccmd.init_printout(False)
tmtc_file_logger = create_tmtc_logger()
hook_obj = EiveHookObject(json_cfg_path=default_json_path())
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)
@ -90,17 +56,18 @@ def main():
setup_args=setup_args,
tm_handler=ccsds_handler,
)
tmtc_file_logger = create_tmtc_logger()
tmtc_backend.usr_send_wrapper = (pre_tc_send_cb, tmtc_file_logger)
tmtc_backend.set_mode(CoreModeList.CONTINUOUS_MODE)
get_console_logger().info("Disabling console logger for continuous operation")
get_console_logger().disabled = True;
get_console_logger().disabled = True
tmtccmd.init_and_start_daemons(tmtc_backend=tmtc_backend)
tmtccmd.performOperation(tmtc_backend=tmtc_backend)
#remove cmdline args so that we can reuse code
# remove cmdline args so that we can reuse code
sys.argv = sys.argv[:1]
while True: