| module RSL_Types { |
| |
| /* GSUP_Types, defining abstract TTCN-3 data types for the A-bis RSL protocol. |
| * |
| * RSL is a 3GPP standard protocol used between BTS and BSC in a GSM network. |
| * |
| * (C) 2017 by Harald Welte <laforge@gnumonks.org> |
| * All rights reserved. |
| * |
| * Released under the terms of GNU General Public License, Version 2 or |
| * (at your option) any later version. |
| */ |
| |
| import from General_Types all; |
| import from Osmocom_Types all; |
| import from GSM_Types all; |
| |
| /* Section 9.1 */ |
| type enumerated RSL_MessageGroup { |
| RSL_MDISC_RESERVED ('0000000'B), |
| RSL_MDISC_RLL ('0000001'B), |
| RSL_MDISC_DCHAN ('0000100'B), |
| RSL_MDISC_CCHAN ('0000110'B), |
| RSL_MDISC_TRX_MGMT ('0001000'B), |
| RSL_MDISC_LCS ('0010000'B), |
| RSL_MDISC_IPACCESS ('0111111'B) |
| } with { variant "FIELDLENGTH(7)" }; |
| |
| /* Section 9.1 */ |
| type record RSL_MessageDiscriminator { |
| RSL_MessageGroup msg_group, |
| boolean transparent |
| } with { variant "FIELDORDER(msb)" }; |
| |
| template RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := { |
| msg_group := mg, |
| transparent := t |
| } |
| |
| /* Section 9.2 */ |
| type enumerated RSL_MessageType { |
| /* Radio Link Layer Management */ |
| RSL_MT_DATA_REQ ('00000001'B), |
| RSL_MT_DATA_IND ('00000010'B), |
| RSL_MT_ERROR_IND ('00000011'B), |
| RSL_MT_EST_REQ ('00000100'B), |
| RSL_MT_EST_CONF ('00000101'B), |
| RSL_MT_EST_IND ('00000110'B), |
| RSL_MT_REL_REQ ('00000111'B), |
| RSL_MT_REL_CONF ('00001000'B), |
| RSL_MT_REL_IND ('00001001'B), |
| RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| RSL_MT_UNIT_DATA_IND ('00001011'B), |
| |
| /* non-standard below */ |
| RSL_MT_SUSP_REQ ('00001100'B), |
| RSL_MT_SUSP_CONF ('00001101'B), |
| RSL_MT_RES_REQ ('00001110'B), |
| RSL_MT_RECON_REQ ('00001111'B), |
| |
| /* Common Channel Management / TRX Management */ |
| RSL_MT_BCCH_INFO ('00010001'B), |
| RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| RSL_MT_CHAN_RQD ('00010011'B), |
| RSL_MT_DELETE_IND ('00010100'B), |
| RSL_MT_PAGING_CMD ('00010101'B), |
| RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| RSL_MT_SMS_BC_REQ ('00010111'B), |
| RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
| /* empty */ |
| RSL_MT_RF_RES_IND ('00011001'B), |
| RSL_MT_SACCH_FILL ('00011010'B), |
| RSL_MT_OVERLOAD ('00011011'B), |
| RSL_MT_ERROR_REPORT ('00011100'B), |
| RSL_MT_SMS_BC_CMD ('00011101'B), |
| RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| RSL_MT_NOT_CMD ('00011111'B), |
| |
| /* Dedicate Channel Management */ |
| RSL_MT_CHAN_ACTIV ('00100001'B), |
| RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| RSL_MT_CONN_FAIL ('00100100'B), |
| RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| RSL_MT_ENCR_CMD ('00100110'B), |
| RSL_MT_HANDO_DET ('00100111'B), |
| RSL_MT_MEAS_RES ('00101000'B), |
| RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| RSL_MT_RF_CHAN_REL ('00101110'B), |
| RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| RSL_MT_PREPROC_CONFIG ('00110001'B), |
| RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| RSL_MT_TALKER_DET ('00110101'B), |
| RSL_MT_LISTENER_DET ('00110110'B), |
| RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| RSL_MT_RTD_REP ('00111000'B), |
| RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| RSL_MT_TFO_REP ('00111110'B), |
| RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
| |
| RSL_MT_LOCATION_INFO ('01000001'B), |
| |
| /* ip.access specific RSL message types */ |
| RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| |
| RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
| RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
| RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
| RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
| |
| RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
| RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
| RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
| RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| RSL_MT_IPAC_CRCX ('01110000'B), |
| RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| RSL_MT_IPAC_MDCX ('01110011'B), |
| RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| RSL_MT_IPAC_DLCX ('01110111'B), |
| RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
| RSL_MT_IPAC_DLCX_NACK ('01111001'B) |
| } with { variant "FIELDLENGTH(8)" }; |
| |
| /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| type enumerated RSL_IE_Type { |
| RSL_IE_CHAN_NR ('00000001'B), |
| RSL_IE_LINK_IDENT ('00000010'B), |
| RSL_IE_ACT_TYPE ('00000011'B), |
| RSL_IE_BS_POWER ('00000100'B), |
| RSL_IE_CHAN_IDENT ('00000101'B), |
| RSL_IE_CHAN_MODE ('00000110'B), |
| RSL_IE_ENCR_INFO ('00000111'B), |
| RSL_IE_FRAME_NUMBER ('00001000'B), |
| RSL_IE_HANDO_REF ('00001001'B), |
| RSL_IE_L1_INFO ('00001010'B), |
| RSL_IE_L3_INFO ('00001011'B), |
| RSL_IE_MS_IDENTITY ('00001100'B), |
| RSL_IE_MS_POWER ('00001101'B), |
| RSL_IE_PAGING_GROUP ('00001110'B), |
| RSL_IE_PAGING_LOAD ('00001111'B), |
| RSL_IE_PYHS_CONTEXT ('00010000'B), |
| RSL_IE_ACCESS_DELAY ('00010001'B), |
| RSL_IE_RACH_LOAD ('00010010'B), |
| RSL_IE_REQ_REFERENCE ('00010011'B), |
| RSL_IE_RELEASE_MODE ('00010100'B), |
| RSL_IE_RESOURCE_INFO ('00010101'B), |
| RSL_IE_RLM_CAUSE ('00010110'B), |
| RSL_IE_STARTNG_TIME ('00010111'B), |
| RSL_IE_TIMING_ADVANCE ('00011000'B), |
| RSL_IE_UPLINK_MEAS ('00011001'B), |
| RSL_IE_CAUSE ('00011010'B), |
| RSL_IE_MEAS_RES_NR ('00011011'B), |
| RSL_IE_MSG_ID ('00011100'B), |
| /* reserved */ |
| RSL_IE_SYSINFO_TYPE ('00011110'B), |
| RSL_IE_MS_POWER_PARAM ('00011111'B), |
| RSL_IE_BS_POWER_PARAM ('00100000'B), |
| RSL_IE_PREPROC_PARAM ('00100001'B), |
| RSL_IE_PREPROC_MEAS ('00100010'B), |
| RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| RSL_IE_SMSCB_INFO ('00100100'B), |
| RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| RSL_IE_ERR_MSG ('00100110'B), |
| RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| RSL_IE_CHAN_NEEDED ('00101000'B), |
| RSL_IE_CB_CMD_TYPE ('00101001'B), |
| RSL_IE_SMSCB_MSG ('00101010'B), |
| RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| RSL_IE_SACCH_INFO ('00101100'B), |
| RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| RSL_IE_GROUP_CALL_REF ('00101111'B), |
| RSL_IE_CHAN_DESC ('00110000'B), |
| RSL_IE_NCH_DRX_INFO ('00110001'B), |
| RSL_IE_CMD_INDICATOR ('00110010'B), |
| RSL_IE_EMLPP_PRIO ('00110011'B), |
| RSL_IE_UIC ('00110100'B), |
| RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| RSL_IE_MR_CONFIG ('00110110'B), |
| RSL_IE_MR_CONTROL ('00110111'B), |
| RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| RSL_IE_CODEC_CONFIG ('00111001'B), |
| RSL_IE_RTD ('00111010'B), |
| RSL_IE_TFO_STATUS ('00111011'B), |
| RSL_IE_LLP_APDU ('00111100'B), |
| |
| /* ip.access */ |
| RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
| RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
| |
| RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
| RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| RSL_IE_IPAC_CONN_ID ('11111000'B), |
| RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
| } with { variant "FIELDLENGTH(8)" }; |
| |
| type record RSL_LV { |
| uint8_t len, |
| octetstring payload |
| } with { variant (len) "LENGTHTO(payload)" } |
| |
| template RSL_LV ts_RSL_LV(template octetstring pl) := { |
| len := 0, |
| payload := pl |
| } |
| |
| template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| len := ?, |
| payload := pl |
| } |
| |
| type record RSL_L16V { |
| uint16_t len, |
| octetstring payload |
| } with { variant (len) "LENGTHTO(payload)" } |
| |
| template RSL_L16V ts_RSL_L16V(template octetstring pl) := { |
| len := 0, |
| payload := pl |
| } |
| |
| template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| len := ?, |
| payload := pl |
| } |
| |
| type record RSL_IE_V { |
| uint8_t val |
| } |
| |
| /* 9.3.3 */ |
| type record RSL_IE_ActivationType { |
| boolean reactivation, |
| uint4_t reserved, |
| uint3_t a_bits |
| } |
| |
| template RSL_IE_ActivationType t_RSL_IE_ActType := { |
| reactivation := false, |
| reserved := 0, |
| a_bits := 0 /* related to immediate assignment */ |
| } |
| |
| /* 9.3.6 */ |
| type enumerated RSL_SpeechDataInd { |
| RSL_SPDI_SPEECH ('00000001'B), |
| RSL_SPDI_DATA ('00000010'B), |
| RSL_SPDI_SIGN ('00000011'B) |
| } with { variant "FIELDLENGTH(8)" }; |
| type enumerated RSL_ChanRateType { |
| RSL_CHRT_SDCCH ('00000001'B), |
| RSL_CHRT_TCH_F ('00001000'B), |
| RSL_CHRT_TCH_H ('00001001'B), |
| RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| RSL_CHRT_TCH_F_BCAST ('00101000'B), |
| RSL_CHRT_TCH_H_BCAST ('00101001'B) |
| } with { variant "FIELDLENGTH(8)" }; |
| type enumerated RSL_SpeechAlgo { |
| RSL_CMOD_NO_RESOURCE ('00000000'B), |
| RSL_CMOD_SP_GSM1 ('00000001'B), |
| RSL_CMOD_SP_GSM2 ('00010001'B), |
| RSL_CMOD_SP_GSM3 ('00100001'B), |
| RSL_CMOD_SP_GSM4 ('00110001'B), |
| RSL_CMOD_SP_GSM5 ('00001001'B), |
| RSL_CMOD_SP_GSM6 ('00001101'B) |
| } with { variant "FIELDLENGTH(8)" }; |
| type record RSL_IE_ChannelMode { |
| uint8_t len, |
| BIT6 reserved, |
| boolean dtx_d, |
| boolean dtx_u, |
| RSL_SpeechDataInd spd_ind, |
| RSL_ChanRateType ch_rate_type, |
| RSL_SpeechAlgo coding_alg_rate |
| } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,coding_alg_rate)" } |
| |
| template RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN := { |
| len := 0, /* overwritten */ |
| reserved := '000000'B, |
| dtx_d := false, |
| dtx_u := false, |
| spd_ind := RSL_SPDI_SIGN, |
| ch_rate_type := RSL_CHRT_SDCCH, |
| coding_alg_rate := RSL_CMOD_NO_RESOURCE |
| } |
| |
| template RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg) := { |
| len := 0, /* overwritten */ |
| reserved := '000000'B, |
| dtx_d := false, |
| dtx_u := false, |
| spd_ind := RSL_SPDI_SPEECH, |
| ch_rate_type := t, |
| coding_alg_rate := alg |
| } |
| |
| /* 9.3.4 */ |
| type record RSL_IE_BS_Power { |
| uint1_t reserved, |
| boolean epc, |
| boolean fpc, |
| uint5_t power_level |
| } |
| |
| /* 9.3.7 */ |
| type record RSL_IE_EncryptionInfo { |
| uint8_t len, |
| OCT1 alg_id, |
| octetstring key |
| } with { variant (len) "LENGTHTO(alg_id,key)" }; |
| |
| template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template OCT1 alg, template octetstring key) := { |
| len := ?, |
| alg_id := alg, |
| key := key |
| } |
| |
| /* 9.3.8 */ |
| type record RSL_IE_FrameNumber { |
| uint5_t t1_p, |
| uint6_t t3, |
| uint5_t t2 |
| } |
| type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| |
| /* 9.3.10 */ |
| type record RSL_IE_L1Info { |
| uint5_t ms_power_lvl, |
| boolean fpc, |
| uint2_t reserved, |
| uint8_t actual_ta |
| } |
| |
| /* 9.3.13 */ |
| type record RSL_IE_MS_Power { |
| uint2_t reserved, |
| boolean fpc_epc, |
| uint5_t power_level |
| } |
| |
| /* 9.3.18 */ |
| type record RSL_IE_RachLoad { |
| uint8_t len, |
| uint16_t slot_count, |
| uint16_t busy_count, |
| uint16_t access_count |
| } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| |
| template RSL_IE_RachLoad ts_RSL_IE_RachLoad(uint16_t slot, uint16_t busy, uint16_t acc) := { |
| len := 0, /* overwritten */ |
| slot_count := slot, |
| busy_count := busy, |
| access_count := acc |
| } |
| |
| template RSL_IE_RachLoad tr_RSL_IE_RachLoad(template uint16_t slot, |
| template uint16_t busy, |
| template uint16_t acc) := { |
| len := ?, /* overwritten */ |
| slot_count := slot, |
| busy_count := busy, |
| access_count := acc |
| } |
| |
| /* 9.3.19 */ |
| type record RSL_IE_RequestRef { |
| OCT1 ra, |
| RSL_IE_FrameNumber frame_nr |
| } |
| |
| /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
| template RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
| t1_p := (fn / 1326) mod 32, |
| t3 := fn mod 51, |
| t2 := fn mod 26 |
| } |
| |
| function tr_RSL_IE_FrameNumber(template GsmFrameNumber fn) return template RSL_IE_FrameNumber { |
| if (istemplatekind(fn, "?")) { |
| return ?; |
| } else { |
| return ts_RSL_IE_FrameNumber(valueof(fn)); |
| } |
| } |
| |
| template RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := { |
| ra := ra, |
| frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| } |
| |
| template RSL_IE_RequestRef tr_RSL_IE_ReqRef(template OCT1 ra, template GsmFrameNumber frame_nr) := { |
| ra := ra, |
| frame_nr := tr_RSL_IE_FrameNumber(frame_nr) |
| } |
| |
| /* 9.3.25 */ |
| type record RSL_IE_UplinkMeas { |
| uint8_t len, |
| BIT1 rfu, |
| boolean dtx_d, |
| uint6_t rxlev_f_u, |
| BIT2 reserved1, |
| uint6_t rxlev_s_u, |
| BIT2 reserved2, |
| uint3_t rxq_f_u, |
| uint3_t rxq_s_u, |
| octetstring supp_meas_info optional |
| } with { variant (len) "LENGTHTO(rfu,dtx_d,rxlev_f_u,reserved1,rxlev_s_u,reserved2,rxq_f_u,rxq_s_u,supp_meas_info)" }; |
| |
| /* 9.3.26 */ |
| type enumerated RSL_Cause { |
| /* normal event */ |
| RSL_ERR_RADIO_IF_FAIL ('00'O), |
| RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| RSL_ERR_OM_INTERVENTION ('07'O), |
| RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| /* resource unavailable */ |
| RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| RSL_ERR_RR_UNAVAIL ('21'O), |
| RSL_ERR_TERR_CH_FAIL ('22'O), |
| RSL_ERR_CCCH_OVERLOAD ('23'O), |
| RSL_ERR_ACCH_OVERLOAD ('24'O), |
| RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| RSL_ERR_RES_UNAVAIL ('2f'O), |
| /* service or option not available */ |
| RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| /* service or option not implemented */ |
| RSL_ERR_ENCR_UNIMPL ('40'O), |
| RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| /* invalid message */ |
| RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
| RSL_ERR_INVALID_MESSAGE ('5f'O), |
| /* protocol error */ |
| RSL_ERR_MSG_DISCR ('60'O), |
| RSL_ERR_MSG_TYPE ('61'O), |
| RSL_ERR_MSG_SEQ ('62'O), |
| RSL_ERR_IE_ERROR ('63'O), |
| RSL_ERR_MAND_IE_ERROR ('64'O), |
| RSL_ERR_OPT_IE_ERROR ('65'O), |
| RSL_ERR_IE_NONEXIST ('66'O), |
| RSL_ERR_IE_LENGTH ('67'O), |
| RSL_ERR_IE_CONTENT ('68'O), |
| RSL_ERR_PROTO ('6f'O), |
| /* interworking */ |
| RSL_ERR_INTERWORKING ('7f'O) |
| }; |
| type record RSL_IE_Cause { |
| uint8_t len, |
| uint1_t e, |
| RSL_Cause cause, |
| octetstring cause_ext optional |
| } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
| |
| template RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
| len := 0, /* overwritten */ |
| e := 0, |
| cause := cause, |
| cause_ext := omit |
| } |
| |
| template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| len := ?, |
| e := 0, |
| cause := cause, |
| cause_ext := omit |
| } |
| |
| /* 9.3.40 */ |
| type enumerated RSL_ChanNeeded { |
| RSL_CHANNEED_ANY ('00'B), |
| RSL_CHANNEED_SDCCH ('01'B), |
| RSL_CHANNEED_TCH_F ('10'B), |
| RSL_CHANNEED_TCH_ForH ('11'B) |
| } with { variant "FIELDLENGTH(2)" }; |
| type record RSL_IE_ChanNeeded { |
| uint6_t reserved, |
| RSL_ChanNeeded chan_needed |
| } |
| |
| /* 9.3.53 */ |
| type record RSL_IE_MultirateCtrl { |
| uint3_t spare, |
| boolean od, |
| boolean pre, |
| uint2_t rae, |
| boolean tfo |
| } |
| |
| type enumerated RSL_IE_SysinfoType { |
| RSL_SYSTEM_INFO_8 ('00000000'B), |
| RSL_SYSTEM_INFO_1 ('00000001'B), |
| RSL_SYSTEM_INFO_2 ('00000010'B), |
| RSL_SYSTEM_INFO_3 ('00000011'B), |
| RSL_SYSTEM_INFO_4 ('00000100'B), |
| RSL_SYSTEM_INFO_5 ('00000101'B), |
| RSL_SYSTEM_INFO_6 ('00000110'B), |
| RSL_SYSTEM_INFO_7 ('00000111'B), |
| RSL_SYSTEM_INFO_16 ('00001000'B), |
| RSL_SYSTEM_INFO_17 ('00001001'B), |
| RSL_SYSTEM_INFO_2bis ('00001010'B), |
| RSL_SYSTEM_INFO_2ter ('00001011'B), |
| RSL_SYSTEM_INFO_5bis ('00001101'B), |
| RSL_SYSTEM_INFO_5ter ('00001110'B), |
| RSL_SYSTEM_INFO_10 ('00001111'B), |
| RSL_EXT_MEAS_ORDER ('01000111'B), |
| RSL_MEAS_INFO ('01001000'B), |
| RSL_SYSTEM_INFO_13 ('00101000'B), |
| RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| RSL_SYSTEM_INFO_2quater ('00101001'B), |
| RSL_SYSTEM_INFO_9 ('00101010'B), |
| RSL_SYSTEM_INFO_18 ('00101011'B), |
| RSL_SYSTEM_INFO_19 ('00101100'B), |
| RSL_SYSTEM_INFO_20 ('00101101'B) |
| } with { variant "FIELDLENGTH(8)" } |
| |
| type record RSL_IE_IPA_ConnectionStats { |
| uint8_t len, |
| uint32_t tx_packets, |
| uint32_t tx_octets, |
| uint32_t rx_packets, |
| uint32_t rx_octets, |
| uint32_t lost_packets, |
| uint32_t jitter, |
| uint32_t avg_delay |
| } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| |
| type enumerated RSL_IPA_SpeechMode { |
| RSL_IPA_SPM_SENDRECV ('00'B), |
| RSL_IPA_SPM_RECVONLY ('01'B), |
| RSL_IPA_SPM_SENDONLY ('10'B), |
| RSL_IPA_SPM_RESERVED ('11'B) |
| } with { variant "FIELDLENGTH(2)" } |
| |
| type enumerated RSL_IPA_Codec { |
| RSL_IPA_CODEC_FR ('0000'B), |
| RSL_IPA_CODEC_EFR ('0001'B), |
| RSL_IPA_CODEC_AMR_F ('0010'B), |
| RSL_IPA_CODEC_HR ('0011'B), |
| RSL_IPA_CODEC_AMR_H ('0101'B), |
| RSL_IPA_CODEC_RTP_PT ('1111'B) |
| } with { variant "FIELDLENGTH(4)" } |
| |
| type record RSL_IE_IPA_SpeechMode { |
| BIT2 reserved, |
| RSL_IPA_SpeechMode mode, |
| RSL_IPA_Codec codec |
| } |
| |
| /* union of all IE bodies */ |
| type union RSL_IE_Body { |
| RslChannelNr chan_nr, |
| RslLinkId link_id, |
| RSL_L16V l3_info, |
| RSL_LV rlm_cause, |
| uint8_t release_mode, |
| RSL_IE_ActivationType act_type, |
| RSL_IE_ChannelMode chan_mode, |
| uint8_t handover_ref, |
| RSL_IE_BS_Power bs_power, |
| RSL_IE_MS_Power ms_power, |
| uint8_t timing_adv, |
| RSL_IE_MultirateCtrl multirate_ctrl, |
| RSL_IE_FrameNumber frame_nr, |
| RSL_IE_Cause cause, |
| uint8_t access_delay, |
| RSL_IE_RachLoad rach_load, |
| uint8_t meas_res_nr, |
| uint8_t ms_timing_offset, |
| RSL_IE_UplinkMeas uplink_meas, |
| RSL_IE_L1Info l1_info, |
| RSL_IE_SysinfoType sysinfo_type, |
| uint16_t paging_load, |
| uint8_t paging_group, |
| RSL_IE_ChanNeeded chan_needed, |
| RSL_IE_StartingTime starting_time, |
| RSL_IE_EncryptionInfo encr_info, |
| RSL_IE_RequestRef req_ref, |
| RSL_LV full_imm_ass_info, |
| RSL_LV ms_identity, |
| |
| uint16_t ipa_conn_id, |
| uint16_t ipa_local_port, |
| uint16_t ipa_remote_port, |
| uint32_t ipa_local_ip, |
| uint32_t ipa_remote_ip, |
| uint8_t ipa_rtp_pt, |
| uint8_t ipa_rtp_pt2, |
| RSL_IE_IPA_ConnectionStats ipa_stats, |
| RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| |
| RSL_LV other |
| } |
| |
| type record RSL_IE { |
| RSL_IE_Type iei, |
| RSL_IE_Body body |
| } with { variant (body) "CROSSTAG( |
| chan_nr, iei = RSL_IE_CHAN_NR; |
| link_id, iei = RSL_IE_LINK_IDENT; |
| l3_info, iei = RSL_IE_L3_INFO; |
| rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| release_mode, iei = RSL_IE_RELEASE_MODE; |
| act_type, iei = RSL_IE_ACT_TYPE; |
| chan_mode, iei = RSL_IE_CHAN_MODE; |
| handover_ref, iei = RSL_IE_HANDO_REF; |
| bs_power, iei = RSL_IE_BS_POWER; |
| ms_power, iei = RSL_IE_MS_POWER; |
| timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
| |
| frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| cause, iei = RSL_IE_CAUSE; |
| access_delay, iei = RSL_IE_ACCESS_DELAY; |
| rach_load, iei = RSL_IE_RACH_LOAD; |
| meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
| ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
| l1_info, iei = RSL_IE_L1_INFO; |
| sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| paging_load, iei = RSL_IE_PAGING_LOAD; |
| paging_group, iei = RSL_IE_PAGING_GROUP; |
| chan_needed, iei = RSL_IE_CHAN_NEEDED; |
| starting_time, iei = RSL_IE_STARTNG_TIME; |
| encr_info, iei = RSL_IE_ENCR_INFO; |
| |
| req_ref, iei = RSL_IE_REQ_REFERENCE; |
| full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| ms_identity, iei = RSL_IE_MS_IDENTITY; |
| other, iei = RSL_IE_FULL_BCCH_INFO; |
| |
| ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| |
| other, OTHERWISE; |
| )" }; |
| |
| /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| * that it needs to set for a given union-choice (body). So we have to explicitly |
| * specify the IEI by the caller :( */ |
| template RSL_IE t_RSL_IE(RSL_IE_Type iei, template RSL_IE_Body body) := { |
| iei := iei, |
| body := body |
| } |
| |
| template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| iei := ?, /* overwritten? */ |
| body := body |
| } |
| |
| |
| type record of RSL_IE RSL_IE_List; |
| |
| type record RSL_Message { |
| RSL_MessageDiscriminator msg_disc, |
| RSL_MessageType msg_type, |
| RSL_IE_List ies optional |
| } |
| |
| external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| with { extension "prototype(convert) encode(RAW)" }; |
| external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| with { extension "prototype(convert) decode(RAW)" }; |
| |
| template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
| RSL_MessageType m_type) := { |
| msg_disc := m_disc, |
| msg_type := m_type, |
| ies := * |
| } |
| |
| template RSL_Message ts_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
| template RSL_MessageType msg_type, |
| template RSL_IE_List ies := omit) := { |
| msg_disc := m_disc, |
| msg_type := msg_type, |
| ies := ies |
| } |
| |
| template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| msg_disc := ?, |
| msg_type := msg_type, |
| ies := * |
| } |
| |
| /* Common Channel Management */ |
| template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| msg_disc := { RSL_MDISC_CCHAN, ? } |
| } |
| |
| /* RLL */ |
| template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| msg_disc := { RSL_MDISC_RLL, true } |
| } |
| |
| /* Dedicated Channel Management */ |
| template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| msg_disc := { RSL_MDISC_DCHAN, ? } |
| } |
| |
| /* Dedicated Channel Management */ |
| template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| } |
| |
| |
| /* dedicated channel or RLL */ |
| template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
| } |
| |
| |
| /* 8.3.1 BSC -> BTS */ |
| template RSL_Message ts_RSL_DATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| msg_type := RSL_MT_DATA_REQ, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| template RslLinkId link_id := ?, |
| template octetstring l3_info := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| msg_type := RSL_MT_DATA_REQ, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| |
| /* 8.3.2 BTS -> BSC */ |
| template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| msg_type := RSL_MT_DATA_IND, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| } |
| } |
| template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| template octetstring l3_info := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| msg_type := RSL_MT_DATA_IND, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| /* 8.3.3 BTS -> BSC */ |
| template RSL_Message ts_RSL_ERROR_IND(RslChannelNr chan_nr, RslLinkId link_id, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_ERROR_IND, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| template RSL_Cause cause := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_ERROR_IND, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| /* 8.3.6 BTS -> BSC */ |
| template RSL_Message ts_RSL_EST_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_EST_IND, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| } |
| } |
| template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| template octetstring l3_info := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_EST_IND, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| /* 8.3.7 BSC -> BTS */ |
| template RSL_Message ts_RSL_REL_REQ(RslChannelNr chan_nr, RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_REQ, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| } |
| } |
| template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
| template RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_REQ, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| * |
| } |
| } |
| |
| /* 8.3.8 BTS -> BSC */ |
| template RSL_Message ts_RSL_REL_CONF(RslChannelNr chan_nr, RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_CONF, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| } |
| } |
| template RSL_Message tr_RSL_REL_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_CONF, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| } |
| } |
| |
| /* 8.3.9 BTS -> BSC */ |
| template RSL_Message ts_RSL_REL_IND(RslChannelNr chan_nr, RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_IND, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| } |
| } |
| template RSL_Message tr_RSL_REL_IND(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| msg_type := RSL_MT_REL_IND, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| } |
| } |
| |
| /* 8.3.10 BSC -> BTS */ |
| template RSL_Message ts_RSL_UNITDATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| modifies ts_RSL_DATA_REQ := { |
| msg_type := RSL_MT_UNIT_DATA_REQ |
| } |
| |
| /* 8.3.11 BTS -> BSC */ |
| template RSL_Message ts_RSL_UNITDATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| modifies ts_RSL_DATA_IND := { |
| msg_type := RSL_MT_UNIT_DATA_IND |
| } |
| |
| |
| /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| |
| /* 8.4.1 BSC -> BTS */ |
| template RSL_Message ts_RSL_CHAN_ACT(RslChannelNr chan_nr, RSL_IE_ChannelMode mode) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CHAN_ACTIV, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) |
| /* lots of optional IEs */ |
| } |
| } |
| |
| /* 8.4.2 BTS -> BSC */ |
| template RSL_Message ts_RSL_CHAN_ACT_ACK(RslChannelNr chan_nr, GsmFrameNumber fn) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := ts_RSL_IE_FrameNumber(fn)}) |
| } |
| } |
| template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| } |
| } |
| |
| /* 8.4.3 BTS -> BSC */ |
| template RSL_Message ts_RSL_CHAN_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| template RSL_Cause cause := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| } |
| } |
| |
| /* 8.4.4 BTS -> BSC */ |
| template RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CONN_FAIL, |
| ies :={ |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| template RSL_Cause cause := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_CONN_FAIL, |
| ies :={ |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| /* 8.4.5 BSC -> BTS */ |
| template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_DEACTIVATE_SACCH, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| template RSL_Message ts_RSL_DEACT_SACCH(RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_DEACTIVATE_SACCH, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| |
| /* 8.4.6 BSC ->BTS */ |
| template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| template RslLinkId link_id := ?, |
| template OCT1 alg := ?, |
| template octetstring key := ?, |
| template octetstring l3_info := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_ENCR_CMD, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| } |
| } |
| template RSL_Message ts_RSL_ENCR_CMD(RslChannelNr chan_nr, RslLinkId link_id, |
| OCT1 alg, octetstring key, |
| octetstring l3_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_ENCR_CMD, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| template uint8_t meas_res_nr := ?, |
| template RSL_IE_UplinkMeas ul_meas := ?, |
| template RSL_IE_BS_Power bs_power := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MEAS_RES, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| * |
| } |
| } |
| |
| /* Osmocom specific template, require lots of optional fields to be present */ |
| template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| template uint8_t meas_res_nr := ?, |
| template RSL_IE_UplinkMeas ul_meas := ?, |
| template RSL_IE_BS_Power bs_power := ?, |
| template RSL_IE_L1Info l1_info := ?, |
| template octetstring l3_info := ?, |
| template uint8_t ms_to := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MEAS_RES, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| } |
| } |
| |
| |
| /* 8.4.10 BTS -> BSC */ |
| template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MODE_MODIFY_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MODE_MODIFY_ACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| /* 8.4.11 BTS -> BSC */ |
| template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MODE_MODIFY_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| template RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_MODE_MODIFY_NACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| |
| /* 8.4.14: BTS <- BSC */ |
| template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_RF_CHAN_REL, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| template RSL_Message ts_RSL_RF_CHAN_REL(RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_RF_CHAN_REL, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| /* 8.4.19 BTS -> BSC */ |
| template RSL_Message ts_RSL_RF_CHAN_REL_ACK(RslChannelNr chan_nr) := |
| ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| RSL_MT_RF_CHAN_REL_ACK, |
| { t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) }); |
| |
| template RSL_Message tr_RSL_RF_CHAN_REL_ACK(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| |
| /* 8.5.1 BTS <- BSC */ |
| template RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, octetstring full_bcch_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_BCCH_INFO, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_BCCH(0)}), |
| t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| } |
| } |
| |
| /* 8.5.2 BTS -> BSC */ |
| template RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, uint16_t acc_ct) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CCCH_LOAD_IND, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| t_RSL_IE(RSL_IE_RACH_LOAD, RSL_IE_Body:{rach_load := ts_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| } |
| } |
| template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| template uint16_t busy_ct := ?, |
| template uint16_t acc_ct) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CCCH_LOAD_IND, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CCCH_LOAD_IND, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| t_RSL_IE(RSL_IE_PAGING_LOAD, RSL_IE_Body:{paging_load := buffer_space}) |
| } |
| } |
| template RSL_Message tr_RSL_PAGING_LOAD_IND(template uint16_t buffer_space := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CCCH_LOAD_IND, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| } |
| } |
| |
| |
| /* 8.5.3 BTS -> BSC */ |
| template RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, uint8_t acc_del := 0) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CHAN_RQD, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| t_RSL_IE(RSL_IE_ACCESS_DELAY, RSL_IE_Body:{access_delay := acc_del}) |
| } |
| } |
| template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
| template uint8_t acc_del := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_CHAN_RQD, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| } |
| } |
| |
| /* 8.5.4 BTS -> BSC */ |
| template RSL_Message ts_DELETE_IND(RslChannelNr chan_nr, octetstring imm_ass) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_DELETE_IND, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(imm_ass)}) |
| } |
| } |
| |
| /* 8.5.5 BSC -> BTS */ |
| template RSL_Message tr_RSL_PAGING_CMD(template octetstring identity, template uint3_t tn := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_PAGING_CMD, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
| tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_RSL_LV(identity)}), |
| * /* opt: channel needed, eMLPP prio */ |
| } |
| } |
| template RSL_Message ts_RSL_PAGING_CMD(octetstring identity, uint8_t pg, uint3_t tn := 0) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_PAGING_CMD, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
| t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_RSL_LV(identity)}) |
| } |
| } |
| |
| /* 8.5.6 BSC -> BTS */ |
| template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| } |
| } |
| template RSL_Message ts_RSL_IMM_ASSIGN(octetstring f_ass_inf, uint3_t tn := 0) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| } |
| } |
| |
| template RSL_Message tr_RSL_RF_RES_IND := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| msg_type := RSL_MT_RF_RES_IND, |
| ies := * |
| } |
| |
| /* 8.6.2 BTS <- BSC */ |
| template RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| msg_type := RSL_MT_SACCH_FILL, |
| ies := { |
| t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| } |
| } |
| |
| /* 8.6.4 BTS -> BSC */ |
| template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| msg_type := RSL_MT_ERROR_REPORT, |
| ies := { |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| msg_type := RSL_MT_ERROR_REPORT, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| * |
| } |
| } |
| |
| |
| |
| /* Abis/IP specific messages */ |
| |
| template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| * |
| } |
| } |
| template RSL_Message ts_RSL_IPA_CRCX(RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| |
| template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, |
| uint16_t ipa_conn_id, uint32_t local_ip, |
| uint16_t local_port, uint7_t rtp_pt2) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| } |
| } |
| template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| template uint16_t ipa_conn_id, |
| template uint32_t local_ip, |
| template uint16_t local_port) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX_ACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| /* Optional: RTP Payload Type 2 IE */ |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| template RSL_Cause cause := ?) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_CRCX_NACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| template uint16_t ipa_conn_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_MDCX, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| * |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| uint32_t remote_ip, uint16_t remote_port, |
| uint7_t rtp_pt2) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_MDCX_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| /* optional */ |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| /* optional: RTP Payload Type */ |
| t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| template uint16_t ipa_conn_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_MDCX_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| /* optional connection ID */ |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, |
| RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX_IND, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr, |
| template (omit) uint16_t ipa_conn_id := omit) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| /* FIXME: optional conn_id */ |
| } |
| } |
| template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| template uint16_t ipa_conn_id := omit) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| /* FIXME: optional conn_id */ |
| * |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| template RSL_IE_IPA_ConnectionStats stats) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| } |
| } |
| template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| template uint16_t ipa_conn_id, |
| template RSL_IE_IPA_ConnectionStats stats) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX_ACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| } |
| } |
| |
| |
| |
| template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| template uint16_t ipa_conn_id) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| /* optional connection ID */ |
| t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| template RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_DLCX_NACK, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| /* optional connection ID */ |
| *, |
| tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| |
| template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_ACT, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| ies := { |
| tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| } |
| } |
| |
| template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| ies := { |
| t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| } |
| } |
| |
| |
| function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| if (msg.ies[i].iei == iei) { |
| ret := msg.ies[i].body; |
| return true; |
| } |
| } |
| return false; |
| } |
| |
| |
| |
| } with { encode "RAW" ; variant "FIELDORDER(msb)" } |