blob: 7a86e0c983ab6da0b210acb301ae040590924139 [file] [log] [blame]
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +01001/* HNBAP Templates in TTCN-3
2 * (C) 2021 Pau Espin Pedrol <pespin@sysmocom.de>
3 * All rights reserved.
4 *
5 * Released under the terms of GNU General Public License, Version 2 or
6 * (at your option) any later version.
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11module HNBAP_Templates {
12
13import from General_Types all;
14import from Osmocom_Types all;
15
16import from HNBAP_IEs all;
17import from HNBAP_CommonDataTypes all;
18import from HNBAP_Constants all;
19import from HNBAP_Containers all;
20import from HNBAP_PDU_Contents all;
21import from HNBAP_PDU_Descriptions all;
22
23/*********************************************************************************
24 * 3GPP TS 25.469
25 *********************************************************************************/
26
27template (value) Cause ts_HnbapCause(template (value) CauseRadioNetwork c) := {
28 radioNetwork := c
29}
30
31/* 9.1.3 HNB REGISTER REQUEST */
32template (present) HNBAP_PDU
33tr_HNBAP_HNBRegisterRequest(template (present) octetstring hNB_Identity_Info := ?,
34 template (present) OCT3 plmnid := ?,
35 template (present) BIT28 cell_identity := ?,
36 template (present) OCT2 lac := ?,
37 template (present) OCT1 rac := ?,
38 template (present) OCT2 sac := ?) := {
39 initiatingMessage := {
40 procedureCode := id_HNBRegister,
41 criticality := reject,
42 value_ := {
43 hNBRegisterRequest := {
44 protocolIEs := {
45 {
46 id := HNBAP_Constants.id_HNB_Identity,
47 criticality := reject,
48 value_ := {
49 hNB_Identity := {
50 hNB_Identity_Info := hNB_Identity_Info,
51 iE_Extensions := omit
52 }
53 }
54 }, {
55 id := 8,
56 criticality := reject,
57 value_ := {
58 hNB_Location_Information := {
59 macroCoverageInfo := omit,
60 geographicalCoordinates := omit,
61 iE_Extensions := omit
62 }
63 }
64 }, {
65 id := 9,
66 criticality := reject,
67 value_ := { pLMNidentity := plmnid }
68 }, {
69 id := 11,
70 criticality := reject,
71 value_ := { cellIdentity := cell_identity }
72 }, {
73 id := 6,
74 criticality := reject,
75 value_ := { lAC := lac }
76 }, {
77 id := 7,
78 criticality := reject,
79 value_ := { rAC := rac }
80 }, {
81 id := 10,
82 criticality := reject,
83 value_ := { sAC := sac }
84 }
85 },
Daniel Willmann28209ec2022-08-24 09:58:07 +020086 protocolExtensions := *
87 }
88 }
89 }
90}
91
92template (value) HNBAP_PDU
93ts_HNBAP_HNBRegisterRequest(template (value) octetstring hNB_Identity_Info,
94 template (value) OCT3 plmnid,
95 template (value) BIT28 cell_identity,
96 template (value) OCT2 lac,
97 template (value) OCT1 rac,
98 template (value) OCT2 sac) := {
99 initiatingMessage := {
100 procedureCode := id_HNBRegister,
101 criticality := reject,
102 value_ := {
103 hNBRegisterRequest := {
104 protocolIEs := {
105 {
106 id := HNBAP_Constants.id_HNB_Identity,
107 criticality := reject,
108 value_ := {
109 hNB_Identity := {
110 hNB_Identity_Info := hNB_Identity_Info,
111 iE_Extensions := omit
112 }
113 }
114 }, {
115 id := 8,
116 criticality := reject,
117 value_ := {
118 hNB_Location_Information := {
119 macroCoverageInfo := omit,
120 geographicalCoordinates := omit,
121 iE_Extensions := omit
122 }
123 }
124 }, {
125 id := 9,
126 criticality := reject,
127 value_ := { pLMNidentity := plmnid }
128 }, {
129 id := 11,
130 criticality := reject,
131 value_ := { cellIdentity := cell_identity }
132 }, {
133 id := 6,
134 criticality := reject,
135 value_ := { lAC := lac }
136 }, {
137 id := 7,
138 criticality := reject,
139 value_ := { rAC := rac }
140 }, {
141 id := 10,
142 criticality := reject,
143 value_ := { sAC := sac }
144 }
145 },
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100146 protocolExtensions := omit
147 }
148 }
149 }
150}
151
152
153/* 9.1.4 HNB REGISTER ACCEPT */
Daniel Willmanna79e9bb2022-01-05 09:12:34 +0100154template (present) HNBAP_PDU
155tr_HNBAP_HNBRegisterAccept(template (present) uint16_t rnc_id := ?) := {
156 successfulOutcome := {
157 procedureCode := id_HNBRegister,
158 criticality := reject,
159 value_ := {
160 hNBRegisterAccept := {
161 protocolIEs := {
162 {
163 id := HNBAP_Constants.id_RNC_ID,
164 criticality := reject,
165 value_ := { RNC_ID := rnc_id }
166 }
167 },
Daniel Willmann28209ec2022-08-24 09:58:07 +0200168 protocolExtensions := * /* TODO: Mux Port Number (optional) 9.2.29 */
Daniel Willmanna79e9bb2022-01-05 09:12:34 +0100169 }
170 }
171 }
172}
173
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100174template (value) HNBAP_PDU
175ts_HNBAP_HNBRegisterAccept(template (value) uint16_t rnc_id) := {
176 successfulOutcome := {
177 procedureCode := id_HNBRegister,
178 criticality := reject,
179 value_ := {
180 hNBRegisterAccept := {
181 protocolIEs := {
182 {
183 id := HNBAP_Constants.id_RNC_ID,
184 criticality := reject,
185 value_ := { RNC_ID := rnc_id }
186 }
187 },
188 protocolExtensions := omit /* TODO: Mux Port Number (optional) 9.2.29 */
189 }
190 }
191 }
192}
193
194/* 9.1.5 HNB REGISTER REJECT */
Daniel Willmann6d2d8882022-08-23 16:01:04 +0200195template (present) HNBAP_PDU
196tr_HNBAP_HNBRegisterReject(template (present) Cause cause := ?) := {
197 unsuccessfulOutcome := {
198 procedureCode := id_HNBRegister,
199 criticality := reject,
200 value_ := {
201 HNBRegisterReject := {
202 protocolIEs := {
203 {
204 id := HNBAP_Constants.id_Cause,
205 criticality := ignore,
206 value_ := { Cause := cause }
207 }
208 },
209 protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */
210 }
211 }
212 }
213}
214
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100215template (value) HNBAP_PDU
216ts_HNBAP_HNBRegisterReject(template (value) Cause cause) := {
217 unsuccessfulOutcome := {
218 procedureCode := id_HNBRegister,
219 criticality := reject,
220 value_ := {
221 HNBRegisterReject := {
222 protocolIEs := {
223 {
224 id := HNBAP_Constants.id_Cause,
225 criticality := ignore,
226 value_ := { Cause := cause }
227 }
228 },
229 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
230 }
231 }
232 }
233}
234
Harald Welteaf3e2162024-03-27 21:54:20 +0100235/* 9.1.6 UE REGISTER REQUEST */
236template (present) HNBAP_PDU
237tr_HNBAP_UERegisterRequest(template (present) UE_Identity ue_id) := {
238 initiatingMessage := {
239 procedureCode := id_UERegister,
240 criticality := reject,
241 value_ := {
242 uERegisterRequest := {
243 protocolIEs := {
244 {
245 id := HNBAP_Constants.id_UE_Identity,
246 criticality := reject,
247 value_ := { UE_Identity := ue_id }
248 }, {
249 id := HNBAP_Constants.id_Registration_Cause,
250 criticality := ignore,
251 value_ := { Registration_Cause := normal }
252 }, {
253 id := HNBAP_Constants.id_UE_Capabilities,
254 criticality := ignore,
255 value_ := {
256 UE_Capabilities := {
257 access_stratum_release_indicator := ?,
258 csg_capability := ?
259 }
260 }
261 }
262 },
263 protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */
264 }
265 }
266 }
267}
268
269template (value) HNBAP_PDU
270ts_HNBAP_UERegisterRequest(template (value) UE_Identity ue_id) := {
271 initiatingMessage := {
272 procedureCode := id_UERegister,
273 criticality := reject,
274 value_ := {
275 uERegisterRequest := {
276 protocolIEs := {
277 {
278 id := HNBAP_Constants.id_UE_Identity,
279 criticality := reject,
280 value_ := { UE_Identity := ue_id }
281 }, {
282 id := HNBAP_Constants.id_Registration_Cause,
283 criticality := ignore,
284 value_ := { Registration_Cause := normal }
285 }, {
286 id := HNBAP_Constants.id_UE_Capabilities,
287 criticality := ignore,
288 value_ := {
289 UE_Capabilities := {
290 access_stratum_release_indicator := rel_8_and_beyond,
291 csg_capability := not_csg_capable,
292 iE_Extensions := omit
293 }
294 }
295 }
296 },
297 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
298 }
299 }
300 }
301}
302
303/* 9.1.7 UE REGISTER ACCEPT */
304template (present) HNBAP_PDU
305tr_HNBAP_UERegisterAccept(template (present) UE_Identity ue_id) := {
306 successfulOutcome := {
307 procedureCode := id_UERegister,
308 criticality := reject,
309 value_ := {
310 uERegisterAccept := {
311 protocolIEs := {
312 {
313 id := HNBAP_Constants.id_UE_Identity,
314 criticality := reject,
315 value_ := { UE_Identity := ue_id }
316 }, {
317 id := HNBAP_Constants.id_Context_ID,
318 criticality := reject,
319 value_ := { Context_ID := ? }
320 }, *
321 },
322 protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */
323 }
324 }
325 }
326}
327
328template (value) HNBAP_PDU
329ts_HNBAP_UERegisterAccept(template (value) UE_Identity ue_id,
330 template (value) BIT24 context_id) := {
331 successfulOutcome := {
332 procedureCode := id_UERegister,
333 criticality := reject,
334 value_ := {
335 uERegisterAccept := {
336 protocolIEs := {
337 {
338 id := HNBAP_Constants.id_UE_Identity,
339 criticality := reject,
340 value_ := { UE_Identity := ue_id }
341 }, {
342 id := HNBAP_Constants.id_Context_ID,
343 criticality := reject,
344 value_ := { Context_ID := context_id }
345 }
346 },
347 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
348 }
349 }
350 }
351}
352
353/* 9.1.8 UE REGISTER REJECT */
354template (present) HNBAP_PDU
355tr_HNBAP_UERegisterReject(template (present) UE_Identity ue_id, template (present) Cause cause := ?) := {
356 unsuccessfulOutcome := {
357 procedureCode := id_UERegister,
358 criticality := reject,
359 value_ := {
360 uERegisterReject := {
361 protocolIEs := {
362 {
363 id := HNBAP_Constants.id_UE_Identity,
364 criticality := reject,
365 value_ := { UE_Identity := ue_id }
366 }, {
367 id := HNBAP_Constants.id_Cause,
368 criticality := ignore,
369 value_ := { Cause := cause }
370 }, *
371 },
372 protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */
373 }
374 }
375 }
376}
377template (value) HNBAP_PDU
378ts_HNBAP_UERegisterReject(template (value) UE_Identity ue_id, template (value) Cause cause) := {
379 unsuccessfulOutcome := {
380 procedureCode := id_UERegister,
381 criticality := reject,
382 value_ := {
383 uERegisterReject := {
384 protocolIEs := {
385 {
386 id := HNBAP_Constants.id_UE_Identity,
387 criticality := reject,
388 value_ := { UE_Identity := ue_id }
389 }, {
390 id := HNBAP_Constants.id_Cause,
391 criticality := ignore,
392 value_ := { Cause := cause }
393 }
394 },
395 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
396 }
397 }
398 }
399}
400
Pau Espin Pedrolf0b9fa02022-09-12 13:31:07 +0200401/* 9.1.9 HNB DE-REGISTER */
402template (value) HNBAP_PDU
403ts_HNBAP_HNBDe_Register(template (value) Cause cause) := {
404 initiatingMessage := {
405 procedureCode := id_HNBDe_Register,
406 criticality := reject,
407 value_ := {
408 HNBDe_Register := {
409 protocolIEs := {
410 {
411 id := HNBAP_Constants.id_Cause,
412 criticality := ignore,
413 value_ := { Cause := cause }
414 }
415 },
416 protocolExtensions := omit /* TODO: BackoffTimer */
417 }
418 }
419 }
420}
421
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100422}