As the communicator class needed for a module can be specified, in the configuration we do not need to specifiy it explicitly. A new configurator function IO() is introduced for this, defining names and uri only. - update also configuration reference and a tutorial example - update get_class function to accept attributes of classes like 'frappy_demo.lakshore.TemperatureSensor.ioClass' and import from modules other than frappy... like 'test.test_iocfg.Mod'. - add ioClass to the example class for the temperature controller tutorial Change-Id: I3115371d612f14024e43bc6d38b642e1d27b314d Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/38071 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
20 lines
813 B
Python
20 lines
813 B
Python
from os import environ
|
|
|
|
# either change the uri or set the environment variable 'LS_URI'
|
|
lakeshore_uri = environ.get('LS_URI', 'tcp://<host>:7777')
|
|
|
|
Node('example_cryo.psi.ch', # a globally unique identification
|
|
'this is an example cryostat for the Frappy tutorial', # describes the node
|
|
interface='tcp://10767') # you might choose any port number > 1024
|
|
IO('io', lakeshore_uri) # the communicator (its class will be detected automatically)
|
|
Mod('T',
|
|
'frappy_demo.lakeshore.TemperatureLoop',
|
|
'Sample Temperature',
|
|
io='io',
|
|
channel='A', # the channel on the LakeShore for this module
|
|
loop=1, # the loop to be used
|
|
value=Param(max=470), # set the maximum expected T
|
|
target=Param(max=420), # set the maximum allowed target T
|
|
heater_range=3, # 5 for model 350
|
|
)
|