blob: 4ca714c14c18d961c6121de148be52e9ca7f8492 [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 Pedrol7c13cb72022-06-16 19:03:44 +020043template (value) SBC_AP_PDU
44ts_SBCAP_PWS_RESTART(
45 template (value) Restarted_Cell_List restart_cl,
46 template (value) Global_ENB_ID global_enb_id) := {
47 initiatingMessage := {
48 procedureCode := id_PWS_Restart_Indication,
49 criticality := reject,
50 value_ := {
51 PWS_Restart_Indication := {
52 protocolIEs := {
53 {
54 id := SBC_AP_Constants.id_Restarted_Cell_List,
55 criticality := reject,
56 value_ := { Restarted_Cell_List := restart_cl }
57 }, {
58 id := SBC_AP_Constants.id_Global_ENB_ID,
59 criticality := reject,
60 value_ := { Global_ENB_ID := global_enb_id }
61 }
62 /* List of TAIs (mandatory) */
63 /* List of EAIs (optional) */
64 },
65 protocolExtensions := omit
66 }
67 }
68 }
69}
70
71template (value) SBC_AP_PDU
72ts_SBCAP_PWS_FAILURE(
73 template (value) Failed_Cell_List fail_cl,
74 template (value) Global_ENB_ID global_enb_id) := {
75 initiatingMessage := {
76 procedureCode := id_PWS_Failure_Indication,
77 criticality := reject,
78 value_ := {
79 PWS_Failure_Indication := {
80 protocolIEs := {
81 {
82 id := SBC_AP_Constants.id_Failed_Cell_List,
83 criticality := reject,
84 value_ := { Failed_Cell_List := fail_cl }
85 }, {
86 id := SBC_AP_Constants.id_Global_ENB_ID,
87 criticality := reject,
88 value_ := { Global_ENB_ID := global_enb_id }
89 }
90 },
91 protocolExtensions := omit
92 }
93 }
94 }
95}
96
97/* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */
98template (value) SBC_AP_PDU
99ts_SBCAP_WRITE_WARNING(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
100 template (value) uint12_t p_rep_per, template (value) uint16_t p_num_bcast,
101 template (value) OCT2 p_w_type, OCT1 p_dcs,
102 template (value) octetstring p_msg_content) := {
103 initiatingMessage := {
104 procedureCode := id_Write_Replace_Warning,
105 criticality := reject,
106 value_ := {
107 write_Replace_Warning_Request := {
108 protocolIEs := {
109 {
110 id := SBC_AP_Constants.id_Message_Identifier,
111 criticality := reject,
112 value_ := { Message_Identifier := p_msg_id }
113 }, {
114 id := SBC_AP_Constants.id_Serial_Number,
115 criticality := reject,
116 value_ := { Serial_Number := p_ser_nr }
117 /* List of TAIs */
118 /* Warning Area List */
119 }, {
120 id := SBC_AP_Constants.id_Repetition_Period,
121 criticality := reject,
122 value_ := { Repetition_Period := p_rep_per }
123 /* Extended Repetition Period */
124 }, {
125 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
126 criticality := reject,
127 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
128 }, {
129 id := SBC_AP_Constants.id_Warning_Type,
130 criticality := ignore,
131 value_ := { Warning_Type := p_w_type }
132 }, {
133 /* Warning Security Info */
134 /* Data Coding Scheme */
135 id := SBC_AP_Constants.id_Data_Coding_Scheme,
136 criticality := ignore,
137 value_ := { Data_Coding_Scheme := oct2bit(p_dcs) }
138 }, {
139 /* Warning Message Content */
140 id := SBC_AP_Constants.id_Warning_Message_Content,
141 criticality := ignore,
142 value_ := { Warning_Message_Content := p_msg_content }
143 }
144 /* OMC ID */
145 /* Concurrent Warning Message Indicator */
146 /* Send Write Replace Warning Indication */
147 /* Global eNB ID */
148 /* Warning Area Coordinates */
149 },
150 protocolExtensions := omit
151 }
152 }
153 }
154}
155
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200156/* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200157template (present) SBC_AP_PDU
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200158tr_SBCAP_WRITE_WARNING_REQ_CBS(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr,
159 template (present) uint12_t p_rep_per,
160 template (present) uint16_t p_num_bcast,
161 template (present) BIT8 dcs := ?,
162 template (present) octetstring p_msg_content := ?,
163 template (present) Send_Write_Replace_Warning_Indication send_ind := ?,
164 template (present) Concurrent_Warning_Message_Indicator concurrent_ind := ?
165 ) := {
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200166 initiatingMessage := {
167 procedureCode := id_Write_Replace_Warning,
168 criticality := reject,
169 value_ := {
170 write_Replace_Warning_Request := {
171 protocolIEs := {
172 {
173 id := SBC_AP_Constants.id_Message_Identifier,
174 criticality := reject,
175 value_ := { Message_Identifier := p_msg_id }
176 }, {
177 id := SBC_AP_Constants.id_Serial_Number,
178 criticality := reject,
179 value_ := { Serial_Number := p_ser_nr }
180 /* List of TAIs */
181 /* Warning Area List */
182 }, {
183 id := SBC_AP_Constants.id_Repetition_Period,
184 criticality := reject,
185 value_ := { Repetition_Period := p_rep_per }
186 /* Extended Repetition Period */
187 }, {
188 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
189 criticality := reject,
190 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200191 }, {
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200192 id := SBC_AP_Constants.id_Data_Coding_Scheme,
193 criticality := ignore,
194 value_ := { Data_Coding_Scheme := dcs }
195 }, {
196 /* Warning Message Content */
197 id := SBC_AP_Constants.id_Warning_Message_Content,
198 criticality := ignore,
199 value_ := { Warning_Message_Content := p_msg_content }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200200 /* OMC ID */
201 /* Concurrent Warning Message Indicator */
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200202 }, {
Pau Espin Pedrol74f62982022-08-02 18:03:24 +0200203 id := SBC_AP_Constants.id_Concurrent_Warning_Message_Indicator,
204 criticality := reject,
205 value_ := { Concurrent_Warning_Message_Indicator := concurrent_ind }
206 }, {
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200207 id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication,
208 criticality := ignore,
209 value_ := { Send_Write_Replace_Warning_Indication := send_ind }
210 }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200211 /* Global eNB ID */
212 /* Warning Area Coordinates */
213 },
214 protocolExtensions := omit
215 }
216 }
217 }
218}
219
Pau Espin Pedrole7d3d992022-08-04 12:21:10 +0200220template (present) SBC_AP_PDU
221tr_SBCAP_WRITE_WARNING_REQ_ETWS(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr,
222 template (present) uint12_t p_rep_per,
223 template (present) uint16_t p_num_bcast,
224 template (present) Warning_Type warn_type := ?,
225 template (present) Send_Write_Replace_Warning_Indication send_ind := ?
226 ) := {
227 initiatingMessage := {
228 procedureCode := id_Write_Replace_Warning,
229 criticality := reject,
230 value_ := {
231 write_Replace_Warning_Request := {
232 protocolIEs := {
233 {
234 id := SBC_AP_Constants.id_Message_Identifier,
235 criticality := reject,
236 value_ := { Message_Identifier := p_msg_id }
237 }, {
238 id := SBC_AP_Constants.id_Serial_Number,
239 criticality := reject,
240 value_ := { Serial_Number := p_ser_nr }
241 /* List of TAIs */
242 /* Warning Area List */
243 }, {
244 id := SBC_AP_Constants.id_Repetition_Period,
245 criticality := reject,
246 value_ := { Repetition_Period := p_rep_per }
247 /* Extended Repetition Period */
248 }, {
249 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
250 criticality := reject,
251 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
252 }, {
253 id := SBC_AP_Constants.id_Warning_Type,
254 criticality := ignore,
255 value_ := { Warning_Type := warn_type }
256 }, {
257 id := SBC_AP_Constants.id_Warning_Security_Information,
258 criticality := ignore,
259 value_ := { Warning_Security_Information := ? }
260 }, {
261 id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication,
262 criticality := ignore,
263 value_ := { Send_Write_Replace_Warning_Indication := send_ind }
264 }
265 /* Global eNB ID */
266 /* Warning Area Coordinates */
267 },
268 protocolExtensions := omit
269 }
270 }
271 }
272}
273
Pau Espin Pedrolae2e5152022-07-29 19:16:23 +0200274/* 4.3.4.2.5 WRITE REPLACE WARNING INDICATION */
275template (value) SBC_AP_PDU
276ts_SBCAP_WRITE_WARNING_IND(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
277 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
278 template (value) CellId_Broadcast_List bcast_cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()}) := {
279 initiatingMessage := {
280 procedureCode := id_Write_Replace_Warning_Indication,
281 criticality := ignore,
282 value_ := {
283 write_Replace_Warning_Indication := {
284 protocolIEs := {
285 {
286 id := SBC_AP_Constants.id_Message_Identifier,
287 criticality := reject,
288 value_ := { Message_Identifier := p_msg_id }
289 }, {
290 id := SBC_AP_Constants.id_Serial_Number,
291 criticality := reject,
292 value_ := { Serial_Number := p_ser_nr }
293 }, {
294 id := SBC_AP_Constants.id_Broadcast_Scheduled_Area_List,
295 criticality := reject,
296 value_ := { broadcast_Scheduled_Area_List := ts_SBCAP_Broadcast_Scheduled_Area_List(bcast_cell_id_li) }
297 }
298 },
299 protocolExtensions := omit
300 }
301 }
302 }
303}
304
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200305/* 4.3.4.2.3 STOP WARNING REQUEST */
306template (value) SBC_AP_PDU
307ts_SBCAP_WRITE_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
308 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
309 successfulOutcome := {
310 procedureCode := id_Write_Replace_Warning,
311 criticality := reject,
312 value_ := {
313 write_Replace_Warning_Response := {
314 protocolIEs := {
315 {
316 id := SBC_AP_Constants.id_Message_Identifier,
317 criticality := reject,
318 value_ := { Message_Identifier := p_msg_id }
319 }, {
320 id := SBC_AP_Constants.id_Serial_Number,
321 criticality := reject,
322 value_ := { Serial_Number := p_ser_nr }
323 }, {
324 id := SBC_AP_Constants.id_Cause,
325 criticality := reject,
326 value_ := { Cause := enum2int(valueof(cause)) }
327 }
328 },
329 protocolExtensions := omit
330 }
331 }
332 }
333}
334
Pau Espin Pedrolb1a83fb2022-08-02 13:17:47 +0200335template (value) SBC_AP_PDU
336ts_SBCAP_WRITE_WARNING_RESP_UNKNOWN_TAI(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
337 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
338 template (value) List_of_TAIs unknown_tai_list := {{ts_SBCAP_TAI}})
339modifies ts_SBCAP_WRITE_WARNING_RESP := {
340 successfulOutcome := {
341 value_ := {
342 write_Replace_Warning_Response := {
343 protocolIEs := {
344 {
345 id := SBC_AP_Constants.id_Message_Identifier,
346 criticality := reject,
347 value_ := { Message_Identifier := p_msg_id }
348 }, {
349 id := SBC_AP_Constants.id_Serial_Number,
350 criticality := reject,
351 value_ := { Serial_Number := p_ser_nr }
352 }, {
353 id := SBC_AP_Constants.id_Cause,
354 criticality := reject,
355 value_ := { Cause := enum2int(valueof(cause)) }
356 }, {
357 id := SBC_AP_Constants.id_Unknown_Tracking_Area_List,
358 criticality := ignore,
359 value_ := { List_of_TAIs := unknown_tai_list }
360 }
361 }
362 }
363 }
364 }
365}
366
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200367template (present) SBC_AP_PDU
368tr_SBCAP_STOP_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr) := {
369 initiatingMessage := {
370 procedureCode := id_Stop_Warning,
371 criticality := reject,
372 value_ := {
373 stop_Warning_Request := {
374 protocolIEs := {
375 {
376 id := SBC_AP_Constants.id_Message_Identifier,
377 criticality := reject,
378 value_ := { Message_Identifier := p_msg_id }
379 }, {
380 id := SBC_AP_Constants.id_Serial_Number,
381 criticality := reject,
382 value_ := { Serial_Number := p_ser_nr }
383 /* List of TAIs */
384 /* Warning Area List */
385 }
386 },
387 protocolExtensions := omit
388 }
389 }
390 }
391}
392
393/* 4.3.4.2.4 STOP WARNING RESPONSE */
394template (value) SBC_AP_PDU
395ts_SBCAP_STOP_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
396 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
397 successfulOutcome := {
398 procedureCode := id_Stop_Warning,
399 criticality := reject,
400 value_ := {
401 stop_Warning_Response := {
402 protocolIEs := {
403 {
404 id := SBC_AP_Constants.id_Message_Identifier,
405 criticality := reject,
406 value_ := { Message_Identifier := p_msg_id }
407 }, {
408 id := SBC_AP_Constants.id_Serial_Number,
409 criticality := reject,
410 value_ := { Serial_Number := p_ser_nr }
411 }, {
412 id := SBC_AP_Constants.id_Cause,
413 criticality := reject,
414 value_ := { Cause := enum2int(valueof(cause)) }
415 }
416 },
417 protocolExtensions := omit
418 }
419 }
420 }
421}
422
423}