qudi.core.StatusVar
- class qudi.core.StatusVar(name: str | None = None, default: Any | None = None, *, constructor: Callable | None = None, representer: Callable | None = None)[source]
Bases:
builtins.objectThis class defines a status variable that is loaded before activation and saved after deactivation.
- __init__(name: str | None = None, default: Any | None = None, *, constructor: Callable | None = None, representer: Callable | None = None)[source]
@param name: identifier of the status variable when stored @param default: default value for the status variable when a saved version is not present @param constructor: constructor function for variable; use for type checks or conversion @param representer: representer function for status variable; use for saving conversion
Methods
__init__([name, default, constructor, ...])@param name: identifier of the status variable when stored @param default: default value for the status variable when a saved version is not present @param constructor: constructor function for variable; use for type checks or conversion @param representer: representer function for status variable; use for saving conversion
constructor(func)This is the decorator for declaring constructor function for this StatusVar.
copy(**kwargs)Create a new instance of StatusVar with copied and updated values.
representer(func)This is the decorator for declaring a representer function for this StatusVar.
- constructor(func: Callable) Callable[source]
This is the decorator for declaring constructor function for this StatusVar.
@param func: constructor function for this StatusVar @return: return the original function so this can be used as a decorator