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 | |
| 21 | /* 3GPP TS 36.413 9.2.1.54 */ |
| 22 | template (value) CellId_Broadcast_List_Item ts_SBCAP_CellId_Broadcast_List_Item( |
| 23 | template (value) EUTRAN_CGI ecgi := ts_SBCAP_ECGI()) := { |
| 24 | eCGI := ecgi, |
| 25 | iE_Extensions := omit |
| 26 | } |
| 27 | template (value) Broadcast_Scheduled_Area_List ts_SBCAP_Broadcast_Scheduled_Area_List( |
| 28 | template (value) CellId_Broadcast_List cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()}) |
| 29 | := { |
| 30 | cellId_Broadcast_List := cell_id_li, |
| 31 | tAI_Broadcast_List := omit, |
| 32 | emergencyAreaID_Broadcast_List := omit, |
| 33 | iE_Extensions := omit |
| 34 | } |
| 35 | |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 36 | template (value) SBC_AP_PDU |
| 37 | ts_SBCAP_PWS_RESTART( |
| 38 | template (value) Restarted_Cell_List restart_cl, |
| 39 | template (value) Global_ENB_ID global_enb_id) := { |
| 40 | initiatingMessage := { |
| 41 | procedureCode := id_PWS_Restart_Indication, |
| 42 | criticality := reject, |
| 43 | value_ := { |
| 44 | PWS_Restart_Indication := { |
| 45 | protocolIEs := { |
| 46 | { |
| 47 | id := SBC_AP_Constants.id_Restarted_Cell_List, |
| 48 | criticality := reject, |
| 49 | value_ := { Restarted_Cell_List := restart_cl } |
| 50 | }, { |
| 51 | id := SBC_AP_Constants.id_Global_ENB_ID, |
| 52 | criticality := reject, |
| 53 | value_ := { Global_ENB_ID := global_enb_id } |
| 54 | } |
| 55 | /* List of TAIs (mandatory) */ |
| 56 | /* List of EAIs (optional) */ |
| 57 | }, |
| 58 | protocolExtensions := omit |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | template (value) SBC_AP_PDU |
| 65 | ts_SBCAP_PWS_FAILURE( |
| 66 | template (value) Failed_Cell_List fail_cl, |
| 67 | template (value) Global_ENB_ID global_enb_id) := { |
| 68 | initiatingMessage := { |
| 69 | procedureCode := id_PWS_Failure_Indication, |
| 70 | criticality := reject, |
| 71 | value_ := { |
| 72 | PWS_Failure_Indication := { |
| 73 | protocolIEs := { |
| 74 | { |
| 75 | id := SBC_AP_Constants.id_Failed_Cell_List, |
| 76 | criticality := reject, |
| 77 | value_ := { Failed_Cell_List := fail_cl } |
| 78 | }, { |
| 79 | id := SBC_AP_Constants.id_Global_ENB_ID, |
| 80 | criticality := reject, |
| 81 | value_ := { Global_ENB_ID := global_enb_id } |
| 82 | } |
| 83 | }, |
| 84 | protocolExtensions := omit |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /* 4.3.4.2.1 WRITE-REPLACE WARNING REQUEST */ |
| 91 | template (value) SBC_AP_PDU |
| 92 | ts_SBCAP_WRITE_WARNING(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr, |
| 93 | template (value) uint12_t p_rep_per, template (value) uint16_t p_num_bcast, |
| 94 | template (value) OCT2 p_w_type, OCT1 p_dcs, |
| 95 | template (value) octetstring p_msg_content) := { |
| 96 | initiatingMessage := { |
| 97 | procedureCode := id_Write_Replace_Warning, |
| 98 | criticality := reject, |
| 99 | value_ := { |
| 100 | write_Replace_Warning_Request := { |
| 101 | protocolIEs := { |
| 102 | { |
| 103 | id := SBC_AP_Constants.id_Message_Identifier, |
| 104 | criticality := reject, |
| 105 | value_ := { Message_Identifier := p_msg_id } |
| 106 | }, { |
| 107 | id := SBC_AP_Constants.id_Serial_Number, |
| 108 | criticality := reject, |
| 109 | value_ := { Serial_Number := p_ser_nr } |
| 110 | /* List of TAIs */ |
| 111 | /* Warning Area List */ |
| 112 | }, { |
| 113 | id := SBC_AP_Constants.id_Repetition_Period, |
| 114 | criticality := reject, |
| 115 | value_ := { Repetition_Period := p_rep_per } |
| 116 | /* Extended Repetition Period */ |
| 117 | }, { |
| 118 | id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested, |
| 119 | criticality := reject, |
| 120 | value_ := { Number_of_Broadcasts_Requested := p_num_bcast } |
| 121 | }, { |
| 122 | id := SBC_AP_Constants.id_Warning_Type, |
| 123 | criticality := ignore, |
| 124 | value_ := { Warning_Type := p_w_type } |
| 125 | }, { |
| 126 | /* Warning Security Info */ |
| 127 | /* Data Coding Scheme */ |
| 128 | id := SBC_AP_Constants.id_Data_Coding_Scheme, |
| 129 | criticality := ignore, |
| 130 | value_ := { Data_Coding_Scheme := oct2bit(p_dcs) } |
| 131 | }, { |
| 132 | /* Warning Message Content */ |
| 133 | id := SBC_AP_Constants.id_Warning_Message_Content, |
| 134 | criticality := ignore, |
| 135 | value_ := { Warning_Message_Content := p_msg_content } |
| 136 | } |
| 137 | /* OMC ID */ |
| 138 | /* Concurrent Warning Message Indicator */ |
| 139 | /* Send Write Replace Warning Indication */ |
| 140 | /* Global eNB ID */ |
| 141 | /* Warning Area Coordinates */ |
| 142 | }, |
| 143 | protocolExtensions := omit |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | template (present) SBC_AP_PDU |
| 150 | tr_SBCAP_WRITE_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr, |
| 151 | template (present) uint12_t p_rep_per, |
| 152 | template (present) uint16_t p_num_bcast, |
| 153 | template (present) BIT8 dcs := ?, |
Pau Espin Pedrol | 78d80e7 | 2022-07-27 14:13:19 +0200 | [diff] [blame] | 154 | template (present) octetstring p_msg_content := ?, |
| 155 | template (present) Send_Write_Replace_Warning_Indication send_ind := ? |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 156 | ) := { |
| 157 | initiatingMessage := { |
| 158 | procedureCode := id_Write_Replace_Warning, |
| 159 | criticality := reject, |
| 160 | value_ := { |
| 161 | write_Replace_Warning_Request := { |
| 162 | protocolIEs := { |
| 163 | { |
| 164 | id := SBC_AP_Constants.id_Message_Identifier, |
| 165 | criticality := reject, |
| 166 | value_ := { Message_Identifier := p_msg_id } |
| 167 | }, { |
| 168 | id := SBC_AP_Constants.id_Serial_Number, |
| 169 | criticality := reject, |
| 170 | value_ := { Serial_Number := p_ser_nr } |
| 171 | /* List of TAIs */ |
| 172 | /* Warning Area List */ |
| 173 | }, { |
| 174 | id := SBC_AP_Constants.id_Repetition_Period, |
| 175 | criticality := reject, |
| 176 | value_ := { Repetition_Period := p_rep_per } |
| 177 | /* Extended Repetition Period */ |
| 178 | }, { |
| 179 | id := SBC_AP_Constants.id_Number_of_Broadcasts_Requested, |
| 180 | criticality := reject, |
| 181 | value_ := { Number_of_Broadcasts_Requested := p_num_bcast } |
| 182 | }/*, { |
| 183 | id := SBC_AP_Constants.id_Warning_Type, |
| 184 | criticality := ignore, |
| 185 | value_ := { Warning_Type := warn_type } |
| 186 | }, { |
| 187 | id := SBC_AP_Constants.id_Warning_Security_Information, |
| 188 | criticality := reject, |
| 189 | value_ := { Warning_Security_Information := ? } |
| 190 | }*/, { |
| 191 | id := SBC_AP_Constants.id_Data_Coding_Scheme, |
| 192 | criticality := ignore, |
| 193 | value_ := { Data_Coding_Scheme := dcs } |
| 194 | }, { |
| 195 | /* Warning Message Content */ |
| 196 | id := SBC_AP_Constants.id_Warning_Message_Content, |
| 197 | criticality := ignore, |
| 198 | value_ := { Warning_Message_Content := p_msg_content } |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 199 | /* OMC ID */ |
| 200 | /* Concurrent Warning Message Indicator */ |
Pau Espin Pedrol | 78d80e7 | 2022-07-27 14:13:19 +0200 | [diff] [blame] | 201 | }, { |
| 202 | id := SBC_AP_Constants.id_Send_Write_Replace_Warning_Indication, |
| 203 | criticality := ignore, |
| 204 | value_ := { Send_Write_Replace_Warning_Indication := send_ind } |
| 205 | } |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 206 | /* Global eNB ID */ |
| 207 | /* Warning Area Coordinates */ |
| 208 | }, |
| 209 | protocolExtensions := omit |
| 210 | } |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | |
Pau Espin Pedrol | ae2e515 | 2022-07-29 19:16:23 +0200 | [diff] [blame^] | 215 | /* 4.3.4.2.5 WRITE REPLACE WARNING INDICATION */ |
| 216 | template (value) SBC_AP_PDU |
| 217 | ts_SBCAP_WRITE_WARNING_IND(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr, |
| 218 | template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted, |
| 219 | template (value) CellId_Broadcast_List bcast_cell_id_li := {ts_SBCAP_CellId_Broadcast_List_Item()}) := { |
| 220 | initiatingMessage := { |
| 221 | procedureCode := id_Write_Replace_Warning_Indication, |
| 222 | criticality := ignore, |
| 223 | value_ := { |
| 224 | write_Replace_Warning_Indication := { |
| 225 | protocolIEs := { |
| 226 | { |
| 227 | id := SBC_AP_Constants.id_Message_Identifier, |
| 228 | criticality := reject, |
| 229 | value_ := { Message_Identifier := p_msg_id } |
| 230 | }, { |
| 231 | id := SBC_AP_Constants.id_Serial_Number, |
| 232 | criticality := reject, |
| 233 | value_ := { Serial_Number := p_ser_nr } |
| 234 | }, { |
| 235 | id := SBC_AP_Constants.id_Broadcast_Scheduled_Area_List, |
| 236 | criticality := reject, |
| 237 | value_ := { broadcast_Scheduled_Area_List := ts_SBCAP_Broadcast_Scheduled_Area_List(bcast_cell_id_li) } |
| 238 | } |
| 239 | }, |
| 240 | protocolExtensions := omit |
| 241 | } |
| 242 | } |
| 243 | } |
| 244 | } |
| 245 | |
Pau Espin Pedrol | 7c13cb7 | 2022-06-16 19:03:44 +0200 | [diff] [blame] | 246 | /* 4.3.4.2.3 STOP WARNING REQUEST */ |
| 247 | template (value) SBC_AP_PDU |
| 248 | ts_SBCAP_WRITE_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr, |
| 249 | template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := { |
| 250 | successfulOutcome := { |
| 251 | procedureCode := id_Write_Replace_Warning, |
| 252 | criticality := reject, |
| 253 | value_ := { |
| 254 | write_Replace_Warning_Response := { |
| 255 | protocolIEs := { |
| 256 | { |
| 257 | id := SBC_AP_Constants.id_Message_Identifier, |
| 258 | criticality := reject, |
| 259 | value_ := { Message_Identifier := p_msg_id } |
| 260 | }, { |
| 261 | id := SBC_AP_Constants.id_Serial_Number, |
| 262 | criticality := reject, |
| 263 | value_ := { Serial_Number := p_ser_nr } |
| 264 | }, { |
| 265 | id := SBC_AP_Constants.id_Cause, |
| 266 | criticality := reject, |
| 267 | value_ := { Cause := enum2int(valueof(cause)) } |
| 268 | } |
| 269 | }, |
| 270 | protocolExtensions := omit |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | } |
| 275 | |
| 276 | template (present) SBC_AP_PDU |
| 277 | tr_SBCAP_STOP_WARNING(template (present) BIT16 p_msg_id, template (present) BIT16 p_ser_nr) := { |
| 278 | initiatingMessage := { |
| 279 | procedureCode := id_Stop_Warning, |
| 280 | criticality := reject, |
| 281 | value_ := { |
| 282 | stop_Warning_Request := { |
| 283 | protocolIEs := { |
| 284 | { |
| 285 | id := SBC_AP_Constants.id_Message_Identifier, |
| 286 | criticality := reject, |
| 287 | value_ := { Message_Identifier := p_msg_id } |
| 288 | }, { |
| 289 | id := SBC_AP_Constants.id_Serial_Number, |
| 290 | criticality := reject, |
| 291 | value_ := { Serial_Number := p_ser_nr } |
| 292 | /* List of TAIs */ |
| 293 | /* Warning Area List */ |
| 294 | } |
| 295 | }, |
| 296 | protocolExtensions := omit |
| 297 | } |
| 298 | } |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | /* 4.3.4.2.4 STOP WARNING RESPONSE */ |
| 303 | template (value) SBC_AP_PDU |
| 304 | ts_SBCAP_STOP_WARNING_RESP(template (value) BIT16 p_msg_id, template (value) BIT16 p_ser_nr, |
| 305 | template (value) SBC_AP_Cause cause := SBC_AP_Cause_message_accepted) := { |
| 306 | successfulOutcome := { |
| 307 | procedureCode := id_Stop_Warning, |
| 308 | criticality := reject, |
| 309 | value_ := { |
| 310 | stop_Warning_Response := { |
| 311 | protocolIEs := { |
| 312 | { |
| 313 | id := SBC_AP_Constants.id_Message_Identifier, |
| 314 | criticality := reject, |
| 315 | value_ := { Message_Identifier := p_msg_id } |
| 316 | }, { |
| 317 | id := SBC_AP_Constants.id_Serial_Number, |
| 318 | criticality := reject, |
| 319 | value_ := { Serial_Number := p_ser_nr } |
| 320 | }, { |
| 321 | id := SBC_AP_Constants.id_Cause, |
| 322 | criticality := reject, |
| 323 | value_ := { Cause := enum2int(valueof(cause)) } |
| 324 | } |
| 325 | }, |
| 326 | protocolExtensions := omit |
| 327 | } |
| 328 | } |
| 329 | } |
| 330 | } |
| 331 | |
| 332 | } |