User Guide ========== This guide covers important concepts and best practices for using the ChimeraTK DeviceAccess Python bindings. Understanding Accessors ------------------------ Accessors are the primary interface for reading and writing device registers. They encapsulate: * A reference to a specific register * A local buffer holding the current value * Type information and conversion logic * Synchronization with hardware Accessor Lifecycle ~~~~~~~~~~~~~~~~~~~ 1. **Obtain**: Get an accessor from a device for a specific register 2. **Transfer**: Use ``read()`` to get data from hardware or ``write()`` to send data 3. **Access**: Read/write the local buffer without hardware communication 4. **Repeat**: Transfer more data as needed .. code-block:: python # TODO Accessor Types ~~~~~~~~~~~~~~ **ScalarRegisterAccessor**: Single values .. code-block:: python # TODO **ArrayRegisterAccessor**: List of values .. code-block:: python # TODO **TwoDRegisterAccessor**: Two-dimensional arrays .. code-block:: python # TODO Type Conversion --------------- Automatic Type Conversion ~~~~~~~~~~~~~~~~~~~~~~~~~~ The bindings automatically convert between hardware and Python types as set on accessor creation: .. code-block:: python # TODO Transfer Groups --------------- Transfer groups enable atomic operations on multiple registers: Motivation ~~~~~~~~~~ Without transfer groups, reading multiple registers could result in inconsistent data if a register changes between reads. .. code-block:: python # TODO Example of changes between reads Solution: Transfer Groups ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: python # TODO Data Consistency Groups ----------------------- For advanced scenarios with multiple samples or high-frequency updates: .. code-block:: python # TODO Device Maps ----------- Device maps define your hardware configuration. Basic Syntax ~~~~~~~~~~~~ .. code-block:: text # Device map format # LABEL BACKEND_SPECIFICATION # TODO: Give examples Best Practices ~~~~~~~~~~~~~~ * Use meaningful device labels * Organize by system or subsystem * Version control your device maps See Also -------- * :doc:`examples` for practical patterns * :doc:`api_reference` for complete API * :doc:`faq` for common questions * :doc:`troubleshooting` for problem solving