Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 1 | module SBC_AP_Templates { |
| 2 | |
| 3 | import from General_Types all; |
| 4 | import from Osmocom_Types all; |
| 5 | |
| 6 | import from SBC_AP_IEs all; |
| 7 | import from SBC_AP_Constants all; |
| 8 | import from SBC_AP_Containers all; |
| 9 | import from SBC_AP_PDU_Contents all; |
| 10 | import from SBC_AP_PDU_Descriptions all; |
| 11 | |
| 12 | import from SBC_AP_Types all; |
| 13 | |
Pau Espin Pedrol | ae2e515 | 2022-07-29 19:16:23 +0200 | [diff] [blame] | 14 | /* 3GPP TS 36.413 9.2.1.38 */ |
| 15 | template (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 Pedrol | b1a83fb | 2022-08-02 13:17:47 +0200 | [diff] [blame] | 21 | /* 3GPP TS 36.413 9.2.3.16 */ |
| 22 | template (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 Pedrol | ae2e515 | 2022-07-29 19:16:23 +0200 | [diff] [blame] | 28 | /* 3GPP TS 36.413 9.2.1.54 */ |
| 29 | template (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 | } |
| 34 | template (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 Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 43 | template (value) SBC_AP_PDU |
| 44 | ts_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 | |
| 71 | template (value) SBC_AP_PDU |
| 72 | ts_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 */ |
| 98 | template (value) SBC_AP_PDU |
| 99 | ts_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 Pedrol | e7d3d99 | 2022-08-04 12:21:10 +0200 | [diff] [blame] | 156 | /* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */ |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 157 | template (present) SBC_AP_PDU |
Pau Espin Pedrol | e7d3d99 | 2022-08-04 12:21:10 +0200 | [diff] [blame] | 158 | tr_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 Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 166 | 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 Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 191 | }, { |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 192 | 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 Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 200 | /* OMC ID */ |
| 201 | /* Concurrent Warning Message Indicator */ |
Pau Espin Pedrol | 78d80e7 | 2022-07-27 14:13:19 +0200 | [diff] [blame] | 202 | }, { |
Pau Espin Pedrol | 74f6298 | 2022-08-02 18:03:24 +0200 | [diff] [blame] | 203 | id := SBC_AP_Constants.id_Concurrent_Warning_Message_Indicator, |
| 204 | criticality := reject, |
| 205 | value_ := { Concurrent_Warning_Message_Indicator := concurrent_ind } |
| 206 | }, { |
Pau Espin Pedrol | 78d80e7 | 2022-07-27 14:13:19 +0200 | [diff] [blame] | 207 | 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 Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 211 | /* Global eNB ID */ |
| 212 | /* Warning Area Coordinates */ |
| 213 | }, |
| 214 | protocolExtensions := omit |
| 215 | } |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | |
Pau Espin Pedrol | e7d3d99 | 2022-08-04 12:21:10 +0200 | [diff] [blame] | 220 | template (present) SBC_AP_PDU |
| 221 | tr_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 Pedrol | ae2e515 | 2022-07-29 19:16:23 +0200 | [diff] [blame] | 274 | /* 4.3.4.2.5 WRITE REPLACE WARNING INDICATION */ |
| 275 | template (value) SBC_AP_PDU |
| 276 | ts_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 Pedrol | 8c67433 | 2022-08-04 13:34:17 +0200 | [diff] [blame^] | 305 | /* 4.3.4.2.2 WRITE-REPLACE WARNING RESPONSE */ |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 306 | template (value) SBC_AP_PDU |
| 307 | ts_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 Pedrol | b1a83fb | 2022-08-02 13:17:47 +0200 | [diff] [blame] | 335 | template (value) SBC_AP_PDU |
| 336 | ts_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}}) |
| 339 | modifies 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 Pedrol | 8c67433 | 2022-08-04 13:34:17 +0200 | [diff] [blame^] | 367 | /* 4.3.4.2.3 STOP WARNING REQUEST */ |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 368 | template (present) SBC_AP_PDU |
| 369 | tr_SBCAP_STOP_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr) := { |
| 370 | initiatingMessage := { |
| 371 | procedureCode := id_Stop_Warning, |
| 372 | criticality := reject, |
| 373 | value_ := { |
| 374 | stop_Warning_Request := { |
| 375 | protocolIEs := { |
| 376 | { |
| 377 | id := SBC_AP_Constants.id_Message_Identifier, |
| 378 | criticality := reject, |
| 379 | value_ := { Message_Identifier := p_msg_id } |
| 380 | }, { |
| 381 | id := SBC_AP_Constants.id_Serial_Number, |
| 382 | criticality := reject, |
| 383 | value_ := { Serial_Number := p_ser_nr } |
| 384 | /* List of TAIs */ |
| 385 | /* Warning Area List */ |
| 386 | } |
| 387 | }, |
| 388 | protocolExtensions := omit |
| 389 | } |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | /* 4.3.4.2.4 STOP WARNING RESPONSE */ |
| 395 | template (value) SBC_AP_PDU |
| 396 | ts_SBCAP_STOP_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr, |
| 397 | template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := { |
| 398 | successfulOutcome := { |
| 399 | procedureCode := id_Stop_Warning, |
| 400 | criticality := reject, |
| 401 | value_ := { |
| 402 | stop_Warning_Response := { |
| 403 | protocolIEs := { |
| 404 | { |
| 405 | id := SBC_AP_Constants.id_Message_Identifier, |
| 406 | criticality := reject, |
| 407 | value_ := { Message_Identifier := p_msg_id } |
| 408 | }, { |
| 409 | id := SBC_AP_Constants.id_Serial_Number, |
| 410 | criticality := reject, |
| 411 | value_ := { Serial_Number := p_ser_nr } |
| 412 | }, { |
| 413 | id := SBC_AP_Constants.id_Cause, |
| 414 | criticality := reject, |
| 415 | value_ := { Cause := enum2int(valueof(cause)) } |
| 416 | } |
| 417 | }, |
| 418 | protocolExtensions := omit |
| 419 | } |
| 420 | } |
| 421 | } |
| 422 | } |
| 423 | |
| 424 | } |