def __init__(self, address, iesmas, road, alias, invert = False): Irenginys.__init__(self, address) self.iesmas = iesmas self.road = road self.invert = invert self.alias = alias self.onIesmasStateChanged() if iesmas: self.iesmas.stateChanged.connect(self.onIesmasStateChanged)
def __init__(self, address, port, in_ruozas, out_ruozas1, out_ruozas2): Irenginys.__init__(self, address) self.port = port # iesmo portas prie valdiklio if not address in Iesmas.data: Iesmas.data[address] = 0 self._state = 0 self.in_ruozas = in_ruozas self.ruozas1 = out_ruozas1 self.ruozas2 = out_ruozas2 self.in_ruozas.addEnd(self) self.ruozas1.addEnd(self) self.ruozas2.addEnd(self)
def __init__(self, address, iesmas, ruozas, alias, evalfn=None): Irenginys.__init__(self, address) self.alias = alias self.state = Sviesoforas4.State.ZALIA self.blink_tm = self.startTimer(800) self.iesmas = iesmas self.ruozas = ruozas self.evalfn = evalfn self.iesmas.stateChanged.connect(self.onIesmasStateChanged) self.connectedSignals = [] self.test() self._evalState()