Skip to content

Commit d6bfed5

Browse files
committed
WIP Handle ints in CA pvi
1 parent 7591e8f commit d6bfed5

File tree

1 file changed

+7
-2
lines changed
  • src/fastcs/transport/epics/ca

1 file changed

+7
-2
lines changed

src/fastcs/transport/epics/ca/ioc.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,14 @@ def _add_sub_controller_pvi_info(pv_prefix: str, parent: ControllerAPI):
113113

114114
for child in parent.sub_apis.values():
115115
child_pvi = f"{controller_pv_prefix(pv_prefix, child)}:PVI"
116-
child_name = str(child.path[-1]).lower()
116+
child_name = (
117+
f"{child.path[-2]}{child.path[-1]}" # Parent name + child idx
118+
if isinstance(child.path[-1], int)
119+
else str(child.path[-1]) # Child name
120+
)
121+
122+
_add_pvi_info(child_pvi, parent_pvi, child_name.lower())
117123

118-
_add_pvi_info(child_pvi, parent_pvi, child_name)
119124
_add_sub_controller_pvi_info(pv_prefix, child)
120125

121126

0 commit comments

Comments
 (0)