NativeEnumerated.c vars NULL init and check
[com/asn1c.git] / tests / tests-asn1c-compiler / 99-class-sample-OK.asn1.-EFprint-class-matrix
1 ModuleClassSample { iso org(3) dod(6) internet(1) private(4) enterprise(1)
2         spelio(9363) software(1) asn1c(5) test(1) 99 }
3 DEFINITIONS ::=
4 BEGIN
5
6 SAMPLE-CLASS ::= CLASS {
7     &id  RELATIVE-OID UNIQUE,
8     &code        ENUMERATED {
9             request(0),        
10             response(1),        
11             status(2)
12         } DEFAULT 0,
13     &Type        OPTIONAL
14 } WITH SYNTAX { [TYPE &Type] [WITH CODE &code] IDENTIFIED BY &id }
15
16 -- Information Object Set has 4 entries:
17 --    [             &id][           &code][           &Type]
18 -- [1] request-whatever        <no entry>        <no entry> 
19 -- [2]   response-stuff                 1        <no entry> 
20 -- [3]       request-id                 2        SampleType 
21 -- [4]     request-salt        <no entry>              Salt 
22
23
24 SampleClassObjectSet SAMPLE-CLASS ::= {{ IDENTIFIED BY request-whatever } | { WITH CODE 1 IDENTIFIED BY response-stuff } | { TYPE SampleType WITH CODE 2 IDENTIFIED BY request-id } | { TYPE Salt IDENTIFIED BY request-salt }}
25 -- Information Object Set has 4 entries:
26 --    [             &id][           &code][           &Type]
27 -- [1] request-whatever        <no entry>        <no entry> 
28 -- [2]   response-stuff                 1        <no entry> 
29 -- [3]       request-id                 2        SampleType 
30 -- [4]     request-salt        <no entry>              Salt 
31
32
33 request-Whatever SAMPLE-CLASS ::= { IDENTIFIED BY request-whatever }
34 -- Information Object Set has 1 entry:
35 --    [             &id][           &code][           &Type]
36 -- [1] request-whatever        <no entry>        <no entry> 
37
38
39 respond-Stuff SAMPLE-CLASS ::= { WITH CODE 1 IDENTIFIED BY response-stuff }
40 -- Information Object Set has 1 entry:
41 --    [           &id][         &code][         &Type]
42 -- [1] response-stuff               1      <no entry> 
43
44
45 request-Status SAMPLE-CLASS ::= { TYPE SampleType WITH CODE 2 IDENTIFIED BY request-id }
46 -- Information Object Set has 1 entry:
47 --    [       &id][     &code][     &Type]
48 -- [1] request-id           2  SampleType 
49
50
51 request-Salt SAMPLE-CLASS ::= { TYPE Salt IDENTIFIED BY request-salt }
52 -- Information Object Set has 1 entry:
53 --    [         &id][       &code][       &Type]
54 -- [1] request-salt    <no entry>          Salt 
55
56
57 request-id RELATIVE-OID ::= { 1 1 1 }
58
59 request-salt RELATIVE-OID ::= { 1 1 1 }
60
61 request-whatever RELATIVE-OID ::= { 1 1 5 }
62
63 response-stuff RELATIVE-OID ::= { 2 0 1 }
64
65 SampleType ::= SEQUENCE {
66     ...
67 }
68
69 Salt ::= SET {
70     ...
71 }
72
73 END