diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-29 15:23:52 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-01-29 15:23:52 +0100 |
commit | 49153a6485ed665f0d981dd1985251492d2dcaf8 (patch) | |
tree | 1faa18d3c44f1f5ccc3707d06e521fb54a30b489 /edi | |
parent | a08a79d6028b546ff6bdccf72ffef3b2202457fa (diff) | |
download | mmbtools-aux-49153a6485ed665f0d981dd1985251492d2dcaf8.tar.gz mmbtools-aux-49153a6485ed665f0d981dd1985251492d2dcaf8.tar.bz2 mmbtools-aux-49153a6485ed665f0d981dd1985251492d2dcaf8.zip |
edidebug: improve ESTn TAG parsing
Diffstat (limited to 'edi')
-rwxr-xr-x | edi/edidebug.py | 8 |
1 files changed, 4 insertions, 4 deletions
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() |