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