diff --git a/config/config.template.ini b/config/config.template.ini index c70e8f9..533d840 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -128,6 +128,19 @@ geo_format = #C(\d{2})(\d{5}),(\d{2})(\d{5})# geo_order = LON, lon, LAT, lat # Analyze message and associate data to named fields +# If the regular expression matches the POC message, the "named groups" defined in schemaRegex will be added to the data structure. +# You can check this by looking at the value in data["has_schema_fields"]. If it is True, then the regular expression has been hit and the additional fields are available. +# E.g. POC message is "TESTALARM Person in Zwangslage;H2.04;Neustadt;Königsbach;Weinstraße 1;VS Winzerheim;;Dortige Baustelle..Treppensturz" +# +# Without the schemaRegex, data will look like this (RIC, SubRIC and Bitrate are random): +# {'function': '1', 'has_geo': False, 'description': '1234567', 'has_schema_fields': False, 'msg': 'TESTALARM Person in Zwangslage;H2.04;Neustadt;Königsbach;Weinstraße 1;VS Winzerheim;;Dortige Baustelle..Treppensturz', 'bitrate': 1200, 'ric': '1234567'} +# +# When using the schemaRegex from below, data will look like this: +# {'function': '1', 'has_geo': False, 'description': '1234567', 'has_schema_fields': True, 'msg': 'TESTALARM Person in Zwangslage;H2.04;Neustadt;Königsbach;Weinstraße 1;VS Winzerheim;;Dortige Baustelle..Treppensturz', 'bitrate': 1200, 'ric': '1234567, 'Objekt': 'VS Winzerheim', 'StichwortLang': 'TESTALARM Person in Zwangslage', 'Ort': 'Neustadt', 'Bemerkung1': '', 'Adresse': 'Weinstraße 1', 'Bemerkung2': 'Dortige Baustelle..Treppensturz', 'StichwortKurz': 'H2.04', 'Ortsteil': 'Königsbach' +# +# Attention: If you define named groups with names of fields that that are already present in POC decoder's standard data-structure, the content of the respective fields will be overwritten +# with data evaluated by this regex (if the regex finds a match). E.g. if you define a named group like "...(?P.*)..." and the regex will be hit, +# then data["ric"] will get filled with the content evaluated by the regex. #schemaRegex = ^(?P.*?);(?P.*?);(?P.*?);(?P.*?);(?P.*?);(?P.*?);(?P.*?);(?P.*?)$