Exemplo n.º 1
0
 def setAlarms(self, *limits):
     if isinstance(limits[0], list):
         limits = limits[0]
     low, high = limits
     low = Quantity(low)
     high = Quantity(high)
     TaurusAttribute.setAlarms(self, [low, high])
     infoex = self._pytango_attrinfoex
     if low.magnitude != float('-inf'):
         infoex.alarms.min_alarm = str(low.to(self._units).magnitude)
     else:
         infoex.alarms.min_alarm = 'Not specified'
     if high.magnitude != float('inf'):
         infoex.alarms.max_alarm = str(high.to(self._units).magnitude)
     else:
         infoex.alarms.max_alarm = 'Not specified'
     self._applyConfig()
Exemplo n.º 2
0
 def setAlarms(self, *limits):
     if isinstance(limits[0], list):
         limits = limits[0]
     low, high = limits
     low = Quantity(low)
     high = Quantity(high)
     TaurusAttribute.setAlarms(self, [low, high])
     infoex = self._pytango_attrinfoex
     if low.magnitude != float("-inf"):
         infoex.alarms.min_alarm = str(low.to(self._units).magnitude)
     else:
         infoex.alarms.min_alarm = "Not specified"
     if high.magnitude != float("inf"):
         infoex.alarms.max_alarm = str(high.to(self._units).magnitude)
     else:
         infoex.alarms.max_alarm = "Not specified"
     self._applyConfig()
Exemplo n.º 3
0
 def setRange(self, *limits):
     if isinstance(limits[0], list):
         limits = limits[0]
     low, high = limits
     low = Quantity(low)
     if low.unitless:
         low = Quantity(low.magnitude, self._units)
     high = Quantity(high)
     if high.unitless:
         high = Quantity(high.magnitude, self._units)
     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()