blob: 750e0b4dadee480f2c36207c7657a56d4a05c8f3 [file] [log] [blame]
Harald Welte883340c2018-02-28 18:59:29 +01001module PCUIF_Types {
2
3import from General_Types all;
4import from Osmocom_Types all;
5
6/* Osmocom PCU Interface Types, as per osmo-pcu/include/osmocom/pcu/pcuif_proto.h */
7
8const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts";
Harald Welte3568dc72018-03-13 17:06:51 +01009const uint32_t PCU_IF_VERSION := 9;
Harald Welte883340c2018-02-28 18:59:29 +010010
11type enumerated PCUIF_MsgType {
12 PCU_IF_MSG_DATA_REQ ('00'O),
13 PCU_IF_MSG_DATA_CNF ('01'O),
14 PCU_IF_MSG_DATA_IND ('02'O),
15 PCU_IF_MSG_SUSP_REQ ('03'O),
16 PCU_IF_MSG_RTS_REQ ('10'O),
17 PCU_IF_MSG_DATA_CNF_DT ('11'O),
18 PCU_IF_MSG_RACH_IND ('22'O),
19 PCU_IF_MSG_INFO_IND ('32'O),
20 PCU_IF_MSG_ACT_REQ ('40'O),
21 PCU_IF_MSG_TIME_IND ('52'O),
22 PCU_IF_MSG_PAG_REQ ('60'O),
23 PCU_IF_MSG_TXT_IND ('70'O)
24} with { variant "FIELDLENGTH(8)" };
25
26type enumerated PCUIF_Sapi {
27 PCU_IF_SAPI_UNKNOWN ('00'O),
28 PCU_IF_SAPI_RACH ('01'O),
29 PCU_IF_SAPI_AGCH ('02'O),
30 PCU_IF_SAPI_PCH ('03'O),
31 PCU_IF_SAPI_BCCH ('04'O),
32 PCU_IF_SAPI_PDTCH ('05'O),
33 PCU_IF_SAPI_PRACH ('06'O),
34 PCU_IF_SAPI_PTCCH ('07'O),
35 PCU_IF_SAPI_AGCH_DT ('08'O)
36} with { variant "FIELDLENGTH(8)" };
37
38type record PCUIF_Flags {
39 boolean bts_active,
40 boolean sysmo_direct_dsp,
41 BIT14 spare,
42 boolean cs1,
43 boolean cs2,
44 boolean cs3,
45 boolean cs4,
46 boolean mcs1,
47 boolean mcs2,
48 boolean mcs3,
49 boolean mcs4,
50 boolean mcs5,
51 boolean mcs6,
52 boolean mcs7,
53 boolean mcs8,
54 boolean mcs9,
55 BIT3 spare2
56} with { variant "" };
57
58type enumerated PCUIF_TextType {
59 PCU_VERSION (0),
60 PCU_OML_ALERT (1)
61} with { variant "FIELDLENGTH(8)" };
62
63type charstring PCUIF_Text length(128) with { variant "FIELDLENGTH(128)" };
64
65type record PCUIF_txt_ind {
66 PCUIF_TextType txt_type,
67 PCUIF_Text text
68} with { variant "" };
69
Harald Welte883340c2018-02-28 18:59:29 +010070type record PCUIF_data {
71 PCUIF_Sapi sapi,
72 uint8_t len,
Vadim Yanitskiyc78ea262019-05-17 01:08:08 +070073 octetstring data length(162),
Harald Welte883340c2018-02-28 18:59:29 +010074 uint32_t fn,
75 uint16_t arfcn,
76 uint8_t trx_nr,
77 uint8_t ts_nr,
78 uint8_t block_nr,
79 int8_t rssi,
80 uint16_t ber10k,
81 int16_t ta_offs_qbits,
82 int16_t lqual_cb
Vadim Yanitskiyc78ea262019-05-17 01:08:08 +070083} with { variant (data) "FIELDLENGTH(162), ALIGN(left)" };
Harald Welte883340c2018-02-28 18:59:29 +010084
85type record PCUIF_data_cnf_dt {
86 PCUIF_Sapi sapi,
87 OCT4 tlli,
88 uint32_t fn,
89 uint16_t arfcn,
90 uint8_t trx_nr,
91 uint8_t ts_nr,
92 uint8_t block_nr,
93 int8_t rssi,
94 uint16_t ber10k,
95 int16_t ta_offs_qbits,
96 int16_t lqual_cb
97} with { variant "" };
98
99type record PCUIF_rts_req {
100 PCUIF_Sapi sapi,
101 OCT3 spare,
102 uint32_t fn,
103 uint16_t arfcn,
104 uint8_t trx_nr,
105 uint8_t ts_nr,
106 uint8_t block_nr
107} with { variant "" };
108
Harald Welte913bbf62019-03-01 00:39:19 +0100109type enumerated PCUIF_BurstType {
110 BURST_TYPE_NONE (0),
111 BURST_TYPE_0 (1),
112 BURST_TYPE_1 (2),
113 BURST_TYPE_2 (3)
114} with { variant "FIELDLENGTH(8)" };
115
Harald Welte883340c2018-02-28 18:59:29 +0100116type record PCUIF_rach_ind {
117 PCUIF_Sapi sapi,
118 uint16_t ra,
119 int16_t qta,
120 uint32_t fn,
121 uint16_t arfcn,
122 uint8_t is_11bit,
Harald Welte913bbf62019-03-01 00:39:19 +0100123 PCUIF_BurstType burst_type
Harald Welte883340c2018-02-28 18:59:29 +0100124} with { variant "" };
125
126type record PCUIF_InfoTrx {
127 uint16_t arfcn,
128 BIT8 pdch_mask,
129 OCT1 spare,
130 OCT8 tsc,
131 uint32_t hLayer1
Harald Weltef1486592018-04-04 19:26:41 +0200132} with { variant (pdch_mask) "BITORDER(msb)" };
Harald Weltee1fd9162019-02-18 19:47:53 +0100133type record length(8) of PCUIF_InfoTrx PCUIF_InfoTrxs;
Harald Welte883340c2018-02-28 18:59:29 +0100134
135type record PCUIF_info_ind {
136 uint32_t version,
137 PCUIF_Flags flags,
Harald Weltee1fd9162019-02-18 19:47:53 +0100138 PCUIF_InfoTrxs trx,
Harald Welte883340c2018-02-28 18:59:29 +0100139 uint8_t bsic,
140
141 uint16_t mcc,
142 uint16_t mnc,
Harald Welte3568dc72018-03-13 17:06:51 +0100143 uint8_t mnc_3_digits,
Harald Welte883340c2018-02-28 18:59:29 +0100144 uint16_t lac,
145 uint16_t rac,
146
147 uint16_t nsei,
148 record length(7) of uint8_t nse_timer,
149 record length(11) of uint8_t cell_timer,
150
151 uint16_t cell_id,
152 uint16_t repeat_time,
153 uint8_t repeat_count,
154 uint16_t bvci,
155 uint8_t t3142,
156 uint8_t t3169,
157 uint8_t t3191,
158 uint8_t t3193_10ms,
159 uint8_t t3195,
160 uint8_t t3101,
161 uint8_t t3103,
162 uint8_t t3105,
163 uint8_t cv_countdown,
164 uint16_t dl_tbf_ext,
165 uint16_t ul_tbf_ext,
166 uint8_t initial_cs,
167 uint8_t initial_mcs,
168
169 record length(2) of uint16_t nsvci,
170 record length(2) of uint16_t local_pprt,
171 record length(2) of uint16_t remote_port,
Harald Welte07e8dde2019-02-18 20:38:45 +0100172 record length(2) of OCT4 remote_ip
Harald Welte883340c2018-02-28 18:59:29 +0100173} with { variant "" }
174
175type record PCUIF_act_req {
176 uint8_t is_activate,
177 uint8_t trx_nr,
178 uint8_t ts_nr,
179 OCT1 spare
180} with { variant "" };
181
182type record PCUIF_time_ind {
183 uint32_t fn
184} with { variant "" };
185
186type record PCUIF_pag_req {
187 PCUIF_Sapi sapi,
188 uint8_t chan_needed,
189 OCT9 identity_lv
190} with { variant "" };
191
192type record PCUIF_susp_req {
193 OCT4 tlli,
194 OCT6 ra_id,
195 uint8_t cause
196} with { variant "" };
197
198
199type union PCUIF_MsgUnion {
200 PCUIF_data data_req,
201 PCUIF_data data_cnf,
202 PCUIF_data_cnf_dt data_cnf_dt,
203 PCUIF_data data_ind,
204 PCUIF_susp_req susp_req,
205 PCUIF_rts_req rts_req,
206 PCUIF_rach_ind rach_ind,
207 PCUIF_txt_ind txt_ind,
208 PCUIF_info_ind info_ind,
209 PCUIF_act_req act_req,
210 PCUIF_time_ind time_ind,
211 PCUIF_pag_req pag_req
212} with { variant "" };
213
214type record PCUIF_Message {
215 PCUIF_MsgType msg_type,
216 uint8_t bts_nr,
217 OCT2 spare,
218 PCUIF_MsgUnion u
219} with { variant (u) "CROSSTAG(
220 data_req, msg_type = PCU_IF_MSG_DATA_REQ;
221 data_cnf, msg_type = PCU_IF_MSG_DATA_CNF;
222 data_cnf_dt, msg_type = PCU_IF_MSG_DATA_CNF_DT;
223 data_ind, msg_type = PCU_IF_MSG_DATA_IND;
224 susp_req, msg_type = PCU_IF_MSG_SUSP_REQ;
225 rts_req, msg_type = PCU_IF_MSG_RTS_REQ;
226 rach_ind, msg_type = PCU_IF_MSG_RACH_IND;
227 txt_ind, msg_type = PCU_IF_MSG_TXT_IND;
228 info_ind, msg_type = PCU_IF_MSG_INFO_IND;
229 act_req, msg_type = PCU_IF_MSG_ACT_REQ;
230 time_ind, msg_type = PCU_IF_MSG_TIME_IND;
231 pag_req, msg_type = PCU_IF_MSG_PAG_REQ)"
Harald Welte3568dc72018-03-13 17:06:51 +0100232 variant "PADDING(1696)" /* 212 * 8 */
Harald Welte883340c2018-02-28 18:59:29 +0100233};
234
235external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring
236 with { extension "prototype(convert) encode(RAW)" };
237external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message
238 with { extension "prototype(convert) decode(RAW)" };
239
240
Harald Weltee1fd9162019-02-18 19:47:53 +0100241template (value) PCUIF_Message ts_PCUIF_RTS_REQ(template (value) uint8_t bts_nr,
242 template (value) uint8_t trx_nr,
243 template (value) uint8_t ts_nr,
244 template (value) PCUIF_Sapi sapi,
245 template (value) uint32_t fn,
246 template (value) uint16_t arfcn,
247 template (value) uint8_t block_nr
248 ) := {
249 msg_type := PCU_IF_MSG_RTS_REQ,
250 bts_nr := bts_nr,
251 spare := '0000'O,
252 u := {
253 rts_req := {
254 sapi := sapi,
255 spare := '000000'O,
256 fn := fn,
257 arfcn := arfcn,
258 trx_nr := trx_nr,
259 ts_nr := ts_nr,
260 block_nr := block_nr
261 }
262 }
263}
Harald Welte883340c2018-02-28 18:59:29 +0100264template PCUIF_Message tr_PCUIF_RTS_REQ(template uint8_t bts_nr := ?,
265 template uint8_t trx_nr := ?,
266 template uint8_t ts_nr := ?,
267 template PCUIF_Sapi sapi := ?,
268 template uint32_t fn := ?,
269 template uint8_t block_nr := ?
270 ) := {
271 msg_type := PCU_IF_MSG_RTS_REQ,
272 bts_nr := bts_nr,
273 spare := ?,
274 u := {
275 rts_req := {
276 sapi := sapi,
277 spare := ?,
278 fn := fn,
279 arfcn := ?,
280 trx_nr := trx_nr,
281 ts_nr := ts_nr,
282 block_nr := block_nr
283 }
284 }
285}
286
287template (value) PCUIF_Message ts_PCUIF_TXT_IND(uint8_t bts_nr, PCUIF_TextType tt, charstring text) := {
288 msg_type := PCU_IF_MSG_TXT_IND,
289 bts_nr := bts_nr,
290 spare := '0000'O,
291 u := {
292 txt_ind := {
293 txt_type := tt,
294 text := text
295 }
296 }
297}
Harald Weltee1fd9162019-02-18 19:47:53 +0100298template PCUIF_Message tr_PCUIF_TXT_IND(template uint8_t bts_nr, template PCUIF_TextType tt,
299 template charstring text := ?) := {
300 msg_type := PCU_IF_MSG_TXT_IND,
301 bts_nr := bts_nr,
302 spare := '0000'O,
303 u := {
304 txt_ind := {
305 txt_type := tt,
306 text := text
307 }
308 }
309}
310
311
Harald Welte883340c2018-02-28 18:59:29 +0100312
313template (value) PCUIF_Message ts_PCUIF_ACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := {
314 msg_type := PCU_IF_MSG_ACT_REQ,
315 bts_nr := bts_nr,
316 spare := '0000'O,
317 u := {
318 act_req := {
319 is_activate := 1,
320 trx_nr := trx_nr,
321 ts_nr := ts_nr,
322 spare := '00'O
323 }
324 }
325}
Harald Weltee1fd9162019-02-18 19:47:53 +0100326template PCUIF_Message tr_PCUIF_ACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr,
327 template uint8_t ts_nr) := {
328 msg_type := PCU_IF_MSG_ACT_REQ,
329 bts_nr := bts_nr,
330 spare := '0000'O,
331 u := {
332 act_req := {
333 is_activate := 1,
334 trx_nr := trx_nr,
335 ts_nr := ts_nr,
336 spare := '00'O
337 }
338 }
339}
Harald Welte883340c2018-02-28 18:59:29 +0100340
341template (value) PCUIF_Message ts_PCUIF_DEACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := {
342 msg_type := PCU_IF_MSG_ACT_REQ,
343 bts_nr := bts_nr,
344 spare := '0000'O,
345 u := {
346 act_req := {
347 is_activate := 0,
348 trx_nr := trx_nr,
349 ts_nr := ts_nr,
350 spare := '00'O
351 }
352 }
353}
Harald Weltee1fd9162019-02-18 19:47:53 +0100354template PCUIF_Message tr_PCUIF_DEACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr,
355 template uint8_t ts_nr) := {
356 msg_type := PCU_IF_MSG_ACT_REQ,
357 bts_nr := bts_nr,
358 spare := '0000'O,
359 u := {
360 act_req := {
361 is_activate := 0,
362 trx_nr := trx_nr,
363 ts_nr := ts_nr,
364 spare := '00'O
365 }
366 }
367}
Harald Welte883340c2018-02-28 18:59:29 +0100368
Harald Weltee1fd9162019-02-18 19:47:53 +0100369template (value) PCUIF_Message ts_PCUIF_DATA_IND(template (value) uint8_t bts_nr,
370 template (value) uint8_t trx_nr,
371 template (value) uint8_t ts_nr,
372 template (value) uint8_t block_nr,
373 template (value) PCUIF_Sapi sapi,
Vadim Yanitskiyc78ea262019-05-17 01:08:08 +0700374 template (value) octetstring data,
Harald Weltee1fd9162019-02-18 19:47:53 +0100375 template (value) uint32_t fn,
376 template (value) uint16_t arfcn,
377 template (value) int8_t rssi := -80,
378 template (value) uint16_t ber10k := 0,
379 template (value) int16_t ta_offs_qbits := 0,
380 template (value) uint16_t lqual_cb := 10) := {
381 msg_type := PCU_IF_MSG_DATA_IND,
382 bts_nr := bts_nr,
383 spare := '0000'O,
384 u := {
385 data_ind := {
386 sapi := sapi,
387 len := lengthof(valueof(data)),
388 data := data,
389 fn := fn,
390 arfcn := arfcn,
391 trx_nr := trx_nr,
392 ts_nr := ts_nr,
393 block_nr := block_nr,
394 rssi := rssi,
395 ber10k := ber10k,
396 ta_offs_qbits := ta_offs_qbits,
397 lqual_cb := lqual_cb
398 }
399 }
400}
Harald Welte883340c2018-02-28 18:59:29 +0100401template PCUIF_Message tr_PCUIF_DATA_IND(template uint8_t bts_nr := ?,
402 template uint8_t trx_nr := ?,
403 template uint8_t ts_nr := ?,
404 template uint8_t block_nr := ?,
405 template PCUIF_Sapi sapi := ?,
Vadim Yanitskiyc78ea262019-05-17 01:08:08 +0700406 template octetstring data := ?) := {
Harald Welte883340c2018-02-28 18:59:29 +0100407 msg_type := PCU_IF_MSG_DATA_IND,
408 bts_nr := bts_nr,
409 spare := ?,
410 u := {
411 data_ind := {
412 sapi := sapi,
413 len := ?,
414 data := data,
415 fn := ?,
416 arfcn := ?,
417 trx_nr := trx_nr,
418 ts_nr := ts_nr,
419 block_nr := block_nr,
420 rssi := ?,
421 ber10k := ?,
422 ta_offs_qbits := ?,
423 lqual_cb := ?
424 }
425 }
426}
427
428template (value) PCUIF_Message ts_PCUIF_DATA_REQ(uint8_t bts_nr, uint8_t trx_nr,
429 uint8_t ts_nr, uint8_t block_nr,
430 uint32_t fn, PCUIF_Sapi sapi,
431 octetstring data) := {
432 msg_type := PCU_IF_MSG_DATA_REQ,
433 bts_nr := bts_nr,
434 spare := '0000'O,
435 u := {
436 data_req := {
437 sapi := sapi,
438 len := lengthof(data),
439 data := data,
440 fn := fn,
441 arfcn := 0, /* unused in BTS */
442 trx_nr := trx_nr,
443 ts_nr := ts_nr,
444 block_nr := block_nr,
445 /* measurement parameters below unused on Tx */
446 rssi := 0,
447 ber10k := 0,
448 ta_offs_qbits := 0,
449 lqual_cb := 0
450 }
451 }
452}
Harald Weltee1fd9162019-02-18 19:47:53 +0100453template PCUIF_Message tr_PCUIF_DATA_REQ(template uint8_t bts_nr,
454 template uint8_t trx_nr,
455 template uint8_t ts_nr,
456 template uint8_t block_nr := ?,
457 template uint32_t fn := ?,
458 template PCUIF_Sapi sapi := ?,
459 template octetstring data := ?) := {
460 msg_type := PCU_IF_MSG_DATA_REQ,
461 bts_nr := bts_nr,
462 spare := '0000'O,
463 u := {
464 data_req := {
465 sapi := sapi,
466 len := ?,
467 data := data,
468 fn := fn,
Harald Welte0a3d63f2019-03-02 00:02:07 +0100469 arfcn := ?, /* unused in BTS */
Harald Weltee1fd9162019-02-18 19:47:53 +0100470 trx_nr := trx_nr,
471 ts_nr := ts_nr,
472 block_nr := block_nr,
473 /* measurement parameters below unused on Tx */
474 rssi := 0,
475 ber10k := 0,
476 ta_offs_qbits := 0,
477 lqual_cb := 0
478 }
479 }
480}
Harald Welte883340c2018-02-28 18:59:29 +0100481
Harald Weltee1fd9162019-02-18 19:47:53 +0100482template (value) PCUIF_Message ts_PCUIF_DATA_CNF(template (value) uint8_t bts_nr,
483 template (value) uint8_t trx_nr,
484 template (value) uint8_t ts_nr,
485 template (value) uint8_t block_nr,
486 template (value) uint32_t fn,
487 template (value) uint16_t arfcn,
488 template (value) PCUIF_Sapi sapi,
489 template (value) octetstring data) := {
490 msg_type := PCU_IF_MSG_DATA_CNF,
491 bts_nr := bts_nr,
492 spare := '0000'O,
493 u := {
494 data_cnf := {
495 sapi := sapi,
496 len := 0, /* overwritten */
497 data := data,
498 fn := fn,
499 arfcn := arfcn,
500 trx_nr := trx_nr,
501 ts_nr := ts_nr,
502 block_nr := block_nr,
503 rssi := 0,
504 ber10k := 0,
505 ta_offs_qbits := 0,
506 lqual_cb := 0
507 }
508 }
509}
Harald Welte883340c2018-02-28 18:59:29 +0100510template PCUIF_Message tr_PCUIF_DATA_CNF(template uint8_t bts_nr := ?,
511 template uint8_t trx_nr := ?,
512 template uint8_t ts_nr := ?,
513 template PCUIF_Sapi sapi := ?,
514 template octetstring data := ?) := {
515 msg_type := PCU_IF_MSG_DATA_CNF,
516 bts_nr := bts_nr,
517 spare := ?,
518 u := {
519 data_cnf := {
520 sapi := sapi,
521 len := ?,
522 data := data,
523 fn := ?,
524 arfcn := ?,
525 trx_nr := trx_nr,
526 ts_nr := ts_nr,
527 block_nr := ?,
528 rssi := ?,
529 ber10k := ?,
530 ta_offs_qbits := ?,
531 lqual_cb := ?
532 }
533 }
534}
535
Harald Weltee1fd9162019-02-18 19:47:53 +0100536template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t bts_nr,
537 template (value) uint16_t ra,
538 template (value) uint8_t is_11bit,
Harald Welte913bbf62019-03-01 00:39:19 +0100539 template (value) PCUIF_BurstType burst_type,
Harald Weltee1fd9162019-02-18 19:47:53 +0100540 template (value) uint32_t fn,
541 template (value) uint16_t arfcn,
542 template (value) int16_t qta := 0
543) := {
544 msg_type := PCU_IF_MSG_RACH_IND,
545 bts_nr := bts_nr,
546 spare := '0000'O,
547 u := {
548 rach_ind := {
549 sapi := PCU_IF_SAPI_RACH,
550 ra := ra,
551 qta := qta,
552 fn := fn,
553 arfcn := arfcn,
554 is_11bit := is_11bit,
555 burst_type := burst_type
556 }
557 }
558}
Harald Welte883340c2018-02-28 18:59:29 +0100559template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?,
560 template uint16_t ra := ?,
561 template uint8_t is_11bit := ?,
Harald Welte913bbf62019-03-01 00:39:19 +0100562 template PCUIF_BurstType burst_type := ?,
Harald Welte883340c2018-02-28 18:59:29 +0100563 template uint32_t fn := ?) := {
564 msg_type := PCU_IF_MSG_RACH_IND,
565 bts_nr := bts_nr,
566 spare := ?,
567 u := {
568 rach_ind := {
569 sapi := PCU_IF_SAPI_RACH,
570 ra := ra,
571 qta := ?,
572 fn := fn,
573 arfcn := ?,
574 is_11bit := is_11bit,
575 burst_type := burst_type
576 }
577 }
578}
579
Harald Weltee1fd9162019-02-18 19:47:53 +0100580template (value) PCUIF_Message ts_PCUIF_PAG_REQ(template (value) uint8_t bts_nr,
581 template (value) OCT9 id_lv,
582 template (value) uint8_t chan_needed,
583 template (value) PCUIF_Sapi sapi) := {
584 msg_type := PCU_IF_MSG_PAG_REQ,
585 bts_nr := bts_nr,
586 spare := '0000'O,
587 u := {
588 pag_req := {
589 sapi := sapi,
590 chan_needed := chan_needed,
591 identity_lv := id_lv
592 }
593 }
594}
Harald Welte883340c2018-02-28 18:59:29 +0100595template PCUIF_Message tr_PCUIF_PAG_REQ(template uint8_t bts_nr := ?,
596 template OCT9 id_lv := ?,
597 template uint8_t chan_needed := ?,
598 template PCUIF_Sapi sapi := ?) := {
599 msg_type := PCU_IF_MSG_PAG_REQ,
600 bts_nr := bts_nr,
601 spare := ?,
602 u := {
603 pag_req := {
604 sapi := ?,
605 chan_needed := chan_needed,
606 identity_lv := id_lv
607 }
608 }
609}
610
Harald Weltee1fd9162019-02-18 19:47:53 +0100611const PCUIF_Flags c_PCUIF_Flags_default := {
612 bts_active := true,
613 sysmo_direct_dsp := false,
614 spare := '00000000000000'B,
615 cs1 := true,
616 cs2 := true,
617 cs3 := true,
618 cs4 := true,
619 mcs1 := true,
620 mcs2 := true,
621 mcs3 := true,
622 mcs4 := true,
623 mcs5 := true,
624 mcs6 := true,
625 mcs7 := true,
626 mcs8 := true,
627 mcs9 := true,
628 spare2 := '000'B
629};
630
631template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrx(template (value) uint16_t arfcn := 871,
632 template (value) BIT8 pdch_mask := '00000001'B,
633 OCT1 tsc := '07'O) := {
634 arfcn := arfcn,
635 pdch_mask := pdch_mask,
636 spare := '00'O,
637 tsc := tsc & tsc & tsc & tsc & tsc & tsc & tsc & tsc,
638 hLayer1 := 0
639}
640
641template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrxNULL := ts_PCUIF_InfoTrx(0, '00000000'B, '00'O);
642
643template (value) PCUIF_InfoTrxs ts_PCUIF_InfoTrxs_def := {
644 ts_PCUIF_InfoTrx, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL,
645 ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL };
646
647
648template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr,
649 template (value) uint16_t nsei,
650 template (value) uint16_t nsvci,
651 template (value) uint16_t bvci,
652 template (value) uint16_t local_port,
653 template (value) uint16_t remote_port,
Harald Welte07e8dde2019-02-18 20:38:45 +0100654 template (value) OCT4 remote_ip,
Harald Weltee1fd9162019-02-18 19:47:53 +0100655 template (value) PCUIF_Flags flags := c_PCUIF_Flags_default,
656 template (value) uint16_t mcc := 262,
657 template (value) uint16_t mnc := 42,
Harald Weltef12b5a42019-03-21 19:50:21 +0100658 template (value) uint16_t lac := 13135,
Harald Weltee1fd9162019-02-18 19:47:53 +0100659 template (value) uint8_t rac := 0,
Harald Weltef12b5a42019-03-21 19:50:21 +0100660 template (value) uint16_t cell_id := 20960,
Harald Weltee1fd9162019-02-18 19:47:53 +0100661 template (value) uint8_t bsic := 7,
662 template (value) PCUIF_InfoTrxs trx := ts_PCUIF_InfoTrxs_def,
663 template (value) uint32_t version := PCU_IF_VERSION) := {
664 msg_type := PCU_IF_MSG_INFO_IND,
665 bts_nr := bts_nr,
666 spare := '0000'O,
667 u := {
668 info_ind := {
669 version := version,
670 flags := flags,
671 trx := trx,
672 bsic := bsic,
673 mcc := mcc,
674 mnc := mnc,
675 mnc_3_digits := 0,
676 lac := lac,
677 rac := rac,
678 nsei := nsei,
679 nse_timer := { 3, 3, 3, 3, 30, 3, 10 },
680 cell_timer := { 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 },
681 cell_id := cell_id,
682 repeat_time := 5 * 50,
683 repeat_count := 3,
684 bvci := bvci,
685 t3142 := 20,
686 t3169 := 5,
687 t3191 := 5,
688 t3193_10ms := 160,
689 t3195 := 5,
690 t3101 := 10,
691 t3103 := 4,
692 t3105 := 8,
693 cv_countdown := 15,
694 dl_tbf_ext := 250 * 10, /* ms */
695 ul_tbf_ext := 250 * 10, /* ms */
696 initial_cs := 2,
697 initial_mcs := 6,
698 nsvci := { nsvci, 0 },
699 local_pprt := { local_port, 0 },
700 remote_port := { remote_port, 0 },
Harald Welte07e8dde2019-02-18 20:38:45 +0100701 remote_ip := { remote_ip , '00000000'O }
Harald Weltee1fd9162019-02-18 19:47:53 +0100702 }
703 }
704}
Harald Welted378a252018-03-13 17:02:14 +0100705template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?,
706 template PCUIF_Flags flags := ?,
707 template uint32_t version := PCU_IF_VERSION) := {
708 msg_type := PCU_IF_MSG_INFO_IND,
709 bts_nr := bts_nr,
710 spare := ?,
711 u := {
712 info_ind := {
713 version := version,
714 flags := flags,
715 trx := ?,
716 bsic := ?,
717 mcc := ?,
718 mnc :=?,
Harald Welte3568dc72018-03-13 17:06:51 +0100719 mnc_3_digits := ?,
Harald Welted378a252018-03-13 17:02:14 +0100720 lac := ?,
721 rac := ?,
722 nsei := ?,
723 nse_timer := ?,
724 cell_timer := ?,
725 cell_id := ?,
726 repeat_time := ?,
727 repeat_count := ?,
728 bvci := ?,
729 t3142 := ?,
730 t3169 := ?,
731 t3191 := ?,
732 t3193_10ms := ?,
733 t3195 := ?,
734 t3101 := ?,
735 t3103 := ?,
736 t3105 := ?,
737 cv_countdown := ?,
738 dl_tbf_ext := ?,
739 ul_tbf_ext := ?,
740 initial_cs := ?,
741 initial_mcs := ?,
742 nsvci := ?,
743 local_pprt := ?,
744 remote_port := ?,
745 remote_ip := ?
746 }
747 }
748}
749
Harald Weltea3219812019-03-02 00:02:28 +0100750template (value) PCUIF_Message ts_PCUIF_TIME_IND(template (value) uint8_t bts_nr,
751 template (value) uint32_t fn) := {
752 msg_type := PCU_IF_MSG_TIME_IND,
753 bts_nr := bts_nr,
754 spare := '0000'O,
755 u := {
756 time_ind := {
757 fn := fn
758 }
759 }
760}
761template PCUIF_Message tr_PCUIF_TIME_IND(template uint8_t bts_nr,
762 template uint32_t fn) := {
763 msg_type := PCU_IF_MSG_TIME_IND,
764 bts_nr := bts_nr,
765 spare := ?,
766 u := {
767 time_ind := {
768 fn := fn
769 }
770 }
771}
Harald Welte883340c2018-02-28 18:59:29 +0100772
Harald Welte4bff40a2019-03-21 21:34:10 +0100773template (value) PCUIF_Message ts_PCUIF_SUSP_REQ(template (value) uint8_t bts_nr,
774 template (value) OCT4 tlli,
775 template (value) OCT6 ra_id,
776 template (value) uint8_t cause) := {
777 msg_type := PCU_IF_MSG_SUSP_REQ,
778 bts_nr := bts_nr,
779 spare := '0000'O,
780 u := {
781 susp_req := {
782 tlli := tlli,
783 ra_id := ra_id,
784 cause := cause
785 }
786 }
787}
788template PCUIF_Message tr_PCUIF_SUSP_REQ(template uint8_t bts_nr,
789 template OCT4 tlli,
790 template OCT6 ra_id,
791 template uint8_t cause) := {
792 msg_type := PCU_IF_MSG_SUSP_REQ,
793 bts_nr := bts_nr,
794 spare := '0000'O,
795 u := {
796 susp_req := {
797 tlli := tlli,
798 ra_id := ra_id,
799 cause := cause
800 }
801 }
802}
803
804
Harald Welte883340c2018-02-28 18:59:29 +0100805} with { encode "RAW" variant "BYTEORDER(first)" };