blob: 3215c4b6ae3aeb7b70d90b0dce6fc0f90cb96494 [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
70type octetstring OCT162 length(162) with { variant "FIELDLENGTH(162)" };
71
72type record PCUIF_data {
73 PCUIF_Sapi sapi,
74 uint8_t len,
75 OCT162 data,
76 uint32_t fn,
77 uint16_t arfcn,
78 uint8_t trx_nr,
79 uint8_t ts_nr,
80 uint8_t block_nr,
81 int8_t rssi,
82 uint16_t ber10k,
83 int16_t ta_offs_qbits,
84 int16_t lqual_cb
85} with { variant "" };
86
87type record PCUIF_data_cnf_dt {
88 PCUIF_Sapi sapi,
89 OCT4 tlli,
90 uint32_t fn,
91 uint16_t arfcn,
92 uint8_t trx_nr,
93 uint8_t ts_nr,
94 uint8_t block_nr,
95 int8_t rssi,
96 uint16_t ber10k,
97 int16_t ta_offs_qbits,
98 int16_t lqual_cb
99} with { variant "" };
100
101type record PCUIF_rts_req {
102 PCUIF_Sapi sapi,
103 OCT3 spare,
104 uint32_t fn,
105 uint16_t arfcn,
106 uint8_t trx_nr,
107 uint8_t ts_nr,
108 uint8_t block_nr
109} with { variant "" };
110
111type record PCUIF_rach_ind {
112 PCUIF_Sapi sapi,
113 uint16_t ra,
114 int16_t qta,
115 uint32_t fn,
116 uint16_t arfcn,
117 uint8_t is_11bit,
118 uint8_t burst_type
119} with { variant "" };
120
121type record PCUIF_InfoTrx {
122 uint16_t arfcn,
123 BIT8 pdch_mask,
124 OCT1 spare,
125 OCT8 tsc,
126 uint32_t hLayer1
Harald Weltef1486592018-04-04 19:26:41 +0200127} with { variant (pdch_mask) "BITORDER(msb)" };
Harald Weltee1fd9162019-02-18 19:47:53 +0100128type record length(8) of PCUIF_InfoTrx PCUIF_InfoTrxs;
Harald Welte883340c2018-02-28 18:59:29 +0100129
130type record PCUIF_info_ind {
131 uint32_t version,
132 PCUIF_Flags flags,
Harald Weltee1fd9162019-02-18 19:47:53 +0100133 PCUIF_InfoTrxs trx,
Harald Welte883340c2018-02-28 18:59:29 +0100134 uint8_t bsic,
135
136 uint16_t mcc,
137 uint16_t mnc,
Harald Welte3568dc72018-03-13 17:06:51 +0100138 uint8_t mnc_3_digits,
Harald Welte883340c2018-02-28 18:59:29 +0100139 uint16_t lac,
140 uint16_t rac,
141
142 uint16_t nsei,
143 record length(7) of uint8_t nse_timer,
144 record length(11) of uint8_t cell_timer,
145
146 uint16_t cell_id,
147 uint16_t repeat_time,
148 uint8_t repeat_count,
149 uint16_t bvci,
150 uint8_t t3142,
151 uint8_t t3169,
152 uint8_t t3191,
153 uint8_t t3193_10ms,
154 uint8_t t3195,
155 uint8_t t3101,
156 uint8_t t3103,
157 uint8_t t3105,
158 uint8_t cv_countdown,
159 uint16_t dl_tbf_ext,
160 uint16_t ul_tbf_ext,
161 uint8_t initial_cs,
162 uint8_t initial_mcs,
163
164 record length(2) of uint16_t nsvci,
165 record length(2) of uint16_t local_pprt,
166 record length(2) of uint16_t remote_port,
Harald Welte07e8dde2019-02-18 20:38:45 +0100167 record length(2) of OCT4 remote_ip
Harald Welte883340c2018-02-28 18:59:29 +0100168} with { variant "" }
169
170type record PCUIF_act_req {
171 uint8_t is_activate,
172 uint8_t trx_nr,
173 uint8_t ts_nr,
174 OCT1 spare
175} with { variant "" };
176
177type record PCUIF_time_ind {
178 uint32_t fn
179} with { variant "" };
180
181type record PCUIF_pag_req {
182 PCUIF_Sapi sapi,
183 uint8_t chan_needed,
184 OCT9 identity_lv
185} with { variant "" };
186
187type record PCUIF_susp_req {
188 OCT4 tlli,
189 OCT6 ra_id,
190 uint8_t cause
191} with { variant "" };
192
193
194type union PCUIF_MsgUnion {
195 PCUIF_data data_req,
196 PCUIF_data data_cnf,
197 PCUIF_data_cnf_dt data_cnf_dt,
198 PCUIF_data data_ind,
199 PCUIF_susp_req susp_req,
200 PCUIF_rts_req rts_req,
201 PCUIF_rach_ind rach_ind,
202 PCUIF_txt_ind txt_ind,
203 PCUIF_info_ind info_ind,
204 PCUIF_act_req act_req,
205 PCUIF_time_ind time_ind,
206 PCUIF_pag_req pag_req
207} with { variant "" };
208
209type record PCUIF_Message {
210 PCUIF_MsgType msg_type,
211 uint8_t bts_nr,
212 OCT2 spare,
213 PCUIF_MsgUnion u
214} with { variant (u) "CROSSTAG(
215 data_req, msg_type = PCU_IF_MSG_DATA_REQ;
216 data_cnf, msg_type = PCU_IF_MSG_DATA_CNF;
217 data_cnf_dt, msg_type = PCU_IF_MSG_DATA_CNF_DT;
218 data_ind, msg_type = PCU_IF_MSG_DATA_IND;
219 susp_req, msg_type = PCU_IF_MSG_SUSP_REQ;
220 rts_req, msg_type = PCU_IF_MSG_RTS_REQ;
221 rach_ind, msg_type = PCU_IF_MSG_RACH_IND;
222 txt_ind, msg_type = PCU_IF_MSG_TXT_IND;
223 info_ind, msg_type = PCU_IF_MSG_INFO_IND;
224 act_req, msg_type = PCU_IF_MSG_ACT_REQ;
225 time_ind, msg_type = PCU_IF_MSG_TIME_IND;
226 pag_req, msg_type = PCU_IF_MSG_PAG_REQ)"
Harald Welte3568dc72018-03-13 17:06:51 +0100227 variant "PADDING(1696)" /* 212 * 8 */
Harald Welte883340c2018-02-28 18:59:29 +0100228};
229
230external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring
231 with { extension "prototype(convert) encode(RAW)" };
232external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message
233 with { extension "prototype(convert) decode(RAW)" };
234
235
Harald Weltee1fd9162019-02-18 19:47:53 +0100236template (value) PCUIF_Message ts_PCUIF_RTS_REQ(template (value) uint8_t bts_nr,
237 template (value) uint8_t trx_nr,
238 template (value) uint8_t ts_nr,
239 template (value) PCUIF_Sapi sapi,
240 template (value) uint32_t fn,
241 template (value) uint16_t arfcn,
242 template (value) uint8_t block_nr
243 ) := {
244 msg_type := PCU_IF_MSG_RTS_REQ,
245 bts_nr := bts_nr,
246 spare := '0000'O,
247 u := {
248 rts_req := {
249 sapi := sapi,
250 spare := '000000'O,
251 fn := fn,
252 arfcn := arfcn,
253 trx_nr := trx_nr,
254 ts_nr := ts_nr,
255 block_nr := block_nr
256 }
257 }
258}
Harald Welte883340c2018-02-28 18:59:29 +0100259template PCUIF_Message tr_PCUIF_RTS_REQ(template uint8_t bts_nr := ?,
260 template uint8_t trx_nr := ?,
261 template uint8_t ts_nr := ?,
262 template PCUIF_Sapi sapi := ?,
263 template uint32_t fn := ?,
264 template uint8_t block_nr := ?
265 ) := {
266 msg_type := PCU_IF_MSG_RTS_REQ,
267 bts_nr := bts_nr,
268 spare := ?,
269 u := {
270 rts_req := {
271 sapi := sapi,
272 spare := ?,
273 fn := fn,
274 arfcn := ?,
275 trx_nr := trx_nr,
276 ts_nr := ts_nr,
277 block_nr := block_nr
278 }
279 }
280}
281
282template (value) PCUIF_Message ts_PCUIF_TXT_IND(uint8_t bts_nr, PCUIF_TextType tt, charstring text) := {
283 msg_type := PCU_IF_MSG_TXT_IND,
284 bts_nr := bts_nr,
285 spare := '0000'O,
286 u := {
287 txt_ind := {
288 txt_type := tt,
289 text := text
290 }
291 }
292}
Harald Weltee1fd9162019-02-18 19:47:53 +0100293template PCUIF_Message tr_PCUIF_TXT_IND(template uint8_t bts_nr, template PCUIF_TextType tt,
294 template charstring text := ?) := {
295 msg_type := PCU_IF_MSG_TXT_IND,
296 bts_nr := bts_nr,
297 spare := '0000'O,
298 u := {
299 txt_ind := {
300 txt_type := tt,
301 text := text
302 }
303 }
304}
305
306
Harald Welte883340c2018-02-28 18:59:29 +0100307
308template (value) PCUIF_Message ts_PCUIF_ACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := {
309 msg_type := PCU_IF_MSG_ACT_REQ,
310 bts_nr := bts_nr,
311 spare := '0000'O,
312 u := {
313 act_req := {
314 is_activate := 1,
315 trx_nr := trx_nr,
316 ts_nr := ts_nr,
317 spare := '00'O
318 }
319 }
320}
Harald Weltee1fd9162019-02-18 19:47:53 +0100321template PCUIF_Message tr_PCUIF_ACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr,
322 template uint8_t ts_nr) := {
323 msg_type := PCU_IF_MSG_ACT_REQ,
324 bts_nr := bts_nr,
325 spare := '0000'O,
326 u := {
327 act_req := {
328 is_activate := 1,
329 trx_nr := trx_nr,
330 ts_nr := ts_nr,
331 spare := '00'O
332 }
333 }
334}
Harald Welte883340c2018-02-28 18:59:29 +0100335
336template (value) PCUIF_Message ts_PCUIF_DEACT_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr) := {
337 msg_type := PCU_IF_MSG_ACT_REQ,
338 bts_nr := bts_nr,
339 spare := '0000'O,
340 u := {
341 act_req := {
342 is_activate := 0,
343 trx_nr := trx_nr,
344 ts_nr := ts_nr,
345 spare := '00'O
346 }
347 }
348}
Harald Weltee1fd9162019-02-18 19:47:53 +0100349template PCUIF_Message tr_PCUIF_DEACT_REQ(template uint8_t bts_nr, template uint8_t trx_nr,
350 template uint8_t ts_nr) := {
351 msg_type := PCU_IF_MSG_ACT_REQ,
352 bts_nr := bts_nr,
353 spare := '0000'O,
354 u := {
355 act_req := {
356 is_activate := 0,
357 trx_nr := trx_nr,
358 ts_nr := ts_nr,
359 spare := '00'O
360 }
361 }
362}
Harald Welte883340c2018-02-28 18:59:29 +0100363
Harald Weltee1fd9162019-02-18 19:47:53 +0100364template (value) PCUIF_Message ts_PCUIF_DATA_IND(template (value) uint8_t bts_nr,
365 template (value) uint8_t trx_nr,
366 template (value) uint8_t ts_nr,
367 template (value) uint8_t block_nr,
368 template (value) PCUIF_Sapi sapi,
369 template (value) OCT162 data,
370 template (value) uint32_t fn,
371 template (value) uint16_t arfcn,
372 template (value) int8_t rssi := -80,
373 template (value) uint16_t ber10k := 0,
374 template (value) int16_t ta_offs_qbits := 0,
375 template (value) uint16_t lqual_cb := 10) := {
376 msg_type := PCU_IF_MSG_DATA_IND,
377 bts_nr := bts_nr,
378 spare := '0000'O,
379 u := {
380 data_ind := {
381 sapi := sapi,
382 len := lengthof(valueof(data)),
383 data := data,
384 fn := fn,
385 arfcn := arfcn,
386 trx_nr := trx_nr,
387 ts_nr := ts_nr,
388 block_nr := block_nr,
389 rssi := rssi,
390 ber10k := ber10k,
391 ta_offs_qbits := ta_offs_qbits,
392 lqual_cb := lqual_cb
393 }
394 }
395}
Harald Welte883340c2018-02-28 18:59:29 +0100396template PCUIF_Message tr_PCUIF_DATA_IND(template uint8_t bts_nr := ?,
397 template uint8_t trx_nr := ?,
398 template uint8_t ts_nr := ?,
399 template uint8_t block_nr := ?,
400 template PCUIF_Sapi sapi := ?,
401 template OCT162 data := ?) := {
402 msg_type := PCU_IF_MSG_DATA_IND,
403 bts_nr := bts_nr,
404 spare := ?,
405 u := {
406 data_ind := {
407 sapi := sapi,
408 len := ?,
409 data := data,
410 fn := ?,
411 arfcn := ?,
412 trx_nr := trx_nr,
413 ts_nr := ts_nr,
414 block_nr := block_nr,
415 rssi := ?,
416 ber10k := ?,
417 ta_offs_qbits := ?,
418 lqual_cb := ?
419 }
420 }
421}
422
423template (value) PCUIF_Message ts_PCUIF_DATA_REQ(uint8_t bts_nr, uint8_t trx_nr,
424 uint8_t ts_nr, uint8_t block_nr,
425 uint32_t fn, PCUIF_Sapi sapi,
426 octetstring data) := {
427 msg_type := PCU_IF_MSG_DATA_REQ,
428 bts_nr := bts_nr,
429 spare := '0000'O,
430 u := {
431 data_req := {
432 sapi := sapi,
433 len := lengthof(data),
434 data := data,
435 fn := fn,
436 arfcn := 0, /* unused in BTS */
437 trx_nr := trx_nr,
438 ts_nr := ts_nr,
439 block_nr := block_nr,
440 /* measurement parameters below unused on Tx */
441 rssi := 0,
442 ber10k := 0,
443 ta_offs_qbits := 0,
444 lqual_cb := 0
445 }
446 }
447}
Harald Weltee1fd9162019-02-18 19:47:53 +0100448template PCUIF_Message tr_PCUIF_DATA_REQ(template uint8_t bts_nr,
449 template uint8_t trx_nr,
450 template uint8_t ts_nr,
451 template uint8_t block_nr := ?,
452 template uint32_t fn := ?,
453 template PCUIF_Sapi sapi := ?,
454 template octetstring data := ?) := {
455 msg_type := PCU_IF_MSG_DATA_REQ,
456 bts_nr := bts_nr,
457 spare := '0000'O,
458 u := {
459 data_req := {
460 sapi := sapi,
461 len := ?,
462 data := data,
463 fn := fn,
464 arfcn := 0, /* unused in BTS */
465 trx_nr := trx_nr,
466 ts_nr := ts_nr,
467 block_nr := block_nr,
468 /* measurement parameters below unused on Tx */
469 rssi := 0,
470 ber10k := 0,
471 ta_offs_qbits := 0,
472 lqual_cb := 0
473 }
474 }
475}
Harald Welte883340c2018-02-28 18:59:29 +0100476
Harald Weltee1fd9162019-02-18 19:47:53 +0100477template (value) PCUIF_Message ts_PCUIF_DATA_CNF(template (value) uint8_t bts_nr,
478 template (value) uint8_t trx_nr,
479 template (value) uint8_t ts_nr,
480 template (value) uint8_t block_nr,
481 template (value) uint32_t fn,
482 template (value) uint16_t arfcn,
483 template (value) PCUIF_Sapi sapi,
484 template (value) octetstring data) := {
485 msg_type := PCU_IF_MSG_DATA_CNF,
486 bts_nr := bts_nr,
487 spare := '0000'O,
488 u := {
489 data_cnf := {
490 sapi := sapi,
491 len := 0, /* overwritten */
492 data := data,
493 fn := fn,
494 arfcn := arfcn,
495 trx_nr := trx_nr,
496 ts_nr := ts_nr,
497 block_nr := block_nr,
498 rssi := 0,
499 ber10k := 0,
500 ta_offs_qbits := 0,
501 lqual_cb := 0
502 }
503 }
504}
Harald Welte883340c2018-02-28 18:59:29 +0100505template PCUIF_Message tr_PCUIF_DATA_CNF(template uint8_t bts_nr := ?,
506 template uint8_t trx_nr := ?,
507 template uint8_t ts_nr := ?,
508 template PCUIF_Sapi sapi := ?,
509 template octetstring data := ?) := {
510 msg_type := PCU_IF_MSG_DATA_CNF,
511 bts_nr := bts_nr,
512 spare := ?,
513 u := {
514 data_cnf := {
515 sapi := sapi,
516 len := ?,
517 data := data,
518 fn := ?,
519 arfcn := ?,
520 trx_nr := trx_nr,
521 ts_nr := ts_nr,
522 block_nr := ?,
523 rssi := ?,
524 ber10k := ?,
525 ta_offs_qbits := ?,
526 lqual_cb := ?
527 }
528 }
529}
530
Harald Weltee1fd9162019-02-18 19:47:53 +0100531template (value) PCUIF_Message ts_PCUIF_RACH_IND(template (value) uint8_t bts_nr,
532 template (value) uint16_t ra,
533 template (value) uint8_t is_11bit,
534 template (value) uint8_t burst_type,
535 template (value) uint32_t fn,
536 template (value) uint16_t arfcn,
537 template (value) int16_t qta := 0
538) := {
539 msg_type := PCU_IF_MSG_RACH_IND,
540 bts_nr := bts_nr,
541 spare := '0000'O,
542 u := {
543 rach_ind := {
544 sapi := PCU_IF_SAPI_RACH,
545 ra := ra,
546 qta := qta,
547 fn := fn,
548 arfcn := arfcn,
549 is_11bit := is_11bit,
550 burst_type := burst_type
551 }
552 }
553}
Harald Welte883340c2018-02-28 18:59:29 +0100554template PCUIF_Message tr_PCUIF_RACH_IND(template uint8_t bts_nr := ?,
555 template uint16_t ra := ?,
556 template uint8_t is_11bit := ?,
557 template uint8_t burst_type := ?,
558 template uint32_t fn := ?) := {
559 msg_type := PCU_IF_MSG_RACH_IND,
560 bts_nr := bts_nr,
561 spare := ?,
562 u := {
563 rach_ind := {
564 sapi := PCU_IF_SAPI_RACH,
565 ra := ra,
566 qta := ?,
567 fn := fn,
568 arfcn := ?,
569 is_11bit := is_11bit,
570 burst_type := burst_type
571 }
572 }
573}
574
Harald Weltee1fd9162019-02-18 19:47:53 +0100575template (value) PCUIF_Message ts_PCUIF_PAG_REQ(template (value) uint8_t bts_nr,
576 template (value) OCT9 id_lv,
577 template (value) uint8_t chan_needed,
578 template (value) PCUIF_Sapi sapi) := {
579 msg_type := PCU_IF_MSG_PAG_REQ,
580 bts_nr := bts_nr,
581 spare := '0000'O,
582 u := {
583 pag_req := {
584 sapi := sapi,
585 chan_needed := chan_needed,
586 identity_lv := id_lv
587 }
588 }
589}
Harald Welte883340c2018-02-28 18:59:29 +0100590template PCUIF_Message tr_PCUIF_PAG_REQ(template uint8_t bts_nr := ?,
591 template OCT9 id_lv := ?,
592 template uint8_t chan_needed := ?,
593 template PCUIF_Sapi sapi := ?) := {
594 msg_type := PCU_IF_MSG_PAG_REQ,
595 bts_nr := bts_nr,
596 spare := ?,
597 u := {
598 pag_req := {
599 sapi := ?,
600 chan_needed := chan_needed,
601 identity_lv := id_lv
602 }
603 }
604}
605
Harald Weltee1fd9162019-02-18 19:47:53 +0100606const PCUIF_Flags c_PCUIF_Flags_default := {
607 bts_active := true,
608 sysmo_direct_dsp := false,
609 spare := '00000000000000'B,
610 cs1 := true,
611 cs2 := true,
612 cs3 := true,
613 cs4 := true,
614 mcs1 := true,
615 mcs2 := true,
616 mcs3 := true,
617 mcs4 := true,
618 mcs5 := true,
619 mcs6 := true,
620 mcs7 := true,
621 mcs8 := true,
622 mcs9 := true,
623 spare2 := '000'B
624};
625
626template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrx(template (value) uint16_t arfcn := 871,
627 template (value) BIT8 pdch_mask := '00000001'B,
628 OCT1 tsc := '07'O) := {
629 arfcn := arfcn,
630 pdch_mask := pdch_mask,
631 spare := '00'O,
632 tsc := tsc & tsc & tsc & tsc & tsc & tsc & tsc & tsc,
633 hLayer1 := 0
634}
635
636template (value) PCUIF_InfoTrx ts_PCUIF_InfoTrxNULL := ts_PCUIF_InfoTrx(0, '00000000'B, '00'O);
637
638template (value) PCUIF_InfoTrxs ts_PCUIF_InfoTrxs_def := {
639 ts_PCUIF_InfoTrx, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL,
640 ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL, ts_PCUIF_InfoTrxNULL };
641
642
643template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr,
644 template (value) uint16_t nsei,
645 template (value) uint16_t nsvci,
646 template (value) uint16_t bvci,
647 template (value) uint16_t local_port,
648 template (value) uint16_t remote_port,
Harald Welte07e8dde2019-02-18 20:38:45 +0100649 template (value) OCT4 remote_ip,
Harald Weltee1fd9162019-02-18 19:47:53 +0100650 template (value) PCUIF_Flags flags := c_PCUIF_Flags_default,
651 template (value) uint16_t mcc := 262,
652 template (value) uint16_t mnc := 42,
653 template (value) uint16_t lac := 2342,
654 template (value) uint8_t rac := 0,
655 template (value) uint16_t cell_id := 1,
656 template (value) uint8_t bsic := 7,
657 template (value) PCUIF_InfoTrxs trx := ts_PCUIF_InfoTrxs_def,
658 template (value) uint32_t version := PCU_IF_VERSION) := {
659 msg_type := PCU_IF_MSG_INFO_IND,
660 bts_nr := bts_nr,
661 spare := '0000'O,
662 u := {
663 info_ind := {
664 version := version,
665 flags := flags,
666 trx := trx,
667 bsic := bsic,
668 mcc := mcc,
669 mnc := mnc,
670 mnc_3_digits := 0,
671 lac := lac,
672 rac := rac,
673 nsei := nsei,
674 nse_timer := { 3, 3, 3, 3, 30, 3, 10 },
675 cell_timer := { 3, 3, 3, 3, 3, 10, 3, 10, 3, 10, 3 },
676 cell_id := cell_id,
677 repeat_time := 5 * 50,
678 repeat_count := 3,
679 bvci := bvci,
680 t3142 := 20,
681 t3169 := 5,
682 t3191 := 5,
683 t3193_10ms := 160,
684 t3195 := 5,
685 t3101 := 10,
686 t3103 := 4,
687 t3105 := 8,
688 cv_countdown := 15,
689 dl_tbf_ext := 250 * 10, /* ms */
690 ul_tbf_ext := 250 * 10, /* ms */
691 initial_cs := 2,
692 initial_mcs := 6,
693 nsvci := { nsvci, 0 },
694 local_pprt := { local_port, 0 },
695 remote_port := { remote_port, 0 },
Harald Welte07e8dde2019-02-18 20:38:45 +0100696 remote_ip := { remote_ip , '00000000'O }
Harald Weltee1fd9162019-02-18 19:47:53 +0100697 }
698 }
699}
Harald Welted378a252018-03-13 17:02:14 +0100700template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?,
701 template PCUIF_Flags flags := ?,
702 template uint32_t version := PCU_IF_VERSION) := {
703 msg_type := PCU_IF_MSG_INFO_IND,
704 bts_nr := bts_nr,
705 spare := ?,
706 u := {
707 info_ind := {
708 version := version,
709 flags := flags,
710 trx := ?,
711 bsic := ?,
712 mcc := ?,
713 mnc :=?,
Harald Welte3568dc72018-03-13 17:06:51 +0100714 mnc_3_digits := ?,
Harald Welted378a252018-03-13 17:02:14 +0100715 lac := ?,
716 rac := ?,
717 nsei := ?,
718 nse_timer := ?,
719 cell_timer := ?,
720 cell_id := ?,
721 repeat_time := ?,
722 repeat_count := ?,
723 bvci := ?,
724 t3142 := ?,
725 t3169 := ?,
726 t3191 := ?,
727 t3193_10ms := ?,
728 t3195 := ?,
729 t3101 := ?,
730 t3103 := ?,
731 t3105 := ?,
732 cv_countdown := ?,
733 dl_tbf_ext := ?,
734 ul_tbf_ext := ?,
735 initial_cs := ?,
736 initial_mcs := ?,
737 nsvci := ?,
738 local_pprt := ?,
739 remote_port := ?,
740 remote_ip := ?
741 }
742 }
743}
744
Harald Welte883340c2018-02-28 18:59:29 +0100745
746} with { encode "RAW" variant "BYTEORDER(first)" };