blob: 89edf76e37f4f98dbff21f947b7ee2053592884c [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
235}