edit template and interface info

This commit is contained in:
Schrolli 2015-05-22 07:32:39 +02:00
parent 4cf0b63f24
commit 813fdb02f5
2 changed files with 11 additions and 5 deletions

View file

@ -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")

View file

@ -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")