Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 1 | module simple-data-types-ll { |
2 | namespace "simple:data:types:ll"; | ||||
3 | |||||
4 | prefix "smpdtp"; | ||||
5 | revision 2013-11-12 { | ||||
6 | } | ||||
7 | |||||
8 | identity iden { | ||||
9 | } | ||||
10 | |||||
11 | typedef tpdfempty { | ||||
12 | type empty; | ||||
13 | } | ||||
14 | |||||
15 | typedef tpdfbit { | ||||
16 | type bits { | ||||
17 | bit b1; | ||||
18 | bit b2; | ||||
19 | bit b3; | ||||
20 | } | ||||
21 | } | ||||
22 | |||||
23 | typedef tpdfun4 { | ||||
24 | type boolean; | ||||
25 | } | ||||
26 | |||||
27 | typedef tpdfun3 { | ||||
28 | type union { | ||||
29 | type tpdfbit; | ||||
30 | type tpdfempty; | ||||
31 | } | ||||
32 | } | ||||
33 | |||||
34 | typedef tpdfun2 { | ||||
35 | type union { | ||||
36 | type tpdfun3; | ||||
37 | type tpdfun4; | ||||
38 | } | ||||
39 | } | ||||
40 | |||||
41 | typedef tpdfun1 { | ||||
42 | type union { | ||||
43 | type uint8; | ||||
44 | type decimal64 { | ||||
45 | fraction-digits 2; | ||||
46 | } | ||||
47 | } | ||||
48 | } | ||||
49 | |||||
50 | container cont1 { | ||||
51 | leaf-list lfnint8Min { | ||||
52 | type int8; | ||||
53 | } | ||||
54 | leaf-list lfnint8Max { | ||||
55 | type int8; | ||||
56 | } | ||||
57 | leaf-list lfnint16Min { | ||||
58 | type int16; | ||||
59 | } | ||||
60 | leaf-list lfnint16Max { | ||||
61 | type int16; | ||||
62 | } | ||||
63 | leaf-list lfnint32Min { | ||||
64 | type int32; | ||||
65 | } | ||||
66 | leaf-list lfnint32Max { | ||||
67 | type int32; | ||||
68 | } | ||||
69 | leaf-list lfnint64Min { | ||||
70 | type int64; | ||||
71 | } | ||||
72 | leaf-list lfnint64Max { | ||||
73 | type int64; | ||||
74 | } | ||||
75 | leaf-list lfnuint8Max { | ||||
76 | type uint8; | ||||
77 | } | ||||
78 | leaf-list lfnuint16Max { | ||||
79 | type uint16; | ||||
80 | } | ||||
81 | leaf-list lfnuint32Max { | ||||
82 | type uint32; | ||||
83 | } | ||||
84 | leaf-list lfuint64Max { | ||||
85 | type uint64; | ||||
86 | } | ||||
87 | leaf-list lfstr { | ||||
88 | type string; | ||||
89 | } | ||||
90 | leaf-list lfstr1 { | ||||
91 | type string; | ||||
92 | } | ||||
93 | leaf-list lfbool1 { | ||||
94 | type boolean; | ||||
95 | } | ||||
96 | leaf-list lfbool2 { | ||||
97 | type boolean; | ||||
98 | } | ||||
99 | leaf-list lfbool3 { | ||||
100 | type boolean; | ||||
101 | } | ||||
102 | leaf-list lfdecimal1 { | ||||
103 | type decimal64 { | ||||
104 | fraction-digits 1; | ||||
105 | } | ||||
106 | } | ||||
107 | leaf-list lfdecimal2 { | ||||
108 | type decimal64 { | ||||
109 | fraction-digits 2; | ||||
110 | } | ||||
111 | } | ||||
112 | leaf-list lfdecimal3 { | ||||
113 | type decimal64 { | ||||
114 | fraction-digits 3; | ||||
115 | } | ||||
116 | } | ||||
117 | |||||
118 | leaf-list lfdecimal4 { | ||||
119 | type decimal64 { | ||||
120 | fraction-digits 4; | ||||
121 | } | ||||
122 | } | ||||
123 | |||||
124 | leaf-list lfdecimal6 { | ||||
125 | type decimal64 { | ||||
126 | fraction-digits 6; | ||||
127 | } | ||||
128 | } | ||||
129 | |||||
130 | leaf-list lfenum { | ||||
131 | type enumeration { | ||||
132 | enum enum1; | ||||
133 | enum enum2; | ||||
134 | enum enum3; | ||||
135 | enum enum4; | ||||
136 | } | ||||
137 | } | ||||
138 | |||||
139 | leaf-list lfbits { | ||||
140 | type bits { | ||||
141 | bit bit1; | ||||
142 | bit bit2; | ||||
143 | bit bit3; | ||||
144 | bit bit4; | ||||
145 | } | ||||
146 | } | ||||
147 | |||||
148 | leaf-list lfbinary { | ||||
149 | type binary; | ||||
150 | } | ||||
151 | |||||
152 | leaf-list lfref1 { //reference to string type | ||||
153 | type leafref { | ||||
154 | path "../lfstr"; | ||||
155 | } | ||||
156 | } | ||||
157 | |||||
158 | leaf-list lfref2 { //reference to number type | ||||
159 | type leafref { | ||||
160 | path "../lfnint8Max"; | ||||
161 | } | ||||
162 | } | ||||
163 | |||||
164 | leaf-list lfempty { | ||||
165 | type empty; | ||||
166 | } | ||||
167 | |||||
168 | leaf-list lfunion1 { | ||||
169 | type union { | ||||
170 | type uint16; | ||||
171 | type string; | ||||
172 | } | ||||
173 | } | ||||
174 | leaf-list lfunion2 { | ||||
175 | type union { | ||||
176 | type decimal64 { | ||||
177 | fraction-digits 2; | ||||
178 | } | ||||
179 | type string; | ||||
180 | } | ||||
181 | } | ||||
182 | |||||
183 | leaf-list lfunion4 { | ||||
184 | type union { | ||||
185 | type boolean; | ||||
186 | type string; | ||||
187 | } | ||||
188 | } | ||||
189 | |||||
190 | leaf-list lfunion5 { | ||||
191 | type union { | ||||
192 | type uint16; | ||||
193 | type string; | ||||
194 | } | ||||
195 | } | ||||
196 | |||||
197 | leaf-list lfunion7 { | ||||
198 | type tpdfun3; | ||||
199 | } | ||||
200 | |||||
201 | leaf-list lfunion8 { | ||||
202 | type union { | ||||
203 | type uint16; | ||||
204 | type string; | ||||
205 | } | ||||
206 | } | ||||
207 | |||||
208 | leaf-list lfunion9 { | ||||
209 | type union { | ||||
210 | type uint16; | ||||
211 | type boolean; | ||||
212 | } | ||||
213 | } | ||||
214 | |||||
215 | leaf-list lfunion10 { | ||||
216 | type union { | ||||
217 | type bits { | ||||
218 | bit bt1; | ||||
219 | bit bt2; | ||||
220 | } | ||||
221 | type boolean; | ||||
222 | } | ||||
223 | } | ||||
224 | |||||
225 | leaf-list lfunion11 { | ||||
226 | type union { | ||||
227 | type tpdfun1; | ||||
228 | type tpdfun2; | ||||
229 | } | ||||
230 | } | ||||
231 | |||||
232 | leaf-list lfunion12 { | ||||
233 | type tpdfun2; | ||||
234 | } | ||||
235 | |||||
236 | leaf-list lfunion13 { | ||||
237 | type tpdfbit; | ||||
238 | } | ||||
239 | |||||
240 | leaf-list lfunion14 { | ||||
241 | type union { | ||||
242 | type enumeration { | ||||
243 | enum zero; | ||||
244 | enum one; | ||||
245 | } | ||||
246 | type uint16; | ||||
247 | } | ||||
248 | } | ||||
249 | |||||
250 | leaf-list identityref1 { | ||||
251 | type identityref { | ||||
252 | base iden; | ||||
253 | } | ||||
254 | } | ||||
Vidyashree Rama | 114ae46 | 2017-03-16 20:01:16 +0530 | [diff] [blame] | 255 | |
256 | leaf-list lfenum1 { | ||||
257 | type enumeration { | ||||
258 | enum "successful exit" { | ||||
259 | value 1; | ||||
260 | } | ||||
261 | enum "grace period expired" { | ||||
262 | value 2; | ||||
263 | } | ||||
264 | } | ||||
265 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 266 | } |
267 | } |