Skip to content

EPICS GUI index: DeviceRef.pv upper-cases the controller id and diverges from the IOC prefix #368

@gilesknap

Description

@gilesknap

Follow-up from review of fc8e710 (#358 / PR #360).

In emission.py the per-controller DeviceRef in the index file is built with:

DeviceRef(
    name=_coerce_pascal_name(controller_id),
    label=controller_id,
    pv=controller_id.upper(),   # <-- here
    ui=ui_filename,
    macros={},
)

But the IOC publishes its PVs using the controller id verbatim — see pv_prefix_from_path in src/fastcs/transports/epics/util.py:7-15, which uses path[0] without case folding. So for id="alpha":

  • per-controller .bob references alpha:Foo (correct, matches the IOC).
  • index .bob references the device with pv="ALPHA" (does not match the IOC).

DeviceRef.pv is the child device's PVI metadata PV. FastCS doesn't currently publish PVI structures, so today the field is purely informational and nothing visibly breaks. But the moment PVI lookup gets wired up (or anything downstream consumes the index pv to construct a macro), the upper-casing will cause the index entry to point at a PV that doesn't exist.

Suggested fix

Use the controller id verbatim:

pv=controller_id,

and let any future case normalisation be driven from a single helper that's also used by pv_prefix_from_path, so the IOC and the index can never disagree.

Refs

  • src/fastcs/transports/epics/emission.py:88-95
  • src/fastcs/transports/epics/util.py:7-15

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions