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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
|
InfObj DEFINITIONS ::=
BEGIN
RANAP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&Outcome DEFAULT NULL,
&vartypvalue &Outcome OPTIONAL,
&FixTypeValSet PrintableString OPTIONAL,
&VarTypeValSet &InitiatingMessage OPTIONAL,
&infoObject RANAP-ELEMENTARY-PROCEDURE OPTIONAL,
&InfObjectSet CLASS2 OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
[OUTCOME &Outcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
[VARTYPEVALUE &vartypvalue]
[FIXT &FixTypeValSet]
[VART &VarTypeValSet]
[INFOOBJECT &infoObject]
[INFOOBJECTSET &InfObjectSet]
}
RANAP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
-- successfulOutcome SuccessfulOutcome,
-- unsuccessfulOutcome UnsuccessfulOutcome,
-- outcome Outcome,
...
}
CLASS2 ::= RANAP-ELEMENTARY-PROCEDURE
InitiatingMessage ::= SEQUENCE {
procedureCode RANAP-ELEMENTARY-PROCEDURE.&procedureCode ({RANAP-ELEMENTARY-PROCEDURES}),
criticality RANAP-ELEMENTARY-PROCEDURE.&criticality ({RANAP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value RANAP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({RANAP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
iu-Release RANAP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Iu-ReleaseCommand
SUCCESSFUL OUTCOME Iu-ReleaseComplete
PROCEDURE CODE id-Iu-Release1
CRITICALITY ignore
}
relocationPreparation RANAP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE INTEGER --Iu-ReleaseCommand
SUCCESSFUL OUTCOME Iu-ReleaseComplete
PROCEDURE CODE id-Iu-Release2
CRITICALITY notify
}
object3 RANAP-ELEMENTARY-PROCEDURE ::= {
&InitiatingMessage Iu-ReleaseCommand,
&SuccessfulOutcome Iu-ReleaseComplete,
&procedureCode id-Iu-Release3,
&criticality reject
}
object4 RANAP-ELEMENTARY-PROCEDURE ::= {
&InitiatingMessage INTEGER,
&SuccessfulOutcome PrintableString,
&procedureCode id-Iu-Release4,
&criticality reject
}
object5 RANAP-ELEMENTARY-PROCEDURE ::= {
&InitiatingMessage INTEGER,
&SuccessfulOutcome PrintableString,
&Outcome ProcedureCode,
&vartypvalue 12,
&infoObject object4,
&InfObjectSet MyObjectSet,
&procedureCode id-Iu-Release5,
&criticality reject
}
RANAP-ELEMENTARY-PROCEDURES RANAP-ELEMENTARY-PROCEDURE ::= {
iu-Release |
relocationPreparation ,
...
}
RANAP-ELEMENTARY-PROCEDURES2 RANAP-ELEMENTARY-PROCEDURE ::= {
iu-Release |
relocationPreparation
}
OBJECTSET1 RANAP-ELEMENTARY-PROCEDURE ::= {
{INITIATING MESSAGE Iu-ReleaseCommand SUCCESSFUL OUTCOME Iu-ReleaseComplete PROCEDURE CODE id-Iu-Release1 CRITICALITY ignore} | {INITIATING MESSAGE Iu-ReleaseCommand PROCEDURE CODE id-Iu-Release2}
}
OBJECTSET2 RANAP-ELEMENTARY-PROCEDURE ::= {
iu-Release |
{INITIATING MESSAGE Iu-ReleaseCommand SUCCESSFUL OUTCOME Iu-ReleaseComplete PROCEDURE CODE id-Iu-Release4 CRITICALITY ignore} |
relocationPreparation |
{INITIATING MESSAGE Iu-ReleaseCommand PROCEDURE CODE id-Iu-Release5} ,
...
}
OBJECTSET3 RANAP-ELEMENTARY-PROCEDURE ::= {
iu-Release,
...
}
OBJECTSET4 RANAP-ELEMENTARY-PROCEDURE ::= {
iu-Release
}
Iu-ReleaseCommand ::= SEQUENCE {
first INTEGER,
second BOOLEAN
}
Iu-ReleaseComplete ::= INTEGER (1..510)
ProcedureCode ::= INTEGER (0..255)
Criticality ::= ENUMERATED { reject, ignore, notify }
id-Iu-Release1 INTEGER ::= 1
id-Iu-Release2 INTEGER ::= 2
id-Iu-Release3 INTEGER ::= 3
id-Iu-Release4 INTEGER ::= 4
id-Iu-Release5 INTEGER ::= 5
--
-- MY-CLASS
--
Seq ::= SEQUENCE {
int INTEGER,
str OCTET STRING
}
MY-CLASS ::= CLASS {
&Count DEFAULT INTEGER,
&integerValue INTEGER UNIQUE,
&booleanValue BOOLEAN,
&stringValue PrintableString
}
myobject MY-CLASS ::= {
&integerValue 12,
&booleanValue TRUE,
&stringValue "hejsan"
}
myotherobject MY-CLASS ::= {
&Count Seq,
&integerValue 42,
&booleanValue FALSE,
&stringValue "hoppsan"
}
MyObjectSet MY-CLASS ::= {
myobject | myotherobject |
{
-- Each character will be encoded in 3 bits in UPER, 4 bits in PER.
&Count NumericString (FROM("01234567") ^ SIZE(8)),
&integerValue 43,
&booleanValue TRUE,
&stringValue "tjosan"
}
}
MyPdu ::= SEQUENCE {
count MY-CLASS.&Count ({MyObjectSet}{@int}),
int MY-CLASS.&integerValue ({MyObjectSet}),
bool MY-CLASS.&booleanValue ({MyObjectSet}{@int}),
str MY-CLASS.&stringValue ({MyObjectSet}{@int})
}
Seq2 ::= SEQUENCE {
int MY-CLASS.&integerValue ({MyObjectSet}),
seqof SEQUENCE (1..10) OF MY-CLASS.&booleanValue ({MyObjectSet}{@int}),
setof SET (1..10) OF MY-CLASS.&booleanValue ({MyObjectSet}{@int})
}
--
-- Class with constructed default
--
CONSTRUCTED-DEFAULT ::= CLASS {
&id INTEGER UNIQUE,
&Type DEFAULT SEQUENCE { a INTEGER, b BOOLEAN },
&ok BOOLEAN DEFAULT TRUE
}
constructed1 CONSTRUCTED-DEFAULT ::= { &id 1 }
constructed2 CONSTRUCTED-DEFAULT ::= { &id 2, &ok false }
ConstructedDefaultSet CONSTRUCTED-DEFAULT ::= {
constructed1 |
constructed2 |
{ &id 3, &Type BOOLEAN } |
{ &id 4, &Type SET { a INTEGER, b BIT STRING } } |
{ &id 5, &Type CHOICE { i INTEGER, b BIT STRING } } |
{ &id 6, &Type SEQUENCE OF INTEGER (1..16) } |
{ &id 7, &Type SET OF INTEGER (1..64) } |
{ &id 8, &Type SEQUENCE OF SEQUENCE { x INTEGER, y INTEGER } } |
{ &id 9, &Type SET OF SEQUENCE { x INTEGER, y INTEGER } }
}
ConstructedPdu ::= SEQUENCE {
id CONSTRUCTED-DEFAULT.&id ({ConstructedDefaultSet}),
content CONSTRUCTED-DEFAULT.&Type ({ConstructedDefaultSet}{@id})
}
ConstructedSet ::= SET {
id [0] CONSTRUCTED-DEFAULT.&id ({ConstructedDefaultSet}),
content [1] CONSTRUCTED-DEFAULT.&Type ({ConstructedDefaultSet}{@id})
}
-- Test OPTIONAL and DEFAULT
OptionalInSeq ::= SEQUENCE {
id CONSTRUCTED-DEFAULT.&id ({ConstructedDefaultSet}),
content CONSTRUCTED-DEFAULT.&Type ({ConstructedDefaultSet}{@id}) OPTIONAL
}
DefaultInSeq ::= SEQUENCE {
id CONSTRUCTED-DEFAULT.&id ({ConstructedDefaultSet}),
content CONSTRUCTED-DEFAULT.&Type ({ConstructedDefaultSet}{@id})
DEFAULT BOOLEAN:TRUE
}
-- Test more than one optional typefield table constraint in a SEQUENCE.
MULTIPLE-OPTIONALS ::= CLASS {
&id INTEGER UNIQUE,
&T1,
&T2,
&T3
}
multiple-optionals-1 MULTIPLE-OPTIONALS ::=
{&id 1, &T1 INTEGER, &T2 BOOLEAN, &T3 OCTET STRING}
Multiple-Optionals-Set MULTIPLE-OPTIONALS ::= {
multiple-optionals-1
}
Multiple-Optionals ::= SEQUENCE {
id MULTIPLE-OPTIONALS.&id ({Multiple-Optionals-Set}),
t1 [0] MULTIPLE-OPTIONALS.&T1 ({Multiple-Optionals-Set}{@id}) OPTIONAL,
t2 [1] MULTIPLE-OPTIONALS.&T2 ({Multiple-Optionals-Set}{@id}) OPTIONAL,
t3 [2] MULTIPLE-OPTIONALS.&T3 ({Multiple-Optionals-Set}{@id}) OPTIONAL
}
-- Test different ways of constructing object sets.
OBJECT-SET-TEST ::= CLASS {
&id INTEGER UNIQUE,
&Type
} WITH SYNTAX {
&id IS &Type
}
ObjectSetTest{OBJECT-SET-TEST:ObjectSet} ::=
SEQUENCE {
id OBJECT-SET-TEST.&id ({ObjectSet}),
type OBJECT-SET-TEST.&Type ({ObjectSet}{@id})
}
ost1 OBJECT-SET-TEST ::= { 1 IS BIT STRING }
ost2 OBJECT-SET-TEST ::= { 2 IS OCTET STRING }
ost3 OBJECT-SET-TEST ::= { 3 IS ENUMERATED {donald,scrooge} }
ost4 OBJECT-SET-TEST ::= { 4 IS BOOLEAN }
ost5 OBJECT-SET-TEST ::= { 5 IS INTEGER (0..15) }
Ost12 OBJECT-SET-TEST ::= { ost1 | ost2 }
Ost123 OBJECT-SET-TEST ::= { ost3 | Ost12 }
Ost1234 OBJECT-SET-TEST ::= { Ost123 | ost4 }
Ost45 OBJECT-SET-TEST ::= { ost4 | ost5 }
Ost12345 OBJECT-SET-TEST ::= { Ost123 | Ost45 }
OstSeq12 ::= ObjectSetTest{ {Ost12} }
OstSeq123 ::= ObjectSetTest{ {Ost123} }
OstSeq1234 ::= ObjectSetTest{ {Ost1234} }
OstSeq45 ::= ObjectSetTest{ {Ost45} }
OstSeq12345 ::= ObjectSetTest{ {Ost12345} }
OstSeq12Except ::= ObjectSetTest{ {Ost123 EXCEPT ost3} }
OstSeq123Except ::= ObjectSetTest{ {Ost12345 EXCEPT Ost45} }
ExOst1 OBJECT-SET-TEST ::= { ost1, ... }
ExOst12 OBJECT-SET-TEST ::= { ost1, ..., ost2 }
ExOst123 OBJECT-SET-TEST ::= { ost3, ..., ExOst12 }
ExOst1234 OBJECT-SET-TEST ::= { ExOst123, ..., ost4 }
ExOst45 OBJECT-SET-TEST ::= { ost4, ..., ost5 }
ExOst12345 OBJECT-SET-TEST ::= { ExOst123, ..., ExOst45 }
ExOstSeq1 ::= ObjectSetTest{ {ExOst1} }
ExOstSeq12 ::= ObjectSetTest{ {ExOst12} }
ExOstSeq123 ::= ObjectSetTest{ {ExOst123} }
ExOstSeq1234 ::= ObjectSetTest{ {ExOst1234} }
ExOstSeq45 ::= ObjectSetTest{ {ExOst45} }
ExOstSeq12345 ::= ObjectSetTest{ {ExOst12345} }
ExOstSeq12Except ::= ObjectSetTest{ {ExOst123 EXCEPT ost3} }
ExOstSeq123Except ::= ObjectSetTest{ {ExOst12345 EXCEPT ExOst45} }
ExInlOst1 OBJECT-SET-TEST ::= {
{ 1 IS BIT STRING },
...
}
ExInlOst12 OBJECT-SET-TEST ::= {
{ 1 IS BIT STRING },
...,
{ 2 IS OCTET STRING }
}
ExInlOstSeq1 ::= ObjectSetTest{ {ExInlOst1} }
ExInlOstSeq12 ::= ObjectSetTest{ {ExInlOst12} }
--
-- Test that extensions in a simple class works.
--
ExtClassSeq ::= SEQUENCE {
arg EXT-CLASS.&id({Extend})
}
EXT-CLASS ::= CLASS {
&id INTEGER UNIQUE
} WITH SYNTAX {
ID &id
}
Extend EXT-CLASS ::= { { ID alt1 } | { ID alt2 }, ... }
alt1 INTEGER ::= 4
alt2 INTEGER ::= 5
--
-- Test a BIT STRING which is optional in the simplified syntax.
--
PUBLIC-KEY ::= CLASS {
&id INTEGER UNIQUE,
&keyUsage KeyUsage OPTIONAL
} WITH SYNTAX {
IDENTIFIER &id
[OPTIONAL-BIT-STRING &keyUsage]
}
KeyUsage ::= BIT STRING {
digitalSignature (0),
nonRepudiation (1),
keyEncipherment (2)
}
object-with-optional-bit-string PUBLIC-KEY ::= {
IDENTIFIER 42
OPTIONAL-BIT-STRING {digitalSignature, nonRepudiation, keyEncipherment}
}
-- Test object identifiers from objects.
CONTAINER ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&rid RELATIVE-OID OPTIONAL,
&Type OPTIONAL
} WITH SYNTAX {
IDENTIFIED BY &id
[REL-OID &rid]
[TYPE &Type]
}
id1 OBJECT IDENTIFIER ::= {1 2 42}
obj1 CONTAINER ::= { IDENTIFIED BY id1 REL-OID {100 101} }
value-2 OBJECT IDENTIFIER ::= { value-1 25 }
value-1 OBJECT IDENTIFIER ::= obj1.&id
value-3 RELATIVE-OID ::= obj1.&rid
value-4 OBJECT IDENTIFIER ::= { 1 2 value-3 }
-- Test an obscure issue when ATTRIBUTE.&id was not
-- properly evaluated.
Rdn ::= SingleAttribute { {SupportedAttributes} }
ATTRIBUTE ::= CLASS {
&id OBJECT IDENTIFIER UNIQUE,
&Type OPTIONAL
}
SingleAttribute{ATTRIBUTE:AttrSet} ::= SEQUENCE {
type ATTRIBUTE.&id({AttrSet}),
value ATTRIBUTE.&Type({AttrSet}{@type})
}
AttributeType ::= ATTRIBUTE.&id
SupportedAttributes ATTRIBUTE ::= { at-name }
id-at OBJECT IDENTIFIER ::= { 2 5 4 41 }
id-at-name AttributeType ::= id-at
at-name ATTRIBUTE ::= { &Type PrintableString, &id id-at-name }
--
-- Test using an alias for TYPE-IDENTIFIER.
--
TiAliasParameterized { TI-ALIAS:InfoObjectSet } ::= SEQUENCE {
algorithm TI-ALIAS.&id({InfoObjectSet}),
parameters TI-ALIAS.&Type({InfoObjectSet} {@algorithm}) OPTIONAL
}
TI-ALIAS ::= TYPE-IDENTIFIER
TiAliasSeq ::= SEQUENCE {
prf TiAliasParameterized {{TiAliasSet}}
}
TiAliasSet TI-ALIAS ::= {
{NULL IDENTIFIED BY {2 1 2}},
...
}
--
-- Test using an alias for a class.
--
ALIAS-CONTAINER ::= CLASS {
&id INTEGER UNIQUE,
&obj INDIRECT-CLASS
}
INDIRECTED-CLASS ::= CLASS {
&id INTEGER UNIQUE,
&Type
}
INDIRECT-CLASS ::= INDIRECTED-CLASS
--
-- Indirect ObjectClassFieldType in a SEQUENCE.
--
ContentInfo ::= SEQUENCE {
contentType ContentType, -- Indirect ObjectClassFieldType
content TYPE-IDENTIFIER.&Type({Contents}{@contentType})
OPTIONAL
}
Contents TYPE-IDENTIFIER ::= {
{IA5String IDENTIFIED BY id-content-type}
}
ContentType ::= TYPE-IDENTIFIER.&id({Contents})
id-content-type ContentType ::= { 2 7 8 9 }
--
-- Tricky parsing of simplified syntax.
--
TrickyType-1 ::= BIT STRING
TrickyType-2 ::= OCTET STRING
TRICKY ::= CLASS {
&Type1,
&Type2
} WITH SYNTAX {
TYPE &Type1 &Type2
}
tricky-object TRICKY ::= {TYPE TrickyType-1 TrickyType-2}
tricky-bit-string tricky-object.&Type1 ::= '1011'B
tricky-octet-string tricky-object.&Type1 ::= 'CAFE'H
END
|