def __init__(self, servicio_db): self.__autenticacion_log = Applogging("Autenticacion") self.servicio_db = servicio_db self.__sesion = servicio_db.sesion self.usuario_autenticado = False self.ultima_autenticacion = None self.usuario = None
def __init__(self, nombre_log, servicio_db): self.__cliente_log = Applogging(nombre_log) self.__servicio_db = servicio_db self.__sesion = servicio_db.sesion self.__hilo_datalock = threading.Lock() self.__hilo_cliente_rpi = threading.Thread() self.__comenzar_servicio_background()
def __init__(self, app, _app_ctx_stack): self.__app = app self.__mysql_log = Applogging("MysqlDB") self.__server_ssh = None self.engine = None self.sesion = None self.__iniciar_instancias_conexiones(_app_ctx_stack)
def __init__(self, app): self.__app = app self.__log_startup = Applogging("Startup") self.servicio_db = None self.servicio_autenticacion = None self.servicio_rpi = None self.__inyeccion_dependencias()
def __init__(self): self.__rpi_log = Applogging("RPI") self.__hilo_datalock = threading.Lock() self.__hilo_rpi = threading.Thread() self.__comenzar_servicio_background() self.__pin_temperatura = TEMP_PIN self.__servicio_temperatura = None self.valor_temperatura = None
def __init__(self): self.__rpi_log = Applogging("RPI") self.__hilo_datalock = threading.Lock() self.__hilo_rpi = threading.Thread() self.__pin_buzzer = BUZZER_PIN self.temperatura_cpu = None self.parpadear = True self.__comenzar_servicio_background()
def __add_index_controller(self): index_controller_log = Applogging("Controlador Index") self.__app.add_url_rule( '/', endpoint='index', view_func=Indexcontroller.as_view( 'index', autenticacion=self.__servicio_autenticacion, index_controller_log=index_controller_log), methods=["GET", "POST"])
def __add_registro_controller(self): registro_controller_log = Applogging("Controlador Registro") self.__app.add_url_rule( '/registro', endpoint='registro', view_func=Registrocontroller.as_view( 'registro', repositorio_usuario=self.__repositorio_usuario, registro_controller_log=registro_controller_log), methods=["GET", "POST"])
def __add_monitorizacion_controller(self): monitorizacion_controller_log = Applogging("Controlador Principal") self.__app.add_url_rule( '/monitorizacion', endpoint='monitorizacion', view_func=Monitorizacioncontroller.as_view( 'monitorizacion', autenticacion=self.__servicio_autenticacion, monitorizacion_controller_log=monitorizacion_controller_log, api=self.__api), methods=["GET", "POST"])
def __init__(self, app): self.__app = app self.__log_startup = Applogging("Startup") self.__servicio_db = None self.__servicio_autenticacion = None self.__repositorio_usuario = None self.__servicioRPi1 = None self.__servicioRPi2 = None self.__servicio_rpi_local = None self.__api = None self.__inyeccion_servicios()
def __add_principal_controller(self): principal_controller_log = Applogging("Controlador Principal") self.__app.add_url_rule( '/principal', endpoint='principal', view_func=Principalcontroller.as_view( 'principal', autenticacion=self.__servicio_autenticacion, rpi_local=self.__servicio_rpi_local, principal_controller_log=principal_controller_log, api=self.__api), methods=["GET", "POST", "PUT"])
def __add_servicio_autenticacion(self): self.__log_startup.info_log("Iniciando servicio autenticacion...") self.servicio_autenticacion = Autenticacion(self.servicio_db) index_controller_log = Applogging("Controlador Index") self.__app.add_url_rule('/', endpoint='index', view_func=Indexcontroller.as_view( 'index', autenticacion=self.servicio_autenticacion, index_controller_log=index_controller_log), methods=["GET", "POST"]) registro_controller_log = Applogging("Controlador Registro") self.__app.add_url_rule( '/registro', endpoint='registro', view_func=Registrocontroller.as_view( 'registro', autenticacion=self.servicio_autenticacion, registro_controller_log=registro_controller_log), methods=["GET", "POST"])
def __add_servicio_rpi(self): self.__log_startup.info_log("Iniciando servicio rpi...") self.servicio_rpi = Rpi() principal_controller_log = Applogging("Controlador Principal") self.__app.add_url_rule( '/principal', endpoint='principal', view_func=Principalcontroller.as_view( 'principal', autenticacion=self.servicio_autenticacion, rpi=self.servicio_rpi, principal_controller_log=principal_controller_log), methods=["GET", "POST"])
def __init__(self, app, _app_ctx_stack): self.__app = app self.__mysql_log = Applogging("MysqlDB") self.engine = None self.sesion = None self.__init_configuracion(_app_ctx_stack)
def __init__(self, app): self.__app = app self.__log_startup = Applogging("Startup") self.__temperatura = RpiLocal()
def __init__(self, servicio_db, sesion): self.servicio_db = servicio_db self.sesion = sesion self.__base_log = Applogging("RepositorioBase")
def __init__(self, servicio_db, sesion): super().__init__(servicio_db, sesion) self.__repositorio_log = Applogging("UsuarioRepo")
from servicios.weblogging import Applogging excepcion_import_log = Applogging("Import") def error_gpio_import_log(): return excepcion_import_log.error_log("Error al importar modulo GPIO") def error_mosquito_import_log(): return excepcion_import_log.error_log( "Error al importar modulo paho.mqtt (mosquito)")
def __init__(self, app): self.__app = app self.__log_startup = Applogging("Startup") self.__acelerometro = RpiLocal()
def __init__(self): self.__pin_ventilador = VENTILADOR_PIN self.__rpi_log = Applogging("RPI")
def __init__(self): self.__rpi_log = Applogging("RPI") self.__hilo_datalock = threading.Lock() self.__hilo_rpi = threading.Thread() self.__pin_ventilador = VENTILADOR_PIN self.__comenzar_servicio_background()