class documentation
TextUI plugin class. This class provides a textual user interface for the ACME CSE.
| Method | __init__ |
Initialize the TextUI plugin. |
| Method | config |
Callback for the configUpdate event. |
| Method | configure |
Configure the TextUI plugin with the given configuration. |
| Method | refresh |
Refresh the resources. |
| Method | registration |
Callback for registration-related events. |
| Method | restart |
Restart the TextUI service. |
| Method | run |
Run the TextUI. This will block until the TextUI is exited. |
| Method | script |
Clear the script console. |
| Method | script |
Print a line to the script log output. |
| Method | script |
Print a line to the script log output. |
| Method | script |
Print a line to the script output. |
| Method | script |
Show a confirmation dialog. |
| Method | script |
Show a notification. |
| Method | script |
Visual bell. |
| Method | shutdown |
Stop the TextUI service. |
| Method | start |
Start the TextUI service. |
| Method | validate |
Validate the configuration for the TextUI plugin. |
| Class Variable | __slots__ |
Slots for TextUI class. |
| Instance Variable | tui |
Instance of the ACMETuiApp class. |
Callback for the configUpdate event.
| Parameters | |
eventEventData | The event data, containing the name of the updated configuration setting and its new value. |
Configure the TextUI plugin with the given configuration.
| Parameters | |
config:Configuration | The configuration to use for the TextUI plugin. |
@onEvent( eventManager.aeHasRegistered)
@onEvent( eventManager.aeHasDeregistered)
@onEvent( eventManager.registeredToRegistrarCSE)
@onEvent( eventManager.registreeCSEHasRegistered)
@onEvent( eventManager.registreeCSEHasDeregistered)
@onEvent( eventManager.deregisteredFromRegistrarCSE)
@onEvent( eventManager.registeredToRemoteCSE)
@onEvent( eventManager.csrUpdated)
def registrationUpdate(self, eventData: @onEvent(
@onEvent(
@onEvent(
@onEvent(
@onEvent(
@onEvent(
@onEvent(
EventData):
¶
Callback for registration-related events.
This will trigger an update of the container registrations in the TextUI.
| Parameters | |
eventEventData | The event data, containing information about the registration event. |
Run the TextUI. This will block until the TextUI is exited.
| Returns | |
bool | True if the TextUI was exited with a restart request, False if it was exited with a quit request. |
Print a line to the script log output.
| Parameters | |
scriptstr | Name of the script. |
msg:str | Message to print. |
| Returns | |
bool | Always returns True. |
Print a line to the script log output.
| Parameters | |
scriptstr | Name of the script. |
msg:str | Message to print. |
| Returns | |
bool | Always returns True. |
Print a line to the script output.
| Parameters | |
scriptstr | Name of the script. |
msg:str | Message to print. |
def scriptShowConfirmation(self, msg:
str, title: str, confirmButtonText: str | None = 'Confirm', cancelButtonText: str | None = 'Cancel') -> bool | None:
¶
Show a confirmation dialog.
| Parameters | |
msg:str | Message to show. |
title:str | Title of the dialog. |
confirmstr | None | Text for the confirm button. |
cancelstr | None | Text for the cancel button. |
| Returns | |
bool | None | True if the user confirmed, False if the user cancelled, None if TUI is not available. |
def scriptShowNotification(self, msg:
str, title: str, severity: Literal[ 'information', 'warning', 'error'], timeout: float):
¶
Show a notification.
| Parameters | |
msg:str | Message to show. |
title:str | Title of the notification. |
severity:Literal[ | Severity of the notification. |
timeout:float | Timeout in seconds. |
Validate the configuration for the TextUI plugin.
| Parameters | |
config:Configuration | The configuration to validate. |
| Raises | |
ConfigurationError | If the configuration is invalid. |