File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 77
88
99class AttributeIO (Generic [T , AttributeIORefT ], Tracer ):
10+ """Base class for performing IO for an ``Attribute``
11+
12+ This class should be inherited to implement reading and writing values from
13+ ``Attributes`` via some API. For read, ``Attribute``s implement the ``update``
14+ method and for write, ``Attribute`` implement the ``send`` method.
15+
16+ Concrete implementations of this class must be parameterised with a specific
17+ ``AttributeIORef`` that defines exactly what part of the API the ``Attribute``
18+ corresponds to. See the docstring for ``AttributeIORef`` for more information.
19+ """
20+
1021 ref_type = AttributeIORef
1122
1223 def __init_subclass__ (cls ) -> None :
Original file line number Diff line number Diff line change 55
66@dataclass (kw_only = True )
77class AttributeIORef :
8+ """Base for references to define IO for an ``Attribute`` over an API.
9+
10+ This object acts as a specification of the API that its corresponding
11+ ``AttributeIO`` should access for a given ``Attribute``. The fields necessary to
12+ distinguish between different ``Attributes`` is an implementation detail of the IO,
13+ but some examples are a string to send over a TCP port, or URI within an HTTP
14+ server.
15+ """
16+
817 update_period : float | None = None
918
1019
Original file line number Diff line number Diff line change 4040
4141 logger = _logger.bind(logger_name=__name__)
4242
43-
4443or to create a class logger with its name
4544
4645.. code-block:: python
4746
4847 self.logger = _logger.bind(logger_name=__class__.__name__)
4948
50-
5149As standard ``loguru`` supports ``trace`` level monitoring, but it should not be used in
5250fastcs. Instead there is a ``Tracer`` class for verbose logging with fine-grained
5351controls that can be enabled by the user at runtime.
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class Tracer:
2020
2121 Example usage:
2222 .. code-block:: python
23+
2324 controller.ramp_rate.enable_tracing()
2425 controller.ramp_rate.disable_tracing()
2526 controller.connection.enable_tracing()
You can’t perform that action at this time.
0 commit comments