Conflicts:
	CHANGELOG.md
	config/config.template.ini
This commit is contained in:
Marco Schotthöfer 2021-01-28 21:11:24 +01:00
commit ebeeec467a
3 changed files with 33 additions and 2 deletions

View file

@ -158,7 +158,20 @@ def decode(freq, decoded):
# check for double alarm
if doubleFilter.checkID("POC", poc_id+poc_sub, poc_text):
data = {"ric":poc_id, "function":poc_sub, "msg":poc_text, "bitrate":bitrate, "description":poc_id, "has_geo":has_geo}
data = {"ric":poc_id, "function":poc_sub, "msg":poc_text, "bitrate":bitrate, "description":poc_id, "has_geo":has_geo, "has_schema_fields":False}
# if a schema is defined, analyze and associate
if globalVars.config.has_option("POC", "schemaRegex"):
logging.debug("schemaRegex found")
m = re.match(globalVars.config.get("POC", "schemaRegex"), poc_text)
if m:
logging.debug("POC Schema match")
# enrich data structure by regex groups
data.update(m.groupdict())
data["has_schema_fields"] = True
else:
logging.debug("No POC Schema match")
if has_geo == True:
data["lon"] = lon
data["lat"] = lat
@ -182,7 +195,7 @@ def decode(freq, decoded):
logging.debug(" - multicastAlarm without msg")
from includes import multicastAlarm
multicastAlarm.newEntrymultiList(data)
# multicastAlarm processing if enabled and alarm message has been received
elif globalVars.config.getint("multicastAlarm", "multicastAlarm") and data["msg"] != "" and data["ric"] in globalVars.config.get("multicastAlarm", "multicastAlarm_ric"):
logging.debug(" - multicastAlarm with message")