Change in osmo-ttcn3-hacks[master]: Osmocom_Gb_types: add minimum requred tr_ templates for RAN INF

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Jan 27 14:57:46 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22461 )


Change subject: Osmocom_Gb_types: add minimum requred tr_ templates for RAN INF
......................................................................

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
---
M library/Osmocom_Gb_Types.ttcn
1 file changed, 111 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/61/22461/1

diff --git a/library/Osmocom_Gb_Types.ttcn b/library/Osmocom_Gb_Types.ttcn
index 2bbc508..97412b8 100644
--- a/library/Osmocom_Gb_Types.ttcn
+++ b/library/Osmocom_Gb_Types.ttcn
@@ -2511,7 +2511,14 @@
 		 },
 		 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 @@
 		 },
 		 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 @@
 		 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 @@
 	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 @@
 		 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 @@
 		 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 @@
 		 },
 		 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;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22461
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I964d7504f3c4aeaa4ce537316b3140e8b893003d
Gerrit-Change-Number: 22461
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210127/c2192129/attachment.htm>


More information about the gerrit-log mailing list