blob: 129f4413ac644e06bd06d2f3eca98844d057d96a [file] [log] [blame]
Harald Welte643e2a62017-11-27 15:03:18 +01001module RSL_Types {
2
3 import from General_Types all;
4 import from Osmocom_Types all;
5 import from GSM_Types all;
6
7 /* Section 9.1 */
8 type enumerated RSL_MessageGroup {
9 RSL_MDISC_RESERVED ('0000000'B),
10 RSL_MDISC_RLL ('0000001'B),
11 RSL_MDISC_DCHAN ('0000100'B),
12 RSL_MDISC_CCHAN ('0000110'B),
13 RSL_MDISC_TRX_MGMT ('0001000'B),
14 RSL_MDISC_LCS ('0010000'B),
15 RSL_MDISC_IPACCESS ('0111111'B)
16 } with { variant "FIELDLENGTH(7)" };
17
18 /* Section 9.1 */
19 type record RSL_MessageDiscriminator {
20 RSL_MessageGroup msg_group,
21 boolean transparent
22 } with { variant "FIELDORDER(msb)" };
23
24 template RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := {
25 msg_group := mg,
26 transparent := t
27 }
28
29 /* Section 9.2 */
30 type enumerated RSL_MessageType {
31 /* Radio Link Layer Management */
32 RSL_MT_DATA_REQ ('00000001'B),
33 RSL_MT_DATA_IND ('00000010'B),
34 RSL_MT_ERROR_IND ('00000011'B),
35 RSL_MT_EST_REQ ('00000100'B),
36 RSL_MT_EST_CONF ('00000101'B),
37 RSL_MT_EST_IND ('00000110'B),
38 RSL_MT_REL_REQ ('00000111'B),
39 RSL_MT_REL_CONF ('00001000'B),
40 RSL_MT_REL_IND ('00001001'B),
41 RSL_MT_UNIT_DATA_REQ ('00001010'B),
42 RSL_MT_UNIT_DATA_IND ('00001011'B),
43
44 /* non-standard below */
45 RSL_MT_SUSP_REQ ('00001100'B),
46 RSL_MT_SUSP_CONF ('00001101'B),
47 RSL_MT_RES_REQ ('00001110'B),
48 RSL_MT_RECON_REQ ('00001111'B),
49
50 /* Common Channel Management / TRX Management */
51 RSL_MT_BCCH_INFO ('00010001'B),
52 RSL_MT_CCCH_LOAD_IND,
53 RSL_MT_CHAN_RQD,
54 RSL_MT_DELETE_IND,
55 RSL_MT_PAGING_CMD,
56 RSL_MT_IMMEDIATE_ASSIGN_CMD,
57 RSL_MT_SMS_BC_REQ,
58 RSL_MT_CHAN_CONF, /* non-standard element */
59 /* empty */
60 RSL_MT_RF_RES_IND ('00011001'B),
61 RSL_MT_SACCH_FILL,
62 RSL_MT_OVERLOAD,
63 RSL_MT_ERROR_REPORT,
64 RSL_MT_SMS_BC_CMD,
65 RSL_MT_CBCH_LOAD_IND,
66 RSL_MT_NOT_CMD,
67
68 /* Dedicate Channel Management */
69 RSL_MT_CHAN_ACTIV ('00100001'B),
70 RSL_MT_CHAN_ACTIV_ACK,
71 RSL_MT_CHAN_ACTIV_NACK,
72 RSL_MT_CONN_FAIL,
73 RSL_MT_DEACTIVATE_SACCH,
74 RSL_MT_ENCR_CMD,
75 RSL_MT_HANDO_DET,
76 RSL_MT_MEAS_RES,
77 RSL_MT_MODE_MODIFY_REQ,
78 RSL_MT_MODE_MODIFY_ACK,
79 RSL_MT_MODE_MODIFY_NACK,
80 RSL_MT_PHY_CONTEXT_REQ,
81 RSL_MT_PHY_CONTEXT_CONF,
82 RSL_MT_RF_CHAN_REL,
83 RSL_MT_MS_POWER_CONTROL,
84 RSL_MT_BS_POWER_CONTROL, /* 0x30 */
85 RSL_MT_PREPROC_CONFIG,
86 RSL_MT_PREPROC_MEAS_RES,
87 RSL_MT_RF_CHAN_REL_ACK,
88 RSL_MT_SACCH_INFO_MODIFY,
89 RSL_MT_TALKER_DET,
90 RSL_MT_LISTENER_DET,
91 RSL_MT_REMOTE_CODEC_CONF_REP,
92 RSL_MT_RTD_REP,
93 RSL_MT_PRE_HANDO_NOTIF,
94 RSL_MT_MR_CODEC_MOD_REQ,
95 RSL_MT_MR_CODEC_MOD_ACK,
96 RSL_MT_MR_CODEC_MOD_NACK,
97 RSL_MT_MR_CODEC_MOD_PER,
98 RSL_MT_TFO_REP,
99 RSL_MT_TFO_MOD_REQ, /* 0x3f */
100
101 RSL_MT_LOCATION_INFO ('01000001'B),
102
103 /* ip.access specific RSL message types */
104 RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B),
105
106 RSL_MT_IPAC_PDCH_ACT ('01001000'B),
107 RSL_MT_IPAC_PDCH_ACT_ACK,
108 RSL_MT_IPAC_PDCH_ACT_NACK,
109 RSL_MT_IPAC_PDCH_DEACT ('01001011'B),
110 RSL_MT_IPAC_PDCH_DEACT_ACK,
111 RSL_MT_IPAC_PDCH_DEACT_NACK,
112
113 RSL_MT_IPAC_CONNECT_MUX ('01010000'B),
114 RSL_MT_IPAC_CONNECT_MUX_ACK,
115 RSL_MT_IPAC_CONNECT_MUX_NACK,
116 RSL_MT_IPAC_BIND_MUX,
117 RSL_MT_IPAC_BIND_MUX_ACK,
118 RSL_MT_IPAC_BIND_MUX_NACK,
119 RSL_MT_IPAC_DISC_MUX,
120 RSL_MT_IPAC_DISC_MUX_ACK,
121 RSL_MT_IPAC_DISC_MUX_NACK,
122 RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B),
123 RSL_MT_IPAC_HO_CAN_ENQ,
124 RSL_MT_IPAC_HO_CAN_RES,
125 RSL_MT_IPAC_CRCX,
126 RSL_MT_IPAC_CRCX_ACK,
127 RSL_MT_IPAC_CRCX_NACK,
128 RSL_MT_IPAC_MDCX,
129 RSL_MT_IPAC_MDCX_ACK,
130 RSL_MT_IPAC_MDCX_NACK,
131 RSL_MT_IPAC_DLCX_IND,
132 RSL_MT_IPAC_DLCX,
133 RSL_MT_IPAC_DLCX_ACK,
134 RSL_MT_IPAC_DLCX_NACK
135 } with { variant "FIELDLENGTH(8)" };
136
137 /*! RSL Information Element Identifiers (Chapter 9.3) */
138 type enumerated RSL_IE_Type {
139 RSL_IE_CHAN_NR ('00000001'B),
140 RSL_IE_LINK_IDENT,
141 RSL_IE_ACT_TYPE,
142 RSL_IE_BS_POWER,
143 RSL_IE_CHAN_IDENT,
144 RSL_IE_CHAN_MODE,
145 RSL_IE_ENCR_INFO,
146 RSL_IE_FRAME_NUMBER,
147 RSL_IE_HANDO_REF,
148 RSL_IE_L1_INFO,
149 RSL_IE_L3_INFO,
150 RSL_IE_MS_IDENTITY,
151 RSL_IE_MS_POWER,
152 RSL_IE_PAGING_GROUP,
153 RSL_IE_PAGING_LOAD,
154 RSL_IE_PYHS_CONTEXT,
155 RSL_IE_ACCESS_DELAY,
156 RSL_IE_RACH_LOAD,
157 RSL_IE_REQ_REFERENCE,
158 RSL_IE_RELEASE_MODE,
159 RSL_IE_RESOURCE_INFO,
160 RSL_IE_RLM_CAUSE,
161 RSL_IE_STARTNG_TIME,
162 RSL_IE_TIMING_ADVANCE,
163 RSL_IE_UPLINK_MEAS,
164 RSL_IE_CAUSE,
165 RSL_IE_MEAS_RES_NR,
166 RSL_IE_MSG_ID,
167 /* reserved */
168 RSL_IE_SYSINFO_TYPE ('00011110'B),
169 RSL_IE_MS_POWER_PARAM,
170 RSL_IE_BS_POWER_PARAM,
171 RSL_IE_PREPROC_PARAM,
172 RSL_IE_PREPROC_MEAS,
173 RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */
174 RSL_IE_SMSCB_INFO,
175 RSL_IE_MS_TIMING_OFFSET,
176 RSL_IE_ERR_MSG,
177 RSL_IE_FULL_BCCH_INFO,
178 RSL_IE_CHAN_NEEDED,
179 RSL_IE_CB_CMD_TYPE,
180 RSL_IE_SMSCB_MSG,
181 RSL_IE_FULL_IMM_ASS_INFO,
182 RSL_IE_SACCH_INFO,
183 RSL_IE_CBCH_LOAD_INFO,
184 RSL_IE_SMSCB_CHAN_INDICATOR,
185 RSL_IE_GROUP_CALL_REF,
186 RSL_IE_CHAN_DESC,
187 RSL_IE_NCH_DRX_INFO,
188 RSL_IE_CMD_INDICATOR,
189 RSL_IE_EMLPP_PRIO,
190 RSL_IE_UIC,
191 RSL_IE_MAIN_CHAN_REF,
192 RSL_IE_MR_CONFIG,
193 RSL_IE_MR_CONTROL,
194 RSL_IE_SUP_CODEC_TYPES,
195 RSL_IE_CODEC_CONFIG,
196 RSL_IE_RTD,
197 RSL_IE_TFO_STATUS,
198 RSL_IE_LLP_APDU,
199
200 /* ip.access */
201 RSL_IE_IPAC_SRTP_CONFIG ('11100000'B),
202 RSL_IE_IPAC_PROXY_UDP,
203 RSL_IE_IPAC_BSCMPL_TOUT,
204
205 RSL_IE_IPAC_REMOTE_IP ('11110000'B),
206 RSL_IE_IPAC_REMOTE_PORT,
207 RSL_IE_IPAC_RTP_PAYLOAD,
208 RSL_IE_IPAC_LOCAL_PORT,
209 RSL_IE_IPAC_SPEECH_MODE,
210 RSL_IE_IPAC_LOCAL_IP,
211 RSL_IE_IPAC_CONN_STAT,
212 RSL_IE_IPAC_HO_C_PARMS,
213 RSL_IE_IPAC_CONN_ID,
214 RSL_IE_IPAC_RTP_CSD_FMT,
215 RSL_IE_IPAC_RTP_JIT_BUF,
216 RSL_IE_IPAC_RTP_COMPR,
217 RSL_IE_IPAC_RTP_PAYLOAD2,
218 RSL_IE_IPAC_RTP_MPLEX,
219 RSL_IE_IPAC_RTP_MPLEX_ID
220 } with { variant "FIELDLENGTH(8)" };
221
222 type record RSL_LV {
223 uint8_t len,
224 octetstring payload
225 } with { variant (len) "LENGTHTO(payload)" }
226
227 template RSL_LV ts_RSL_LV(template octetstring pl) := {
228 len := 0,
229 payload := pl
230 }
231
232 type record RSL_IE_V {
233 uint8_t val
234 }
235
236 /* 9.3.3 */
237 type record RSL_IE_ActivationType {
238 boolean reactivation,
239 uint4_t reserved,
240 uint3_t a_bits
241 }
242
243 template RSL_IE_ActivationType t_RSL_IE_ActType := {
244 reactivation := false,
245 reserved := 0,
246 a_bits := 0 /* related to immediate assignment */
247 }
248
249 /* 9.3.6 */
250 type enumerated RSL_SpeechDataInd {
251 RSL_SPDI_SPEECH ('00000001'B),
252 RSL_SPDI_DATA ('00000010'B),
253 RSL_SPDI_SIGN ('00000011'B)
254 } with { variant "FIELDLENGTH(8)" };
255 type enumerated RSL_ChanRateType {
256 RSL_CHRT_SDCCH ('00000001'B),
257 RSL_CHRT_TCH_F ('00001000'B),
258 RSL_CHRT_TCH_H ('00001001'B),
259 RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B),
260 RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B),
261 RSL_CHRT_TCH_F_GROUP ('00011000'B),
262 RSL_CHRT_TCH_H_GROUP ('00011001'B),
263 RSL_CHRT_TCH_F_BCAST ('00101000'B),
264 RSL_CHRT_TCH_H_BCAST ('00101001'B)
265 } with { variant "FIELDLENGTH(8)" };
266 type enumerated RSL_SpeechAlgo {
267 RSL_CMOD_NO_RESOURCE ('00000000'B),
268 RSL_CMOD_SP_GSM1 ('00000001'B),
269 RSL_CMOD_SP_GSM2 ('00010001'B),
270 RSL_CMOD_SP_GSM3 ('00100001'B),
271 RSL_CMOD_SP_GSM4 ('00110001'B),
272 RSL_CMOD_SP_GSM5 ('00001001'B),
273 RSL_CMOD_SP_GSM6 ('00001101'B)
274 } with { variant "FIELDLENGTH(8)" };
275 type record RSL_IE_ChannelMode {
276 BIT6 reserved,
277 boolean dtx_d,
278 boolean dtx_u,
279 RSL_SpeechDataInd spd_ind,
280 RSL_ChanRateType ch_rate_type,
281 RSL_SpeechAlgo coding_alg_rate
282 }
283
284 template RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN := {
285 reserved := '000000'B,
286 dtx_d := false,
287 dtx_u := false,
288 spd_ind := RSL_SPDI_SIGN,
289 ch_rate_type := RSL_CHRT_SDCCH,
290 coding_alg_rate := RSL_CMOD_NO_RESOURCE
291 }
292
293 template RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg) := {
294 reserved := '000000'B,
295 dtx_d := false,
296 dtx_u := false,
297 spd_ind := RSL_SPDI_SPEECH,
298 ch_rate_type := t,
299 coding_alg_rate := alg
300 }
301
302 /* 9.3.4 */
303 type record RSL_IE_BS_Power {
304 uint1_t reserved,
305 boolean epc,
306 boolean fpc,
307 uint5_t power_level
308 }
309
310 /* 9.3.8 */
311 type record RSL_IE_FrameNumber {
312 uint5_t t1_p,
313 uint6_t t3,
314 uint5_t t2
315 }
316 type RSL_IE_FrameNumber RSL_IE_StartingTime;
317
318 /* 9.3.10 */
319 type record RSL_IE_L1Info {
320 uint5_t ms_power_lvl,
321 boolean fpc,
322 uint2_t reserved,
323 uint8_t actual_ta
324 }
325
326 /* 9.3.13 */
327 type record RSL_IE_MS_Power {
328 uint2_t reserved,
329 boolean fpc_epc,
330 uint5_t power_level
331 }
332
333 /* 9.3.19 */
334 type record RSL_IE_RequestRef {
335 OCT1 ra,
336 RSL_IE_FrameNumber frame_nr
337 }
338
339 /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */
340 template RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := {
341 t1_p := (fn / 1326) mod 32,
342 t3 := fn mod 51,
343 t2 := fn mod 26
344 }
345
346 template RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := {
347 ra := ra,
348 frame_nr := ts_RSL_IE_FrameNumber(frame_nr)
349 }
350
351 /* 9.3.26 */
352 type uint7_t RSL_Cause;
353 type record RSL_IE_Cause {
354 uint1_t e,
355 RSL_Cause cause,
356 octetstring cause_ext optional
357 }
358
359 template RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := {
360 e := 0,
361 cause := cause,
362 cause_ext := omit
363 }
364
365 /* 9.3.40 */
366 type enumerated RSL_ChanNeeded {
367 RSL_CHANNEED_ANY ('00'B),
368 RSL_CHANNEED_SDCCH ('01'B),
369 RSL_CHANNEED_TCH_F ('10'B),
370 RSL_CHANNEED_TCH_ForH ('11'B)
371 }
372 type record RSL_IE_ChanNeeded {
373 uint6_t reserved,
374 RSL_ChanNeeded chan_needed
375 }
376
377 /* 9.3.53 */
378 type record RSL_IE_MultirateCtrl {
379 uint3_t spare,
380 boolean od,
381 boolean pre,
382 uint2_t rae,
383 boolean tfo
384 }
385
386 type enumerated RSL_IE_SysinfoType {
387 RSL_SYSTEM_INFO_8 ('00000000'B),
388 RSL_SYSTEM_INFO_1 ('00000001'B),
389 RSL_SYSTEM_INFO_2 ('00000010'B),
390 RSL_SYSTEM_INFO_3 ('00000011'B),
391 RSL_SYSTEM_INFO_4 ('00000100'B),
392 RSL_SYSTEM_INFO_5 ('00000101'B),
393 RSL_SYSTEM_INFO_6 ('00000110'B),
394 RSL_SYSTEM_INFO_7 ('00000111'B),
395 RSL_SYSTEM_INFO_16 ('00001000'B),
396 RSL_SYSTEM_INFO_17 ('00001001'B),
397 RSL_SYSTEM_INFO_2bis ('00001010'B),
398 RSL_SYSTEM_INFO_2ter ('00001011'B),
399 RSL_SYSTEM_INFO_5bis ('00001101'B),
400 RSL_SYSTEM_INFO_5ter ('00001110'B),
401 RSL_SYSTEM_INFO_10 ('00001111'B),
402 RSL_EXT_MEAS_ORDER ('01000111'B),
403 RSL_MEAS_INFO ('01001000'B),
404 RSL_SYSTEM_INFO_13 ('00101000'B),
405 RSL_ERIC_SYSTEM_INFO_13 ('00001100'B),
406 RSL_SYSTEM_INFO_2quater ('00101001'B),
407 RSL_SYSTEM_INFO_9 ('00101010'B),
408 RSL_SYSTEM_INFO_18 ('00101011'B),
409 RSL_SYSTEM_INFO_19 ('00101100'B),
410 RSL_SYSTEM_INFO_20 ('00101101'B)
411 } with { variant "FIELDLENGTH(8)" }
412
413 /* union of all IE bodies */
414 type union RSL_IE_Body {
415 RslChannelNr chan_nr,
416 RslLinkId link_id,
417 RSL_LV l3_info,
418 RSL_LV rlm_cause,
419 uint8_t release_mode,
420 RSL_IE_ActivationType act_type,
421 RSL_IE_ChannelMode chan_mode,
422 uint8_t handover_ref,
423 RSL_IE_BS_Power bs_power,
424 RSL_IE_MS_Power ms_power,
425 uint8_t timing_adv,
426 RSL_IE_MultirateCtrl multirate_ctrl,
427 RSL_IE_FrameNumber frame_nr,
428 RSL_IE_Cause cause,
429 uint8_t access_delay,
430 uint8_t meas_res_nr,
431 RSL_IE_L1Info l1_info,
432 RSL_IE_SysinfoType sysinfo_type,
433 uint16_t paging_load,
434 uint8_t paging_group,
435 RSL_IE_ChanNeeded chan_needed,
436 RSL_IE_StartingTime starting_time,
437 RSL_IE_RequestRef req_ref,
438 RSL_LV full_imm_ass_info,
439
440 RSL_LV other
441 }
442
443 type record RSL_IE {
444 RSL_IE_Type iei,
445 RSL_IE_Body body
446 } with { variant (body) "CROSSTAG(
447 chan_nr, iei = RSL_IE_CHAN_NR;
448 link_id, iei = RSL_IE_LINK_IDENT;
449 l3_info, iei = RSL_IE_L3_INFO;
450 rlm_cause, iei = RSL_IE_RLM_CAUSE;
451 release_mode, iei = RSL_IE_RELEASE_MODE;
452 act_type, iei = RSL_IE_ACT_TYPE;
453 chan_mode, iei = RSL_IE_CHAN_MODE;
454 handover_ref, iei = RSL_IE_HANDO_REF;
455 bs_power, iei = RSL_IE_BS_POWER;
456 ms_power, iei = RSL_IE_MS_POWER;
457 timing_adv, iei = RSL_IE_TIMING_ADVANCE;
458 multirate_ctrl, iei = RSL_IE_MR_CONTROL;
459
460 frame_nr, iei = RSL_IE_FRAME_NUMBER;
461 cause, iei = RSL_IE_CAUSE;
462 access_delay, iei = RSL_IE_ACCESS_DELAY;
463 meas_res_nr, iei = RSL_IE_MEAS_RES_NR;
464 l1_info, iei = RSL_IE_L1_INFO;
465 sysinfo_type, iei = RSL_IE_SYSINFO_TYPE;
466 paging_load, iei = RSL_IE_PAGING_LOAD;
467 paging_group, iei = RSL_IE_PAGING_GROUP;
468 chan_needed, iei = RSL_IE_CHAN_NEEDED;
469 starting_time, iei = RSL_IE_STARTNG_TIME;
470
471 req_ref, iei = RSL_IE_REQ_REFERENCE;
472
473 other, OTHERWISE;
474 )" };
475
476 template RSL_IE t_RSL_IE(template RSL_IE_Body body) := {
477 iei := RSL_IE_CHAN_NR, /* overwritten? */
478 body := body
479 }
480
481 type record of RSL_IE RSL_IE_List;
482
483 type record RSL_Message {
484 RSL_MessageDiscriminator msg_disc,
485 RSL_MessageType msg_type,
486 RSL_IE_List ies optional
487 }
488
489 external function enc_RSL_Message(in RSL_Message msg) return octetstring
490 with { extension "prototype(convert) encode(RAW)" };
491 external function dec_RSL_Message(in octetstring stream) return RSL_Message
492 with { extension "prototype(convert) decode(RAW)" };
493
494 template RSL_Message tr_RSL_MsgType(RSL_MessageDiscriminator m_disc,
495 RSL_MessageType m_type) := {
496 msg_disc := m_disc,
497 msg_type := m_type,
498 ies := *
499 }
500
501 /* 8.3.1 BSC -> BTS */
502 template RSL_Message ts_RSL_DATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := {
503 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true),
504 msg_type := RSL_MT_DATA_REQ,
505 ies :={
506 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
507 t_RSL_IE(RSL_IE_Body:{link_id := link_id}),
508 t_RSL_IE(RSL_IE_Body:{l3_info := ts_RSL_LV(l3_info)})
509 }
510 }
511
512 /* 8.3.2 BTS -> BSC */
513 template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := {
514 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true),
515 msg_type := RSL_MT_DATA_IND,
516 ies :={
517 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
518 t_RSL_IE(RSL_IE_Body:{link_id := link_id}),
519 t_RSL_IE(RSL_IE_Body:{l3_info := ts_RSL_LV(l3_info)})
520 }
521 }
522
523 /* 8.3.3 BTS -> BSC */
524 template RSL_Message ts_RSL_ERROR_IND(RslChannelNr chan_nr, RslLinkId link_id, RSL_Cause cause) := {
525 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false),
526 msg_type := RSL_MT_ERROR_IND,
527 ies :={
528 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
529 t_RSL_IE(RSL_IE_Body:{link_id := link_id}),
530 t_RSL_IE(RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)})
531 }
532 }
533
534 /* 8.3.6 BTS -> BSC */
535 template RSL_Message ts_RSL_EST_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := {
536 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false),
537 msg_type := RSL_MT_EST_IND,
538 ies := {
539 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
540 t_RSL_IE(RSL_IE_Body:{link_id := link_id}),
541 t_RSL_IE(RSL_IE_Body:{l3_info := ts_RSL_LV(l3_info)})
542 }
543 }
544
545 /* 8.3.7 BSC -> BTS */
546 template RSL_Message ts_RSL_REL_REQ(RslChannelNr chan_nr, RslLinkId link_id) := {
547 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false),
548 msg_type := RSL_MT_REL_REQ,
549 ies :={
550 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
551 t_RSL_IE(RSL_IE_Body:{link_id := link_id})
552 }
553 }
554
555 /* 8.3.8 BTS -> BSC */
556 template RSL_Message ts_RSL_REL_CONF(RslChannelNr chan_nr, RslLinkId link_id) := {
557 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false),
558 msg_type := RSL_MT_REL_CONF,
559 ies :={
560 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
561 t_RSL_IE(RSL_IE_Body:{link_id := link_id})
562 }
563 }
564
565 /* 8.3.9 BTS -> BSC */
566 template RSL_Message ts_RSL_REL_IND(RslChannelNr chan_nr, RslLinkId link_id) := {
567 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false),
568 msg_type := RSL_MT_REL_IND,
569 ies :={
570 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
571 t_RSL_IE(RSL_IE_Body:{link_id := link_id})
572 }
573 }
574
575 /* 8.3.10 BSC -> BTS */
576 template RSL_Message ts_RSL_UNITDATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info)
577 modifies ts_RSL_DATA_REQ := {
578 msg_type := RSL_MT_UNIT_DATA_REQ
579 }
580
581 /* 8.3.11 BTS -> BSC */
582 template RSL_Message ts_RSL_UNITDATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info)
583 modifies ts_RSL_DATA_IND := {
584 msg_type := RSL_MT_UNIT_DATA_IND
585 }
586
587
588 /* DEDICATED CANNEL MANAGEMENT MESSAGES */
589
590 /* 8.4.1 BSC -> BTS */
591 template RSL_Message ts_RSL_CHAN_ACT(RslChannelNr chan_nr, RSL_IE_ChannelMode mode) := {
592 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
593 msg_type := RSL_MT_CHAN_ACTIV,
594 ies :={
595 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
596 t_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType}),
597 t_RSL_IE(RSL_IE_Body:{chan_mode := mode})
598 /* lots of optional IEs */
599 }
600 }
601
602 /* 8.4.2 BTS -> BSC */
603 template RSL_Message ts_RSL_CHAN_ACT_ACK(RslChannelNr chan_nr, GsmFrameNumber fn) := {
604 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
605 msg_type := RSL_MT_CHAN_ACTIV_ACK,
606 ies :={
607 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
608 t_RSL_IE(RSL_IE_Body:{frame_nr := ts_RSL_IE_FrameNumber(fn)})
609 }
610 }
611
612 /* 8.4.3 BTS -> BSC */
613 template RSL_Message ts_RSL_CHAN_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := {
614 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
615 msg_type := RSL_MT_CHAN_ACTIV_NACK,
616 ies :={
617 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
618 t_RSL_IE(RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)})
619 }
620 }
621
622 /* 8.4.4 BTS -> BSC */
623 template RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := {
624 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false),
625 msg_type := RSL_MT_CONN_FAIL,
626 ies :={
627 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
628 t_RSL_IE(RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)})
629 }
630 }
631
632 /* 8.4.11 BTS -> BSC */
633 template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause)
634 modifies ts_RSL_CHAN_ACT_NACK := {
635 msg_type := RSL_MT_MODE_MODIFY_NACK
636 }
637
638 /* COMMON CHANNEL MANAGEMENT MESSAGES */
639
640 /* 8.5.3 BTS -> BSC */
641 template RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn) := {
642 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
643 msg_type := RSL_MT_CHAN_RQD,
644 ies := {
645 t_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}),
646 t_RSL_IE(RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)})
647 }
648 }
649
650 /* 8.5.4 BTS -> BSC */
651 template RSL_Message ts_DELETE_IND(RslChannelNr chan_nr, octetstring imm_ass) := {
652 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
653 msg_type := RSL_MT_DELETE_IND,
654 ies := {
655 t_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}),
656 t_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(imm_ass)})
657 }
658 }
659
660 /* 8.6.4 BTS -> BSC */
661 template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := {
662 msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false),
663 msg_type := RSL_MT_ERROR_IND,
664 ies := {
665 t_RSL_IE(RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)})
666 }
667 }
668
669} with { encode "RAW" ; variant "FIELDORDER(msb)" }