add some documentation

This commit is contained in:
Bastian Schroll 2019-10-26 18:35:31 +02:00
parent edb0fae58a
commit 3b7847a515
No known key found for this signature in database
GPG key ID: 0AE96912A20E9F5F
2 changed files with 12 additions and 1 deletions

View file

@ -19,12 +19,16 @@ import time
logging.debug("- %s loaded", __name__)
# todo check function and document + write an test
# todo check function - write an test
_additionalWildcards = {}
def registerWildcard(wildcard, bwPacketField):
"""!Register a new additional wildcard
@param wildcard: New wildcard string with format: '{WILDCARD}'
@param bwPacketField: Field of the bwPacket which is used for wildcard replacement"""
if wildcard in _additionalWildcards:
logging.error("wildcard always registered: %s", wildcard)
return
@ -33,6 +37,11 @@ def registerWildcard(wildcard, bwPacketField):
def replaceWildcards(message, bwPacket):
"""!Replace the wildcards in a given message
@param message: Message in which wildcards should be replaced
@param bwPacket: bwPacket instance with the replacement information
@return Input message with the replaced wildcards"""
_wildcards = {
# formatting wildcards
# todo check if br and par are needed - if not also change config

View file

@ -13,6 +13,8 @@ Folgendes gilt:
- Sobald ein Filter mit all seinen Checks besteht, wird mit der Ausführung des Routers fortgefahren
- Sollten alle Filter fehlschlagen wird die Ausführung des Routers beendet
Vereinfacht kann man sagen, dass einzelnen Router ODER-verknüpft und die jeweiligen Checks UND-verknüpft sind.
## Resource
`filter.regexFilter`