summaryrefslogtreecommitdiff
path: root/vrt/lib/expanded_header_parse_switch_body.h
diff options
context:
space:
mode:
authorJosh Blum2009-12-17 16:48:54 -0800
committerJosh Blum2009-12-17 18:01:25 -0800
commitfc4fa0a1894f0f85be1a76e48b922effb3d5dd9b (patch)
treeb7ed4d7dedf55c0340fa93d793daa7fb3cd13261 /vrt/lib/expanded_header_parse_switch_body.h
parent754299932325a5b6c02587cf7dcf444b3b1080ae (diff)
downloadgnuradio-fc4fa0a1894f0f85be1a76e48b922effb3d5dd9b.tar.gz
gnuradio-fc4fa0a1894f0f85be1a76e48b922effb3d5dd9b.tar.bz2
gnuradio-fc4fa0a1894f0f85be1a76e48b922effb3d5dd9b.zip
Added unparse capability to the vrt expanded header.
Unparse can fill in a vrt header and trailer from an expanded header.
Diffstat (limited to 'vrt/lib/expanded_header_parse_switch_body.h')
-rw-r--r--vrt/lib/expanded_header_parse_switch_body.h256
1 files changed, 256 insertions, 0 deletions
diff --git a/vrt/lib/expanded_header_parse_switch_body.h b/vrt/lib/expanded_header_parse_switch_body.h
new file mode 100644
index 000000000..40e575c2c
--- /dev/null
+++ b/vrt/lib/expanded_header_parse_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;
+