def checkValue(self, value): if not self._dpt.limits[0] <= value <= self._dpt.limits[1]: raise DPTXlatorValueError("Value not in range %r" % repr(self._dpt.limits))
def checkValue(self, value): for index in range(3): if not self._dpt.limits[0][index] <= value[ index] <= self._dpt.limits[1][index]: raise DPTXlatorValueError("value not in range %r" % repr(self._dpt.limits))
def checkData(self, data): if not 0x00000000 <= data <= 0xffffffff: raise DPTXlatorValueError( "data %s not in (0x00000000, 0xffffffff)" % hex(data))
def checkValue(self, value): if value not in self._dpt.limits and value not in self.DPT_Generic.limits: raise DPTXlatorValueError("value %d not in %s" % (value, str(self._dpt.limits)))