diff --git a/director.py b/director.py index cc7774a..25b3fcb 100644 --- a/director.py +++ b/director.py @@ -20,16 +20,18 @@ class Director: doc.add_root(layout) + def on_add_pv(self, attr, old, new): + print(f"CB Add PV: attribute \"{attr}\" changed from \"{old}\" to \"{new}\"") + new = new.replace(",", " ").split() + new = reversed(new) + self.add_pvs(*new) + + def add_pvs(self, *pvnames): for n in pvnames: self.add_pv(n) - def on_add_pv(self, attr, old, new): - print("CB Add PV:", attr, old, new) - self.add_pv(new) - - def add_pv(self, pvname): print("Add PV:", pvname)