wei.modules.utility_module

A module for utility and helper actions that are broadly useful in different workcells and applications.

Functions

delay(seconds)

Set a timer for a specified number of seconds, returning successfully after the timer has elapsed.

delay_until(target)

Blocks until a specific datetime, then returns success.

utility_exception_handler(state, exception)

This function is called whenever a module encounters or throws an irrecoverable exception.

wei.modules.utility_module.delay(seconds: float)

Set a timer for a specified number of seconds, returning successfully after the timer has elapsed.

wei.modules.utility_module.delay_until(target: datetime)

Blocks until a specific datetime, then returns success.

wei.modules.utility_module.utility_exception_handler(state: State, exception: Exception, error_message: str | None = None)

This function is called whenever a module encounters or throws an irrecoverable exception. It should handle the exception (print errors, do any logging, etc.) and set the module status to ERROR.