fastcs.attributes.attribute_io#

Members

AttributeIO

Base class for performing IO for an Attribute

class fastcs.attributes.attribute_io.AttributeIO[source]#

Base class for performing IO for an Attribute

This class should be inherited to implement reading and writing values from Attributes via some API. For read, Attribute``s implement the ``update method and for write, Attribute implement the send method.

Concrete implementations of this class must be parameterised with a specific AttributeIORef that defines exactly what part of the API the Attribute corresponds to. See the docstring for AttributeIORef for more information.

ref_type#

alias of AttributeIORef

async update(attr: AttrR[DType_T, AttributeIORefT]) None[source]#

Update AttrR value from device

This method will be called in AttrR.update in a background task.

Exceptions raised by this method will be caught and logged with a full stack trace. If using targeted try-except blocks to log more specific errors, this should be done with stack trace and exceptions should be re-raised to be handled by FastCS.

async send(attr: AttrW[DType_T, AttributeIORefT], value: DType_T) None[source]#

Send Attribute value to device

This method will be called in AttrW.put, generally from a Transport.

Exceptions raised by this method will be caught and logged with a full stack trace. If using targetted try-except blocks to log more specific errors, this should be done with stack trace and exceptions should be re-raised to be handled by FastCS..