DiamondLightSource/dodal

RFC: Device names and function names.

Open

#339 geöffnet am 15. Feb. 2024

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (12 Forks)auto 404
help wantedquestion

Repository-Metriken

Stars
 (4 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Device names are used as part of the Bluesky event-model to name, as object_keys in the Descriptor. They should have a unique name, but this is not enforced until you attempt to run a plan with two devices with the same name and there is a collision (AFAIK). In BlueAPI this is required on startup (again, AFAIK). Device factory function names are used to refer to devices outside of BlueAPI/event-model context, and also must be unique within the namespace.

Should device.name and device_function.name target:

  • Their purpose (e.g. saxs, waxs)
  • Their make/model/description of what the hardware is (e.g. linkam, tetramm)
  • Being as short and easily typed as possible
  • Different things (e.g. device.name being purpose, device_function.name being hardware type?)

I think this decision can/should be made on a per-beamline basis, but it might be useful to document a best practice.

Contributor Guide