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:
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
Follow-up from review of fc8e710 (#358 / PR #360).
In
emission.pythe per-controllerDeviceRefin the index file is built with:But the IOC publishes its PVs using the controller id verbatim — see
pv_prefix_from_pathinsrc/fastcs/transports/epics/util.py:7-15, which usespath[0]without case folding. So forid="alpha":.bobreferencesalpha:Foo(correct, matches the IOC)..bobreferences the device withpv="ALPHA"(does not match the IOC).DeviceRef.pvis 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 indexpvto 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:
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-95src/fastcs/transports/epics/util.py:7-15