Exemplo n.º 1
0
 def setRange(self, *limits):
     if isinstance(limits[0], list):
         limits = limits[0]
     low, high = limits
     low = Quantity(low)
     high = Quantity(high)
     TaurusAttribute.setRange(self, [low, high])
     infoex = self._pytango_attrinfoex
     if low.magnitude != float("-inf"):
         infoex.min_value = str(low.to(self._units).magnitude)
     else:
         infoex.min_value = "Not specified"
     if high.magnitude != float("inf"):
         infoex.max_value = str(high.to(self._units).magnitude)
     else:
         infoex.max_value = "Not specified"
     self._applyConfig()
Exemplo n.º 2
0
 def setRange(self, *limits):
     if isinstance(limits[0], list):
         limits = limits[0]
     low, high = limits
     low = Quantity(low)
     high = Quantity(high)
     TaurusAttribute.setRange(self, [low, high])
     infoex = self._pytango_attrinfoex
     if low.magnitude != float('-inf'):
         infoex.min_value = str(low.to(self._units).magnitude)
     else:
         infoex.min_value = 'Not specified'
     if high.magnitude != float('inf'):
         infoex.max_value = str(high.to(self._units).magnitude)
     else:
         infoex.max_value = 'Not specified'
     self._applyConfig()