- class EvaluationAttribute(name='', parent=None, **kwargs)
TaurusAttributethat can be used to perform mathematical operations involving other arbitrary Taurus attributes. The mathematical operation is described in the attribute name itself. An Evaluation Attribute will keep references to any other attributes being referenced and it will update its own value whenever any of the referenced attributes change.
In most cases this class should not be instantiated directly. Instead it should be done via the
from taurus.core.evaluation import EvaluationAttribute
Add a TaurusListener object in the listeners list. If it is the first listener, it triggers the subscription to the referenced attributes. If the listener is already registered nothing happens.
- eventReceived(evt_src, evt_type, evt_value)
- static getId(obj, idFormat='_V%i_')
- returns an id string for the given object which has the following
- two properties:
It is unique for this object during all its life
It is a string that can be used as a variable or method name
parses the transformation string and creates the necessary symbols for the evaluator. It also connects any referenced attributes so that the transformation gets re-evaluated if they change.
trstring (str) – a string to be pre-processed
a tuple containing the processed string and a boolean indicating if the preprocessing was successful. if ok==True, the string is ready to be evaluated
- Return type
returns the value of the attribute.
cache (bool) – If True (default), the last calculated value will be returned. If False, the referenced values will be re- read and the transformation string will be re-evaluated
Remove a TaurusListener from the listeners list. If polling enabled and it is the last element then stop the polling timer. If the listener is not registered nothing happens.
- write(value, with_read=True)