remove UNKNOWN, UNSTABLE and DISABLED from Readable.status
- re-add them where needed (epics, entangle ...) Change-Id: I2b8af9f5f86285f081d5418211f6940e80a1dbd7 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30718 Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
"""drivers for CCU4, the cryostat control unit at SINQ"""
|
||||
# the most common Frappy classes can be imported from frappy.core
|
||||
from frappy.core import EnumType, FloatRange, \
|
||||
HasIO, Parameter, Readable, StringIO
|
||||
HasIO, Parameter, Readable, StringIO, StatusType
|
||||
|
||||
|
||||
class CCU4IO(StringIO):
|
||||
@ -51,16 +51,16 @@ class HeLevel(HasIO, Readable):
|
||||
readonly=False)
|
||||
sample_rate = Parameter('sample rate', EnumType(slow=0, fast=1), readonly=False)
|
||||
|
||||
Status = Readable.Status
|
||||
status = Parameter(datatype=StatusType(Readable, 'DISABLED'))
|
||||
|
||||
# conversion of the code from the CCU4 parameter 'hsf'
|
||||
STATUS_MAP = {
|
||||
0: (Status.IDLE, 'sensor ok'),
|
||||
1: (Status.ERROR, 'sensor warm'),
|
||||
2: (Status.ERROR, 'no sensor'),
|
||||
3: (Status.ERROR, 'timeout'),
|
||||
4: (Status.ERROR, 'not yet read'),
|
||||
5: (Status.DISABLED, 'disabled'),
|
||||
0: (StatusType.IDLE, 'sensor ok'),
|
||||
1: (StatusType.ERROR, 'sensor warm'),
|
||||
2: (StatusType.ERROR, 'no sensor'),
|
||||
3: (StatusType.ERROR, 'timeout'),
|
||||
4: (StatusType.ERROR, 'not yet read'),
|
||||
5: (StatusType.DISABLED, 'disabled'),
|
||||
}
|
||||
|
||||
def query(self, cmd):
|
||||
|
Reference in New Issue
Block a user