control#

abstractmethod RootSystem.control(command: str, hid: str | None = None, wait_for_completion: bool = True, timeout: float | int = 100, run_async: bool = False) → bool | str#

Control the node state.

Parameters:
command: str

Command to execute. Options are "start", "restart", "stop_gently", "stop", and "reset".

hid: Optional[str], optional

Hid, by default None.

wait_for_completion: bool, optional

Whether to wait for completion. The default is True.

timeout: Union[float, int], optional

Time limit for monitoring the status of the command. The default is 100 s.

run_async: bool, optional

Whether to execute the command as an asynchronous, non-blocking long running operation. If True, this method returns immediately with the ID of the long running operation instead of waiting for completion (wait_for_completion is ignored). Only supported for the "reset" command. By default False.

Note

Argument is supported for Ansys optiSLang version >= 27.1 only.

Returns:
Union[bool, str]

True when successful, False when failed. If run_async is True, the ID of the long running operation is returned instead.