Subject: data path encoding update

From: Jamal Hadi Salim <[email-masked]>
Date: Thu, 13 Jan 2005 09:09:33 -0500

I have updated the document to show variable size data encoding.
Please review. Both new and diff from previous included.
Weiming! havent heard from you; have heard from Joel on previous posting
of this doc. My interpretation is it seems agreeble to him. So please
Get, Del , Add|Modify so we can wrap this up.

cheers,
jamal
--- data_path2.txt	2005/01/11 17:03:15	1.3
+++ data_path2.txt	2005/01/13 14:06:08
@@ -29,7 +29,8 @@
 PATH := flags IDcount <IDs> 
 DATAINFO TLV := [SELECTOR]  [DATARAW]
 SELECTOR :=  [BLKINFO] [KEYINFO]+ | [INDINFO]> 
-DATARAW := somedata [DATAINFO]
+DATARAW := <THEDATA> [DATAINFO]
+THEDATA := [somedata]* [VARENCDATA TLV]*
 INDINFO TLV := index | fieldID
 KEYINFO TLV := KEYID KEY_DATA
 BLKINFO TLV := [BLK_RANGE_INDEX] | [BLK_LIST_INDEX] | [BLK_CNT_INDEX]
@@ -46,9 +47,13 @@
 used for selection.
 -> DATAINFO: = Optional variable sized data dependent on PATH
 and applied operations. As an example a GET or DEL may not have data.
--> DATARAW contains the data whose path is selected. This may
+-> DATARAW contains "the data" whose path is selected. This may
 recursively contain DATAINFO such that we can have a series
-of "path data subpath data subpath data ..."
+of "path data selector data selector data ..."
+The data depending on the LFB may containing variable sized entities.
+To ensure that entities > 2^16 bytes can also be encoded, the
+Type of the VARENCDATA will indicate whether the the length is in
+bytes, words, doublewords etc. (expand more later on this)
 
 NOTE! NOTE!
 -----------
@@ -191,6 +196,11 @@
 	j1, type u32, ID = 1
 	j2, type u32, ID = 2
 
+table3: type array, ID = 5
+	elements are: 
+	someid, type u32, ID = 1
+	name, type string variable sized, ID = 2
+
 1) To get foo1
 Path: IDCount = 1, IDs = 1
 
@@ -340,7 +350,7 @@
 
 11) get _all_ entries for table2 where j1=100
 Path = IDCount = 1,  IDs=4
-Subpath := BLK_RANGE_INDEX TLV = {0,maxsize} KEYINFO = {KEYID =1 KEY_DATA=100}
+SELECTOR := BLK_RANGE_INDEX TLV = {0,maxsize} KEYINFO = {KEYID =1 KEY_DATA=100}
 
 In other words the BLK_RANGE_INDEX says "for all entries in table"
 and KEYINFO says "if they match j1= 100"
@@ -359,7 +369,7 @@
 starting at index 10. 
 
 Path = IDCount = 1, IDs=4
-Subpath := 
+SELECTOR := 
 	BLK_CNT_INDEX TLV = {10,10} 
 	KEYINFO = {KEYID =1 KEY_DATA=100}
 	KEYINFO = {KEYID =2 KEY_DATA=200}
@@ -380,16 +390,44 @@
 only 5? What about when the highest index available is 5?
 Need to enumerate all possible error paths
 
+13) Dump contents of table3, 
+
+should be noted that this table has a column with element name
+that is variable sized. The purpose of this use case is to show
+how such an element is to be encoded.
+
+Path = IDCount = 1, IDs=5
+
+Result:
+Assuming subscript/index holes in the table
+Path = IDCount = 1, IDs=5
+T = BLK_LIST_INDEX, L = XXX
+Values: 3, 5, 15, ...
+
+DATAINFO TLV, Length = XXXX
+Values:
+	someidval, TLV: T=VARENCDATA, L = 8+strlen(name), V = nameval
+	someidval, TLV: T=VARENCDATA, L = 8+strlen(name), V = nameval
+	someidval, TLV: T=VARENCDATA, L = 8+strlen(name), V = nameval
+	someidval, TLV: T=VARENCDATA, L = 8+strlen(name), V = nameval
+	.
+	.
+	.
 TODO:
 
 - more refinement of flags for atomicity etc
 - column and cell access in a table use cases
-- Provide a more complex use case example (where a table cell points
-to a whole table). Essentially this is no different from the
-variable sized string problem pointed to in the BNF (while describing
-"somedata").
+- shos an example like the one Weiming was talking about where you
+have someone configuring in one message table1 but also the entry
+in table2 that is pointed at. This will show a sample of 
+path subpath data subpath data i believe.
 
 $Log: data_path2.txt,v $
+Revision 1.4  2005/01/13 14:01:11  hadi
+added table 3 which contains variable sized strings.
+added example of how such a table is to be manipulated
+extended the grammar slightly to accomodate above
+
 Revision 1.3  2005/01/11 17:03:15  hadi
 proof read and sent to list; major change was s/RAWDATA/DATAINFO/g
 A little more explanatory text