blob: 0e62291b8f1df5cebaf24bd7e24d79802cbb9027 [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 },
86 protocolExtensions := omit
87 }
88 }
89 }
90}
91
92
93/* 9.1.4 HNB REGISTER ACCEPT */
Daniel Willmanna79e9bb2022-01-05 09:12:34 +010094template (present) HNBAP_PDU
95tr_HNBAP_HNBRegisterAccept(template (present) uint16_t rnc_id := ?) := {
96 successfulOutcome := {
97 procedureCode := id_HNBRegister,
98 criticality := reject,
99 value_ := {
100 hNBRegisterAccept := {
101 protocolIEs := {
102 {
103 id := HNBAP_Constants.id_RNC_ID,
104 criticality := reject,
105 value_ := { RNC_ID := rnc_id }
106 }
107 },
108 protocolExtensions := omit /* TODO: Mux Port Number (optional) 9.2.29 */
109 }
110 }
111 }
112}
113
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100114template (value) HNBAP_PDU
115ts_HNBAP_HNBRegisterAccept(template (value) uint16_t rnc_id) := {
116 successfulOutcome := {
117 procedureCode := id_HNBRegister,
118 criticality := reject,
119 value_ := {
120 hNBRegisterAccept := {
121 protocolIEs := {
122 {
123 id := HNBAP_Constants.id_RNC_ID,
124 criticality := reject,
125 value_ := { RNC_ID := rnc_id }
126 }
127 },
128 protocolExtensions := omit /* TODO: Mux Port Number (optional) 9.2.29 */
129 }
130 }
131 }
132}
133
134/* 9.1.5 HNB REGISTER REJECT */
Daniel Willmann6d2d8882022-08-23 16:01:04 +0200135template (present) HNBAP_PDU
136tr_HNBAP_HNBRegisterReject(template (present) Cause cause := ?) := {
137 unsuccessfulOutcome := {
138 procedureCode := id_HNBRegister,
139 criticality := reject,
140 value_ := {
141 HNBRegisterReject := {
142 protocolIEs := {
143 {
144 id := HNBAP_Constants.id_Cause,
145 criticality := ignore,
146 value_ := { Cause := cause }
147 }
148 },
149 protocolExtensions := * /* TODO: CriticalityDiagnostics, BackoffTimer */
150 }
151 }
152 }
153}
154
Pau Espin Pedrolb54acca2021-11-22 20:35:44 +0100155template (value) HNBAP_PDU
156ts_HNBAP_HNBRegisterReject(template (value) Cause cause) := {
157 unsuccessfulOutcome := {
158 procedureCode := id_HNBRegister,
159 criticality := reject,
160 value_ := {
161 HNBRegisterReject := {
162 protocolIEs := {
163 {
164 id := HNBAP_Constants.id_Cause,
165 criticality := ignore,
166 value_ := { Cause := cause }
167 }
168 },
169 protocolExtensions := omit /* TODO: CriticalityDiagnostics, BackoffTimer */
170 }
171 }
172 }
173}
174
175}