mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-04-04 14:07:25 +00:00
small changes in documentation
This commit is contained in:
parent
16865b2c57
commit
97e87fcae2
11 changed files with 140 additions and 128 deletions
|
|
@ -2,9 +2,10 @@
|
|||
# -*- coding: cp1252 -*-
|
||||
|
||||
"""
|
||||
Handler for the Filter and Plugins at an Alarm
|
||||
Handler for the filter and plugins at an alarm
|
||||
|
||||
@author: Bastian Schroll
|
||||
@author: Jens Herrmann
|
||||
|
||||
@requires: none
|
||||
"""
|
||||
|
|
@ -13,10 +14,13 @@ import logging # Global logger
|
|||
|
||||
from includes import globals # Global variables
|
||||
|
||||
|
||||
##
|
||||
#
|
||||
# main function for central filtering and calling the plugins
|
||||
#
|
||||
def processAlarm(typ,freq,data):
|
||||
"""
|
||||
Function to process Filters and Plugins at Alarm
|
||||
Function to process filters and plugins at Alarm
|
||||
|
||||
@type typ: string (FMS|ZVEI|POC)
|
||||
@param typ: Typ of the dataset
|
||||
|
|
@ -25,29 +29,26 @@ def processAlarm(typ,freq,data):
|
|||
@type data: map of data (structure see interface.txt)
|
||||
@param data: Contains the parameter
|
||||
|
||||
@requires: active Plugins in pluginList
|
||||
@requires: active plugins in pluginList
|
||||
|
||||
@return: nothing
|
||||
@exception: Exception if Alarm processing failed
|
||||
"""
|
||||
try:
|
||||
logging.debug("[ ALARM ]")
|
||||
#Go to all Plugins in pluginList
|
||||
# Go to all plugins in pluginList
|
||||
for pluginName, plugin in globals.pluginList.items():
|
||||
|
||||
#if enabled use RegEx-Filter
|
||||
# if enabled use RegEx-filter
|
||||
if globals.config.getint("BOSWatch","useRegExFilter"):
|
||||
from includes import filter
|
||||
if filter.checkFilters(typ,data,pluginName,freq):
|
||||
logging.debug("call Plugin: %s", pluginName)
|
||||
plugin.run(typ,freq,data)
|
||||
logging.debug("return from: %s", pluginName)
|
||||
|
||||
else: #RegEX Filter off - Call Plugin direct
|
||||
else: # RegEX filter off - call plugin directly
|
||||
logging.debug("call Plugin: %s", pluginName)
|
||||
plugin.run(typ,freq,data)
|
||||
logging.debug("return from: %s", pluginName)
|
||||
|
||||
logging.debug("[END ALARM]")
|
||||
except:
|
||||
logging.exception("Error in Alarm processing")
|
||||
Loading…
Add table
Add a link
Reference in a new issue