more demo test cases

- added them to cfg/dummy_cfg.py
+ treat enum correctly in SecopClient.setParameterFromString

Change-Id: Ia5b2d8d3a21c3215cb93d90975086eb9995b1543
This commit is contained in:
2025-04-25 15:38:16 +02:00
parent 0230641b1d
commit 58549065fb
4 changed files with 23 additions and 3 deletions

View File

@ -161,7 +161,7 @@ class Cryostat(CryoBase):
by setting the current setpoint as new target"""
# XXX: discussion: take setpoint or current value ???
self.write_target(self.setpoint)
self.write_target(self.setpoint if self.mode == 'ramp' else self.value)
#
# calculation helpers

View File

@ -28,7 +28,7 @@ import time
from frappy.datatypes import ArrayOf, BoolType, EnumType, \
FloatRange, IntRange, StringType, StructOf, TupleOf
from frappy.lib.enum import Enum
from frappy.modules import Drivable, Readable, Attached
from frappy.modules import Drivable, Readable, Writable, Attached
from frappy.modules import Parameter as SECoP_Parameter
from frappy.properties import Property
@ -99,6 +99,14 @@ class Switch(Drivable):
self.log.info(info)
class BoolWritable(Writable):
value = Parameter('boolean', BoolType())
target = Parameter('boolean', BoolType())
def write_target(self, value):
self.value = value
class MagneticField(Drivable):
"""a liquid magnet
"""