This module is part of the Python Sardana libray. It defines the base classes for Sardana attributes
Classes
Class representing an atomic attribute like position of a motor or a counter value
Determines if the attribute’s read value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a read value stored or False otherwise |
---|---|
Return type: | bool |
Determines if the attribute’s write value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a write value stored or False otherwise |
---|---|
Return type: | bool |
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Sets the current read value and propagates the event (if propagate > 0).
Parameters: |
|
---|
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
Sets the current write value.
Parameters: |
|
---|
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Returns the timestamp of the last readout or None if the attribute has never been read before
Returns: | timestamp of the last readout or None |
---|---|
Return type: | float or None |
Returns the timestamp of the last write or None if the attribute has never been written before
Returns: | timestamp of the last write or None |
---|---|
Return type: | float or None |
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
the read timestamp
the write timestamp
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Adds a new listener for this object.
Parameters: | listener – a listener |
---|
Returns True if anybody is listening to events from this object
Returns: | True is at least one listener is listening or False otherwise |
---|
Removes an existing listener for this object.
Parameters: | listener – the listener to be removed |
---|---|
Returns: | True is succeeded or False otherwise |
Class representing a software attribute. The difference between this and SardanaAttribute is that, because it is a pure software attribute, there is no difference ever between the read and write values.
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Sets the current read value and propagates the event (if propagate > 0).
Parameters: |
|
---|
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Adds a new listener for this object.
Parameters: | listener – a listener |
---|
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Returns the timestamp of the last readout or None if the attribute has never been read before
Returns: | timestamp of the last readout or None |
---|---|
Return type: | float or None |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
Returns the timestamp of the last write or None if the attribute has never been written before
Returns: | timestamp of the last write or None |
---|---|
Return type: | float or None |
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
Returns True if anybody is listening to events from this object
Returns: | True is at least one listener is listening or False otherwise |
---|
Determines if the attribute’s read value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a read value stored or False otherwise |
---|---|
Return type: | bool |
Determines if the attribute’s write value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a write value stored or False otherwise |
---|---|
Return type: | bool |
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Removes an existing listener for this object.
Parameters: | listener – the listener to be removed |
---|---|
Returns: | True is succeeded or False otherwise |
Sets the current write value.
Parameters: |
|
---|
the read timestamp
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
the write timestamp
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
A SardanaAttribute specialized for numbers
Adds a new listener for this object.
Parameters: | listener – a listener |
---|
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Fires an event to the listeners of the object which owns this attribute.
Parameters: | propagate (int) – 0 for not propagating, 1 to propagate, 2 propagate with priority |
---|
Returns the exception information (like sys.exc_info()) about last attribute readout or None if last read did not generate an exception.
Returns: | exception information or None |
---|---|
Return type: | tuple<3> or None |
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Returns the timestamp of the last readout or None if the attribute has never been read before
Returns: | timestamp of the last readout or None |
---|---|
Return type: | float or None |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
Returns the timestamp of the last write or None if the attribute has never been written before
Returns: | timestamp of the last write or None |
---|---|
Return type: | float or None |
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
Returns True if anybody is listening to events from this object
Returns: | True is at least one listener is listening or False otherwise |
---|
Determines if the attribute’s read value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a read value stored or False otherwise |
---|---|
Return type: | bool |
Determines if the attribute’s write value has been read at least once in the lifetime of the attribute.
Returns: | True if the attribute has a write value stored or False otherwise |
---|---|
Return type: | bool |
Determines if this attribute is in error state.
Returns: | True if the attribute is in error state or False otherwise |
---|---|
Return type: | bool |
Returns the object which owns this attribute
Returns: | the object which owns this attribute |
---|---|
Return type: | obj |
Removes an existing listener for this object.
Parameters: | listener – the listener to be removed |
---|---|
Returns: | True is succeeded or False otherwise |
Sets the current read value and propagates the event (if propagate > 0).
Parameters: |
|
---|
Sets the current write value.
Parameters: |
|
---|
the read timestamp
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | obj |
Raises : | Exception if no read value has been set yet |
Returns the last read value for this attribute.
Returns: | the last read value for this attribute |
---|---|
Return type: | SardanaValue |
Raises : | Exception if no read value has been set yet |
the write timestamp
Returns the last write value for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | obj |
Returns the last write value object for this attribute.
Returns: | the last write value for this attribute or None if value has not been written yet |
---|---|
Return type: | SardanaValue |
Storage class for SardanaAttribute information (like ranges)