diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-22 09:49:37 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-11-22 09:49:37 +0100 |
commit | a3dcff8ca93859388cfe400c5a369fd51b67b7e5 (patch) | |
tree | 7f2c9e6cba4de3665bed2b72aad8edc86635a1bf /etisnoop | |
parent | d76625d458886093f6330732083fbc85f4f50c06 (diff) | |
download | mmbtools-aux-a3dcff8ca93859388cfe400c5a369fd51b67b7e5.tar.gz mmbtools-aux-a3dcff8ca93859388cfe400c5a369fd51b67b7e5.tar.bz2 mmbtools-aux-a3dcff8ca93859388cfe400c5a369fd51b67b7e5.zip |
ETISnoop parse FIG0/1
Diffstat (limited to 'etisnoop')
-rw-r--r-- | etisnoop/etisnoop.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/etisnoop/etisnoop.cpp b/etisnoop/etisnoop.cpp index a915e90..9730d5c 100644 --- a/etisnoop/etisnoop.cpp +++ b/etisnoop/etisnoop.cpp @@ -604,6 +604,63 @@ void decodeFIG(std::vector<struct FIG> &figs, } break; + case 1: // FIG 0/1 basic subchannel organisation + { + int i = 1; + + while (i < figlen-3) { + // iterate over subchannels + int subch_id = f[i] >> 2; + int start_addr = (f[i] << 6) | + (f[i+1]); + int long_flag = (f[i+2] >> 7); + + if (long_flag) { + int option = (f[i+2] >> 4) & 0x0F; + int protection_level = (f[i+2] >> 2) & 0x03; + int subchannel_size = ((f[i+2] & 0x03) << 6 ) | + f[i+3]; + + i += 4; + + if (option = 0x00) { + sprintf(desc, + "Subch 0x%x, start_addr %d, long, EEP %d-A, subch size %d", + subch_id, start_addr, protection_level, subchannel_size); + } + else if (option = 0x01) { + sprintf(desc, + "Subch 0x%x, start_addr %d, long, EEP %d-B, subch size %d", + subch_id, start_addr, protection_level, subchannel_size); + } + else { + sprintf(desc, + "Subch 0x%x, start_addr %d, long, invalid option %d, protection %d, subch size %d", + subch_id, start_addr, option, protection_level, subchannel_size); + } + } + else { + int table_switch = (f[i+2] >> 6) & 0x01; + unsigned int table_index = (f[i+2] & 0x3F); + + + if (table_switch == 0) { + sprintf(desc, + "Subch 0x%x, start_addr %d, short, table index %d", + subch_id, start_addr, table_index); + } + else { + sprintf(desc, + "Subch 0x%x, start_addr %d, short, invalid table_switch(=1), table index %d", + subch_id, start_addr, table_index); + } + + i += 3; + } + printbuf(desc, indent+1, NULL, 0); + } + + } case 2: // FIG 0/2 { unsigned short int sref, sid; |