rcognita.callbacks
This module contains callbacks. Callbacks are lightweight event handlers, used mainly for logging.
To make a method of a class trigger callbacks, one needs to
decorate the class (or its base class) with @introduce_callbacks()
and then
also decorate the method with @apply_callbacks
.
Callbacks can be registered by simply supplying them in the respective keyword argument:
@rcognita.main(callbacks=[...], ...)
def my_app(config):
...
Functions
|
Decorator that applies a list of callbacks to a given method of an object. |
|
Creates a callback class that logs the output of a specific method of a class or any class. |
Classes
|
This is the base class for a callback object. |
|
A Callback class that logs the current objective value of an Actor instance. |
|
StateCallback is a subclass of the Callback class that logs the state of a system object when the compute_closed_loop_rhs method of the System class is called. |
|
A class decorator that introduces a callbacks attribute to the decorated class. |