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()
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()
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()