Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 1 | /* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h |
| 2 | * (C) 2018-2019 Harald Welte <laforge@gnumonks.org> |
| 3 | * contributions by Vadim Yanitskiy <axilirator@gmail.com> |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * Released under the terms of GNU General Public License, Version 2 or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 10 | */ |
| 11 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 12 | module PCUIF_Types { |
| 13 | |
| 14 | import from General_Types all; |
| 15 | import from Osmocom_Types all; |
| 16 | |
Vadim Yanitskiy | c155930 | 2020-07-19 16:39:12 +0700 | [diff] [blame] | 17 | modulepar { |
| 18 | /* PCUIF version supported by the IUT */ |
| 19 | PCUIF_Version mp_pcuif_version := 9; |
| 20 | }; |
| 21 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 22 | const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 23 | type integer PCUIF_Version (9..10); /* supported versions */ |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 24 | |
| 25 | type enumerated PCUIF_MsgType { |
| 26 | PCU_IF_MSG_DATA_REQ ('00'O), |
| 27 | PCU_IF_MSG_DATA_CNF ('01'O), |
| 28 | PCU_IF_MSG_DATA_IND ('02'O), |
| 29 | PCU_IF_MSG_SUSP_REQ ('03'O), |
Harald Welte | 11b734c | 2019-09-05 14:17:54 +0200 | [diff] [blame] | 30 | PCU_IF_MSG_APP_INFO_REQ ('04'O), |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 31 | PCU_IF_MSG_RTS_REQ ('10'O), |
| 32 | PCU_IF_MSG_DATA_CNF_DT ('11'O), |
| 33 | PCU_IF_MSG_RACH_IND ('22'O), |
| 34 | PCU_IF_MSG_INFO_IND ('32'O), |
| 35 | PCU_IF_MSG_ACT_REQ ('40'O), |
| 36 | PCU_IF_MSG_TIME_IND ('52'O), |
| 37 | PCU_IF_MSG_PAG_REQ ('60'O), |
| 38 | PCU_IF_MSG_TXT_IND ('70'O) |
| 39 | } with { variant "FIELDLENGTH(8)" }; |
| 40 | |
| 41 | type enumerated PCUIF_Sapi { |
| 42 | PCU_IF_SAPI_UNKNOWN ('00'O), |
| 43 | PCU_IF_SAPI_RACH ('01'O), |
| 44 | PCU_IF_SAPI_AGCH ('02'O), |
| 45 | PCU_IF_SAPI_PCH ('03'O), |
| 46 | PCU_IF_SAPI_BCCH ('04'O), |
| 47 | PCU_IF_SAPI_PDTCH ('05'O), |
| 48 | PCU_IF_SAPI_PRACH ('06'O), |
| 49 | PCU_IF_SAPI_PTCCH ('07'O), |
| 50 | PCU_IF_SAPI_AGCH_DT ('08'O) |
| 51 | } with { variant "FIELDLENGTH(8)" }; |
| 52 | |
| 53 | type record PCUIF_Flags { |
| 54 | boolean bts_active, |
| 55 | boolean sysmo_direct_dsp, |
| 56 | BIT14 spare, |
| 57 | boolean cs1, |
| 58 | boolean cs2, |
| 59 | boolean cs3, |
| 60 | boolean cs4, |
| 61 | boolean mcs1, |
| 62 | boolean mcs2, |
| 63 | boolean mcs3, |
| 64 | boolean mcs4, |
| 65 | boolean mcs5, |
| 66 | boolean mcs6, |
| 67 | boolean mcs7, |
| 68 | boolean mcs8, |
| 69 | boolean mcs9, |
| 70 | BIT3 spare2 |
| 71 | } with { variant "" }; |
| 72 | |
| 73 | type enumerated PCUIF_TextType { |
| 74 | PCU_VERSION (0), |
| 75 | PCU_OML_ALERT (1) |
| 76 | } with { variant "FIELDLENGTH(8)" }; |
| 77 | |
Vadim Yanitskiy | e1527f7 | 2019-09-09 02:15:33 +0200 | [diff] [blame] | 78 | type charstring PCUIF_Text length(128) with { variant "FIELDLENGTH(null_terminated)" }; |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 79 | |
| 80 | type record PCUIF_txt_ind { |
| 81 | PCUIF_TextType txt_type, |
| 82 | PCUIF_Text text |
| 83 | } with { variant "" }; |
| 84 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 85 | type record PCUIF_data { |
| 86 | PCUIF_Sapi sapi, |
| 87 | uint8_t len, |
Vadim Yanitskiy | d8f28e6 | 2019-09-10 18:11:52 +0200 | [diff] [blame] | 88 | octetstring data length(162), |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 89 | uint32_t fn, |
| 90 | uint16_t arfcn, |
| 91 | uint8_t trx_nr, |
| 92 | uint8_t ts_nr, |
| 93 | uint8_t block_nr, |
| 94 | int8_t rssi, |
| 95 | uint16_t ber10k, |
| 96 | int16_t ta_offs_qbits, |
| 97 | int16_t lqual_cb |
Vadim Yanitskiy | d8f28e6 | 2019-09-10 18:11:52 +0200 | [diff] [blame] | 98 | } with { variant (data) "FIELDLENGTH(162), ALIGN(left)" }; |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 99 | |
| 100 | type record PCUIF_data_cnf_dt { |
| 101 | PCUIF_Sapi sapi, |
| 102 | OCT4 tlli, |
| 103 | uint32_t fn, |
| 104 | uint16_t arfcn, |
| 105 | uint8_t trx_nr, |
| 106 | uint8_t ts_nr, |
| 107 | uint8_t block_nr, |
| 108 | int8_t rssi, |
| 109 | uint16_t ber10k, |
| 110 | int16_t ta_offs_qbits, |
| 111 | int16_t lqual_cb |
| 112 | } with { variant "" }; |
| 113 | |
| 114 | type record PCUIF_rts_req { |
| 115 | PCUIF_Sapi sapi, |
| 116 | OCT3 spare, |
| 117 | uint32_t fn, |
| 118 | uint16_t arfcn, |
| 119 | uint8_t trx_nr, |
| 120 | uint8_t ts_nr, |
| 121 | uint8_t block_nr |
| 122 | } with { variant "" }; |
| 123 | |
Harald Welte | 913bbf6 | 2019-03-01 00:39:19 +0100 | [diff] [blame] | 124 | type enumerated PCUIF_BurstType { |
| 125 | BURST_TYPE_NONE (0), |
| 126 | BURST_TYPE_0 (1), |
| 127 | BURST_TYPE_1 (2), |
| 128 | BURST_TYPE_2 (3) |
| 129 | } with { variant "FIELDLENGTH(8)" }; |
| 130 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 131 | type record PCUIF_rach_ind { |
| 132 | PCUIF_Sapi sapi, |
| 133 | uint16_t ra, |
| 134 | int16_t qta, |
| 135 | uint32_t fn, |
| 136 | uint16_t arfcn, |
| 137 | uint8_t is_11bit, |
Vadim Yanitskiy | 36558d9 | 2019-11-17 02:23:51 +0700 | [diff] [blame] | 138 | PCUIF_BurstType burst_type, |
| 139 | uint8_t trx_nr, |
| 140 | uint8_t ts_nr |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 141 | } with { variant "" }; |
| 142 | |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 143 | type record PCUIF_InfoTrxTs { |
| 144 | uint8_t tsc, |
| 145 | uint8_t hopping, |
| 146 | uint8_t hsn, |
| 147 | uint8_t maio, |
| 148 | bitstring ma length(64) |
| 149 | } with { variant (ma) "BYTEORDER(first), BITORDER(msb)" }; |
| 150 | private type record length(8) of PCUIF_InfoTrxTs PCUIF_InfoTrxTsList; |
| 151 | |
| 152 | /* Version >= 10 specific coding */ |
| 153 | private type record PCUIF_InfoV10Trx { |
| 154 | uint16_t arfcn, |
| 155 | BIT8 pdch_mask, |
| 156 | uint32_t hLayer1, |
| 157 | PCUIF_InfoTrxTsList ts |
| 158 | } with { variant (pdch_mask) "BITORDER(msb)" }; |
| 159 | private type record length(8) of PCUIF_InfoV10Trx PCUIF_InfoV10TrxList; |
| 160 | |
| 161 | /* Version <= 9 specific coding */ |
| 162 | private type record PCUIF_InfoV09Trx { |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 163 | uint16_t arfcn, |
| 164 | BIT8 pdch_mask, |
| 165 | OCT1 spare, |
| 166 | OCT8 tsc, |
| 167 | uint32_t hLayer1 |
Harald Welte | f148659 | 2018-04-04 19:26:41 +0200 | [diff] [blame] | 168 | } with { variant (pdch_mask) "BITORDER(msb)" }; |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 169 | private type record length(8) of PCUIF_InfoV09Trx PCUIF_InfoV09TrxList; |
| 170 | |
| 171 | type union PCUIF_InfoTrxs { |
| 172 | PCUIF_InfoV09TrxList v09, |
| 173 | PCUIF_InfoV10TrxList v10 |
| 174 | } with { variant "" }; |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 175 | |
| 176 | type record PCUIF_info_ind { |
| 177 | uint32_t version, |
| 178 | PCUIF_Flags flags, |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 179 | PCUIF_InfoTrxs trx, |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 180 | uint8_t bsic, |
| 181 | |
| 182 | uint16_t mcc, |
| 183 | uint16_t mnc, |
Harald Welte | 3568dc7 | 2018-03-13 17:06:51 +0100 | [diff] [blame] | 184 | uint8_t mnc_3_digits, |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 185 | uint16_t lac, |
| 186 | uint16_t rac, |
| 187 | |
| 188 | uint16_t nsei, |
| 189 | record length(7) of uint8_t nse_timer, |
| 190 | record length(11) of uint8_t cell_timer, |
| 191 | |
| 192 | uint16_t cell_id, |
| 193 | uint16_t repeat_time, |
| 194 | uint8_t repeat_count, |
| 195 | uint16_t bvci, |
| 196 | uint8_t t3142, |
| 197 | uint8_t t3169, |
| 198 | uint8_t t3191, |
| 199 | uint8_t t3193_10ms, |
| 200 | uint8_t t3195, |
| 201 | uint8_t t3101, |
| 202 | uint8_t t3103, |
| 203 | uint8_t t3105, |
| 204 | uint8_t cv_countdown, |
| 205 | uint16_t dl_tbf_ext, |
| 206 | uint16_t ul_tbf_ext, |
| 207 | uint8_t initial_cs, |
| 208 | uint8_t initial_mcs, |
| 209 | |
| 210 | record length(2) of uint16_t nsvci, |
| 211 | record length(2) of uint16_t local_pprt, |
| 212 | record length(2) of uint16_t remote_port, |
Harald Welte | 07e8dde | 2019-02-18 20:38:45 +0100 | [diff] [blame] | 213 | record length(2) of OCT4 remote_ip |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 214 | } with { |
| 215 | /* NOTE: TITAN is not smart enough to handle 'version < 10' and 'version > 9', |
| 216 | * so we cannot support more than two versions at the same time here. Sigh. */ |
| 217 | variant (trx) "CROSSTAG(v09, version = 9; v10, version = 10)" |
| 218 | }; |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 219 | |
| 220 | type record PCUIF_act_req { |
| 221 | uint8_t is_activate, |
| 222 | uint8_t trx_nr, |
| 223 | uint8_t ts_nr, |
| 224 | OCT1 spare |
| 225 | } with { variant "" }; |
| 226 | |
| 227 | type record PCUIF_time_ind { |
| 228 | uint32_t fn |
| 229 | } with { variant "" }; |
| 230 | |
| 231 | type record PCUIF_pag_req { |
| 232 | PCUIF_Sapi sapi, |
| 233 | uint8_t chan_needed, |
| 234 | OCT9 identity_lv |
| 235 | } with { variant "" }; |
| 236 | |
Harald Welte | 11b734c | 2019-09-05 14:17:54 +0200 | [diff] [blame] | 237 | type record PCUIF_app_info_req { |
| 238 | uint8_t application_type, |
| 239 | uint8_t len, |
| 240 | octetstring data |
| 241 | } with { |
| 242 | variant (len) "LENGTHTO(data)" |
| 243 | } |
| 244 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 245 | type record PCUIF_susp_req { |
| 246 | OCT4 tlli, |
| 247 | OCT6 ra_id, |
| 248 | uint8_t cause |
Harald Welte | eaa9a86 | 2019-05-26 23:01:08 +0200 | [diff] [blame] | 249 | } with { |
| 250 | variant (tlli) "BYTEORDER(last)" |
| 251 | }; |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 252 | |
| 253 | |
| 254 | type union PCUIF_MsgUnion { |
| 255 | PCUIF_data data_req, |
| 256 | PCUIF_data data_cnf, |
| 257 | PCUIF_data_cnf_dt data_cnf_dt, |
| 258 | PCUIF_data data_ind, |
| 259 | PCUIF_susp_req susp_req, |
| 260 | PCUIF_rts_req rts_req, |
| 261 | PCUIF_rach_ind rach_ind, |
| 262 | PCUIF_txt_ind txt_ind, |
| 263 | PCUIF_info_ind info_ind, |
| 264 | PCUIF_act_req act_req, |
| 265 | PCUIF_time_ind time_ind, |
Harald Welte | 11b734c | 2019-09-05 14:17:54 +0200 | [diff] [blame] | 266 | PCUIF_pag_req pag_req, |
| 267 | PCUIF_app_info_req app_info_req |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 268 | } with { variant "" }; |
| 269 | |
| 270 | type record PCUIF_Message { |
| 271 | PCUIF_MsgType msg_type, |
| 272 | uint8_t bts_nr, |
| 273 | OCT2 spare, |
| 274 | PCUIF_MsgUnion u |
| 275 | } with { variant (u) "CROSSTAG( |
| 276 | data_req, msg_type = PCU_IF_MSG_DATA_REQ; |
| 277 | data_cnf, msg_type = PCU_IF_MSG_DATA_CNF; |
| 278 | data_cnf_dt, msg_type = PCU_IF_MSG_DATA_CNF_DT; |
| 279 | data_ind, msg_type = PCU_IF_MSG_DATA_IND; |
| 280 | susp_req, msg_type = PCU_IF_MSG_SUSP_REQ; |
| 281 | rts_req, msg_type = PCU_IF_MSG_RTS_REQ; |
| 282 | rach_ind, msg_type = PCU_IF_MSG_RACH_IND; |
| 283 | txt_ind, msg_type = PCU_IF_MSG_TXT_IND; |
| 284 | info_ind, msg_type = PCU_IF_MSG_INFO_IND; |
| 285 | act_req, msg_type = PCU_IF_MSG_ACT_REQ; |
| 286 | time_ind, msg_type = PCU_IF_MSG_TIME_IND; |
Harald Welte | 11b734c | 2019-09-05 14:17:54 +0200 | [diff] [blame] | 287 | pag_req, msg_type = PCU_IF_MSG_PAG_REQ; |
| 288 | app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ)" |
Harald Welte | 3568dc7 | 2018-03-13 17:06:51 +0100 | [diff] [blame] | 289 | variant "PADDING(1696)" /* 212 * 8 */ |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 290 | }; |
| 291 | |
| 292 | external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring |
| 293 | with { extension "prototype(convert) encode(RAW)" }; |
| 294 | external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message |
| 295 | with { extension "prototype(convert) decode(RAW)" }; |
| 296 | |
| 297 | |
Vadim Yanitskiy | f7d9c0f | 2019-09-06 00:08:17 +0200 | [diff] [blame] | 298 | /* Generic template for matching messages by type and/or the BTS number */ |
| 299 | template PCUIF_Message tr_PCUIF_MSG(template PCUIF_MsgType msg_type := ?, |
| 300 | template uint8_t bts_nr := ?) := { |
| 301 | msg_type := msg_type, |
| 302 | bts_nr := bts_nr, |
| 303 | spare := ?, |
| 304 | u := ? |
| 305 | } |
| 306 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 307 | template (value) PCUIF_Message ts_PCUIF_RTS_REQ(template (value) uint8_t bts_nr, |
| 308 | template (value) uint8_t trx_nr, |
| 309 | template (value) uint8_t ts_nr, |
| 310 | template (value) PCUIF_Sapi sapi, |
| 311 | template (value) uint32_t fn, |
| 312 | template (value) uint16_t arfcn, |
| 313 | template (value) uint8_t block_nr |
| 314 | ) := { |
| 315 | msg_type := PCU_IF_MSG_RTS_REQ, |
| 316 | bts_nr := bts_nr, |
| 317 | spare := '0000'O, |
| 318 | u := { |
| 319 | rts_req := { |
| 320 | sapi := sapi, |
| 321 | spare := '000000'O, |
| 322 | fn := fn, |
| 323 | arfcn := arfcn, |
| 324 | trx_nr := trx_nr, |
| 325 | ts_nr := ts_nr, |
| 326 | block_nr := block_nr |
| 327 | } |
| 328 | } |
| 329 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 330 | template PCUIF_Message tr_PCUIF_RTS_REQ(template uint8_t bts_nr := ?, |
| 331 | template uint8_t trx_nr := ?, |
| 332 | template uint8_t ts_nr := ?, |
| 333 | template PCUIF_Sapi sapi := ?, |
| 334 | template uint32_t fn := ?, |
| 335 | template uint8_t block_nr := ? |
| 336 | ) := { |
| 337 | msg_type := PCU_IF_MSG_RTS_REQ, |
| 338 | bts_nr := bts_nr, |
| 339 | spare := ?, |
| 340 | u := { |
| 341 | rts_req := { |
| 342 | sapi := sapi, |
| 343 | spare := ?, |
| 344 | fn := fn, |
| 345 | arfcn := ?, |
| 346 | trx_nr := trx_nr, |
| 347 | ts_nr := ts_nr, |
| 348 | block_nr := block_nr |
| 349 | } |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | template (value) PCUIF_Message ts_PCUIF_TXT_IND(uint8_t bts_nr, PCUIF_TextType tt, charstring text) := { |
| 354 | msg_type := PCU_IF_MSG_TXT_IND, |
| 355 | bts_nr := bts_nr, |
| 356 | spare := '0000'O, |
| 357 | u := { |
| 358 | txt_ind := { |
| 359 | txt_type := tt, |
| 360 | text := text |
| 361 | } |
| 362 | } |
| 363 | } |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 364 | template PCUIF_Message tr_PCUIF_TXT_IND(template uint8_t bts_nr, template PCUIF_TextType tt, |
| 365 | template charstring text := ?) := { |
| 366 | msg_type := PCU_IF_MSG_TXT_IND, |
| 367 | bts_nr := bts_nr, |
| 368 | spare := '0000'O, |
| 369 | u := { |
| 370 | txt_ind := { |
| 371 | txt_type := tt, |
| 372 | text := text |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 378 | |
| 379 | template (value) PCUIF_Message ts_PCUIF_ACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := { |
| 380 | msg_type := PCU_IF_MSG_ACT_REQ, |
| 381 | bts_nr := bts_nr, |
| 382 | spare := '0000'O, |
| 383 | u := { |
| 384 | act_req := { |
| 385 | is_activate := 1, |
| 386 | trx_nr := trx_nr, |
| 387 | ts_nr := ts_nr, |
| 388 | spare := '00'O |
| 389 | } |
| 390 | } |
| 391 | } |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 392 | template PCUIF_Message tr_PCUIF_ACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr, |
| 393 | template uint8_t ts_nr) := { |
| 394 | msg_type := PCU_IF_MSG_ACT_REQ, |
| 395 | bts_nr := bts_nr, |
| 396 | spare := '0000'O, |
| 397 | u := { |
| 398 | act_req := { |
| 399 | is_activate := 1, |
| 400 | trx_nr := trx_nr, |
| 401 | ts_nr := ts_nr, |
| 402 | spare := '00'O |
| 403 | } |
| 404 | } |
| 405 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 406 | |
| 407 | template (value) PCUIF_Message ts_PCUIF_DEACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := { |
| 408 | msg_type := PCU_IF_MSG_ACT_REQ, |
| 409 | bts_nr := bts_nr, |
| 410 | spare := '0000'O, |
| 411 | u := { |
| 412 | act_req := { |
| 413 | is_activate := 0, |
| 414 | trx_nr := trx_nr, |
| 415 | ts_nr := ts_nr, |
| 416 | spare := '00'O |
| 417 | } |
| 418 | } |
| 419 | } |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 420 | template PCUIF_Message tr_PCUIF_DEACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr, |
| 421 | template uint8_t ts_nr) := { |
| 422 | msg_type := PCU_IF_MSG_ACT_REQ, |
| 423 | bts_nr := bts_nr, |
| 424 | spare := '0000'O, |
| 425 | u := { |
| 426 | act_req := { |
| 427 | is_activate := 0, |
| 428 | trx_nr := trx_nr, |
| 429 | ts_nr := ts_nr, |
| 430 | spare := '00'O |
| 431 | } |
| 432 | } |
| 433 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 434 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 435 | template (value) PCUIF_Message ts_PCUIF_DATA_IND(template (value) uint8_t bts_nr, |
| 436 | template (value) uint8_t trx_nr, |
| 437 | template (value) uint8_t ts_nr, |
| 438 | template (value) uint8_t block_nr, |
| 439 | template (value) PCUIF_Sapi sapi, |
Vadim Yanitskiy | c78ea26 | 2019-05-17 01:08:08 +0700 | [diff] [blame] | 440 | template (value) octetstring data, |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 441 | template (value) uint32_t fn, |
| 442 | template (value) uint16_t arfcn, |
| 443 | template (value) int8_t rssi := -80, |
| 444 | template (value) uint16_t ber10k := 0, |
| 445 | template (value) int16_t ta_offs_qbits := 0, |
| 446 | template (value) uint16_t lqual_cb := 10) := { |
| 447 | msg_type := PCU_IF_MSG_DATA_IND, |
| 448 | bts_nr := bts_nr, |
| 449 | spare := '0000'O, |
| 450 | u := { |
| 451 | data_ind := { |
| 452 | sapi := sapi, |
| 453 | len := lengthof(valueof(data)), |
| 454 | data := data, |
| 455 | fn := fn, |
| 456 | arfcn := arfcn, |
| 457 | trx_nr := trx_nr, |
| 458 | ts_nr := ts_nr, |
| 459 | block_nr := block_nr, |
| 460 | rssi := rssi, |
| 461 | ber10k := ber10k, |
| 462 | ta_offs_qbits := ta_offs_qbits, |
| 463 | lqual_cb := lqual_cb |
| 464 | } |
| 465 | } |
| 466 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 467 | template PCUIF_Message tr_PCUIF_DATA_IND(template uint8_t bts_nr := ?, |
| 468 | template uint8_t trx_nr := ?, |
| 469 | template uint8_t ts_nr := ?, |
| 470 | template uint8_t block_nr := ?, |
| 471 | template PCUIF_Sapi sapi := ?, |
Vadim Yanitskiy | c78ea26 | 2019-05-17 01:08:08 +0700 | [diff] [blame] | 472 | template octetstring data := ?) := { |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 473 | msg_type := PCU_IF_MSG_DATA_IND, |
| 474 | bts_nr := bts_nr, |
| 475 | spare := ?, |
| 476 | u := { |
| 477 | data_ind := { |
| 478 | sapi := sapi, |
| 479 | len := ?, |
| 480 | data := data, |
| 481 | fn := ?, |
| 482 | arfcn := ?, |
| 483 | trx_nr := trx_nr, |
| 484 | ts_nr := ts_nr, |
| 485 | block_nr := block_nr, |
| 486 | rssi := ?, |
| 487 | ber10k := ?, |
| 488 | ta_offs_qbits := ?, |
| 489 | lqual_cb := ? |
| 490 | } |
| 491 | } |
| 492 | } |
| 493 | |
| 494 | template (value) PCUIF_Message ts_PCUIF_DATA_REQ(uint8_t bts_nr, uint8_t trx_nr, |
| 495 | uint8_t ts_nr, uint8_t block_nr, |
| 496 | uint32_t fn, PCUIF_Sapi sapi, |
| 497 | octetstring data) := { |
| 498 | msg_type := PCU_IF_MSG_DATA_REQ, |
| 499 | bts_nr := bts_nr, |
| 500 | spare := '0000'O, |
| 501 | u := { |
| 502 | data_req := { |
| 503 | sapi := sapi, |
| 504 | len := lengthof(data), |
| 505 | data := data, |
| 506 | fn := fn, |
| 507 | arfcn := 0, /* unused in BTS */ |
| 508 | trx_nr := trx_nr, |
| 509 | ts_nr := ts_nr, |
| 510 | block_nr := block_nr, |
| 511 | /* measurement parameters below unused on Tx */ |
| 512 | rssi := 0, |
| 513 | ber10k := 0, |
| 514 | ta_offs_qbits := 0, |
| 515 | lqual_cb := 0 |
| 516 | } |
| 517 | } |
| 518 | } |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 519 | template PCUIF_Message tr_PCUIF_DATA_REQ(template uint8_t bts_nr, |
| 520 | template uint8_t trx_nr, |
| 521 | template uint8_t ts_nr, |
| 522 | template uint8_t block_nr := ?, |
| 523 | template uint32_t fn := ?, |
| 524 | template PCUIF_Sapi sapi := ?, |
| 525 | template octetstring data := ?) := { |
| 526 | msg_type := PCU_IF_MSG_DATA_REQ, |
| 527 | bts_nr := bts_nr, |
| 528 | spare := '0000'O, |
| 529 | u := { |
| 530 | data_req := { |
| 531 | sapi := sapi, |
| 532 | len := ?, |
| 533 | data := data, |
| 534 | fn := fn, |
Harald Welte | 0a3d63f | 2019-03-02 00:02:07 +0100 | [diff] [blame] | 535 | arfcn := ?, /* unused in BTS */ |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 536 | trx_nr := trx_nr, |
| 537 | ts_nr := ts_nr, |
| 538 | block_nr := block_nr, |
| 539 | /* measurement parameters below unused on Tx */ |
| 540 | rssi := 0, |
| 541 | ber10k := 0, |
| 542 | ta_offs_qbits := 0, |
| 543 | lqual_cb := 0 |
| 544 | } |
| 545 | } |
| 546 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 547 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 548 | template (value) PCUIF_Message ts_PCUIF_DATA_CNF(template (value) uint8_t bts_nr, |
| 549 | template (value) uint8_t trx_nr, |
| 550 | template (value) uint8_t ts_nr, |
| 551 | template (value) uint8_t block_nr, |
| 552 | template (value) uint32_t fn, |
| 553 | template (value) uint16_t arfcn, |
| 554 | template (value) PCUIF_Sapi sapi, |
| 555 | template (value) octetstring data) := { |
| 556 | msg_type := PCU_IF_MSG_DATA_CNF, |
| 557 | bts_nr := bts_nr, |
| 558 | spare := '0000'O, |
| 559 | u := { |
| 560 | data_cnf := { |
| 561 | sapi := sapi, |
| 562 | len := 0, /* overwritten */ |
| 563 | data := data, |
| 564 | fn := fn, |
| 565 | arfcn := arfcn, |
| 566 | trx_nr := trx_nr, |
| 567 | ts_nr := ts_nr, |
| 568 | block_nr := block_nr, |
| 569 | rssi := 0, |
| 570 | ber10k := 0, |
| 571 | ta_offs_qbits := 0, |
| 572 | lqual_cb := 0 |
| 573 | } |
| 574 | } |
| 575 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 576 | template PCUIF_Message tr_PCUIF_DATA_CNF(template uint8_t bts_nr := ?, |
| 577 | template uint8_t trx_nr := ?, |
| 578 | template uint8_t ts_nr := ?, |
| 579 | template PCUIF_Sapi sapi := ?, |
| 580 | template octetstring data := ?) := { |
| 581 | msg_type := PCU_IF_MSG_DATA_CNF, |
| 582 | bts_nr := bts_nr, |
| 583 | spare := ?, |
| 584 | u := { |
| 585 | data_cnf := { |
| 586 | sapi := sapi, |
| 587 | len := ?, |
| 588 | data := data, |
| 589 | fn := ?, |
| 590 | arfcn := ?, |
| 591 | trx_nr := trx_nr, |
| 592 | ts_nr := ts_nr, |
| 593 | block_nr := ?, |
| 594 | rssi := ?, |
| 595 | ber10k := ?, |
| 596 | ta_offs_qbits := ?, |
| 597 | lqual_cb := ? |
| 598 | } |
| 599 | } |
| 600 | } |
| 601 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 602 | template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t bts_nr, |
Vadim Yanitskiy | 36558d9 | 2019-11-17 02:23:51 +0700 | [diff] [blame] | 603 | template (value) uint8_t trx_nr, |
| 604 | template (value) uint8_t ts_nr, |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 605 | template (value) uint16_t ra, |
| 606 | template (value) uint8_t is_11bit, |
Harald Welte | 913bbf6 | 2019-03-01 00:39:19 +0100 | [diff] [blame] | 607 | template (value) PCUIF_BurstType burst_type, |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 608 | template (value) uint32_t fn, |
| 609 | template (value) uint16_t arfcn, |
Vadim Yanitskiy | 36aa611 | 2019-10-04 16:43:00 +0700 | [diff] [blame] | 610 | template (value) int16_t qta := 0, |
| 611 | template (value) PCUIF_Sapi sapi := PCU_IF_SAPI_RACH |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 612 | ) := { |
| 613 | msg_type := PCU_IF_MSG_RACH_IND, |
| 614 | bts_nr := bts_nr, |
| 615 | spare := '0000'O, |
| 616 | u := { |
| 617 | rach_ind := { |
Vadim Yanitskiy | 36aa611 | 2019-10-04 16:43:00 +0700 | [diff] [blame] | 618 | sapi := sapi, |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 619 | ra := ra, |
| 620 | qta := qta, |
| 621 | fn := fn, |
| 622 | arfcn := arfcn, |
| 623 | is_11bit := is_11bit, |
Vadim Yanitskiy | 36558d9 | 2019-11-17 02:23:51 +0700 | [diff] [blame] | 624 | burst_type := burst_type, |
| 625 | trx_nr := trx_nr, |
| 626 | ts_nr := ts_nr |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 627 | } |
| 628 | } |
| 629 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 630 | template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?, |
Vadim Yanitskiy | 36558d9 | 2019-11-17 02:23:51 +0700 | [diff] [blame] | 631 | template uint8_t trx_nr := ?, |
| 632 | template uint8_t ts_nr := ?, |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 633 | template uint16_t ra := ?, |
| 634 | template uint8_t is_11bit := ?, |
Harald Welte | 913bbf6 | 2019-03-01 00:39:19 +0100 | [diff] [blame] | 635 | template PCUIF_BurstType burst_type := ?, |
Vadim Yanitskiy | 36aa611 | 2019-10-04 16:43:00 +0700 | [diff] [blame] | 636 | template uint32_t fn := ?, |
| 637 | template PCUIF_Sapi sapi := PCU_IF_SAPI_RACH) := { |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 638 | msg_type := PCU_IF_MSG_RACH_IND, |
| 639 | bts_nr := bts_nr, |
| 640 | spare := ?, |
| 641 | u := { |
| 642 | rach_ind := { |
Vadim Yanitskiy | 36aa611 | 2019-10-04 16:43:00 +0700 | [diff] [blame] | 643 | sapi := sapi, |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 644 | ra := ra, |
| 645 | qta := ?, |
| 646 | fn := fn, |
| 647 | arfcn := ?, |
| 648 | is_11bit := is_11bit, |
Vadim Yanitskiy | 36558d9 | 2019-11-17 02:23:51 +0700 | [diff] [blame] | 649 | burst_type := burst_type, |
| 650 | trx_nr := trx_nr, |
| 651 | ts_nr := ts_nr |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 652 | } |
| 653 | } |
| 654 | } |
| 655 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 656 | template (value) PCUIF_Message ts_PCUIF_PAG_REQ(template (value) uint8_t bts_nr, |
| 657 | template (value) OCT9 id_lv, |
| 658 | template (value) uint8_t chan_needed, |
| 659 | template (value) PCUIF_Sapi sapi) := { |
| 660 | msg_type := PCU_IF_MSG_PAG_REQ, |
| 661 | bts_nr := bts_nr, |
| 662 | spare := '0000'O, |
| 663 | u := { |
| 664 | pag_req := { |
| 665 | sapi := sapi, |
| 666 | chan_needed := chan_needed, |
| 667 | identity_lv := id_lv |
| 668 | } |
| 669 | } |
| 670 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 671 | template PCUIF_Message tr_PCUIF_PAG_REQ(template uint8_t bts_nr := ?, |
| 672 | template OCT9 id_lv := ?, |
| 673 | template uint8_t chan_needed := ?, |
| 674 | template PCUIF_Sapi sapi := ?) := { |
| 675 | msg_type := PCU_IF_MSG_PAG_REQ, |
| 676 | bts_nr := bts_nr, |
| 677 | spare := ?, |
| 678 | u := { |
| 679 | pag_req := { |
| 680 | sapi := ?, |
| 681 | chan_needed := chan_needed, |
| 682 | identity_lv := id_lv |
| 683 | } |
| 684 | } |
| 685 | } |
| 686 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 687 | const PCUIF_Flags c_PCUIF_Flags_default := { |
| 688 | bts_active := true, |
| 689 | sysmo_direct_dsp := false, |
| 690 | spare := '00000000000000'B, |
| 691 | cs1 := true, |
| 692 | cs2 := true, |
| 693 | cs3 := true, |
| 694 | cs4 := true, |
| 695 | mcs1 := true, |
| 696 | mcs2 := true, |
| 697 | mcs3 := true, |
| 698 | mcs4 := true, |
| 699 | mcs5 := true, |
| 700 | mcs6 := true, |
| 701 | mcs7 := true, |
| 702 | mcs8 := true, |
| 703 | mcs9 := true, |
| 704 | spare2 := '000'B |
| 705 | }; |
| 706 | |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 707 | template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH0(template (value) uint3_t tsc := 7) := { |
| 708 | tsc := tsc, |
| 709 | hopping := 0, |
| 710 | hsn := 0, maio := 0, |
| 711 | ma := f_pad_bit(''B, 64, '0'B) |
| 712 | }; |
| 713 | |
| 714 | template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH1(template (value) uint3_t tsc := 7, |
| 715 | template (value) uint6_t hsn := 0, |
| 716 | template (value) uint6_t maio := 0, |
| 717 | template (value) bitstring ma := ''B) := { |
| 718 | tsc := tsc, |
| 719 | hopping := 1, |
| 720 | hsn := hsn, |
| 721 | maio := maio, |
| 722 | ma := f_pad_bit(valueof(ma), 64, '0'B) |
| 723 | }; |
| 724 | |
| 725 | template (value) PCUIF_InfoV10Trx ts_PCUIF_InfoV10Trx(template (value) uint16_t arfcn := 871, |
| 726 | template (value) BIT8 pdch_mask := '00000001'B, |
| 727 | template (value) uint3_t tsc := 7) := { |
| 728 | arfcn := arfcn, |
| 729 | pdch_mask := pdch_mask, |
| 730 | hLayer1 := 0, |
| 731 | ts := { |
| 732 | ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc), |
| 733 | ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc), |
| 734 | ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc), |
| 735 | ts_PCUIF_InfoTrxTsH0(tsc), ts_PCUIF_InfoTrxTsH0(tsc) |
| 736 | } |
| 737 | }; |
| 738 | |
| 739 | template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09Trx(template (value) uint16_t arfcn := 871, |
| 740 | template (value) BIT8 pdch_mask := '00000001'B, |
| 741 | OCT1 tsc := '07'O) := { |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 742 | arfcn := arfcn, |
| 743 | pdch_mask := pdch_mask, |
| 744 | spare := '00'O, |
| 745 | tsc := tsc & tsc & tsc & tsc & tsc & tsc & tsc & tsc, |
| 746 | hLayer1 := 0 |
| 747 | } |
| 748 | |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 749 | template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09TrxNULL := ts_PCUIF_InfoV09Trx(0, '00000000'B, '00'O); |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 750 | |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 751 | template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV09Trxs_def := { |
| 752 | v09 := { |
| 753 | ts_PCUIF_InfoV09Trx, ts_PCUIF_InfoV09TrxNULL, |
| 754 | ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL, |
| 755 | ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL, |
| 756 | ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL |
| 757 | } |
| 758 | }; |
| 759 | |
| 760 | template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV10Trxs_def := { |
| 761 | v10 := { |
| 762 | ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, |
| 763 | ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, |
| 764 | ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, |
| 765 | ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx |
| 766 | } |
| 767 | }; |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 768 | |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 769 | template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr, |
Pau Espin Pedrol | f787b09 | 2019-10-04 18:34:05 +0200 | [diff] [blame] | 770 | template (value) PCUIF_info_ind info_ind) := { |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 771 | msg_type := PCU_IF_MSG_INFO_IND, |
| 772 | bts_nr := bts_nr, |
| 773 | spare := '0000'O, |
| 774 | u := { |
Pau Espin Pedrol | f787b09 | 2019-10-04 18:34:05 +0200 | [diff] [blame] | 775 | info_ind := info_ind |
Harald Welte | e1fd916 | 2019-02-18 19:47:53 +0100 | [diff] [blame] | 776 | } |
| 777 | } |
Harald Welte | d378a25 | 2018-03-13 17:02:14 +0100 | [diff] [blame] | 778 | template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?, |
| 779 | template PCUIF_Flags flags := ?, |
Vadim Yanitskiy | c155930 | 2020-07-19 16:39:12 +0700 | [diff] [blame] | 780 | template uint32_t version := mp_pcuif_version) := { |
Harald Welte | d378a25 | 2018-03-13 17:02:14 +0100 | [diff] [blame] | 781 | msg_type := PCU_IF_MSG_INFO_IND, |
| 782 | bts_nr := bts_nr, |
| 783 | spare := ?, |
| 784 | u := { |
| 785 | info_ind := { |
| 786 | version := version, |
| 787 | flags := flags, |
| 788 | trx := ?, |
| 789 | bsic := ?, |
| 790 | mcc := ?, |
| 791 | mnc :=?, |
Harald Welte | 3568dc7 | 2018-03-13 17:06:51 +0100 | [diff] [blame] | 792 | mnc_3_digits := ?, |
Harald Welte | d378a25 | 2018-03-13 17:02:14 +0100 | [diff] [blame] | 793 | lac := ?, |
| 794 | rac := ?, |
| 795 | nsei := ?, |
| 796 | nse_timer := ?, |
| 797 | cell_timer := ?, |
| 798 | cell_id := ?, |
| 799 | repeat_time := ?, |
| 800 | repeat_count := ?, |
| 801 | bvci := ?, |
| 802 | t3142 := ?, |
| 803 | t3169 := ?, |
| 804 | t3191 := ?, |
| 805 | t3193_10ms := ?, |
| 806 | t3195 := ?, |
| 807 | t3101 := ?, |
| 808 | t3103 := ?, |
| 809 | t3105 := ?, |
| 810 | cv_countdown := ?, |
| 811 | dl_tbf_ext := ?, |
| 812 | ul_tbf_ext := ?, |
| 813 | initial_cs := ?, |
| 814 | initial_mcs := ?, |
| 815 | nsvci := ?, |
| 816 | local_pprt := ?, |
| 817 | remote_port := ?, |
| 818 | remote_ip := ? |
| 819 | } |
| 820 | } |
| 821 | } |
| 822 | |
Harald Welte | a321981 | 2019-03-02 00:02:28 +0100 | [diff] [blame] | 823 | template (value) PCUIF_Message ts_PCUIF_TIME_IND(template (value) uint8_t bts_nr, |
| 824 | template (value) uint32_t fn) := { |
| 825 | msg_type := PCU_IF_MSG_TIME_IND, |
| 826 | bts_nr := bts_nr, |
| 827 | spare := '0000'O, |
| 828 | u := { |
| 829 | time_ind := { |
| 830 | fn := fn |
| 831 | } |
| 832 | } |
| 833 | } |
| 834 | template PCUIF_Message tr_PCUIF_TIME_IND(template uint8_t bts_nr, |
| 835 | template uint32_t fn) := { |
| 836 | msg_type := PCU_IF_MSG_TIME_IND, |
| 837 | bts_nr := bts_nr, |
| 838 | spare := ?, |
| 839 | u := { |
| 840 | time_ind := { |
| 841 | fn := fn |
| 842 | } |
| 843 | } |
| 844 | } |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 845 | |
Harald Welte | 4bff40a | 2019-03-21 21:34:10 +0100 | [diff] [blame] | 846 | template (value) PCUIF_Message ts_PCUIF_SUSP_REQ(template (value) uint8_t bts_nr, |
| 847 | template (value) OCT4 tlli, |
| 848 | template (value) OCT6 ra_id, |
| 849 | template (value) uint8_t cause) := { |
| 850 | msg_type := PCU_IF_MSG_SUSP_REQ, |
| 851 | bts_nr := bts_nr, |
| 852 | spare := '0000'O, |
| 853 | u := { |
| 854 | susp_req := { |
| 855 | tlli := tlli, |
| 856 | ra_id := ra_id, |
| 857 | cause := cause |
| 858 | } |
| 859 | } |
| 860 | } |
| 861 | template PCUIF_Message tr_PCUIF_SUSP_REQ(template uint8_t bts_nr, |
| 862 | template OCT4 tlli, |
| 863 | template OCT6 ra_id, |
| 864 | template uint8_t cause) := { |
| 865 | msg_type := PCU_IF_MSG_SUSP_REQ, |
| 866 | bts_nr := bts_nr, |
| 867 | spare := '0000'O, |
| 868 | u := { |
| 869 | susp_req := { |
| 870 | tlli := tlli, |
| 871 | ra_id := ra_id, |
| 872 | cause := cause |
| 873 | } |
| 874 | } |
| 875 | } |
| 876 | |
Harald Welte | 11b734c | 2019-09-05 14:17:54 +0200 | [diff] [blame] | 877 | template (value) PCUIF_Message ts_PCUIF_APP_INFO_REQ(template (value) uint8_t bts_nr, |
| 878 | template (value) uint8_t app_type, |
| 879 | template (value) octetstring app_data) := { |
| 880 | msg_type := PCU_IF_MSG_APP_INFO_REQ, |
| 881 | bts_nr := bts_nr, |
| 882 | spare := '0000'O, |
| 883 | u := { |
| 884 | app_info_req := { |
| 885 | application_type := app_type, |
| 886 | len := 0, /* overwritten */ |
| 887 | data := app_data |
| 888 | } |
| 889 | } |
| 890 | } |
| 891 | template (present) PCUIF_Message tr_PCUIF_APP_INFO_REQ(template (present) uint8_t bts_nr, |
| 892 | template (present) uint8_t app_type, |
| 893 | template (present) octetstring app_data) := { |
| 894 | msg_type := PCU_IF_MSG_APP_INFO_REQ, |
| 895 | bts_nr := bts_nr, |
| 896 | spare := '0000'O, |
| 897 | u := { |
| 898 | app_info_req := { |
| 899 | application_type := app_type, |
| 900 | len := ?, |
| 901 | data := app_data |
| 902 | } |
| 903 | } |
| 904 | } |
| 905 | |
Harald Welte | 4bff40a | 2019-03-21 21:34:10 +0100 | [diff] [blame] | 906 | |
Vadim Yanitskiy | 9e1206c | 2020-07-19 15:52:31 +0700 | [diff] [blame^] | 907 | /* TODO: remove this as soon as we drop version 9 support */ |
| 908 | function f_PCUIF_ver_INFO_Trxs() |
| 909 | return PCUIF_InfoTrxs { |
| 910 | if (PCUIF_Types.mp_pcuif_version >= 10) { |
| 911 | return valueof(ts_PCUIF_InfoV10Trxs_def); |
| 912 | } else { |
| 913 | return valueof(ts_PCUIF_InfoV09Trxs_def); |
| 914 | } |
| 915 | } |
| 916 | |
| 917 | function f_PCUIF_ver_INFO_PDCHMask(in PCUIF_info_ind info, uint8_t trx_nr) |
| 918 | return bitstring { |
| 919 | if (PCUIF_Types.mp_pcuif_version >= 10) { |
| 920 | return info.trx.v10[trx_nr].pdch_mask; |
| 921 | } else { |
| 922 | return info.trx.v09[trx_nr].pdch_mask; |
| 923 | } |
| 924 | } |
| 925 | |
| 926 | |
Harald Welte | 883340c | 2018-02-28 18:59:29 +0100 | [diff] [blame] | 927 | } with { encode "RAW" variant "BYTEORDER(first)" }; |