From 9e33b043b2c84fcc4b81c1b827724d4092638e92 Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Tue, 14 Oct 2014 19:38:08 +0200
Subject: [PATCH] Updated packet layout info

---
 lib/python/labcomm/LabComm.py | 48 ++++++++++++++++++++++++++---------
 1 file changed, 36 insertions(+), 12 deletions(-)

diff --git a/lib/python/labcomm/LabComm.py b/lib/python/labcomm/LabComm.py
index 843bdd1..20e306b 100644
--- a/lib/python/labcomm/LabComm.py
+++ b/lib/python/labcomm/LabComm.py
@@ -1,32 +1,56 @@
 #!/usr/bin/python
 #
-# All packets follows the following layout
+# LabComm20141009 packet has the following layout
 #
 #   +----+----+----+----+
-#   | id              |
+#   | id                    (packed32)
+#   +----+----+----+----+
+#   | length                (packed32)
 #   +----+----+----+----+
 #   | data
 #   | ...
 #   +----+--
 #
-# Data layouts for packets
-#
-# TYPEDEF:
+# LabComm220141009 SAMPLE:
 #
 #   +----+----+----+----+
-#   | id = 0x00000001   |
+#   | id = 0x02             (packed32)
 #   +----+----+----+----+
-#   | type number       |
+#   | length                (packed32)
+#   +----+----+----+----+
+#   | type number           (packed32)
 #   +----+----+----+----+
 #   | type name (UTF8)
 #   | ...
 #   +----+----+----+----+
-#   | type
+#   | signature length      (packed32)
+#   +----+----+----+----+
+#   | type signature
+#   | ...
+#   +----+--
+#
+# LabComm20141009 User data:
+#
+#   +----+----+----+----+
+#   | id >= 0x00000040      (packed32)
+#   +----+----+----+----+
+#   | length                (packed32)
+#   +----+----+----+----+
+#   | user data
 #   | ...
 #   +----+--
+#   
+#
+# LabComm2006 packets has the following layout
 #
+#   +----+----+----+----+
+#   | id                |
+#   +----+----+----+----+
+#   | data
+#   | ...
+#   +----+--
 #
-# SAMPLE:
+# LabComm2006 SAMPLE:
 #
 #   +----+----+----+----+
 #   | id = 0x00000002   |
@@ -36,15 +60,15 @@
 #   | type name (UTF8)
 #   | ...
 #   +----+----+----+----+
-#   | type
+#   | type signature
 #   | ...
 #   +----+--
 #
 #
-# User data:
+# LabComm2006 User data:
 #
 #   +----+----+----+----+
-#   | id >= 0x00000060  |
+#   | id >= 0x00000040  |
 #   +----+----+----+----+
 #   | user data
 #   | ...
-- 
GitLab