Skip to content
Snippets Groups Projects
Commit f45f1a0a authored by BRONES Romain's avatar BRONES Romain
Browse files

Fix configuration of centralnode corrector

parent 321c540f
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ import FofbTool.Operation ...@@ -27,6 +27,7 @@ import FofbTool.Operation
import FofbTool.Configuration import FofbTool.Configuration
import logging import logging
import multiprocessing import multiprocessing
import numpy as np
#----- PROTECTED REGION END -----# // DG_PY_FOFBTool.additionnal_import #----- PROTECTED REGION END -----# // DG_PY_FOFBTool.additionnal_import
...@@ -66,6 +67,14 @@ class DG_PY_FOFBTool(Device): ...@@ -66,6 +67,14 @@ class DG_PY_FOFBTool(Device):
- Type:'DevString' - Type:'DevString'
tangopath_centralnode tangopath_centralnode
- Type:'DevString' - Type:'DevString'
k1_x
- Type:'DevVarLongArray'
k2_x
- Type:'DevVarLongArray'
k1_y
- Type:'DevVarLongArray'
k2_y
- Type:'DevVarLongArray'
""" """
# PROTECTED REGION ID(DG_PY_FOFBTool.class_variable) ENABLED START # # PROTECTED REGION ID(DG_PY_FOFBTool.class_variable) ENABLED START #
...@@ -139,6 +148,26 @@ class DG_PY_FOFBTool(Device): ...@@ -139,6 +148,26 @@ class DG_PY_FOFBTool(Device):
mandatory=True mandatory=True
) )
k1_x = device_property(
dtype='DevVarLongArray',
mandatory=True
)
k2_x = device_property(
dtype='DevVarLongArray',
mandatory=True
)
k1_y = device_property(
dtype='DevVarLongArray',
mandatory=True
)
k2_y = device_property(
dtype='DevVarLongArray',
mandatory=True
)
# ---------- # ----------
# Attributes # Attributes
# ---------- # ----------
...@@ -262,6 +291,15 @@ class DG_PY_FOFBTool(Device): ...@@ -262,6 +291,15 @@ class DG_PY_FOFBTool(Device):
self.error_stream("Failed to configure CCN on {}".format(cn)) self.error_stream("Failed to configure CCN on {}".format(cn))
s=FofbTool.Configuration.centralnode_configure_ccn(self.tangopath_centralnode, self.ccn_nbpm, self.ccn_npsc) s=FofbTool.Configuration.centralnode_configure_ccn(self.tangopath_centralnode, self.ccn_nbpm, self.ccn_npsc)
success = success and s
if not s:
self.error_stream("Failed to configure CCN on {}".format(self.tangopath_centralnode))
numbpm = int(np.sum(self.ccn_nbpm))
self.debug_stream("Summed {} bpm for corrector".format(numbpm))
FofbTool.Configuration.centralnode_configure_corr(self.tangopath_centralnode,
numbpm, [int(p) for p in self.corr_pscid.split()],
self.k1_x, self.k1_y, self.k2_x, self.k2_y)
if success: if success:
self.d_status["configure"]="Configure: success" self.d_status["configure"]="Configure: success"
......
...@@ -45,6 +45,22 @@ ...@@ -45,6 +45,22 @@
<type xsi:type="pogoDsl:StringType"/> <type xsi:type="pogoDsl:StringType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/> <status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties> </deviceProperties>
<deviceProperties name="k1_x" mandatory="true" description="">
<type xsi:type="pogoDsl:IntVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="k2_x" mandatory="true" description="">
<type xsi:type="pogoDsl:IntVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="k1_y" mandatory="true" description="">
<type xsi:type="pogoDsl:IntVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<deviceProperties name="k2_y" mandatory="true" description="">
<type xsi:type="pogoDsl:IntVectorType"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
</deviceProperties>
<commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0"> <commands name="State" description="This command gets the device state (stored in its device_state data member) and returns it to the caller." execMethod="dev_state" displayLevel="OPERATOR" polledPeriod="0">
<argin description="none"> <argin description="none">
<type xsi:type="pogoDsl:VoidType"/> <type xsi:type="pogoDsl:VoidType"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment