blob: 602c37b25826e868d0cf8ecd64901eb897b4f724 [file] [log] [blame]
Vidyashree Ramaa5ba6562017-03-08 11:23:28 +05301module simple-data-types {
2 namespace "simple:data:types";
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 cont {
51 leaf lfnint8Min {
52 type int8;
53 }
54 leaf lfnint8Max {
55 type int8;
56 }
57 leaf lfnint16Min {
58 type int16;
59 }
60 leaf lfnint16Max {
61 type int16;
62 }
63 leaf lfnint32Min {
64 type int32;
65 }
66 leaf lfnint32Max {
67 type int32;
68 }
69 leaf lfnint64Min {
70 type int64;
71 }
72 leaf lfnint64Max {
73 type int64;
74 }
75 leaf lfnuint8Max {
76 type uint8;
77 }
78 leaf lfnuint16Max {
79 type uint16;
80 }
81 leaf lfnuint32Max {
82 type uint32;
83 }
84 leaf lfuint64Max {
85 type uint64;
86 }
87 leaf lfstr {
88 type string;
89 }
90 leaf lfstr1 {
91 type string;
92 }
93 leaf lfbool1 {
94 type boolean;
95 }
96 leaf lfbool2 {
97 type boolean;
98 }
99 leaf lfbool3 {
100 type boolean;
101 }
102 leaf lfdecimal1 {
103 type decimal64 {
104 fraction-digits 1;
105 }
106 }
107 leaf lfdecimal2 {
108 type decimal64 {
109 fraction-digits 2;
110 }
111 }
112 leaf lfdecimal3 {
113 type decimal64 {
114 fraction-digits 3;
115 }
116 }
117
118 leaf lfdecimal4 {
119 type decimal64 {
120 fraction-digits 4;
121 }
122 }
123
124 leaf lfdecimal6 {
125 type decimal64 {
126 fraction-digits 6;
127 }
128 }
129
130 leaf lfenum {
131 type enumeration {
132 enum enum1;
133 enum enum2;
134 enum enum3;
135 enum enum4;
136 }
137 }
138
139 leaf lfbits {
140 type bits {
141 bit bit1;
142 bit bit2;
143 bit bit3;
144 bit bit4;
145 }
146 }
147
148 leaf lfbinary {
149 type binary;
150 }
151
152 leaf lfref1 { //reference to string type
153 type leafref {
154 path "../lfstr";
155 }
156 }
157
158 leaf lfref2 { //reference to number type
159 type leafref {
160 path "../lfnint8Max";
161 }
162 }
163
164 leaf lfempty {
165 type empty;
166 }
167
168 leaf lfunion1 {
169 type union {
170 type uint16;
171 type string;
172 }
173 }
174 leaf lfunion2 {
175 type union {
176 type decimal64 {
177 fraction-digits 2;
178 }
179 type string;
180 }
181 }
182
183 leaf lfunion4 {
184 type union {
185 type boolean;
186 type string;
187 }
188 }
189
190 leaf lfunion5 {
191 type union {
192 type uint16;
193 type string;
194 }
195 }
196
197 leaf lfunion7 {
198 type tpdfun3;
199 }
200
201 leaf lfunion8 {
202 type union {
203 type uint16;
204 type string;
205 }
206 }
207
208 leaf lfunion9 {
209 type union {
210 type uint16;
211 type boolean;
212 }
213 }
214
215 leaf lfunion10 {
216 type union {
217 type bits {
218 bit bt1;
219 bit bt2;
220 }
221 type boolean;
222 }
223 }
224
225 leaf lfunion11 {
226 type union {
227 type tpdfun1;
228 type tpdfun2;
229 }
230 }
231
232 leaf lfunion12 {
233 type tpdfun2;
234 }
235
236 leaf lfunion13 {
237 type tpdfbit;
238 }
239
240 leaf lfunion14 {
241 type union {
242 type enumeration {
243 enum zero;
244 enum one;
245 }
246 type uint16;
247 }
248 }
249
250 leaf identityref1 {
251 type identityref {
252 base iden;
253 }
254 }
255 }
256}