Contains core methods called by entry point files to setup and start a tmtccmd application. It also re-exports commonly used classes and functions.
- class tmtccmd.BackendRequest(value)
Bases:
IntEnumThese requests can be treated like recommendations on what to do after calling the backend handler functions and the
BackendState.mode_to_req()function.- Brief explanation of fields:
NONE: No special recommendation
TERMINATION_NO_ERROR: Will be returned for the One Queue mode after finishing queue handling.
DELAY_IDLE: TC and TM mode are idle, so there is nothing to do
DELAY_LISTENER: TC handling is not active but TM listening is active. Delay to wait for new TM packets
CALL_NEXT: It is recommended to call the handler functions immediately, for example to handle the next entry in the TC queue
- CALL_NEXT = 5
- DELAY_CUSTOM = 4
- DELAY_IDLE = 2
- DELAY_LISTENER = 3
- NONE = 0
- TERMINATION_NO_ERROR = 1
- class tmtccmd.PreArgsParsingWrapper
Bases:
objectThis class can be used to simplify parsing all tmtccmd CLI arguments.
It wraps a parent parser and an argument parser but is also able to create default parsers. The
parse()method can be used to convert this parse the CLI arguments and then create aPostArgsParsingWrapperto process these arguments.Please note that the parent parser and argument parser field have to be set or created first after creating this wrapper. They can be created by calling
create_default_parent_parser()and thecreate_default_parser(), but the second function requires the parent parser to be set or created first.- add_cfdp_args()
Add the default CFDP procedure parameters to the default parser.
- add_def_proc_and_cfdp_as_subparsers() tuple[ArgumentParser, ArgumentParser]
Add the default tmtc and cfdp procedure as subparsers.
- add_def_proc_args()
Add the default tmtc procedure parameters to the default parser. This includes the service and operation code flags.
- create_default_parent_parser()
Create a default parent parser, which contains common flags for all possible tmtccmd submodules. For example, both the cfdp and default tmtc submodule could contain these common flags. The user can extend or modify the parent parser after it was created.
- create_default_parser()
Create the default parser. Requires a valid parent parser containing common flags, The user can create or modify the parser after it was created. This function requires a valid parent parser to be set or created via
create_default_parent_parser().
- parse(hook_obj: HookBase, setup_params: SetupParams) PostArgsParsingWrapper
Parses the set parser by calling the
argparse.ArgumentParser.parse_known_args()method internally and returns thePostArgsParsingWrapperto simplify processing the arguments.
- class tmtccmd.SetupParams(com_if: ComInterface | None = None, cmd_params: CommandingParams | None = None, backend_params: BackendParams | None = None, app_params: AppParams | None = None)
Bases:
object- property apid
- property com_if_id
- property mode
- property use_gui
Core Package
Module contents
Submodules
tmtccmd.core.ccsds_backend module
tmtccmd.core.base module
- class tmtccmd.core.base.BackendRequest(value)
Bases:
IntEnumThese requests can be treated like recommendations on what to do after calling the backend handler functions and the
BackendState.mode_to_req()function.- Brief explanation of fields:
NONE: No special recommendation
TERMINATION_NO_ERROR: Will be returned for the One Queue mode after finishing queue handling.
DELAY_IDLE: TC and TM mode are idle, so there is nothing to do
DELAY_LISTENER: TC handling is not active but TM listening is active. Delay to wait for new TM packets
CALL_NEXT: It is recommended to call the handler functions immediately, for example to handle the next entry in the TC queue
- CALL_NEXT = 5
- DELAY_CUSTOM = 4
- DELAY_IDLE = 2
- DELAY_LISTENER = 3
- NONE = 0
- TERMINATION_NO_ERROR = 1