Commit 5b28399a authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by blissadm_ID31@bibhelm
Browse files

SPEC config: add transfocator

parent 91b5ef2b
......@@ -623,6 +623,27 @@ class Generator(object):
for item in items:
self.__add_wago_channel(session_name, item)
####################
# Transfocator
####################
def add_transfocator(self, session_name, name, config_name):
config = self.config.get_config(config_name)
tango_type = 'TransfocatorDS'
server = self.__tango_servers.get('{0}/{1}'.format(tango_type, name))
if server is None:
dev_name = '{0}/transfocator/{1}'.format(self.beamline, config_name)
server_host = config.get(SERVER_HOST_KEY)
nb_lens = config['nb_lens']
nb_pinhole = config['nb_pinhole']
wago_ip = config['wago_ip']
server = TServer(tango_type, name, server_host, [
TDevice('Transfocator', dev_name, nb_lens=nb_lens,
nb_pinhole=nb_pinhole, wago_ip=wago_ip)])
self.__tango_servers[server['server']] = server
self.__spec_setup.append("tfsetup {0} {1}".format(name, dev_name))
self.__spec_macros.add('transfocator_ds.mac')
####################
# Eurotherm
####################
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment