run_iocsh

Package for running IOC and checking output.

Submodules

Exceptions

IocshAlreadyRunningError

Exception raised when IOC is started a second time.

IocshModuleNotFoundError

Exception raised when the required module is not found.

IocshProcessError

Exception raised when the iocsh script exits with a non null return code.

IocshTimeoutExpiredError

Exception raised when a timeout occurred trying to send exit to the softIOC.

MissingSharedLibraryError

Exception raised when shared library is missing.

RunIocshError

Base class for exceptions in this module.

Classes

IOC

Class to wrap IOC process.

Functions

run_iocsh(→ None)

Run an IOC, exit, and parse the output.

Package Contents

class run_iocsh.IOC(*args: str, timeout: float = 5.0)[source]

Class to wrap IOC process.

executable = 'iocsh'
state_values
proc = None
outs = ''
errs = ''
args = ()
timeout = 5.0
state
__enter__() None[source]
__exit__(exc_type: object, exc_value: object, exc_traceback: object) None[source]
is_running() bool[source]

Check if the ioc is already running.

start() None[source]

Run <self.executable> iocsh script with given command-line args.

exit() None[source]

Send the exit command to the running IOC.

check_output() None[source]

Log and check output from subprocess.

exception run_iocsh.IocshAlreadyRunningError[source]

Bases: RunIocshError

Exception raised when IOC is started a second time.

exception run_iocsh.IocshModuleNotFoundError[source]

Bases: RunIocshError

Exception raised when the required module is not found.

exception run_iocsh.IocshProcessError[source]

Bases: RunIocshError

Exception raised when the iocsh script exits with a non null return code.

Only raised if no error was catched (and another exception raised).

exception run_iocsh.IocshTimeoutExpiredError[source]

Bases: RunIocshError

Exception raised when a timeout occurred trying to send exit to the softIOC.

exception run_iocsh.MissingSharedLibraryError[source]

Bases: RunIocshError

Exception raised when shared library is missing.

exception run_iocsh.RunIocshError[source]

Bases: Exception

Base class for exceptions in this module.

run_iocsh.run_iocsh(delay: int, *args: str, timeout: float = 5) None[source]

Run an IOC, exit, and parse the output.