mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-20 23:30:17 +01:00
edit template and interface info
This commit is contained in:
parent
4cf0b63f24
commit
813fdb02f5
|
|
@ -5,7 +5,8 @@ freq = [FREQ(Hz)]
|
|||
data = {"KEY1":"VALUE1","KEY2":"VALUE2"} als Python Dict
|
||||
|
||||
|
||||
Follgende Daten sind bei der jeweiligen Alarm-Art enthalten:
|
||||
Follgende Daten sind bei der jeweiligen Alarm-Art enthalten
|
||||
und per data["OPTION"] abrufbar:
|
||||
|
||||
ZVEI:
|
||||
- zvei
|
||||
|
|
@ -26,6 +27,9 @@ Es stehen folgende globale Objecte zur Verf
|
|||
|
||||
1.) import logging # Global logger
|
||||
logging - Object
|
||||
Nachricht ins Log per: logging.LOGLEVEL("MESSAGE")
|
||||
Mögliche Loglevel: debug|info|warning|error|exception|critical
|
||||
|
||||
2.) import globals # Global variables
|
||||
config - Object (typ: ConfigParser, stellt config.ini bereit)
|
||||
config - Object (typ: ConfigParser, stellt config.ini bereit)
|
||||
VALUE = globals.config.get("SECTION", "OPTION")
|
||||
|
|
@ -32,7 +32,8 @@ def run(typ,freq,data):
|
|||
logging.debug(" - %s = %s", key, val)
|
||||
except:
|
||||
logging.exception("cannot read config file")
|
||||
|
||||
|
||||
########## User Plugin CODE ##########
|
||||
if typ == "FMS":
|
||||
logging.warning(typ + " not supported")
|
||||
elif typ == "ZVEI":
|
||||
|
|
@ -40,7 +41,8 @@ def run(typ,freq,data):
|
|||
elif typ == "POC":
|
||||
logging.warning(typ + " not supported")
|
||||
else:
|
||||
logging.warning(typ + " not supported")
|
||||
|
||||
logging.warning(typ + " not supported")
|
||||
########## User Plugin CODE ##########
|
||||
|
||||
except:
|
||||
logging.exception("unknown error")
|
||||
|
|
|
|||
Loading…
Reference in a new issue