Commit 2edffe7d authored by blissadm_ID31@bibhelm's avatar blissadm_ID31@bibhelm
Browse files

SPEC config: add temperature

parent 91a1fa4d
......@@ -339,6 +339,7 @@ class Generator(object):
# spec <-> bliss controllers
self.__spec_mot_ctrl_tango_bliss_servers = OrderedDict()
self.__spec_mot_ctrl_axis_manager_servers = OrderedDict()
self.__spec_temp_ctrl_tango_bliss_servers = OrderedDict()
# necessary macros to be imported
self.__spec_macros = set(['spec_utils.mac'])
......@@ -533,6 +534,27 @@ class Generator(object):
ctrl = self.get_spec_mot_ctrl_axis_manager(tango_server)
self.__add_emotion_axis_to_spec_controller(name, config_name, ctrl)
####################
# Temperature
####################
def add_temperature(self, session_name, name, config_name):
temp_config = self.config.get_config(config_name)
if 'tango_server' in temp_config:
self._log.warning("Temperature chanel %r with 'tango_server' " \
"key not managed", config_name)
return
dev_name = '{0}/bliss_{1}/{2}'.format(self.beamline, session_name, config_name)
ctrl = Device(ltype='PSE_MAC_C', addr='attr_ct', num=2, conf=dev_name)
self.spec_config.addDevice(ctrl)
unit = ctrl.getCtrlIndex()
counter = Counter(ctrl='MAC_CNT', unit=unit, chan=0,
mne=name, name=name)
counter.addPar('CNTPAR:attr_name = value')
self.spec_config.addCounter(counter)
self.__spec_macros.add('attributes.mac')
return ctrl
####################
# Icepap
####################
......
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