herosdevices.hardware.menlo.functional_layer
============================================

.. py:module:: herosdevices.hardware.menlo.functional_layer

.. autoapi-nested-parse::

   Base class for drivers scoped to one `functionalLayer` sub-tree of a Menlo Systems optical frequency comb.





Module Contents
---------------

.. py:class:: FunctionalLayerModule(ofc: herosdevices.hardware.menlo.ofc.OFC, base_path: str, observables: dict[str, dict[str, str]] | None = None)

   Base for drivers that address one sub-tree of an OFC's `functionalLayer`, relative to a fixed base path.

   Does not open its own connection: `ofc` is meant to be an already-running
   :py:class:`~herosdevices.hardware.menlo.ofc.OFC` HERO, injected as a dependency (e.g. via boss's
   `"ofc": "$device_menlo_ofc"` reference in the config), so multiple modules share the one physical
   websocket connection to the OFC instead of each opening a duplicate connection to the same device.

   :param ofc: The OFC HERO this module belongs to.
   :param base_path: Dotted path to this module's settings object, e.g. `functionalLayer.cw1112_1Settings` or
                     `functionalLayer.rrSettings`.
   :param observables: Additional observables to poll for `observable_data`, merged on top of
                       :py:attr:`DEFAULT_OBSERVABLES` (an entry here with the same name overrides the default). See
                       :py:meth:`~herosdevices.hardware.menlo.ofc.OFC.get_node` for the "path"/"unit" dict shape.


   .. py:attribute:: DEFAULT_OBSERVABLES
      :type:  dict[str, dict[str, str]]


   .. py:attribute:: ofc


   .. py:attribute:: base_path


   .. py:attribute:: observables


   .. py:method:: get(relative_path: str) -> Any

      Read the current value of a node relative to this module's settings object.

      Use this for module properties not already exposed as a named attribute. See
      :py:meth:`~herosdevices.hardware.menlo.ofc.OFC.explore` to find the available relative paths,
      e.g. `ofc.explore(module.base_path, depth=2)`.

      :param relative_path: Dotted path relative to `base_path`.

      :returns: The current value of the node.



   .. py:method:: set(relative_path: str, value: Any) -> None

      Set the value of a node relative to this module's settings object.

      :param relative_path: Dotted path relative to `base_path`, see :py:meth:`get`.
      :param value: Value to set.



