[Test] Erik is testing SECoP with PVEPICS module
Change-Id: Ie6124a5ab8a48efe16ab2970f337363e8f44a14d
This commit is contained in:
parent
6a2fa8d6a0
commit
92cf6f34a1
@ -1,5 +1,5 @@
|
||||
[server]
|
||||
bindto=localhost
|
||||
bindto=0.0.0.0
|
||||
bindport=10767
|
||||
interface = tcp
|
||||
framing=eol
|
||||
@ -16,3 +16,7 @@ maxheaterpower=10
|
||||
class=devices.test.Temp
|
||||
sensor="X34598T7"
|
||||
|
||||
[device epicspv]
|
||||
class=devices.test.EPICS_PV
|
||||
sensor="test_sensor"
|
||||
max_rpm="very high"
|
||||
|
@ -26,6 +26,7 @@ import random
|
||||
from devices.core import Readable, Driveable, PARAM
|
||||
from validators import floatrange
|
||||
|
||||
from epics import PV
|
||||
|
||||
class LN2(Readable):
|
||||
"""Just a readable.
|
||||
@ -71,3 +72,23 @@ class Temp(Driveable):
|
||||
|
||||
def write_target(self, target):
|
||||
pass
|
||||
|
||||
|
||||
|
||||
class EPICS_PV(Driveable):
|
||||
"""pyepics test device."""
|
||||
|
||||
PARAMS = {
|
||||
'sensor': PARAM("Sensor number or calibration id",
|
||||
validator=str, readonly=True),
|
||||
'max_rpm': PARAM("Maximum allowed rpm",
|
||||
validator=str, readonly=True),
|
||||
}
|
||||
|
||||
def read_value(self, maxage=0):
|
||||
p1 = PV('testpv.VAL')
|
||||
return p1.value
|
||||
|
||||
def write_target(self, target):
|
||||
p1 = PV('test.VAL')
|
||||
p1.value = target
|
||||
|
Loading…
x
Reference in New Issue
Block a user