diff options
author | eb | 2009-08-15 18:34:45 +0000 |
---|---|---|
committer | eb | 2009-08-15 18:34:45 +0000 |
commit | ea57c1b52b8bed12296ba51441afcfc57a0b9d34 (patch) | |
tree | f86aee7b4b75aef3d27f7d876431296838e8cb8e /vrt/lib/expanded_header_switch_body.h | |
parent | cdecd3aa94c0ed24312c869c27b3cbd01998004e (diff) | |
download | gnuradio-ea57c1b52b8bed12296ba51441afcfc57a0b9d34.tar.gz gnuradio-ea57c1b52b8bed12296ba51441afcfc57a0b9d34.tar.bz2 gnuradio-ea57c1b52b8bed12296ba51441afcfc57a0b9d34.zip |
Merged VRT work-in-progress from eb/vrt2 (11518:11598) into trunk.
Passes distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11600 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'vrt/lib/expanded_header_switch_body.h')
-rw-r--r-- | vrt/lib/expanded_header_switch_body.h | 256 |
1 files changed, 256 insertions, 0 deletions
diff --git a/vrt/lib/expanded_header_switch_body.h b/vrt/lib/expanded_header_switch_body.h new file mode 100644 index 000000000..40e575c2c --- /dev/null +++ b/vrt/lib/expanded_header_switch_body.h @@ -0,0 +1,256 @@ + case 0: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 1: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 2: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 3: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 4: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = ntohl(p[1]); + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 5: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = ntohl(p[2]); + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 6: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = ntohl(p[3]); + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 7: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = ntohl(p[4]); + h->fractional_secs = 0; + h->trailer = 0; + break; + + case 8: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->trailer = 0; + break; + + case 9: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->trailer = 0; + break; + + case 10: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]); + h->trailer = 0; + break; + + case 11: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]); + h->trailer = 0; + break; + + case 12: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = ntohl(p[1]); + h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->trailer = 0; + break; + + case 13: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = ntohl(p[2]); + h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]); + h->trailer = 0; + break; + + case 14: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = ntohl(p[3]); + h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]); + h->trailer = 0; + break; + + case 15: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = ntohl(p[4]); + h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]); + h->trailer = 0; + break; + + case 16: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 17: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 18: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 19: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = 0; + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 20: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = ntohl(p[1]); + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 21: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = ntohl(p[2]); + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 22: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = ntohl(p[3]); + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 23: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = ntohl(p[4]); + h->fractional_secs = 0; + h->trailer = ntohl(p[len-1]); + break; + + case 24: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->trailer = ntohl(p[len-1]); + break; + + case 25: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->trailer = ntohl(p[len-1]); + break; + + case 26: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]); + h->trailer = ntohl(p[len-1]); + break; + + case 27: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = 0; + h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]); + h->trailer = ntohl(p[len-1]); + break; + + case 28: + h->stream_id = 0; + h->class_id = 0; + h->integer_secs = ntohl(p[1]); + h->fractional_secs = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->trailer = ntohl(p[len-1]); + break; + + case 29: + h->stream_id = ntohl(p[1]); + h->class_id = 0; + h->integer_secs = ntohl(p[2]); + h->fractional_secs = ((uint64_t)(ntohl(p[3])) << 32) | ntohl(p[4]); + h->trailer = ntohl(p[len-1]); + break; + + case 30: + h->stream_id = 0; + h->class_id = ((uint64_t)(ntohl(p[1])) << 32) | ntohl(p[2]); + h->integer_secs = ntohl(p[3]); + h->fractional_secs = ((uint64_t)(ntohl(p[4])) << 32) | ntohl(p[5]); + h->trailer = ntohl(p[len-1]); + break; + + case 31: + h->stream_id = ntohl(p[1]); + h->class_id = ((uint64_t)(ntohl(p[2])) << 32) | ntohl(p[3]); + h->integer_secs = ntohl(p[4]); + h->fractional_secs = ((uint64_t)(ntohl(p[5])) << 32) | ntohl(p[6]); + h->trailer = ntohl(p[len-1]); + break; + |