-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.code
84 lines (67 loc) · 2.66 KB
/
README.code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Main Data Structures
Defined in flospec.h
flo_data_t
Purpose: to store the prefix/value or op,value of the flow components
and is used to indicate if this value is to be anded/or'd with
the previous value.
+------------+
bool | and |
+------------+
op_t | op |
+------------+
uint32| value |
+------------+
uint8 | len | --> used only for prefix types
+------------+
The eol bit is not stored, the encoder adds it
flo_list_t
Purpose: To store the flow components to be passed to the comparator
Also, the tokeniser stores the parsed values in this DS, so
that type ordering of the components can be enforced before
encoding. flo_list_t array is always created for all [12] components
and the array index is used to refer to component type
int flo_data_t []
+--+----+
unused | | |
+--+----+ +------+-----+--------------+-----+
1|n | d |-->| | | ... | |
+--+----+ +------+-----+--------------+-----+
| | |
+--+----+
| | |
+--+----+
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| ... |
| ... |
| | |
+--+----+ +----+----+------------+-----+
12 | | |->| | | ... | |
+--+----+ +----+----+------------+-----+
flo_decode_t
Purpose: This is filled by the decoder, similar to flo_list_t
just that the component type is also stored instead of
inferring it from the array index; initial thot was to
save some mem, but doesnt make much of a difference
and flo_list_t could have been used as well.
flo_comp_t int flo_data_t
+-----+----------+---+ +-------+-------+------+-----+
|comp | num_elems| d |-->| | | ... | |
+-----+----------+---+ +-------+-------+------+-----+
| | | |
+-----+----------+---+
| | | |
| | | |
| | ... | |
| | ... | |
| | | |
| | | |
| | | |
+-----+----------+---+