Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 1 | module simple-data-types { |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 2 | namespace "simple:data:types"; |
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 3 | |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 4 | prefix "smpdtp"; |
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 5 | |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 6 | import YtbDataTypes { |
7 | prefix ytb; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 8 | } |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 9 | revision 2013-11-12 { |
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 10 | } |
11 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 12 | identity iden { |
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 13 | } |
14 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 15 | identity val { |
16 | base iden; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 17 | } |
18 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 19 | identity pro { |
20 | base iden; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 21 | } |
22 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 23 | typedef tpdfempty { |
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 24 | type empty; |
25 | } | ||||
26 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 27 | typedef tpdfbit { |
28 | type bits { | ||||
29 | bit b1; | ||||
30 | bit b2; | ||||
31 | bit b3; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 32 | } |
33 | } | ||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 34 | |
35 | typedef tpdfun4 { | ||||
36 | type boolean; | ||||
37 | } | ||||
38 | |||||
39 | typedef tpdfun3 { | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 40 | type union { |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 41 | type tpdfbit; |
42 | type tpdfempty; | ||||
43 | } | ||||
44 | } | ||||
45 | |||||
46 | typedef tpdfun2 { | ||||
47 | type union { | ||||
48 | type tpdfun3; | ||||
49 | type tpdfun4; | ||||
50 | } | ||||
51 | } | ||||
52 | |||||
53 | typedef tpdfun1 { | ||||
54 | type union { | ||||
55 | type uint8; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 56 | type decimal64 { |
57 | fraction-digits 2; | ||||
58 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 59 | } |
60 | } | ||||
61 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 62 | typedef tpdfun0 { |
63 | type enumeration { | ||||
64 | enum "successful exit" { | ||||
65 | value 1; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 66 | } |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 67 | enum "grace period expired" { |
68 | value 2; | ||||
69 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 70 | } |
71 | } | ||||
72 | |||||
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 73 | container cont { |
74 | leaf lfnint8Min { | ||||
75 | type int8; | ||||
76 | } | ||||
77 | |||||
78 | leaf lfnint8Max { | ||||
79 | type int8; | ||||
80 | } | ||||
81 | |||||
82 | leaf lfnint16Min { | ||||
83 | type int16; | ||||
84 | } | ||||
85 | |||||
86 | leaf lfnint16Max { | ||||
87 | type int16; | ||||
88 | } | ||||
89 | |||||
90 | leaf lfnint32Min { | ||||
91 | type int32; | ||||
92 | } | ||||
93 | |||||
94 | leaf lfnint32Max { | ||||
95 | type int32; | ||||
96 | } | ||||
97 | |||||
98 | leaf lfnint64Min { | ||||
99 | type int64; | ||||
100 | } | ||||
101 | |||||
102 | leaf lfnint64Max { | ||||
103 | type int64; | ||||
104 | } | ||||
105 | |||||
106 | leaf lfnuint8Max { | ||||
107 | type uint8; | ||||
108 | } | ||||
109 | |||||
110 | leaf lfnuint16Max { | ||||
111 | type uint16; | ||||
112 | } | ||||
113 | |||||
114 | leaf lfnuint32Max { | ||||
115 | type uint32; | ||||
116 | } | ||||
117 | |||||
118 | leaf lfuint64Max { | ||||
119 | type uint64; | ||||
120 | } | ||||
121 | |||||
122 | leaf lfstr { | ||||
123 | type string; | ||||
124 | } | ||||
125 | |||||
126 | leaf lfstr1 { | ||||
127 | type string; | ||||
128 | } | ||||
129 | |||||
130 | leaf lfbool1 { | ||||
131 | type boolean; | ||||
132 | } | ||||
133 | |||||
134 | leaf lfbool2 { | ||||
135 | type boolean; | ||||
136 | } | ||||
137 | |||||
138 | leaf lfbool3 { | ||||
139 | type boolean; | ||||
140 | } | ||||
141 | |||||
142 | leaf lfdecimal1 { | ||||
143 | type decimal64 { | ||||
144 | fraction-digits 1; | ||||
145 | } | ||||
146 | } | ||||
147 | |||||
148 | leaf lfdecimal2 { | ||||
149 | type decimal64 { | ||||
150 | fraction-digits 2; | ||||
151 | } | ||||
152 | } | ||||
153 | |||||
154 | leaf lfdecimal3 { | ||||
155 | type decimal64 { | ||||
156 | fraction-digits 3; | ||||
157 | } | ||||
158 | } | ||||
159 | |||||
160 | leaf lfdecimal4 { | ||||
161 | type decimal64 { | ||||
162 | fraction-digits 4; | ||||
163 | } | ||||
164 | } | ||||
165 | |||||
166 | leaf lfdecimal6 { | ||||
167 | type decimal64 { | ||||
168 | fraction-digits 6; | ||||
169 | } | ||||
170 | } | ||||
171 | |||||
172 | leaf lfenum { | ||||
173 | type enumeration { | ||||
174 | enum enum1; | ||||
175 | enum enum2; | ||||
176 | enum enum3; | ||||
177 | enum enum4; | ||||
178 | } | ||||
179 | } | ||||
180 | |||||
181 | leaf lfbits { | ||||
182 | type bits { | ||||
183 | bit bit1; | ||||
184 | bit bit2; | ||||
185 | bit bit3; | ||||
186 | bit bit4; | ||||
187 | } | ||||
188 | } | ||||
189 | |||||
190 | leaf lfbinary { | ||||
191 | type binary; | ||||
192 | } | ||||
193 | |||||
194 | leaf lfref1 { //reference to string type | ||||
195 | type leafref { | ||||
196 | path "../lfstr"; | ||||
197 | } | ||||
198 | } | ||||
199 | |||||
200 | leaf lfref2 { //reference to number type | ||||
201 | type leafref { | ||||
202 | path "../lfnint8Max"; | ||||
203 | } | ||||
204 | } | ||||
205 | |||||
206 | leaf lfempty { | ||||
207 | type empty; | ||||
208 | } | ||||
209 | |||||
210 | leaf lfunion1 { | ||||
211 | type union { | ||||
212 | type uint16; | ||||
213 | type string; | ||||
214 | } | ||||
215 | } | ||||
216 | leaf lfunion2 { | ||||
217 | type union { | ||||
218 | type decimal64 { | ||||
219 | fraction-digits 2; | ||||
220 | } | ||||
221 | type string; | ||||
222 | } | ||||
223 | } | ||||
224 | |||||
225 | leaf lfunion4 { | ||||
226 | type union { | ||||
227 | type boolean; | ||||
228 | type string; | ||||
229 | } | ||||
230 | } | ||||
231 | |||||
232 | leaf lfunion5 { | ||||
233 | type union { | ||||
234 | type uint16; | ||||
235 | type string; | ||||
236 | } | ||||
237 | } | ||||
238 | |||||
239 | leaf lfunion7 { | ||||
240 | type tpdfun3; | ||||
241 | } | ||||
242 | |||||
243 | leaf lfunion8 { | ||||
244 | type union { | ||||
245 | type uint16; | ||||
246 | type string; | ||||
247 | } | ||||
248 | } | ||||
249 | |||||
250 | leaf lfunion9 { | ||||
251 | type union { | ||||
252 | type uint16; | ||||
253 | type boolean; | ||||
254 | } | ||||
255 | } | ||||
256 | |||||
257 | leaf lfunion10 { | ||||
258 | type union { | ||||
259 | type bits { | ||||
260 | bit bt1; | ||||
261 | bit bt2; | ||||
262 | } | ||||
263 | type boolean; | ||||
264 | } | ||||
265 | } | ||||
266 | |||||
267 | leaf lfunion11 { | ||||
268 | type union { | ||||
269 | type tpdfun1; | ||||
270 | type tpdfun2; | ||||
271 | } | ||||
272 | } | ||||
273 | |||||
274 | leaf lfunion12 { | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 275 | type tpdfun2; |
276 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 277 | |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 278 | leaf lfunion13 { |
279 | type tpdfbit; | ||||
280 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 281 | |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 282 | leaf lfunion14 { |
283 | type union { | ||||
284 | type enumeration { | ||||
285 | enum zero; | ||||
286 | enum one; | ||||
287 | } | ||||
288 | type uint16; | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 289 | } |
janani b | 867b9ef | 2017-07-17 12:33:38 +0530 | [diff] [blame] | 290 | } |
291 | |||||
292 | leaf identityref1 { | ||||
293 | type identityref { | ||||
294 | base iden; | ||||
295 | } | ||||
296 | } | ||||
297 | |||||
298 | leaf lfenum1 { | ||||
299 | type tpdfun0; | ||||
300 | } | ||||
301 | |||||
302 | leaf inst-iden { | ||||
303 | type instance-identifier; | ||||
304 | } | ||||
305 | |||||
306 | leaf lref1 { | ||||
307 | type leafref { | ||||
308 | path "../lfnint8Min"; | ||||
309 | } | ||||
310 | } | ||||
311 | |||||
312 | leaf lref2 { | ||||
313 | type leafref { | ||||
314 | path "../identityref1"; | ||||
315 | } | ||||
316 | } | ||||
317 | |||||
318 | leaf lref3 { | ||||
319 | type leafref { | ||||
320 | path "../lfunion14"; | ||||
321 | } | ||||
322 | } | ||||
323 | |||||
324 | leaf lref4 { | ||||
325 | type leafref { | ||||
326 | path "../lfunion13"; | ||||
327 | } | ||||
328 | } | ||||
329 | |||||
330 | leaf lref5 { | ||||
331 | type leafref { | ||||
332 | path "../lfunion11"; | ||||
333 | } | ||||
334 | } | ||||
335 | |||||
336 | leaf lref6 { | ||||
337 | type leafref { | ||||
338 | path "../lfref2"; | ||||
339 | } | ||||
340 | } | ||||
341 | |||||
342 | leaf lref7 { | ||||
343 | type leafref { | ||||
344 | path "../lfenum"; | ||||
345 | } | ||||
346 | } | ||||
347 | |||||
348 | leaf lref8 { | ||||
349 | type leafref { | ||||
350 | path "../lfdecimal6"; | ||||
351 | } | ||||
352 | } | ||||
353 | |||||
354 | leaf lref9 { | ||||
355 | type leafref { | ||||
356 | path "/ytb:leaf12"; | ||||
357 | } | ||||
358 | } | ||||
359 | |||||
360 | leaf lref10 { | ||||
361 | type leafref { | ||||
362 | path "/ytb:leaf11"; | ||||
363 | } | ||||
364 | } | ||||
365 | |||||
366 | leaf lref11 { | ||||
367 | type leafref { | ||||
368 | path "/ytb:leaf10"; | ||||
369 | } | ||||
370 | } | ||||
371 | |||||
372 | leaf lref12 { | ||||
373 | type leafref { | ||||
374 | path "/ytb:leaf9"; | ||||
375 | } | ||||
376 | } | ||||
377 | |||||
378 | leaf lref13 { | ||||
379 | type leafref { | ||||
380 | path "/ytb:leaf8"; | ||||
381 | } | ||||
382 | } | ||||
383 | |||||
384 | leaf lref14 { | ||||
385 | type leafref { | ||||
386 | path "/ytb:leaf7"; | ||||
387 | } | ||||
388 | } | ||||
389 | |||||
390 | leaf lref15 { | ||||
391 | type leafref { | ||||
392 | path "/ytb:leaf6"; | ||||
393 | } | ||||
394 | } | ||||
395 | |||||
396 | leaf lref16 { | ||||
397 | type leafref { | ||||
398 | path "/ytb:leaf5"; | ||||
399 | } | ||||
400 | } | ||||
401 | |||||
402 | leaf lref17 { | ||||
403 | type leafref { | ||||
404 | path "/ytb:leaf4"; | ||||
405 | } | ||||
406 | } | ||||
407 | |||||
408 | leaf lref18 { | ||||
409 | type leafref { | ||||
410 | path "/ytb:leaf3"; | ||||
411 | } | ||||
412 | } | ||||
413 | |||||
414 | leaf lref19 { | ||||
415 | type leafref { | ||||
416 | path "/ytb:leaf2"; | ||||
417 | } | ||||
418 | } | ||||
419 | |||||
420 | leaf lref20 { | ||||
421 | type leafref { | ||||
422 | path "/ytb:leaf1"; | ||||
423 | } | ||||
424 | } | ||||
425 | |||||
426 | leaf iref1 { | ||||
427 | type identityref { | ||||
428 | base iden; | ||||
429 | } | ||||
430 | } | ||||
431 | |||||
432 | leaf-list iref2 { | ||||
433 | type identityref { | ||||
434 | base iden; | ||||
435 | } | ||||
436 | } | ||||
437 | |||||
438 | leaf iref3 { | ||||
439 | type identityref { | ||||
440 | base ytb:type; | ||||
441 | } | ||||
442 | } | ||||
443 | |||||
444 | leaf-list iref4 { | ||||
445 | type identityref { | ||||
446 | base ytb:type; | ||||
447 | } | ||||
448 | } | ||||
449 | |||||
450 | uses gr; | ||||
451 | } | ||||
452 | |||||
453 | grouping gr { | ||||
454 | container cont3 { | ||||
455 | leaf-list llref1 { | ||||
456 | type leafref { | ||||
457 | path "../../lfnint8Min"; | ||||
458 | } | ||||
459 | } | ||||
460 | |||||
461 | leaf-list llref2 { | ||||
462 | type leafref { | ||||
463 | path "../../identityref1"; | ||||
464 | } | ||||
465 | } | ||||
466 | |||||
467 | leaf-list llref3 { | ||||
468 | type leafref { | ||||
469 | path "../../lfunion14"; | ||||
470 | } | ||||
471 | } | ||||
472 | |||||
473 | leaf-list llref4 { | ||||
474 | type leafref { | ||||
475 | path "../../lfunion13"; | ||||
476 | } | ||||
477 | } | ||||
478 | |||||
479 | leaf-list llref5 { | ||||
480 | type leafref { | ||||
481 | path "../../lfunion11"; | ||||
482 | } | ||||
483 | } | ||||
484 | |||||
485 | leaf-list llref6 { | ||||
486 | type leafref { | ||||
487 | path "../../lfref2"; | ||||
488 | } | ||||
489 | } | ||||
490 | |||||
491 | leaf-list llref7 { | ||||
492 | type leafref { | ||||
493 | path "../../lfenum"; | ||||
494 | } | ||||
495 | } | ||||
496 | |||||
497 | leaf-list llref8 { | ||||
498 | type leafref { | ||||
499 | path "../../lfdecimal6"; | ||||
500 | } | ||||
501 | } | ||||
502 | |||||
503 | leaf-list llref9 { | ||||
504 | type leafref { | ||||
505 | path "/ytb:leaf12"; | ||||
506 | } | ||||
507 | } | ||||
508 | |||||
509 | leaf-list llref10 { | ||||
510 | type leafref { | ||||
511 | path "/ytb:leaf11"; | ||||
512 | } | ||||
513 | } | ||||
514 | |||||
515 | leaf-list llref11 { | ||||
516 | type leafref { | ||||
517 | path "/ytb:leaf10"; | ||||
518 | } | ||||
519 | } | ||||
520 | |||||
521 | leaf-list llref12 { | ||||
522 | type leafref { | ||||
523 | path "/ytb:leaf9"; | ||||
524 | } | ||||
525 | } | ||||
526 | |||||
527 | leaf-list llref13 { | ||||
528 | type leafref { | ||||
529 | path "/ytb:leaf8"; | ||||
530 | } | ||||
531 | } | ||||
532 | |||||
533 | leaf-list llref14 { | ||||
534 | type leafref { | ||||
535 | path "/ytb:leaf7"; | ||||
536 | } | ||||
537 | } | ||||
538 | |||||
539 | leaf-list llref15 { | ||||
540 | type leafref { | ||||
541 | path "/ytb:leaf6"; | ||||
542 | } | ||||
543 | } | ||||
544 | |||||
545 | leaf-list llref16 { | ||||
546 | type leafref { | ||||
547 | path "/ytb:leaf5"; | ||||
548 | } | ||||
549 | } | ||||
550 | |||||
551 | leaf-list llref17 { | ||||
552 | type leafref { | ||||
553 | path "/ytb:leaf4"; | ||||
554 | } | ||||
555 | } | ||||
556 | |||||
557 | leaf-list llref18 { | ||||
558 | type leafref { | ||||
559 | path "/ytb:leaf3"; | ||||
560 | } | ||||
561 | } | ||||
562 | |||||
563 | leaf-list llref19 { | ||||
564 | type leafref { | ||||
565 | path "/ytb:leaf2"; | ||||
566 | } | ||||
567 | } | ||||
568 | |||||
569 | leaf-list llref20 { | ||||
570 | type leafref { | ||||
571 | path "/ytb:leaf1"; | ||||
572 | } | ||||
573 | } | ||||
574 | |||||
575 | leaf lref21 { | ||||
576 | type leafref { | ||||
577 | path "/ytb:leaf1"; | ||||
578 | } | ||||
579 | } | ||||
580 | |||||
581 | leaf iref1 { | ||||
582 | type identityref { | ||||
583 | base iden; | ||||
584 | } | ||||
585 | } | ||||
586 | |||||
587 | leaf-list iref2 { | ||||
588 | type identityref { | ||||
589 | base iden; | ||||
590 | } | ||||
591 | } | ||||
592 | |||||
593 | leaf iref3 { | ||||
594 | type identityref { | ||||
595 | base ytb:type; | ||||
596 | } | ||||
597 | } | ||||
598 | |||||
599 | leaf-list iref4 { | ||||
600 | type identityref { | ||||
601 | base ytb:type; | ||||
602 | } | ||||
603 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 604 | } |
605 | } | ||||
Vidyashree Rama | a5ba656 | 2017-03-08 11:23:28 +0530 | [diff] [blame] | 606 | } |