Support for various app and slic wrapper

This commit is contained in:
2023-06-13 14:18:09 +02:00
parent f22a17852c
commit dc5df0ca2a
13 changed files with 488 additions and 31 deletions

21
ext/magnet.py Normal file
View File

@ -0,0 +1,21 @@
from slic.core.adjustable import PVAdjustable
from slic.utils import typename
class Magnet(PVAdjustable):
def __init__(self,name):
self.name=name
pvsv='%s:I-SET' % name
pvrb='%s:I-READ' % name
tol = 0.075
super().__init__(pvsv,pvname_readback=pvrb,accuracy=tol,internal=True)
@property
def status(self):
return "Cycling"
def __repr__(self):
tn = typename(self)
return f"{tn} \"{self.name}\" is {self.status}"