Skip to content

EPICS CA multi-root softioc with id-based PV prefix #354

@gilesknap

Description

@gilesknap

Parent

#351

What to build

One softioc hosts N controllers, each with its id as the verbatim PV prefix. EPICS path-to-PV mapping treats path[0] (the id) verbatim; subsequent path segments continue through snake-to-Pascal conversion. The previous EpicsIOCOptions dataclass and its pv_prefix field are removed entirely — the id is the prefix.

Scope:

  • EPICS CA transport adopts the multi-controller connect() signature properly: hosts all configured controllers in one softioc.
  • Adopts the D2 PV-prefix derivation utility introduced in Multi-controller foundation end-to-end via REST transport #353 (path[0] verbatim, path[1:] snake-to-Pascal). The previous separate prefix parameter to the PV-prefix utility is removed.
  • EpicsIOCOptions and its pv_prefix field deleted; demo and tests updated accordingly.
  • Per-transport CA id validator runs at connect() time: rejects illegal characters AND emits a clear error when the id plus longest path exceeds the EPICS 60-character PV name limit.
  • tests/conftest.py pv_prefix fixture migrated to id-based naming.
  • Extend tests/test_multi_controller.py with the EPICS-CA scenario: two controllers wire into one IOC with distinct PV prefixes and no clash.
  • CA transport test gains a per-transport id-validation case demonstrating the fail-fast behaviour at connect() time.

User stories from #351 covered: 16, 17, 18, 32, 34.

Acceptance criteria

  • One softioc serves all configured controllers; each controller's PVs appear under its verbatim id
  • D2 PV-prefix utility adopted; standalone prefix parameter removed
  • EpicsIOCOptions.pv_prefix removed; no callers remain
  • CA id validator rejects illegal characters and 60-char overflow with clear startup errors
  • conftest.pv_prefix fixture migrated to id-based naming
  • tests/test_multi_controller.py covers the two-IOC-no-clash scenario over CA
  • CA transport test covers id-validation fail-fast
  • Full test suite stays green

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpythonPull requests that update Python code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions