-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRepresenting_Event_Codes.ceps
188 lines (180 loc) · 4.53 KB
/
Representing_Event_Codes.ceps
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
label __6__2 title = "6.2 Representing Event Codes";
kind DocgenStringPrintNoEscape;
DocgenStringPrintNoEscape docinfo_se;
docinfo_se(
"
--------------------------------------------------------------------------------
001 Each event code is represented by a sequence of 1 to 3 parts that
002 uniquely identify an event. Event code parts are encoded in order
003 starting with the first part followed by subsequent parts.
004
005 The i-th part of an event code is encoded as an n-bit unsigned
006 integer (7.1.9 n-bit Unsigned Integer) where n is ceil(log_2 m)
007 and m is the number of distinct values used as the i-th part
008 of its own and all its sibling event codes in the current grammar.
009 Two event codes are siblings at the i-th part if and only if they
010 share the same valies in all preceding parts.
011 All event codes are siblings at the first part.
012
013 If there is only one distinct value for a given part, the part
014 is omitted (i.e.. encoded in log_2 1 bits = 0 bits = 0 bytes).
015
016 For example, the eight event codes shown in the DocContent
017 grammar above have values ranging form 0 to 5 for the first part.
018 Six distinct values are needed to identify the first part of
019 these event codes. Therefore, the first part can be encoded as an
020 n-bit unsigned integer where n = ceil(log_2 6) = 3. In the same
021 fashion, the second and third part (if present) are represented as
022 n-bit unsigned integers where n is ceil (log_2 2) = 1 and
023 ceil(log_2 2) = 1 respectively.
024
025 When the value of the compression option is false and bit-packed
026 alignment is used, n-bit unsigned integers are represented using
027 n bits. The first table below illustrates how the event codes of
028 each event matched by the DocContent grammar above are represented
029 in this case.
030
031 When the value of compression option is true, or either byte-
032 alignment or pre-compression alignment option is used, n-bit
033 unsigned integers are represented using the minimum number of
034 bytes required to store n bits. The second table below illustrates
035 how the event codes of each event matched by the DocContent grammar
036 above are represented in this case.
");
label __6__2__example title="Example event code encoding";
table{
label __6__1__table title="Example event code encoding when EXI compression is not in effect and bit-packed alignment is used";
header{
th{"Event";};th{"Part values";};th{"Event Code Encoding";};th{"# bits";};
tr{
td{SE("A");};
td{part{0;}; part{}; part{};};
td{0;0;0;};
td{3;};
};
tr{
td{SE("B");};
td{part{1;}; part{}; part{};};
td{0;0;1;};
td{3;};
};
tr{
td{SE("C");};
td{part{2;}; part{}; part{};};
td{0;1;0;};
td{3;};
};
tr{
td{SE("D");};
td{part{3;}; part{}; part{};};
td{0;1;1;};
td{3;};
};
tr{
td{SE(_*_);};
td{part{4;}; part{}; part{};};
td{1;0;0;};
td{3;};
};
tr{
td{DT;};
td{part{5;}; part{0;}; part{};};
td{1;0;1;0;};
td{4;};
};
tr{
td{CM;};
td{part{5;}; part{1;}; part{0;};};
td{1;0;1;1;0;};
td{5;};
};
tr{
td{PI;};
td{part{5;}; part{1;}; part{1;};};
td{1;0;1;1;1;};
td{5;};
};
tr{
td{"# distinct values(m)";};
td{part{6;}; part{2;}; part{2;};};
td{};
td{};
};
tr{
td{"# bits per part ceil(log_2 m)";};
td{part{3;}; part{1;}; part{1;};};
td{};
td{};
};
};
};
table{
label __6__2__table title="Example event code encoding when EXI compression is in effect, or either byte-alignment or pre-compression alignment option is used";
header{
th{"Event";};th{"Part values";};th{"Event Code Encoding";};th{"# bytes";};
tr{
td{SE("A");};
td{part{0;}; part{}; part{};};
td{0;0;0;0;0;0;0;0;};
td{1;};
};
tr{
td{SE("B");};
td{part{1;}; part{}; part{};};
td{0;0;0;0;0;0;0;1;};
td{1;};
};
tr{
td{SE("C");};
td{part{2;}; part{}; part{};};
td{0;0;0;0;0;0;1;0;};
td{1;};
};
tr{
td{SE("D");};
td{part{3;}; part{}; part{};};
td{0;0;0;0;0;0;1;1;};
td{1;};
};
tr{
td{SE(_*_);};
td{part{4;}; part{}; part{};};
td{0;0;0;0;0;1;0;0;};
td{1;};
};
tr{
td{DT;};
td{part{5;}; part{0;}; part{};};
td{0;0;0;0;0;1;0;1; 0;0;0;0;0;0;0;0;};
td{2;};
};
tr{
td{CM;};
td{part{5;}; part{1;}; part{0;};};
td{0;0;0;0;0;1;0;1; 0;0;0;0;0;0;0;1; 0;0;0;0;0;0;0;0;};
td{3;};
};
tr{
td{PI;};
td{part{5;}; part{1;}; part{1;};};
td{0;0;0;0;0;1;0;1; 0;0;0;0;0;0;0;1; 0;0;0;0;0;0;0;1;};
td{3;};
};
tr{
td{"# distinct values(m)";};
td{part{6;}; part{2;}; part{2;};};
td{};
td{};
};
tr{
td{"# bytes per part ceil( (log_2 m )/ 8)";};
td{part{1;}; part{1;}; part{1;};};
td{};
td{};
};
};
};
docinfo_se(
"
")
;