From 49153a6485ed665f0d981dd1985251492d2dcaf8 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 29 Jan 2016 15:23:52 +0100 Subject: edidebug: improve ESTn TAG parsing --- edi/edidebug.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'edi') diff --git a/edi/edidebug.py b/edi/edidebug.py index d753d6e..6089a0d 100755 --- a/edi/edidebug.py +++ b/edi/edidebug.py @@ -588,16 +588,16 @@ def decode_deti(item): p.dec() -item_estn_head_struct = "!HB" +item_estn_head_struct = "!BBB" def decode_estn(item): estN = chr(ord("0") + ord(item['name'][3])) p.pr("TAG item EST{} (len={})".format(estN, item['length'])) p.inc() tag_value = item['value'] - scid_sad, tpl_rfa = struct.unpack(item_estn_head_struct, tag_value[:3]) - scid = scid_sad >> 10 - sad = scid_sad & 0x3F + scid_sad, sad_low, tpl_rfa = struct.unpack(item_estn_head_struct, tag_value[:3]) + scid = scid_sad >> 2 + sad = ((scid_sad << 8) | sad_low) & 0x3FF tpl = tpl_rfa >> 2 stc = eti_data.new_subchannel() -- cgit v1.2.3