From e00776c5db5f6d13b91834b8885dafce898ab4c4 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 26 Jan 2021 23:01:47 +0100 Subject: [PATCH] Osmocom_Gb_types: add minimum requred tr_ templates for RAN INF When testing the serving BSS part of the RIM application in osmo-pcu, we will need receiving templates that allow us to verify the response (RAN INFORMATION) rim container. Change-Id: I964d7504f3c4aeaa4ce537316b3140e8b893003d Related: SYS#5103 --- library/Osmocom_Gb_Types.ttcn | 112 +++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 1 deletion(-) diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn index 2bbc5085b..97412b89a 100644 --- a/library/Osmocom_Gb_Types.ttcn +++ b/library/Osmocom_Gb_Types.ttcn @@ -2511,7 +2511,14 @@ octetstring sdu) := { }, rIMApplicationIdentity := app_id } - + template RIM_Application_Identity tr_RIM_Application_Identity(template OCT1 app_id := ?) := { + iEI := '4B'O, + ext := '1'B, + lengthIndicator := { + length1 := 1 + }, + rIMApplicationIdentity := app_id + } /* 3GPP TS 48.018 11.3.62 */ template (value) RIM_Sequence_Number ts_RIM_Sequence_Number(integer seq) := { @@ -2522,6 +2529,20 @@ octetstring sdu) := { }, rIMSequenceNumber := int2oct(seq, 4) } + function tr_RIM_Sequence_Number(template integer seq := ?) return template RIM_Sequence_Number { + var template RIM_Sequence_Number ret; + ret.iEI := '4C'O; + ret.ext := '1'B; + ret.lengthIndicator := { length1 := 4 }; + if (istemplatekind(seq, "*")) { + ret.rIMSequenceNumber := *; + } else if (istemplatekind(seq, "?")) { + ret.rIMSequenceNumber := ?; + } else { + ret.rIMSequenceNumber := int2oct(valueof(seq), 4); + } + return ret; + } /* 3GPP TS 48.018 11.3.62a.1 */ template (value) RAN_Information_Request_RIM_Container @@ -2585,10 +2606,34 @@ octetstring sdu) := { applContainer_or_ApplErrContainer := app_cont_or_app_err, sON_Transfer_Application_Identity := son_app_id } + template RAN_Information_RIM_Container + tr_RAN_Information_RIM_Container(template RIM_Application_Identity app_id := ?, + template RIM_Sequence_Number seq := ?, + template RIM_PDU_Indications ind := ?, + template RIM_Protocol_Version_Number ver := omit, + template ApplContainer_or_ApplErrContainer app_cont_or_app_err := omit, + template SON_Transfer_Application_Identity_TLV son_app_id := omit) := { + + iEI := '58'O, + ext := '1'B, + lengthIndicator := { + length1 := ? + }, + rIM_Application_Identity := app_id, + rIM_Sequence_Number := seq, + rIM_PDU_Indications := ind, + rIM_Protocol_Version_Number := ver, + applContainer_or_ApplErrContainer := app_cont_or_app_err, + sON_Transfer_Application_Identity := son_app_id + } template (value) ApplContainer_or_ApplErrContainer tsu_ApplContainer_or_ApplErrContainer_NACC(template (value) ApplContainer_or_ApplErrContainer_NACC cont) := { nacc := cont } + template ApplContainer_or_ApplErrContainer + tru_ApplContainer_or_ApplErrContainer_NACC(template ApplContainer_or_ApplErrContainer_NACC cont := ?) := { + nacc := cont + } template (value) ApplContainer_or_ApplErrContainer tsu_ApplContainer_or_ApplErrContainer_SI3(template (value) ApplContainer_or_ApplErrContainer_SI3 cont) := { si3 := cont @@ -2601,6 +2646,10 @@ octetstring sdu) := { tsu_ApplContainer_NACC(template (value) BssgpCellId cid, boolean psi_type, integer si_psi_num, octetstring si_psi) := { application_Container := ts_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi) } + template ApplContainer_or_ApplErrContainer_NACC + tru_ApplContainer_NACC(template BssgpCellId cid := ?, template boolean psi_type := ?, template integer si_psi_num := ?, template octetstring si_psi := ?) := { + application_Container := tr_RAN_Information_Application_Container_NACC(cid, psi_type, si_psi_num, si_psi) + } template (value) ApplContainer_or_ApplErrContainer_NACC tsu_ApplErrContainer_NACC(template (value) BssgpCellId cid, integer cause, @@ -2762,6 +2811,31 @@ octetstring sdu) := { number_of_SI_PSI := int2bit(si_psi_num, 7), sI_PSI := si_psi } + function tr_RAN_Information_Application_Container_NACC(template BssgpCellId cid := ?, template boolean psi_type := ?, + template integer si_psi_num := ?, template octetstring si_psi := ?) + return template RAN_Information_Application_Container_NACC { + var template RAN_Information_Application_Container_NACC ret; + ret.iEI := '4E'O; + ret.ext := '1'B; + ret.lengthIndicator := { length1 := ? }; + ret.reporting_Cell_Identifier := t_Cell_Identifier_V(cid); + if (istemplatekind(psi_type, "*")) { + ret.typeBit := *; + } else if (istemplatekind(psi_type, "?")) { + ret.typeBit := ?; + } else { + ret.typeBit := bool2bit(valueof(psi_type)); + } + if (istemplatekind(si_psi_num, "*")) { + ret.number_of_SI_PSI := *; + } else if (istemplatekind(si_psi_num, "?")) { + ret.number_of_SI_PSI := ?; + } else { + ret.number_of_SI_PSI := int2bit(valueof(si_psi_num), 7); + } + ret.sI_PSI := si_psi; + return ret; + } /* 3GPP TS 48.018 11.3.63.2.2 */ template (value) RAN_Information_Application_Container_SI3 @@ -2999,6 +3073,28 @@ octetstring sdu) := { pDU_Type_Extension := type_ext, reserved := '0000'B } + function tr_RIM_PDU_Indications(template boolean ack := ?, template BIT3 type_ext := ?) return template RIM_PDU_Indications { + var template RIM_PDU_Indications ret; + ret.iEI := '4F'O; + ret.ext := '1'B; + ret.lengthIndicator := { length1 := 1 }; + if (istemplatekind(ack, "*")) { + ret.ack := *; + } else if (istemplatekind(ack, "?")) { + ret.ack := ?; + } else { + ret.ack := bool2bit(valueof(ack)); + } + if (istemplatekind(type_ext, "*")) { + ret.pDU_Type_Extension := *; + } else if (istemplatekind(type_ext, "?")) { + ret.pDU_Type_Extension := ?; + } else { + ret.pDU_Type_Extension := valueof(type_ext); + } + ret.reserved := '0000'B; + return ret; + } /* 3GPP TS 48.018 11.3.67 */ template (value) RIM_Protocol_Version_Number ts_RIM_Protocol_Version_Number(integer ver) := { @@ -3009,6 +3105,20 @@ octetstring sdu) := { }, rIMProtocolVersionNumber := int2oct(ver, 1) } + function tr_RIM_Protocol_Version_Number(template integer ver := ?) return template RIM_Protocol_Version_Number { + var template RIM_Protocol_Version_Number ret; + ret.iEI := '55'O; + ret.ext := '1'B; + ret.lengthIndicator := { length1 := 1 }; + if (istemplatekind(ver, "*")) { + ret.rIMProtocolVersionNumber := *; + } else if (istemplatekind(ver, "?")) { + ret.rIMProtocolVersionNumber := ?; + } else { + ret.rIMProtocolVersionNumber := int2oct(valueof(ver), 1); + } + return ret; + } /* 3GPP TS 48.018 11.3.70 */ const HEX1 RIM_ADDR_GERAN_CELL_ID := '0'H;