|
From: Marc J. R. S. <mro...@ce...> - 2015-08-20 11:29:56
|
Tango specific members have to be removed from taurusattribute.
Remove _applyConfig from taurusattribute.
Move setter methods from taurusattribute to tangoattribute and adapt
them in order to use the method from the parent class taurusattribute
and subsequently apply the configuration.
---
lib/taurus/core/tango/tangoattribute.py | 24 ++++++++++++++++++++++++
lib/taurus/core/taurusattribute.py | 10 ----------
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/lib/taurus/core/tango/tangoattribute.py b/lib/taurus/core/tango/tangoattribute.py
index 66bc8b3..0e4a736 100755
--- a/lib/taurus/core/tango/tangoattribute.py
+++ b/lib/taurus/core/tango/tangoattribute.py
@@ -804,6 +804,30 @@ class TangoAttribute(TaurusAttribute):
self.calarms = [l_str, h_str]
self._applyConfig()
+ def setFormat(self, fmt):
+ TaurusAttribute.setFormat(self, fmt)
+ self._applyConfig()
+
+ def setDescription(self, descr):
+ TaurusAttribute.setDescription(self, descr)
+ self._applyConfig()
+
+ def setLabel(self, lbl):
+ TaurusAttribute.setLabel(self, lbl)
+ self._applyConfig()
+
+ def setRange(self, low, high):
+ TaurusAttribute.setRange(self, low, high)
+ self._applyConfig()
+
+ def setWarnings(self, low, high):
+ TaurusAttribute.setWarnings(self, low, high)
+ self._applyConfig()
+
+ def setAlarms(self, low, high):
+ TaurusAttribute.setAlarms(self, low, high)
+ self._applyConfig()
+
def _applyConfig(self):
config = self._pytango_attrinfoex
self.setConfigEx(config)
diff --git a/lib/taurus/core/taurusattribute.py b/lib/taurus/core/taurusattribute.py
index 7ec8e11..3b2e851 100644
--- a/lib/taurus/core/taurusattribute.py
+++ b/lib/taurus/core/taurusattribute.py
@@ -519,19 +519,15 @@ class TaurusAttribute(TaurusModel):
def setParam(self, param_name, value):
if self.getParam(param_name):
setattr(self, param_name, value)
- self._applyConfig()
def setFormat(self, fmt):
self.format = fmt
- self._applyConfig()
def setDescription(self, descr):
self.description = descr
- self._applyConfig()
def setLabel(self, lbl):
self.label = lbl
- self._applyConfig()
@tep14_deprecation(alt='getRange')
def setLimits(self, low, high):
@@ -539,18 +535,12 @@ class TaurusAttribute(TaurusModel):
def setRange(self, low, high):
self.range = [low, high]
- self._applyConfig()
def setWarnings(self, low, high):
self.warning = [low, high]
- self._applyConfig()
def setAlarms(self, low, high):
self.alarm = [low, high]
- self._applyConfig()
-
- def _applyConfig(self):
- pass
def isBoolean(self, cache=True):
v = self.read(cache)
--
1.8.1.4
|