mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-20 15:20:16 +01:00
little changes for docu
This commit is contained in:
parent
5394bceedf
commit
346d5a41f6
|
|
@ -18,7 +18,7 @@ loglevel = 10
|
|||
backupCount = 7
|
||||
|
||||
#Using RegEx-Filter (0|1)
|
||||
#Filter-configuration in section "Filters"
|
||||
#Filter-configuration in section [Filters]
|
||||
useRegExFilter = 1
|
||||
|
||||
[FMS]
|
||||
|
|
@ -48,15 +48,19 @@ filter_range_end = 9999999
|
|||
|
||||
[Filters]
|
||||
#RegEX Filter Configuration
|
||||
#http://www.regexr.com/ - RegEX Test Tool an Documentation
|
||||
#No Filter for a Typ/Plugin Combination = all Data pass
|
||||
#INDIVIDUAL_NAME = TYP;DATAFIELD;PLUGIN;REGEX
|
||||
#TYP = the Data Typ (FMS|ZVEI|POC)
|
||||
#DATAFIELD = the field of the Data Array. See interface.txt for names.
|
||||
#PLUGIN = the name of the Plugin to call with this Filter.
|
||||
#DATAFIELD = the field of the Data Array (See interface.txt)
|
||||
#PLUGIN = the name of the Plugin to call with this Filter
|
||||
#REGEX = the RegEX
|
||||
|
||||
#only ZVEI to template with 25###
|
||||
#testfilter = ZVEI;zvei;template;25[0-9F]{3}
|
||||
#testfilter = ZVEI;zvei;template;25[0-9]{3}
|
||||
|
||||
#only POCSAG to MySQL with the text "ALARM:" in the Message
|
||||
#pocTest = POC;msg;MySQL;ALARM:
|
||||
|
||||
|
||||
[Plugins]
|
||||
|
|
@ -106,9 +110,6 @@ poc_url = www.google.de
|
|||
##### Not ready yet #
|
||||
#####################
|
||||
|
||||
|
||||
[template]
|
||||
data1 = test123
|
||||
data2 = test345
|
||||
data3 = test567
|
||||
data4 = test789
|
||||
test1 = testString
|
||||
test2 = 123456
|
||||
|
|
@ -19,14 +19,14 @@ from includes import globals # Global variables
|
|||
# Simple Filter
|
||||
def isAllowed(poc_id):
|
||||
"""
|
||||
Simple Filter Functions (Allowed ,Denied and Range)
|
||||
Simple Filter Functions (Allowed, Denied and Range)
|
||||
|
||||
@type poc_id: string
|
||||
@param poc_id: POCSAG Ric
|
||||
|
||||
@requires: Configuration has to be set in the config.ini
|
||||
|
||||
@return: True if the Ric is allows, other False
|
||||
@return: True if the Ric is allowed, other False
|
||||
@exception: none
|
||||
"""
|
||||
# 1.) If allowed RICs is set, only they will path,
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
Übergabe an Plugin:
|
||||
|
||||
typ = [FMS|ZVEI|POC]
|
||||
freq = [FREQ(Hz)]
|
||||
data = {"KEY1":"VALUE1","KEY2":"VALUE2"} als Python Dict
|
||||
Handover to Plugin:
|
||||
typ = [FMS|ZVEI|POC]
|
||||
freq = [Freq in Hz]
|
||||
data = {"KEY1":"VALUE1","KEY2":"VALUE2"}
|
||||
|
||||
|
||||
Follgende Daten sind bei der jeweiligen Alarm-Art enthalten
|
||||
und per data["OPTION"] abrufbar:
|
||||
The following informations are included in the var "data".
|
||||
They can be used by their Index Names: data['OPTION']
|
||||
|
||||
ZVEI:
|
||||
- zvei
|
||||
|
|
@ -24,13 +23,14 @@ POCSAG:
|
|||
- bitrate
|
||||
|
||||
|
||||
Es stehen folgende globale Objecte zur Verfügung:
|
||||
Global Objects:
|
||||
|
||||
1.) import logging # Global logger
|
||||
logging - Object
|
||||
Nachricht ins Log per: logging.LOGLEVEL("MESSAGE")
|
||||
Mögliche Loglevel: debug|info|warning|error|exception|critical
|
||||
1.)
|
||||
import logging # Global logger
|
||||
Message into Log: logging.LOGLEVEL("MESSAGE")
|
||||
Loglevel: debug|info|warning|error|exception|critical
|
||||
|
||||
2.) import globals # Global variables
|
||||
config - Object (typ: ConfigParser, stellt config.ini bereit)
|
||||
2.)
|
||||
import globals # Global variables
|
||||
reads Data from the config.ini
|
||||
VALUE = globals.config.get("SECTION", "OPTION")
|
||||
Loading…
Reference in a new issue