herosdevices.hardware.menlo.functional_layer

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

Module Contents

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

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 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.

Parameters:
  • ofc – The OFC HERO this module belongs to.

  • base_path – Dotted path to this module’s settings object, e.g. functionalLayer.cw1112_1Settings or functionalLayer.rrSettings.

  • observables – Additional observables to poll for observable_data, merged on top of DEFAULT_OBSERVABLES (an entry here with the same name overrides the default). See get_node() for the “path”/”unit” dict shape.

DEFAULT_OBSERVABLES: dict[str, dict[str, str]]
ofc
base_path
observables
get(relative_path: str) Any[source]

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 explore() to find the available relative paths, e.g. ofc.explore(module.base_path, depth=2).

Parameters:

relative_path – Dotted path relative to base_path.

Returns:

The current value of the node.

set(relative_path: str, value: Any) None[source]

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

Parameters:
  • relative_path – Dotted path relative to base_path, see get().

  • value – Value to set.