From 6912c597853cccfb99e6746c95f8bf22372f284c Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Wed, 22 Apr 2020 20:24:54 +0200 Subject: [PATCH 1/6] Add paramter to change between main-ric and sub-ric --- config/config.template.ini | 5 +++++ includes/descriptionList.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/config/config.template.ini b/config/config.template.ini index 358fd18..4ce2d02 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -103,6 +103,11 @@ filter_range_end = 9999999 # descriptions are loaded from csv/poc.csv idDescribed = 0 +# Main-RIC with Subric (0 - off) +# Only Sub-RIC (1 - on) +# descriptions are loaded from csv/poc.csv +onlysubric = 0 + # Static Massages for Subrics. rica = Feuer ricb = TH diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 11281fd..2206d29 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -110,6 +110,9 @@ def getDescription(typ, data): elif typ == "ZVEI": resultStr = zveiDescribtionList[data] elif typ == "POC": + if globalVars.config.getint("POC", "onlysubric"): + resultStr = ricDescribtionList[data] # only SubRIC + else: resultStr = ricDescribtionList[data[:-1]] # MainRIC resultStr += " " + ricDescribtionList[data] # SubRIC else: From 502f4036fbbc499bedf84667d97db83b7d238ad3 Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Wed, 22 Apr 2020 21:44:03 +0200 Subject: [PATCH 2/6] Change distance --- includes/descriptionList.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 2206d29..b8d528b 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -112,9 +112,9 @@ def getDescription(typ, data): elif typ == "POC": if globalVars.config.getint("POC", "onlysubric"): resultStr = ricDescribtionList[data] # only SubRIC - else: - resultStr = ricDescribtionList[data[:-1]] # MainRIC - resultStr += " " + ricDescribtionList[data] # SubRIC + else: + resultStr = ricDescribtionList[data[:-1]] # MainRIC + resultStr += " " + ricDescribtionList[data] # SubRIC else: logging.warning("Invalid Typ: %s", typ) From c564993ce260a756b8ab4e3c2d485e22e0ea728a Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Wed, 22 Apr 2020 22:18:26 +0200 Subject: [PATCH 3/6] Change description --- config/config.template.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.template.ini b/config/config.template.ini index 4ce2d02..af5da01 100644 --- a/config/config.template.ini +++ b/config/config.template.ini @@ -103,8 +103,8 @@ filter_range_end = 9999999 # descriptions are loaded from csv/poc.csv idDescribed = 0 -# Main-RIC with Subric (0 - off) -# Only Sub-RIC (1 - on) +# change between Main-RIC with Sub-RIC (0 - off) +# or only the Sub-RIC (1 - on) # descriptions are loaded from csv/poc.csv onlysubric = 0 From c8f6ed52c0112fab8c168fd5c071efe4af525b60 Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Wed, 22 Apr 2020 22:23:23 +0200 Subject: [PATCH 4/6] change poc template description for subric --- csv/poc.template.csv | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/csv/poc.template.csv b/csv/poc.template.csv index 9dfe7d4..8cba8c2 100644 --- a/csv/poc.template.csv +++ b/csv/poc.template.csv @@ -5,12 +5,18 @@ ric,description # For each RIC-Address you could set a description-text # Use the structure: ric,"Description-Text" # +# main RIC with subric: # You can even define specific subrics, therefore you # 1. need to specify a main RIC: 1234567, "Unit One" # 2. specify a certain subric: 1234567B, "Subunit Bravo" # The result for 1234567B will be "Unit One Subunit Bravo" # - Be sure having defined the main RIC (step one)! - # +# Only subric: +# Specify only the subric: 123457B, "Subunit Bravo" +# The result for 1234567B will be "Subunit Bravo" +# - main RIC is not required - +# # !!! DO NOT delete the first line !!! # 1234567,"POCSAG testdata äöüß" From 1bb71d13753772154d13a8c83f3fbc4ad548f514 Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Mon, 27 Apr 2020 19:09:25 +0200 Subject: [PATCH 5/6] Update Changelog.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa2af66..165143b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### __[v2.5.1]__ - unreleased ##### Added - Plugin requirements: Added requirements.txt for all plugins requiring extra python packages so the install will be easier +- POC: neuer Parameter um Sub-RICs ohne Hauptdefinition zu beschreiben. Parameter 'onlysubric'. [#449](https://github.com/Schrolli91/BOSWatch/pull/449) ##### Changed ##### Deprecated ##### Removed From 9b5aa11462d1b76ef75403338b6d9e3d2d2da7e7 Mon Sep 17 00:00:00 2001 From: Lars Gremme Date: Mon, 27 Apr 2020 19:51:48 +0200 Subject: [PATCH 6/6] Change description to english --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 165143b..d1efabf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### __[v2.5.1]__ - unreleased ##### Added - Plugin requirements: Added requirements.txt for all plugins requiring extra python packages so the install will be easier -- POC: neuer Parameter um Sub-RICs ohne Hauptdefinition zu beschreiben. Parameter 'onlysubric'. [#449](https://github.com/Schrolli91/BOSWatch/pull/449) +- DescriptionList POC: add new description parameter for Sub-RICs without a main RIC definition. parameter 'onlysubric'. [#449](https://github.com/Schrolli91/BOSWatch/pull/449) ##### Changed ##### Deprecated ##### Removed