From 21ad7e1a4a5d5cbd21e9c2f4309af4d940d13ab0 Mon Sep 17 00:00:00 2001 From: JHCD Date: Mon, 25 May 2015 00:11:35 +0200 Subject: [PATCH 1/2] add some documentation --- plugins/BosMon/BosMon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/BosMon/BosMon.py b/plugins/BosMon/BosMon.py index 8793ec0..d9cc727 100644 --- a/plugins/BosMon/BosMon.py +++ b/plugins/BosMon/BosMon.py @@ -43,7 +43,7 @@ def run(typ,freq,data): logging.debug("connect to BosMon") httprequest = httplib.HTTPConnection(globals.config.get("BosMon", "bosmon_server"), globals.config.get("BosMon", "bosmon_port")) #debug-level to shell (0=no debug|1) - httprequest.set_debuglevel(1) + httprequest.set_debuglevel(0) except: logging.exception("cannot connect to BosMon") @@ -52,7 +52,8 @@ def run(typ,freq,data): logging.debug("Start FMS to BosMon") try: #BosMon-Telegramin expected assembly group, direction and tsi in one field - #structure: Byte 1: assembly group; Byte 2: Direction; Byte 3+4: tactic short info + #structure (binary as hex in base10): + # Byte 1: assembly group; Byte 2: Direction; Byte 3+4: tactic short info info = 0 #assembly group: info = info + 1 # + b0001 (Assumption: is in every time 1 (no output from multimon-ng)) @@ -66,6 +67,8 @@ def run(typ,freq,data): info = info + 8 # + b1000 elif "II" in data["tsi"]: info = info + 4 # + b0100 + # "I" is + b0000 => nothing to do... + params = urllib.urlencode({'type':'fms', 'address':data["fms"], 'status':data["status"], 'info':info, 'flags':'0'}) logging.debug(" - Params: %s", params) bosMonRequest(httprequest, params, headers) From 2b333975c51645f63354b1a141c81a662956d935 Mon Sep 17 00:00:00 2001 From: JHCD Date: Mon, 25 May 2015 00:13:34 +0200 Subject: [PATCH 2/2] add some documentation --- plugins/BosMon/BosMon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/BosMon/BosMon.py b/plugins/BosMon/BosMon.py index d9cc727..889dcb0 100644 --- a/plugins/BosMon/BosMon.py +++ b/plugins/BosMon/BosMon.py @@ -67,7 +67,7 @@ def run(typ,freq,data): info = info + 8 # + b1000 elif "II" in data["tsi"]: info = info + 4 # + b0100 - # "I" is + b0000 => nothing to do... + # "I" is nothing to do + b0000 params = urllib.urlencode({'type':'fms', 'address':data["fms"], 'status':data["status"], 'info':info, 'flags':'0'}) logging.debug(" - Params: %s", params)