blob: b002286832e5006f1486181243f4e70f086204c9 [file] [log] [blame]
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +02001module SBC_AP_Templates {
2
3import from General_Types all;
4import from Osmocom_Types all;
5
6import from SBC_AP_IEs all;
7import from SBC_AP_Constants all;
8import from SBC_AP_Containers all;
9import from SBC_AP_PDU_Contents all;
10import from SBC_AP_PDU_Descriptions all;
11
12import from SBC_AP_Types all;
13
Pau Espin Pedrolae2e5152022-07-29 19:16:23 +020014/* 3GPP TS 36.413 9.2.1.38 */
15template (value) EUTRAN_CGI ts_SBCAP_ECGI(PLMNidentity plmn_id := '09F107'O, integer cell_id := 1) := {
16 pLMNidentity := plmn_id,
17 cell_ID := int2bit(cell_id, 28),
18 iE_Extensions := omit
19}
20
Pau Espin Pedrolb1a83fb2022-08-02 13:17:47 +020021/* 3GPP TS 36.413 9.2.3.16 */
22template (value) TAI ts_SBCAP_TAI(PLMNidentity plmn_id := '09F107'O, uint16_t tac := 1) := {
23 pLMNidentity := plmn_id,
24 tAC := int2oct(tac, 2),
25 iE_Extensions := omit
26}
27
Pau Espin Pedrolae2e5152022-07-29 19:16:23 +020028/* 3GPP TS 36.413 9.2.1.54 */
29template (value) CellId_Broadcast_List_Item ts_SBCAP_CellId_Broadcast_List_Item(
30 template (value) EUTRAN_CGI ecgi := ts_SBCAP_ECGI()) := {
31 eCGI := ecgi,
32 iE_Extensions := omit
33}
34template (value) Broadcast_Scheduled_Area_List ts_SBCAP_Broadcast_Scheduled_Area_List(
35 template (value) CellId_Broadcast_List cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()})
36:= {
37 cellId_Broadcast_List := cell_id_li,
38 tAI_Broadcast_List := omit,
39 emergencyAreaID_Broadcast_List := omit,
40 iE_Extensions := omit
41}
42
Pau Espin Pedrol45ef7752022-08-05 18:08:48 +020043template (value) Global_ENB_ID ts_Global_ENB_ID_MACRO(PLMNidentity plmn_id,
44 integer macro_enb_id)
45
46:= {
47 pLMNidentity := plmn_id,
48 eNB_ID := {
49 macroENB_ID := int2bit(macro_enb_id, 20)
50 },
51 iE_Extensions := omit
52}
53
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +020054template (value) SBC_AP_PDU
55ts_SBCAP_PWS_RESTART(
56 template (value) Restarted_Cell_List restart_cl,
57 template (value) Global_ENB_ID global_enb_id) := {
58 initiatingMessage := {
59 procedureCode := id_PWS_Restart_Indication,
60 criticality := reject,
61 value_ := {
62 PWS_Restart_Indication := {
63 protocolIEs := {
64 {
65 id := SBC_AP_Constants.id_Restarted_Cell_List,
66 criticality := reject,
67 value_ := { Restarted_Cell_List := restart_cl }
68 }, {
69 id := SBC_AP_Constants.id_Global_ENB_ID,
70 criticality := reject,
71 value_ := { Global_ENB_ID := global_enb_id }
72 }
73 /* List of TAIs (mandatory) */
74 /* List of EAIs (optional) */
75 },
76 protocolExtensions := omit
77 }
78 }
79 }
80}
81
82template (value) SBC_AP_PDU
83ts_SBCAP_PWS_FAILURE(
84 template (value) Failed_Cell_List fail_cl,
85 template (value) Global_ENB_ID global_enb_id) := {
86 initiatingMessage := {
87 procedureCode := id_PWS_Failure_Indication,
88 criticality := reject,
89 value_ := {
90 PWS_Failure_Indication := {
91 protocolIEs := {
92 {
93 id := SBC_AP_Constants.id_Failed_Cell_List,
94 criticality := reject,
95 value_ := { Failed_Cell_List := fail_cl }
96 }, {
97 id := SBC_AP_Constants.id_Global_ENB_ID,
98 criticality := reject,
99 value_ := { Global_ENB_ID := global_enb_id }
100 }
101 },
102 protocolExtensions := omit
103 }
104 }
105 }
106}
107
108/* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */
109template (value) SBC_AP_PDU
110ts_SBCAP_WRITE_WARNING(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
111 template (value) uint12_t p_rep_per, template (value) uint16_t p_num_bcast,
112 template (value) OCT2 p_w_type, OCT1 p_dcs,
113 template (value) octetstring p_msg_content) := {
114 initiatingMessage := {
115 procedureCode := id_Write_Replace_Warning,
116 criticality := reject,
117 value_ := {
118 write_Replace_Warning_Request := {
119 protocolIEs := {
120 {
121 id := SBC_AP_Constants.id_Message_Identifier,
122 criticality := reject,
123 value_ := { Message_Identifier := p_msg_id }
124 }, {
125 id := SBC_AP_Constants.id_Serial_Number,
126 criticality := reject,
127 value_ := { Serial_Number := p_ser_nr }
128 /* List of TAIs */
129 /* Warning Area List */
130 }, {
131 id := SBC_AP_Constants.id_Repetition_Period,
132 criticality := reject,
133 value_ := { Repetition_Period := p_rep_per }
134 /* Extended Repetition Period */
135 }, {
136 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
137 criticality := reject,
138 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
139 }, {
140 id := SBC_AP_Constants.id_Warning_Type,
141 criticality := ignore,
142 value_ := { Warning_Type := p_w_type }
143 }, {
144 /* Warning Security Info */
145 /* Data Coding Scheme */
146 id := SBC_AP_Constants.id_Data_Coding_Scheme,
147 criticality := ignore,
148 value_ := { Data_Coding_Scheme := oct2bit(p_dcs) }
149 }, {
150 /* Warning Message Content */
151 id := SBC_AP_Constants.id_Warning_Message_Content,
152 criticality := ignore,
153 value_ := { Warning_Message_Content := p_msg_content }
154 }
155 /* OMC ID */
156 /* Concurrent Warning Message Indicator */
157 /* Send Write Replace Warning Indication */
158 /* Global eNB ID */
159 /* Warning Area Coordinates */
160 },
161 protocolExtensions := omit
162 }
163 }
164 }
165}
166
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200167/* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200168template (present) SBC_AP_PDU
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200169tr_SBCAP_WRITE_WARNING_REQ_CBS(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr,
170 template (present) uint12_t p_rep_per,
171 template (present) uint16_t p_num_bcast,
172 template (present) BIT8 dcs := ?,
173 template (present) octetstring p_msg_content := ?,
174 template (present) Send_Write_Replace_Warning_Indication send_ind := ?,
175 template (present) Concurrent_Warning_Message_Indicator concurrent_ind := ?
176 ) := {
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200177 initiatingMessage := {
178 procedureCode := id_Write_Replace_Warning,
179 criticality := reject,
180 value_ := {
181 write_Replace_Warning_Request := {
182 protocolIEs := {
183 {
184 id := SBC_AP_Constants.id_Message_Identifier,
185 criticality := reject,
186 value_ := { Message_Identifier := p_msg_id }
187 }, {
188 id := SBC_AP_Constants.id_Serial_Number,
189 criticality := reject,
190 value_ := { Serial_Number := p_ser_nr }
191 /* List of TAIs */
192 /* Warning Area List */
193 }, {
194 id := SBC_AP_Constants.id_Repetition_Period,
195 criticality := reject,
196 value_ := { Repetition_Period := p_rep_per }
197 /* Extended Repetition Period */
198 }, {
199 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
200 criticality := reject,
201 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200202 }, {
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200203 id := SBC_AP_Constants.id_Data_Coding_Scheme,
204 criticality := ignore,
205 value_ := { Data_Coding_Scheme := dcs }
206 }, {
207 /* Warning Message Content */
208 id := SBC_AP_Constants.id_Warning_Message_Content,
209 criticality := ignore,
210 value_ := { Warning_Message_Content := p_msg_content }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200211 /* OMC ID */
212 /* Concurrent Warning Message Indicator */
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200213 }, {
Pau Espin Pedrol74f62982022-08-02 18:03:24 +0200214 id := SBC_AP_Constants.id_Concurrent_Warning_Message_Indicator,
215 criticality := reject,
216 value_ := { Concurrent_Warning_Message_Indicator := concurrent_ind }
217 }, {
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200218 id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication,
219 criticality := ignore,
220 value_ := { Send_Write_Replace_Warning_Indication := send_ind }
221 }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200222 /* Global eNB ID */
223 /* Warning Area Coordinates */
224 },
225 protocolExtensions := omit
226 }
227 }
228 }
229}
230
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200231template (present) SBC_AP_PDU
232tr_SBCAP_WRITE_WARNING_REQ_ETWS(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr,
233 template (present) uint12_t p_rep_per,
234 template (present) uint16_t p_num_bcast,
235 template (present) Warning_Type warn_type := ?,
236 template (present) Send_Write_Replace_Warning_Indication send_ind := ?
237 ) := {
238 initiatingMessage := {
239 procedureCode := id_Write_Replace_Warning,
240 criticality := reject,
241 value_ := {
242 write_Replace_Warning_Request := {
243 protocolIEs := {
244 {
245 id := SBC_AP_Constants.id_Message_Identifier,
246 criticality := reject,
247 value_ := { Message_Identifier := p_msg_id }
248 }, {
249 id := SBC_AP_Constants.id_Serial_Number,
250 criticality := reject,
251 value_ := { Serial_Number := p_ser_nr }
252 /* List of TAIs */
253 /* Warning Area List */
254 }, {
255 id := SBC_AP_Constants.id_Repetition_Period,
256 criticality := reject,
257 value_ := { Repetition_Period := p_rep_per }
258 /* Extended Repetition Period */
259 }, {
260 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
261 criticality := reject,
262 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
263 }, {
264 id := SBC_AP_Constants.id_Warning_Type,
265 criticality := ignore,
266 value_ := { Warning_Type := warn_type }
267 }, {
268 id := SBC_AP_Constants.id_Warning_Security_Information,
269 criticality := ignore,
270 value_ := { Warning_Security_Information := ? }
271 }, {
272 id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication,
273 criticality := ignore,
274 value_ := { Send_Write_Replace_Warning_Indication := send_ind }
275 }
276 /* Global eNB ID */
277 /* Warning Area Coordinates */
278 },
279 protocolExtensions := omit
280 }
281 }
282 }
283}
284
Pau Espin Pedrolae2e5152022-07-29 19:16:23 +0200285/* 4.3.4.2.5 WRITE REPLACE WARNING INDICATION */
286template (value) SBC_AP_PDU
287ts_SBCAP_WRITE_WARNING_IND(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
288 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
289 template (value) CellId_Broadcast_List bcast_cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()}) := {
290 initiatingMessage := {
291 procedureCode := id_Write_Replace_Warning_Indication,
292 criticality := ignore,
293 value_ := {
294 write_Replace_Warning_Indication := {
295 protocolIEs := {
296 {
297 id := SBC_AP_Constants.id_Message_Identifier,
298 criticality := reject,
299 value_ := { Message_Identifier := p_msg_id }
300 }, {
301 id := SBC_AP_Constants.id_Serial_Number,
302 criticality := reject,
303 value_ := { Serial_Number := p_ser_nr }
304 }, {
305 id := SBC_AP_Constants.id_Broadcast_Scheduled_Area_List,
306 criticality := reject,
307 value_ := { broadcast_Scheduled_Area_List := ts_SBCAP_Broadcast_Scheduled_Area_List(bcast_cell_id_li) }
308 }
309 },
310 protocolExtensions := omit
311 }
312 }
313 }
314}
315
Pau Espin Pedrol8c674332022-08-04 13:34:17 +0200316/* 4.3.4.2.2 WRITE-REPLACE WARNING RESPONSE */
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200317template (value) SBC_AP_PDU
318ts_SBCAP_WRITE_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
319 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
320 successfulOutcome := {
321 procedureCode := id_Write_Replace_Warning,
322 criticality := reject,
323 value_ := {
324 write_Replace_Warning_Response := {
325 protocolIEs := {
326 {
327 id := SBC_AP_Constants.id_Message_Identifier,
328 criticality := reject,
329 value_ := { Message_Identifier := p_msg_id }
330 }, {
331 id := SBC_AP_Constants.id_Serial_Number,
332 criticality := reject,
333 value_ := { Serial_Number := p_ser_nr }
334 }, {
335 id := SBC_AP_Constants.id_Cause,
336 criticality := reject,
337 value_ := { Cause := enum2int(valueof(cause)) }
338 }
339 },
340 protocolExtensions := omit
341 }
342 }
343 }
344}
345
Pau Espin Pedrolb1a83fb2022-08-02 13:17:47 +0200346template (value) SBC_AP_PDU
347ts_SBCAP_WRITE_WARNING_RESP_UNKNOWN_TAI(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
348 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
349 template (value) List_of_TAIs unknown_tai_list := {{ts_SBCAP_TAI}})
350modifies ts_SBCAP_WRITE_WARNING_RESP := {
351 successfulOutcome := {
352 value_ := {
353 write_Replace_Warning_Response := {
354 protocolIEs := {
355 {
356 id := SBC_AP_Constants.id_Message_Identifier,
357 criticality := reject,
358 value_ := { Message_Identifier := p_msg_id }
359 }, {
360 id := SBC_AP_Constants.id_Serial_Number,
361 criticality := reject,
362 value_ := { Serial_Number := p_ser_nr }
363 }, {
364 id := SBC_AP_Constants.id_Cause,
365 criticality := reject,
366 value_ := { Cause := enum2int(valueof(cause)) }
367 }, {
368 id := SBC_AP_Constants.id_Unknown_Tracking_Area_List,
369 criticality := ignore,
370 value_ := { List_of_TAIs := unknown_tai_list }
371 }
372 }
373 }
374 }
375 }
376}
377
Pau Espin Pedrol8c674332022-08-04 13:34:17 +0200378/* 4.3.4.2.3 STOP WARNING REQUEST */
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200379template (present) SBC_AP_PDU
380tr_SBCAP_STOP_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr) := {
381 initiatingMessage := {
382 procedureCode := id_Stop_Warning,
383 criticality := reject,
384 value_ := {
385 stop_Warning_Request := {
386 protocolIEs := {
387 {
388 id := SBC_AP_Constants.id_Message_Identifier,
389 criticality := reject,
390 value_ := { Message_Identifier := p_msg_id }
391 }, {
392 id := SBC_AP_Constants.id_Serial_Number,
393 criticality := reject,
394 value_ := { Serial_Number := p_ser_nr }
395 /* List of TAIs */
396 /* Warning Area List */
397 }
398 },
399 protocolExtensions := omit
400 }
401 }
402 }
403}
404
405/* 4.3.4.2.4 STOP WARNING RESPONSE */
406template (value) SBC_AP_PDU
407ts_SBCAP_STOP_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
408 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
409 successfulOutcome := {
410 procedureCode := id_Stop_Warning,
411 criticality := reject,
412 value_ := {
413 stop_Warning_Response := {
414 protocolIEs := {
415 {
416 id := SBC_AP_Constants.id_Message_Identifier,
417 criticality := reject,
418 value_ := { Message_Identifier := p_msg_id }
419 }, {
420 id := SBC_AP_Constants.id_Serial_Number,
421 criticality := reject,
422 value_ := { Serial_Number := p_ser_nr }
423 }, {
424 id := SBC_AP_Constants.id_Cause,
425 criticality := reject,
426 value_ := { Cause := enum2int(valueof(cause)) }
427 }
428 },
429 protocolExtensions := omit
430 }
431 }
432 }
433}
434
435}