blob: 007105620d81db9b9caad30e8e8393835f16efa7 [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
156template (present) SBC_AP_PDU
157tr_SBCAP_WRITE_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr,
158 template (present) uint12_t p_rep_per,
159 template (present) uint16_t p_num_bcast,
160 template (present) BIT8 dcs := ?,
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200161 template (present) octetstring p_msg_content := ?,
Pau Espin Pedrol74f62982022-08-02 18:03:24 +0200162 template (present) Send_Write_Replace_Warning_Indication send_ind := ?,
163 template (present) Concurrent_Warning_Message_Indicator concurrent_ind := ?
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200164 ) := {
165 initiatingMessage := {
166 procedureCode := id_Write_Replace_Warning,
167 criticality := reject,
168 value_ := {
169 write_Replace_Warning_Request := {
170 protocolIEs := {
171 {
172 id := SBC_AP_Constants.id_Message_Identifier,
173 criticality := reject,
174 value_ := { Message_Identifier := p_msg_id }
175 }, {
176 id := SBC_AP_Constants.id_Serial_Number,
177 criticality := reject,
178 value_ := { Serial_Number := p_ser_nr }
179 /* List of TAIs */
180 /* Warning Area List */
181 }, {
182 id := SBC_AP_Constants.id_Repetition_Period,
183 criticality := reject,
184 value_ := { Repetition_Period := p_rep_per }
185 /* Extended Repetition Period */
186 }, {
187 id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested,
188 criticality := reject,
189 value_ := { Number_of_Broadcasts_Requested := p_num_bcast }
190 }/*, {
191 id := SBC_AP_Constants.id_Warning_Type,
192 criticality := ignore,
193 value_ := { Warning_Type := warn_type }
194 }, {
195 id := SBC_AP_Constants.id_Warning_Security_Information,
196 criticality := reject,
197 value_ := { Warning_Security_Information := ? }
198 }*/, {
199 id := SBC_AP_Constants.id_Data_Coding_Scheme,
200 criticality := ignore,
201 value_ := { Data_Coding_Scheme := dcs }
202 }, {
203 /* Warning Message Content */
204 id := SBC_AP_Constants.id_Warning_Message_Content,
205 criticality := ignore,
206 value_ := { Warning_Message_Content := p_msg_content }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200207 /* OMC ID */
208 /* Concurrent Warning Message Indicator */
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200209 }, {
Pau Espin Pedrol74f62982022-08-02 18:03:24 +0200210 id := SBC_AP_Constants.id_Concurrent_Warning_Message_Indicator,
211 criticality := reject,
212 value_ := { Concurrent_Warning_Message_Indicator := concurrent_ind }
213 }, {
Pau Espin Pedrol78d80e72022-07-27 14:13:19 +0200214 id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication,
215 criticality := ignore,
216 value_ := { Send_Write_Replace_Warning_Indication := send_ind }
217 }
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200218 /* Global eNB ID */
219 /* Warning Area Coordinates */
220 },
221 protocolExtensions := omit
222 }
223 }
224 }
225}
226
Pau Espin Pedrolae2e5152022-07-29 19:16:23 +0200227/* 4.3.4.2.5 WRITE REPLACE WARNING INDICATION */
228template (value) SBC_AP_PDU
229ts_SBCAP_WRITE_WARNING_IND(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
230 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
231 template (value) CellId_Broadcast_List bcast_cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()}) := {
232 initiatingMessage := {
233 procedureCode := id_Write_Replace_Warning_Indication,
234 criticality := ignore,
235 value_ := {
236 write_Replace_Warning_Indication := {
237 protocolIEs := {
238 {
239 id := SBC_AP_Constants.id_Message_Identifier,
240 criticality := reject,
241 value_ := { Message_Identifier := p_msg_id }
242 }, {
243 id := SBC_AP_Constants.id_Serial_Number,
244 criticality := reject,
245 value_ := { Serial_Number := p_ser_nr }
246 }, {
247 id := SBC_AP_Constants.id_Broadcast_Scheduled_Area_List,
248 criticality := reject,
249 value_ := { broadcast_Scheduled_Area_List := ts_SBCAP_Broadcast_Scheduled_Area_List(bcast_cell_id_li) }
250 }
251 },
252 protocolExtensions := omit
253 }
254 }
255 }
256}
257
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200258/* 4.3.4.2.3 STOP WARNING REQUEST */
259template (value) SBC_AP_PDU
260ts_SBCAP_WRITE_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
261 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
262 successfulOutcome := {
263 procedureCode := id_Write_Replace_Warning,
264 criticality := reject,
265 value_ := {
266 write_Replace_Warning_Response := {
267 protocolIEs := {
268 {
269 id := SBC_AP_Constants.id_Message_Identifier,
270 criticality := reject,
271 value_ := { Message_Identifier := p_msg_id }
272 }, {
273 id := SBC_AP_Constants.id_Serial_Number,
274 criticality := reject,
275 value_ := { Serial_Number := p_ser_nr }
276 }, {
277 id := SBC_AP_Constants.id_Cause,
278 criticality := reject,
279 value_ := { Cause := enum2int(valueof(cause)) }
280 }
281 },
282 protocolExtensions := omit
283 }
284 }
285 }
286}
287
Pau Espin Pedrolb1a83fb2022-08-02 13:17:47 +0200288template (value) SBC_AP_PDU
289ts_SBCAP_WRITE_WARNING_RESP_UNKNOWN_TAI(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
290 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted,
291 template (value) List_of_TAIs unknown_tai_list := {{ts_SBCAP_TAI}})
292modifies ts_SBCAP_WRITE_WARNING_RESP := {
293 successfulOutcome := {
294 value_ := {
295 write_Replace_Warning_Response := {
296 protocolIEs := {
297 {
298 id := SBC_AP_Constants.id_Message_Identifier,
299 criticality := reject,
300 value_ := { Message_Identifier := p_msg_id }
301 }, {
302 id := SBC_AP_Constants.id_Serial_Number,
303 criticality := reject,
304 value_ := { Serial_Number := p_ser_nr }
305 }, {
306 id := SBC_AP_Constants.id_Cause,
307 criticality := reject,
308 value_ := { Cause := enum2int(valueof(cause)) }
309 }, {
310 id := SBC_AP_Constants.id_Unknown_Tracking_Area_List,
311 criticality := ignore,
312 value_ := { List_of_TAIs := unknown_tai_list }
313 }
314 }
315 }
316 }
317 }
318}
319
Pau Espin Pedrol7c13cb72022-06-16 19:03:44 +0200320template (present) SBC_AP_PDU
321tr_SBCAP_STOP_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr) := {
322 initiatingMessage := {
323 procedureCode := id_Stop_Warning,
324 criticality := reject,
325 value_ := {
326 stop_Warning_Request := {
327 protocolIEs := {
328 {
329 id := SBC_AP_Constants.id_Message_Identifier,
330 criticality := reject,
331 value_ := { Message_Identifier := p_msg_id }
332 }, {
333 id := SBC_AP_Constants.id_Serial_Number,
334 criticality := reject,
335 value_ := { Serial_Number := p_ser_nr }
336 /* List of TAIs */
337 /* Warning Area List */
338 }
339 },
340 protocolExtensions := omit
341 }
342 }
343 }
344}
345
346/* 4.3.4.2.4 STOP WARNING RESPONSE */
347template (value) SBC_AP_PDU
348ts_SBCAP_STOP_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr,
349 template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := {
350 successfulOutcome := {
351 procedureCode := id_Stop_Warning,
352 criticality := reject,
353 value_ := {
354 stop_Warning_Response := {
355 protocolIEs := {
356 {
357 id := SBC_AP_Constants.id_Message_Identifier,
358 criticality := reject,
359 value_ := { Message_Identifier := p_msg_id }
360 }, {
361 id := SBC_AP_Constants.id_Serial_Number,
362 criticality := reject,
363 value_ := { Serial_Number := p_ser_nr }
364 }, {
365 id := SBC_AP_Constants.id_Cause,
366 criticality := reject,
367 value_ := { Cause := enum2int(valueof(cause)) }
368 }
369 },
370 protocolExtensions := omit
371 }
372 }
373 }
374}
375
376}