Skip to content

Managing Device Configurations

A beamline can easily have hundreds of devices. Managing this in a single file is often not practical. BEC supports splitting the device configuration into multiple files and loading them together.

Conceptually, this allows teams to keep base, endstation, or subsystem device groups separate while still loading one effective session configuration.

Compose a device configuration

base_config:
  - !include ./path/to/base_config.yaml

endstation:
  - !include ./path/to/endstation_config.yaml

curr:
  readoutPriority: baseline
  description: SLS ring current
  deviceClass: ophyd.EpicsSignalRO
  deviceConfig:
    auto_monitor: true
    read_pv: ARIDI-PCT:CURRENT
  deviceTags:
    - cSAXS
  onFailure: buffer
  enabled: true
  readOnly: true
  softwareTrigger: false

In the example config above, we combine two separate device configuration files into one effective configuration. The !include syntax is a feature supported by BEC's YAML parser and allows including the contents of another YAML file at that location. The resulting device configuration is a combination of all included files and any additional entries defined directly in the main config.

This effective configuration becomes the basis for the current device session in BEC once it is loaded.

For more task-focused guides, take a look at the following how-tos: