diff options
Diffstat (limited to 'library/PCUIF_Types.ttcn')
-rw-r--r-- | library/PCUIF_Types.ttcn | 603 |
1 files changed, 393 insertions, 210 deletions
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index da500117..70838845 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -17,45 +17,50 @@ import from Native_Functions all; modulepar { /* PCUIF version supported by the IUT */ - PCUIF_Version mp_pcuif_version := 10; - /* Whether to pad outgoing messages */ - boolean mp_pcuif_padding := true; + PCUIF_Version mp_pcuif_version := 12; }; const charstring PCU_SOCK_DEFAULT := "/tmp/pcu_bts"; -type integer PCUIF_Version (9..10); /* supported versions */ +type integer PCUIF_Version (11..12); /* supported versions */ type enumerated PCUIF_MsgType { PCU_IF_MSG_DATA_REQ ('00'O), - PCU_IF_MSG_DATA_CNF ('01'O), + /* RFU, removed in PCUIFv11 ('01'O), */ PCU_IF_MSG_DATA_IND ('02'O), PCU_IF_MSG_SUSP_REQ ('03'O), PCU_IF_MSG_APP_INFO_REQ ('04'O), PCU_IF_MSG_RTS_REQ ('10'O), - PCU_IF_MSG_DATA_CNF_DT ('11'O), + PCU_IF_MSG_DATA_CNF_2 ('11'O), PCU_IF_MSG_RACH_IND ('22'O), PCU_IF_MSG_INFO_IND ('32'O), + PCU_IF_MSG_E1_CCU_IND ('33'O), PCU_IF_MSG_ACT_REQ ('40'O), PCU_IF_MSG_TIME_IND ('52'O), + PCU_IF_MSG_INTERF_IND ('53'O), PCU_IF_MSG_PAG_REQ ('60'O), - PCU_IF_MSG_TXT_IND ('70'O) + PCU_IF_MSG_TXT_IND ('70'O), + PCU_IF_MSG_CONTAINER ('80'O), + /* Container payload message types: */ + PCU_IF_MSG_NEIGH_ADDR_REQ ('81'O), + PCU_IF_MSG_NEIGH_ADDR_CNF ('82'O) } with { variant "FIELDLENGTH(8)" }; type enumerated PCUIF_Sapi { PCU_IF_SAPI_UNKNOWN ('00'O), PCU_IF_SAPI_RACH ('01'O), - PCU_IF_SAPI_AGCH ('02'O), - PCU_IF_SAPI_PCH ('03'O), + /* RFU, removed in PCUIFv11 ('02'O), */ + /* RFU, removed in PCUIFv11 ('03'O), */ PCU_IF_SAPI_BCCH ('04'O), PCU_IF_SAPI_PDTCH ('05'O), PCU_IF_SAPI_PRACH ('06'O), PCU_IF_SAPI_PTCCH ('07'O), - PCU_IF_SAPI_AGCH_DT ('08'O) + PCU_IF_SAPI_PCH_2 ('08'O), + PCU_IF_SAPI_AGCH_2 ('09'O) } with { variant "FIELDLENGTH(8)" }; type record PCUIF_Flags { boolean bts_active, - boolean sysmo_direct_dsp, + boolean direct_phy, BIT14 spare, boolean cs1, boolean cs2, @@ -73,6 +78,16 @@ type record PCUIF_Flags { BIT3 spare2 } with { variant "" }; +type enumerated PCUIF_bts_model { + PCU_IF_BTS_MODEL_UNSPEC ('00'O), + PCU_IF_BTS_MODEL_LC15 ('01'O), + PCU_IF_BTS_MODEL_OC2G ('02'O), + PCU_IF_BTS_MODEL_OCTPHY ('03'O), + PCU_IF_BTS_MODEL_SYSMO ('04'O), + PCU_IF_BTS_MODEL_TRX ('05'O), + PCU_IF_BTS_MODEL_RBS ('06'O) +} with { variant "FIELDLENGTH(8)" }; + type enumerated PCUIF_TextType { PCU_VERSION (0), PCU_OML_ALERT (1) @@ -98,21 +113,17 @@ type record PCUIF_data { uint16_t ber10k, int16_t ta_offs_qbits, int16_t lqual_cb -} with { variant (data) "FIELDLENGTH(162), ALIGN(left)" }; +} with { + variant (data) "FIELDLENGTH(162), ALIGN(left)" + variant (lqual_cb) "COMP(2scompl)" +}; -type record PCUIF_data_cnf_dt { +type record PCUIF_data_cnf { PCUIF_Sapi sapi, - OCT4 tlli, - uint32_t fn, - uint16_t arfcn, - uint8_t trx_nr, - uint8_t ts_nr, - uint8_t block_nr, - int8_t rssi, - uint16_t ber10k, - int16_t ta_offs_qbits, - int16_t lqual_cb -} with { variant "" }; + OCT4 msg_id +} with { + variant (msg_id) "BYTEORDER(last)" +}; type record PCUIF_rts_req { PCUIF_Sapi sapi, @@ -153,30 +164,14 @@ type record PCUIF_InfoTrxTs { } with { variant (ma) "BYTEORDER(first), BITORDER(msb)" }; private type record length(8) of PCUIF_InfoTrxTs PCUIF_InfoTrxTsList; -/* Version >= 10 specific coding */ -private type record PCUIF_InfoV10Trx { +private type record PCUIF_InfoTrx { uint16_t arfcn, BIT8 pdch_mask, OCT1 spare, uint32_t hLayer1, PCUIF_InfoTrxTsList ts } with { variant (pdch_mask) "BITORDER(msb)" }; -private type record length(8) of PCUIF_InfoV10Trx PCUIF_InfoV10TrxList; - -/* Version <= 9 specific coding */ -private type record PCUIF_InfoV09Trx { - uint16_t arfcn, - BIT8 pdch_mask, - OCT1 spare, - OCT8 tsc, - uint32_t hLayer1 -} with { variant (pdch_mask) "BITORDER(msb)" }; -private type record length(8) of PCUIF_InfoV09Trx PCUIF_InfoV09TrxList; - -type union PCUIF_InfoTrxs { - PCUIF_InfoV09TrxList v09, - PCUIF_InfoV10TrxList v10 -} with { variant "" }; +type record length(8) of PCUIF_InfoTrx PCUIF_InfoTrxs; type record PCUIF_info_ind { uint32_t version, @@ -203,9 +198,9 @@ type record PCUIF_info_ind { uint8_t t3191, uint8_t t3193_10ms, uint8_t t3195, - uint8_t t3101, - uint8_t t3103, - uint8_t t3105, + uint8_t n3101, + uint8_t n3103, + uint8_t n3105, uint8_t cv_countdown, uint16_t dl_tbf_ext, uint16_t ul_tbf_ext, @@ -215,21 +210,13 @@ type record PCUIF_info_ind { record length(2) of uint16_t nsvci, record length(2) of uint16_t local_port, record length(2) of uint16_t remote_port, - PCUIF_RemoteAddr remote_addr -} with { - /* NOTE: TITAN is not smart enough to handle 'version < 10' and 'version > 9', - * so we cannot support more than two versions at the same time here. Sigh. */ - variant (trx) "CROSSTAG(v09, version = 9; v10, version = 10)" - variant (remote_addr) "CROSSTAG(v09, version = 9; v10, version = 10)" -}; + PCUIF_RemoteAddr remote_addr, -type union PCUIF_RemoteAddr { - PCUIF_RemoteAddrV09 v09, - PCUIF_RemoteAddrV10 v10 -} with { variant "" }; - -type record PCUIF_RemoteAddrV09 { - record length(2) of OCT4 addr + /* The bts_model field was introduced with PCUIF v12 as a new mandatory field. This also means that when we + * use the testsuite to test against latest builds (still uses PCUIF v11) this field is not included in + * the PCUIF_info_ind message. Since the testsuite does not check on this field we decided to declare the + * field as an optional field until PCUIF v12 is also used in the latest builds.*/ + PCUIF_bts_model bts_model optional } with { variant "" }; type enumerated PCUIF_AddrType { @@ -238,11 +225,22 @@ type enumerated PCUIF_AddrType { PCUIF_ADDR_TYPE_IPV6 ('29'O) } with { variant "FIELDLENGTH(8)" }; -type record PCUIF_RemoteAddrV10 { +type record PCUIF_RemoteAddr { record length(2) of PCUIF_AddrType addr_type, record length(2) of octetstring addr length(16) } with { variant "" }; +/* E1 CCU connection parameters */ +type record PCUIF_e1_ccu_ind { + /* GSM/GPRS air interface */ + uint8_t trx_nr, + uint8_t ts_nr, + /* E1 line interface */ + uint8_t e1_nr, + uint8_t e1_ts, + uint8_t e1_ts_ss +} with { variant "" }; + type record PCUIF_act_req { uint8_t is_activate, uint8_t trx_nr, @@ -254,6 +252,14 @@ type record PCUIF_time_ind { uint32_t fn } with { variant "" }; +type record length(8) of uint8_t PCUIF_interf; +type record PCUIF_interf_ind { + uint8_t trx_nr, + OCT3 spare, + uint32_t fn, + PCUIF_interf interf +} with { variant "" }; + type record PCUIF_pag_req { PCUIF_Sapi sapi, uint8_t chan_needed, @@ -276,21 +282,99 @@ type record PCUIF_susp_req { variant (tlli) "BYTEORDER(last)" }; +type record PCUIF_neigh_addr_req { + uint16_t local_lac, + uint16_t local_ci, + uint16_t tgt_arfcn, + uint8_t tgt_bsic +} with { variant (local_lac) "BYTEORDER(last)" + variant (local_ci) "BYTEORDER(last)" + variant (tgt_arfcn) "BYTEORDER(last)" }; + +type record PCUIF_neigh_addr_cnf { + PCUIF_neigh_addr_req orig_req, + uint8_t error_code, + uint16_t mcc, + uint16_t mnc, + uint8_t mnc_3_digits, + uint16_t lac, + uint8_t rac, + uint16_t cell_identity +} with { variant (mcc) "BYTEORDER(last)" + variant (mnc) "BYTEORDER(last)" + variant (lac) "BYTEORDER(last)" + variant (cell_identity) "BYTEORDER(last)" }; + +type union PCUIF_ContainerMsgUnion { + PCUIF_neigh_addr_req neigh_addr_req, + PCUIF_neigh_addr_cnf neigh_addr_cnf, + octetstring other +} with { variant "" }; + +type record PCUIF_container { + PCUIF_MsgType msg_type, + OCT1 spare, + uint16_t len, /* network byte order */ + PCUIF_ContainerMsgUnion u +} with { + variant (len) "BYTEORDER(last)" + variant (len) "LENGTHTO(u)" + variant (u) "CROSSTAG( + neigh_addr_req, msg_type = PCU_IF_MSG_NEIGH_ADDR_REQ; + neigh_addr_cnf, msg_type = PCU_IF_MSG_NEIGH_ADDR_CNF; + other, OTHERWISE)" +}; + +/* Record to send a (confirmed) IMMEDIATE ASSIGNMENT message via PCH. The record is sent by the PCU to the BTS as a + * data request (data_req) under SAPI PCU_IF_SAPI_PCH_2. */ +type record PCUIF_pch { + OCT4 msg_id, + charstring imsi length(17), + octetstring data length(23), + boolean confirm +} with { + variant (msg_id) "BYTEORDER(last)" + variant (imsi) "FIELDLENGTH(17)" + variant (data) "FIELDLENGTH(23)" +}; + +external function enc_PCUIF_pch(in PCUIF_pch pdu) return octetstring + with { extension "prototype(convert) encode(RAW)" }; +external function dec_PCUIF_pch(in octetstring stream) return PCUIF_pch + with { extension "prototype(convert) decode(RAW)" }; + +/* Record to send a (confirmed) IMMEDIATE ASSIGNMENT message via AGCH. The record is sent by the PCU to the BTS as a + * data request (data_req) under SAPI PCU_IF_SAPI_AGCH_2. */ +type record PCUIF_agch { + OCT4 msg_id, + octetstring data length(23), + boolean confirm +} with { + variant (msg_id) "BYTEORDER(last)" + variant (data) "FIELDLENGTH(23)" +}; + +external function enc_PCUIF_agch(in PCUIF_agch pdu) return octetstring + with { extension "prototype(convert) encode(RAW)" }; +external function dec_PCUIF_agch(in octetstring stream) return PCUIF_agch + with { extension "prototype(convert) decode(RAW)" }; type union PCUIF_MsgUnion { PCUIF_data data_req, - PCUIF_data data_cnf, - PCUIF_data_cnf_dt data_cnf_dt, + PCUIF_data_cnf data_cnf2, PCUIF_data data_ind, PCUIF_susp_req susp_req, PCUIF_rts_req rts_req, PCUIF_rach_ind rach_ind, PCUIF_txt_ind txt_ind, PCUIF_info_ind info_ind, + PCUIF_e1_ccu_ind e1_ccu_ind, PCUIF_act_req act_req, PCUIF_time_ind time_ind, + PCUIF_interf_ind interf_ind, PCUIF_pag_req pag_req, - PCUIF_app_info_req app_info_req + PCUIF_app_info_req app_info_req, + PCUIF_container container } with { variant "" }; type record PCUIF_Message { @@ -300,18 +384,22 @@ type record PCUIF_Message { PCUIF_MsgUnion u } with { variant (u) "CROSSTAG( data_req, msg_type = PCU_IF_MSG_DATA_REQ; - data_cnf, msg_type = PCU_IF_MSG_DATA_CNF; - data_cnf_dt, msg_type = PCU_IF_MSG_DATA_CNF_DT; + data_cnf2, msg_type = PCU_IF_MSG_DATA_CNF_2; data_ind, msg_type = PCU_IF_MSG_DATA_IND; susp_req, msg_type = PCU_IF_MSG_SUSP_REQ; rts_req, msg_type = PCU_IF_MSG_RTS_REQ; rach_ind, msg_type = PCU_IF_MSG_RACH_IND; txt_ind, msg_type = PCU_IF_MSG_TXT_IND; info_ind, msg_type = PCU_IF_MSG_INFO_IND; + e1_ccu_ind, msg_type = PCU_IF_MSG_E1_CCU_IND; act_req, msg_type = PCU_IF_MSG_ACT_REQ; time_ind, msg_type = PCU_IF_MSG_TIME_IND; + interf_ind, msg_type = PCU_IF_MSG_INTERF_IND; pag_req, msg_type = PCU_IF_MSG_PAG_REQ; - app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ)" + app_info_req, msg_type = PCU_IF_MSG_APP_INFO_REQ; + container, msg_type = PCU_IF_MSG_CONTAINER)" + /* PCUIFv12: 1007 * 8 = 8056 bits */ + variant "PADDING(8056)" }; external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring @@ -319,27 +407,6 @@ external function enc_PCUIF_Message(in PCUIF_Message pdu) return octetstring external function dec_PCUIF_Message(in octetstring stream) return PCUIF_Message with { extension "prototype(convert) decode(RAW)" }; -function enc_pad_PCUIF_Message(in PCUIF_Message pdu) -return octetstring { - var octetstring stream; - var integer len; - - stream := enc_PCUIF_Message(pdu); - if (not mp_pcuif_padding) { - return stream; - } - - select (mp_pcuif_version) { - case (9) { len := 212; } - /* FIXME: 1006 % 4 > 0 (alignment) */ - case (10) { len := 1006; } - case else { len := 0; } - } - - return f_pad_oct(stream, len, '00'O); -} - - /* Generic template for matching messages by type and/or the BTS number */ template PCUIF_Message tr_PCUIF_MSG(template PCUIF_MsgType msg_type := ?, template uint8_t bts_nr := ?) := { @@ -488,7 +555,7 @@ template (value) PCUIF_Message ts_PCUIF_DATA_IND(template (value) uint8_t bts_nr template (value) int8_t rssi := -80, template (value) uint16_t ber10k := 0, template (value) int16_t ta_offs_qbits := 0, - template (value) uint16_t lqual_cb := 10) := { + template (value) int16_t lqual_cb := 10) := { msg_type := PCU_IF_MSG_DATA_IND, bts_nr := bts_nr, spare := '0000'O, @@ -536,6 +603,28 @@ template PCUIF_Message tr_PCUIF_DATA_IND(template uint8_t bts_nr := ?, } } +template PCUIF_data tr_PCUIF_DATA(template uint8_t trx_nr, + template uint8_t ts_nr, + template uint8_t block_nr := ?, + template uint32_t fn := ?, + template PCUIF_Sapi sapi := ?, + template octetstring data := ?) := { + sapi := sapi, + len := ?, + data := data, + fn := fn, + arfcn := ?, /* unused in BTS */ + trx_nr := trx_nr, + ts_nr := ts_nr, + block_nr := block_nr, + /* measurement parameters below unused on Tx */ + rssi := 0, + ber10k := 0, + ta_offs_qbits := 0, + lqual_cb := 0 + +} + template (value) PCUIF_Message ts_PCUIF_DATA_REQ(uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr, uint8_t block_nr, uint32_t fn, PCUIF_Sapi sapi, @@ -572,74 +661,33 @@ template PCUIF_Message tr_PCUIF_DATA_REQ(template uint8_t bts_nr, bts_nr := bts_nr, spare := '0000'O, u := { - data_req := { - sapi := sapi, - len := ?, - data := data, - fn := fn, - arfcn := ?, /* unused in BTS */ - trx_nr := trx_nr, - ts_nr := ts_nr, - block_nr := block_nr, - /* measurement parameters below unused on Tx */ - rssi := 0, - ber10k := 0, - ta_offs_qbits := 0, - lqual_cb := 0 - } + data_req := tr_PCUIF_DATA(trx_nr, ts_nr, block_nr, fn, sapi, data) } } -template (value) PCUIF_Message ts_PCUIF_DATA_CNF(template (value) uint8_t bts_nr, - template (value) uint8_t trx_nr, - template (value) uint8_t ts_nr, - template (value) uint8_t block_nr, - template (value) uint32_t fn, - template (value) uint16_t arfcn, - template (value) PCUIF_Sapi sapi, - template (value) octetstring data) := { - msg_type := PCU_IF_MSG_DATA_CNF, +template (value) PCUIF_Message ts_PCUIF_DATA_CNF_2(template (value) uint8_t bts_nr, + template (value) PCUIF_Sapi sapi, + template (value) OCT4 msg_id) := { + msg_type := PCU_IF_MSG_DATA_CNF_2, bts_nr := bts_nr, spare := '0000'O, u := { - data_cnf := { + data_cnf2 := { sapi := sapi, - len := 0, /* overwritten */ - data := data, - fn := fn, - arfcn := arfcn, - trx_nr := trx_nr, - ts_nr := ts_nr, - block_nr := block_nr, - rssi := 0, - ber10k := 0, - ta_offs_qbits := 0, - lqual_cb := 0 + msg_id := msg_id } } } -template PCUIF_Message tr_PCUIF_DATA_CNF(template uint8_t bts_nr := ?, - template uint8_t trx_nr := ?, - template uint8_t ts_nr := ?, - template PCUIF_Sapi sapi := ?, - template octetstring data := ?) := { - msg_type := PCU_IF_MSG_DATA_CNF, +template PCUIF_Message tr_PCUIF_DATA_CNF_2(template uint8_t bts_nr, + template PCUIF_Sapi sapi := ?, + template OCT4 msg_id := ?) := { + msg_type := PCU_IF_MSG_DATA_CNF_2, bts_nr := bts_nr, spare := ?, u := { - data_cnf := { + data_cnf2 := { sapi := sapi, - len := ?, - data := data, - fn := ?, - arfcn := ?, - trx_nr := trx_nr, - ts_nr := ts_nr, - block_nr := ?, - rssi := ?, - ber10k := ?, - ta_offs_qbits := ?, - lqual_cb := ? + msg_id := msg_id } } } @@ -731,7 +779,7 @@ template PCUIF_Message tr_PCUIF_PAG_REQ(template uint8_t bts_nr := ?, const PCUIF_Flags c_PCUIF_Flags_default := { bts_active := true, - sysmo_direct_dsp := false, + direct_phy := false, spare := '00000000000000'B, cs1 := true, cs2 := true, @@ -749,6 +797,32 @@ const PCUIF_Flags c_PCUIF_Flags_default := { spare2 := '000'B }; +const PCUIF_Flags c_PCUIF_Flags_noMCS := { + bts_active := true, + direct_phy := false, + spare := '00000000000000'B, + cs1 := true, + cs2 := true, + cs3 := true, + cs4 := true, + mcs1 := false, + mcs2 := false, + mcs3 := false, + mcs4 := false, + mcs5 := false, + mcs6 := false, + mcs7 := false, + mcs8 := false, + mcs9 := false, + spare2 := '000'B +}; + +function f_pcuif_ind_flags_egprs_enabled(PCUIF_Flags flags) return boolean { + return flags.mcs1 or flags.mcs2 or flags.mcs3 or flags.mcs4 or + flags.mcs5 or flags.mcs6 or flags.mcs7 or flags.mcs8 or + flags.mcs9; +} + template (value) PCUIF_InfoTrxTs ts_PCUIF_InfoTrxTsH0(template (value) uint3_t tsc := 7) := { tsc := tsc, hopping := 0, @@ -788,9 +862,10 @@ template PCUIF_InfoTrxTs tr_PCUIF_InfoTrxTsH1(template uint3_t tsc := ?, ma := ma }; -template (value) PCUIF_InfoV10Trx ts_PCUIF_InfoV10Trx(template (value) uint16_t arfcn := 871, - template (value) BIT8 pdch_mask := '00000001'B, - template (value) uint3_t tsc := 7) := { +template (value) PCUIF_InfoTrx +ts_PCUIF_InfoTrx(template (value) uint16_t arfcn := 871, + template (value) BIT8 pdch_mask := '00000001'B, + template (value) uint3_t tsc := 7) := { arfcn := arfcn, pdch_mask := pdch_mask, spare := '00'O, @@ -803,34 +878,16 @@ template (value) PCUIF_InfoV10Trx ts_PCUIF_InfoV10Trx(template (value) uint16_t } }; -template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09Trx(template (value) uint16_t arfcn := 871, - template (value) BIT8 pdch_mask := '00000001'B, - OCT1 tsc := '07'O) := { - arfcn := arfcn, - pdch_mask := pdch_mask, - spare := '00'O, - tsc := tsc & tsc & tsc & tsc & tsc & tsc & tsc & tsc, - hLayer1 := 0 -} - -template (value) PCUIF_InfoV09Trx ts_PCUIF_InfoV09TrxNULL := ts_PCUIF_InfoV09Trx(0, '00000000'B, '00'O); - -template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV09Trxs_def := { - v09 := { - ts_PCUIF_InfoV09Trx, ts_PCUIF_InfoV09TrxNULL, - ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL, - ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL, - ts_PCUIF_InfoV09TrxNULL, ts_PCUIF_InfoV09TrxNULL - } -}; - -template (value) PCUIF_InfoTrxs ts_PCUIF_InfoV10Trxs_def := { - v10 := { - ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, - ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, - ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx, - ts_PCUIF_InfoV10Trx, ts_PCUIF_InfoV10Trx - } +template (value) PCUIF_InfoTrxs +ts_PCUIF_InfoTrxs_def(uint16_t base_arfcn) := { + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 0), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 1), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 2), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 3), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 4), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 5), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 6), + ts_PCUIF_InfoTrx(arfcn := base_arfcn + 7) }; template (value) PCUIF_Message ts_PCUIF_INFO_IND(template (value) uint8_t bts_nr, @@ -871,9 +928,9 @@ template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?, t3191 := ?, t3193_10ms := ?, t3195 := ?, - t3101 := ?, - t3103 := ?, - t3105 := ?, + n3101 := ?, + n3103 := ?, + n3105 := ?, cv_countdown := ?, dl_tbf_ext := ?, ul_tbf_ext := ?, @@ -882,7 +939,9 @@ template PCUIF_Message tr_PCUIF_INFO_IND(template uint8_t bts_nr := ?, nsvci := ?, local_port := ?, remote_port := ?, - remote_addr := ? + remote_addr := ?, + /* See note in record PCUIF_info_ind */ + bts_model := * } } } @@ -910,6 +969,41 @@ template PCUIF_Message tr_PCUIF_TIME_IND(template uint8_t bts_nr, } } +template (value) PCUIF_Message +ts_PCUIF_INTERF_IND(template (value) uint8_t bts_nr, + template (value) uint8_t trx_nr, + template (value) uint32_t fn, + template (value) PCUIF_interf interf) := { + msg_type := PCU_IF_MSG_INTERF_IND, + bts_nr := bts_nr, + spare := '0000'O, + u := { + interf_ind := { + trx_nr := trx_nr, + spare := '000000'O, + fn := fn, + interf := interf + } + } +} +template PCUIF_Message +tr_PCUIF_INTERF_IND(template (present) uint8_t bts_nr := ?, + template (present) uint8_t trx_nr := ?, + template (present) uint32_t fn := ?, + template (present) PCUIF_interf interf := ?) := { + msg_type := PCU_IF_MSG_INTERF_IND, + bts_nr := bts_nr, + spare := ?, + u := { + interf_ind := { + trx_nr := trx_nr, + spare := ?, + fn := fn, + interf := interf + } + } +} + template (value) PCUIF_Message ts_PCUIF_SUSP_REQ(template (value) uint8_t bts_nr, template (value) OCT4 tlli, template (value) OCT6 ra_id, @@ -971,22 +1065,121 @@ template (present) PCUIF_Message tr_PCUIF_APP_INFO_REQ(template (present) uint8_ } -/* TODO: remove this as soon as we drop version 9 support */ -function f_PCUIF_ver_INFO_Trxs() -return PCUIF_InfoTrxs { - if (PCUIF_Types.mp_pcuif_version >= 10) { - return valueof(ts_PCUIF_InfoV10Trxs_def); - } else { - return valueof(ts_PCUIF_InfoV09Trxs_def); +template (value) PCUIF_Message ts_PCUIF_CONTAINER(template (value) uint8_t bts_nr, + template (value) PCUIF_container container) := { + msg_type := PCU_IF_MSG_CONTAINER, + bts_nr := bts_nr, + spare := '0000'O, + u := { + container := container + } +} +template (present) PCUIF_Message tr_PCUIF_CONTAINER(template (present) uint8_t bts_nr, + template (present) PCUIF_container container) := { + msg_type := PCU_IF_MSG_CONTAINER, + bts_nr := bts_nr, + spare := '0000'O, + u := { + container := container } } -function f_PCUIF_ver_INFO_PDCHMask(in PCUIF_info_ind info, uint8_t trx_nr) -return bitstring { - if (PCUIF_Types.mp_pcuif_version >= 10) { - return info.trx.v10[trx_nr].pdch_mask; - } else { - return info.trx.v09[trx_nr].pdch_mask; +template (value) PCUIF_container ts_PCUIF_CONT_OTHER(PCUIF_MsgType msg_type, template (value) octetstring payload) := { + msg_type := msg_type, + spare := '00'O, + len := lengthof(payload), + u := { + other := payload + } +} +template (present) PCUIF_container tr_PCUIF_CONT_OTHER(template (present) PCUIF_MsgType msg_type, + template (present) octetstring payload) := { + msg_type := msg_type, + spare := '00'O, + len := ?, + u := { + other := payload + } +} + +template (present) PCUIF_container tr_PCUIF_CONT_NEIGH_ADDR_REQ(template (present) uint16_t local_lac := ?, + template (present) uint16_t local_ci := ?, + template (present) uint16_t tgt_arfcn := ?, + template (present) uint8_t tgt_bsic := ?) := { + msg_type := PCU_IF_MSG_NEIGH_ADDR_REQ, + spare := '00'O, + len := ?, + u := { + neigh_addr_req := { + local_lac := local_lac, + local_ci := local_ci, + tgt_arfcn := tgt_arfcn, + tgt_bsic := tgt_bsic + } + } +} +template (present) PCUIF_Message tr_PCUIF_NEIGH_ADDR_REQ(template (present) uint8_t bts_nr, + template (present) uint16_t local_lac := ?, + template (present) uint16_t local_ci := ?, + template (present) uint16_t tgt_arfcn := ?, + template (present) uint8_t tgt_bsic := ?) := { + msg_type := PCU_IF_MSG_CONTAINER, + bts_nr := bts_nr, + spare := '0000'O, + u := { + container := tr_PCUIF_CONT_NEIGH_ADDR_REQ(local_lac, local_ci, tgt_arfcn, tgt_bsic) + } +} + +template (value) PCUIF_container ts_PCUIF_CONT_NEIGH_ADDR_CNF(template (value) PCUIF_neigh_addr_req orig_req, + template (value) uint8_t error_code := 0, + template (value) uint16_t mcc := 0, + template (value) uint16_t mnc := 0, + template (value) uint8_t mnc_3_digits := 0, + template (value) uint16_t lac := 0, + template (value) uint8_t rac := 0, + template (value) uint16_t cell_identity := 0) := { + msg_type := PCU_IF_MSG_NEIGH_ADDR_CNF, + spare := '00'O, + len := 0, /* overwritten */ + u := { + neigh_addr_cnf := { + orig_req := orig_req, + error_code := error_code, + mcc := mcc, + mnc := mnc, + mnc_3_digits := mnc_3_digits, + lac := lac, + rac := rac, + cell_identity := cell_identity + } + } +} +template (value) PCUIF_Message ts_PCUIF_NEIGH_ADDR_CNF(template (value) uint8_t bts_nr, + template (value) PCUIF_neigh_addr_req orig_req, + template (value) uint8_t error_code := 0, + template (value) uint16_t mcc := 0, + template (value) uint16_t mnc := 0, + template (value) uint8_t mnc_3_digits := 0, + template (value) uint16_t lac := 0, + template (value) uint8_t rac := 0, + template (value) uint16_t cell_identity := 0) := { + msg_type := PCU_IF_MSG_CONTAINER, + bts_nr := bts_nr, + spare := '0000'O, + u := { + container := ts_PCUIF_CONT_NEIGH_ADDR_CNF(orig_req, error_code, mcc, mnc, mnc_3_digits, + lac, rac, cell_identity) + } +} + +function f_PCUIF_PDCHMask_set(inout PCUIF_info_ind info, BIT8 pdch_mask, + template (present) uint8_t trx_nr := ?) +{ + for (var integer nr := 0; nr < lengthof(info.trx); nr := nr + 1) { + if (match(nr, trx_nr)) { + info.trx[nr].pdch_mask := pdch_mask; + } } } @@ -1002,31 +1195,21 @@ return PCUIF_AddrType { } /* TODO: second (redundant) NSVC connection is not (yet) supported */ -function f_PCUIF_ver_INFO_RemoteAddr(PCUIF_AddrType addr_type, - charstring addr) +function f_PCUIF_RemoteAddr(PCUIF_AddrType addr_type, + charstring addr_str) return PCUIF_RemoteAddr { var PCUIF_RemoteAddr remote_addr; - if (PCUIF_Types.mp_pcuif_version >= 10) { - remote_addr.v10.addr_type[0] := addr_type; - if (addr_type == PCUIF_ADDR_TYPE_IPV4) { - remote_addr.v10.addr[0] := f_inet_addr(addr); - } else { - remote_addr.v10.addr[0] := f_inet6_addr(addr); - } - remote_addr.v10.addr_type[1] := PCUIF_ADDR_TYPE_UNSPEC; - remote_addr.v10.addr[1] := f_pad_oct(''O, 16, '00'O); + remote_addr.addr_type[0] := addr_type; + if (addr_type == PCUIF_ADDR_TYPE_IPV4) { + remote_addr.addr[0] := f_inet_addr(addr_str); } else { - if (addr_type != PCUIF_ADDR_TYPE_IPV4) { - testcase.stop("NSVC address type := ", addr_type, - "is not supported in version := ", - PCUIF_Types.mp_pcuif_version); - } - /* v9 requires the IP in host byte order */ - remote_addr.v09.addr[0] := f_inet_haddr(addr); - remote_addr.v09.addr[1] := f_pad_oct(''O, 4, '00'O); + remote_addr.addr[0] := f_inet6_addr(addr_str); } + remote_addr.addr_type[1] := PCUIF_ADDR_TYPE_UNSPEC; + remote_addr.addr[1] := f_pad_oct(''O, 16, '00'O); + return remote_addr; } |