interface with array

This commit is contained in:
Schrolli 2015-05-18 14:49:10 +02:00
parent bd6ae68ea3
commit 5cddcf69d7
4 changed files with 22 additions and 25 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
*.psd
*.pyc
*.pyc
*.log

View file

@ -32,16 +32,15 @@ logger.addHandler(ch)
#warning
#error - normal error - program goes further
#exception - error handler in try:exc: into the message
#critical - big error, program exit
#critical - critical error, program exit
daten = ["12345"]
while True:
time.sleep(1)
print ("Alarm!")
logging.info("Alarm!")
for i in pluginloader.getPlugins():
logging.debug("Loading plugin " + i["name"])
plugin = pluginloader.loadPlugin(i)
plugin.run("zvei","","12345","","")
plugin.run("zvei","00000000",daten)

View file

@ -1,23 +1,19 @@
Übergabe an Plugin:
Typ = FMS, ZVEI oder POC
Frequenz = Frequenz in Hz
daten[] als Python List
ZVEI:
=====
typ = zvei
frequenz= empfangsfrequenz
data1 = zvei code
data2 =
data3 =
- ZVEI code
FMS:
====
typ = fms
frequenz= empfangsfrequenz
data1 = fms kennung
data2 = status
data3 = richtung
- FMS Kennung
- Status
- Richtung
- TKI
POCSAG 1200:
============
typ = poc1200
frequenz= empfangsfrequenz
data1 = ric
data2 = sub_ric
data3 = text
POCSAG:
- RIC
- Sub RIC
- Text

View file

@ -1,8 +1,9 @@
import logging
def run(typ,frequenz,data1,data2,data3):
def run(typ,frequenz,daten):
logging.debug("Throw Template Plugin")
try:
logging.info("ZVEI: %s wurde empfangen!", daten[0])
logging.debug("try 5/0")
test = 5/0
except: