aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/asn1_SUITE_data/InfObj.asn
blob: 61d9d23ea28f54995311f35a21d9d411e203512b (plain) (blame)
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
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})
}

--
-- 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 }
}

ConstructedPdu ::= SEQUENCE {
  id CONSTRUCTED-DEFAULT.&id ({ConstructedDefaultSet}),
  content CONSTRUCTED-DEFAULT.&Type ({ConstructedDefaultSet}{@id})
}

END