launch.event_handlers package
Submodules
- launch.event_handlers.event_named module
- launch.event_handlers.on_action_event_base module
- launch.event_handlers.on_execution_complete module
- launch.event_handlers.on_include_launch_description module
- launch.event_handlers.on_process_exit module
- launch.event_handlers.on_process_io module
- launch.event_handlers.on_process_start module
- launch.event_handlers.on_shutdown module
Module contents
Package for event_handlers.
- class launch.event_handlers.OnExecutionComplete[source]
Bases:
OnActionEventBase
Convenience class for handling an action completion event.
It may be configured to only handle the completion of a specific action, or to handle them all.
- __init__(*, target_action: Callable[[Action], bool] | Action | None = None, on_completion: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | Callable[[ExecutionComplete, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None], **kwargs) None [source]
Create an OnExecutionComplete event handler.
- class launch.event_handlers.OnIncludeLaunchDescription[source]
Bases:
EventHandler
Event handler used to handle asynchronous requests to include LaunchDescriptions.
- class launch.event_handlers.OnProcessExit[source]
Bases:
OnActionEventBase
Convenience class for handling a process exited event.
It may be configured to only handle the exiting of a specific action, or to handle all exited processes.
- __init__(*, target_action: Callable[[ExecuteLocal], bool] | ExecuteLocal | None = None, on_exit: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | Callable[[ProcessExited, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None], **kwargs) None [source]
Create an OnProcessExit event handler.
- class launch.event_handlers.OnProcessIO[source]
Bases:
OnActionEventBase
Convenience class for handling I/O from processes via events.
- __init__(*, target_action: Callable[[Action], bool] | Action | None = None, on_stdin: Callable[[ProcessIO], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None] | None = None, on_stdout: Callable[[ProcessIO], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None] | None = None, on_stderr: Callable[[ProcessIO], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None] | None = None, **kwargs) None [source]
Create an OnProcessIO event handler.
- class launch.event_handlers.OnProcessStart[source]
Bases:
OnActionEventBase
Convenience class for handling a process started event.
It may be configured to only handle the starting of a specific action, or to handle all started processes.
- __init__(*, target_action: Callable[[Action], bool] | Action | None = None, on_start: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | Callable[[ProcessStarted, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None], **kwargs) None [source]
Create an OnProcessStart event handler.
- class launch.event_handlers.OnShutdown[source]
Bases:
BaseEventHandler
Convenience class for handling the launch shutdown event.
- __init__(*, on_shutdown: LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | Callable[[Shutdown, LaunchContext], LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None], **kwargs) None [source]
Create an OnShutdown event handler.
- handle(event: Event, context: LaunchContext) LaunchDescriptionEntity | Iterable[LaunchDescriptionEntity] | None [source]
Handle the given event.
- property matcher_description
Return the string description of the matcher.