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

SPEC config: use spec_config tag instead of plugin

parent fc86e7e3
......@@ -448,7 +448,7 @@ class Generator(object):
config_name, session_name)
return
object_name = self.get_spec_object_name(session_name, config_name)
plugin = object_config.plugin
plugin = object_config.get_inherited('spec_config') or object_config.plugin
if plugin is None:
self._log.warning('no plugin active for %r from %s. Item ignored',
config_name, session_name)
......@@ -647,7 +647,7 @@ class Generator(object):
wago_name = config.parent.get_inherited('name')
wago_config = self.config.get_config(wago_name)
name = self.get_spec_object_name(session_name, config.get('name'))
if wago_config.plugin != 'wago':
if wago_config.get_inherited('spec_config') != 'wago':
raise ValueError('wago where channel {0!r} is must have a name'
.format(name))
_, wago_setup = self.__get_wago(wago_name)
......@@ -738,7 +738,7 @@ class Generator(object):
eurotherm_name = config.parent.get_inherited('name')
eurotherm_config = self.config.get_config(eurotherm_name)
name = self.get_spec_object_name(session_name, config.get('name'))
if eurotherm_config.plugin != 'eurotherm':
if eurotherm_config.get_inherited('spec_config') != 'eurotherm':
raise ValueError('eurotherm where channel {0!r} is must have a name'
.format(name))
server, _ = self.__get_eurotherm(eurotherm_name)
......@@ -1174,6 +1174,9 @@ class Generator(object):
if xbpmbv_ctrl is None:
xbpmbv_ctrl = Device(ltype='PSE_MAC_C', num=1,
addr='xbpmbv', conf=bv_dev_name)
xbpmbv_ctrl.addPar('CONPAR:limadev = {0}'
.format(limaccds_dev_name))
xbpmbv_ctrl.addPar('CONPAR:alias = {0}'.format(config_name))
self.spec_config.addDevice(xbpmbv_ctrl)
if xbpm_ctrl or xbpmbv_ctrl:
......@@ -1193,7 +1196,7 @@ class Generator(object):
lima_name = config.parent.get_inherited('name')
lima_config = self.config.get_config(lima_name)
name = self.get_spec_object_name(session_name, config.get('name'))
if lima_config.plugin != 'lima':
if lima_config.get_inherited('spec_config') != 'lima':
raise ValueError('lima where channel {0!r} is must have a name'
.format(name))
server, _ = self.__get_lima(session_name, lima_name)
......
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