def thread_qr16(): # Programa do QR Code 16 rele = 3 ## notifica = "0" while(1): try: qr16 = cmm.Qrcode(ip_qr16,cliente,rele,portao16,notifica, "Leitor 16",mensagem_16) qr16.start() except: time.sleep(3)
def thread_qr1(): # Programa do QR Code 1 rele = 1 ## notifica = "1" while(1): try: qr1 = cmm.Qrcode(ip_qr1,cliente,rele,portao1,notifica,"Leitor 1",mensagem_1) # instancia a classe leitor (a thread quem da o start) qr1.start() # Inicia o programa qrcode correspondente except Exception as err: time.sleep(3)
def thread_qr14(): # Programa do QR Code 14 rele = 3 ## notifica = "0" while(1): try: qr14 = cmm.Qrcode(ip_qr14,cliente,rele,portao14,notifica, "Leitor 14",mensagem_14) qr14.start() except: time.sleep(3)
def thread_qr15(): # Programa do QR Code 15 rele = 3 ## notifica = "0" while(1): try: qr15 = cmm.Qrcode(ip_qr15,cliente,rele,portao15,notifica, "Leitor 15",mensagem_15) qr15.start() except: time.sleep(3)
def thread_qr12(): # Programa do QR Code 12 rele = 3 ## notifica = "0" while(1): try: qr12 = cmm.Qrcode(ip_qr12,cliente,rele,portao12,notifica, "Leitor 12",mensagem_12) qr12.start() except: time.sleep(3)
def thread_qr13(): # Programa do QR Code 13 rele = 3 ## notifica = "0" while(1): try: qr13 = cmm.Qrcode(ip_qr13,cliente,rele,portao13,notifica, "Leitor 13",mensagem_13) qr13.start() except: time.sleep(3)
def thread_qr10(): # Programa do QR Code 10 rele = 3 ## notifica = "0" while(1): try: qr10 = cmm.Qrcode(ip_qr10,cliente,rele,portao10,notifica, "Leitor 10",mensagem_10) qr10.start() except: time.sleep(3)
def thread_qr11(): # Programa do QR Code 11 rele = 3 ## notifica = "0" while(1): try: qr11 = cmm.Qrcode(ip_qr11,cliente,rele,portao11,notifica, "Leitor 11",mensagem_11) qr11.start() except: time.sleep(3)
def thread_qr9(): # Programa do QR Code 9 rele = 3 ## notifica = "0" while(1): try: qr9 = cmm.Qrcode(ip_qr9,cliente,rele,portao9,notifica, "Leitor 9",mensagem_9) qr9.start() except: time.sleep(3)
def thread_qr8(): # Programa do QR Code 8 rele = 3 ## notifica = "0" while(1): try: qr8 = cmm.Qrcode(ip_qr8,cliente,rele,portao8,notifica, "Leitor 8",mensagem_8) qr8.start() except: time.sleep(3)
def thread_qr7(): # Programa do QR Code 7 rele = 3 ## notifica = "0" while(1): try: qr7 = cmm.Qrcode(ip_qr7,cliente,rele,portao7,notifica, "Leitor 7",mensagem_7) qr7.start() except: time.sleep(3)
def thread_qr2(): # Programa do QR Code 2 rele = 1 ## notifica = "1" while(1): try: qr2 = cmm.Qrcode(ip_qr2,cliente,rele,portao2,notifica, "Leitor 2",mensagem_2) qr2.start() except: time.sleep(3)
def thread_qr14(): # Programa do QR Code 14 qr14.start() def thread_qr15(): # Programa do QR Code 15 qr15.start() def thread_qr16(): # Programa do QR Code 16 qr16.start() if ip_qr1 != "": qr1 = cmm.Qrcode(ip_qr1,cliente,rele,portao1,notifica,"Leitor 1") # instancia a classe leitor (a thread quem da o start) qrcode1 = threading.Thread(target=thread_qr1) # Cria e da start ma thread qrcode1.start() if ip_qr2 != "": qr2 = cmm.Qrcode(ip_qr2,cliente,rele,portao2,notifica, "Leitor 2") qrcode2 = threading.Thread(target=thread_qr2) qrcode2.start() if ip_qr3 != "": qr3 = cmm.Qrcode(ip_qr3,cliente,rele,portao3,notifica, "Leitor 3") qrcode3 = threading.Thread(target=thread_qr3) qrcode3.start()