Change in osmo-ttcn3-hacks[master]: bts: Support passing PCUIF messages over IPA multiplex

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/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Jun 14 11:48:30 UTC 2021


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


Change subject: bts: Support passing PCUIF messages over IPA multiplex
......................................................................

bts: Support passing PCUIF messages over IPA multiplex

Related: SYS#5303
Change-Id: I3cd0988cb654f1c5816d1c4717255a5e802d7925
---
M bts/BTS_Tests_OML.ttcn
M bts/regen_makefile.sh
M library/IPA_Emulation.ttcnpp
M library/IPA_Types.ttcn
4 files changed, 48 insertions(+), 2 deletions(-)



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

diff --git a/bts/BTS_Tests_OML.ttcn b/bts/BTS_Tests_OML.ttcn
index 6770dab..ddeb139 100644
--- a/bts/BTS_Tests_OML.ttcn
+++ b/bts/BTS_Tests_OML.ttcn
@@ -52,6 +52,8 @@
 	/* Port for OML */
 	port IPA_OML_PT OML;
 	var uint8_t g_bts_nr := 0;
+	/* Port for Abis/Osmo/PCU */
+	port IPA_OSMO_PCU_PT IPA_OSMO_PCU;
 
 	/* global test case guard timer */
 	timer T_oml_guard := 60.0;
@@ -97,6 +99,7 @@
 	vc_IPA_OML := IPA_Emulation_CT.create(id & "-OML-IPA");
 	map(vc_IPA_OML:IPA_PORT, system:IPA_CODEC_PT);
 	connect(vc_IPA_OML:IPA_OML_PORT, self:OML);
+	connect(vc_IPA_OML:IPA_OSMO_PCU_PORT, self:IPA_OSMO_PCU);
 	vc_IPA_OML.start(IPA_Emulation.main_server(mp_oml_ip, mp_oml_port));
 
 	T_oml_guard.start;
diff --git a/bts/regen_makefile.sh b/bts/regen_makefile.sh
index 9f1bf1d..8771500 100755
--- a/bts/regen_makefile.sh
+++ b/bts/regen_makefile.sh
@@ -2,6 +2,6 @@
 
 FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc UD_PT.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TRXC_CodecPort_CtrlFunctDef.cc L1CTL_PortType_CtrlFunctDef.cc TELNETasp_PT.cc"
 
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML -DIPA_EMULATION_CTRL"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML -DIPA_EMULATION_CTRL -DIPA_EMULATION_OSMO_PCU"
 
 ../regen-makefile.sh BTS_Tests.ttcn $FILES
diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 906664f..5cdf324 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -55,6 +55,10 @@
 import from Osmocom_CTRL_Types all;
 #endif
 
+#ifdef IPA_EMULATION_OSMO_PCU
+import from PCUIF_Types all;
+#endif
+
 modulepar {
 	/* Use Osmocom extended IPA mux header */
 	boolean mp_ipa_mgcp_uses_osmo_ext := true;
@@ -190,6 +194,12 @@
 } with { extension "internal" }
 #endif
 
+#ifdef IPA_EMULATION_OSMO_PCU
+/* Client port for Osmocom PCU extension inside IPA */
+type port IPA_OSMO_PCU_PT message {
+	inout PCUIF_Message, ASP_IPA_Event;
+} with { extension "internal" }
+#endif
 
 
 
@@ -224,6 +234,10 @@
 	/* up-facing port for RSPRO */
 	port IPA_RSPRO_PT IPA_RSPRO_PORT;
 #endif
+#ifdef IPA_EMULATION_OSMO_PCU
+	/* up-facing port for RSPRO */
+	port IPA_OSMO_PCU_PT IPA_OSMO_PCU_PORT;
+#endif
 
 	/* up-facing port for other streams */
 	port IPA_SP_PT IPA_SP_PORT;
@@ -350,6 +364,11 @@
 		IPA_RSPRO_PORT.send(evt);
 	}
 #endif
+#ifdef IPA_EMULATION_OSMO_PCU
+	if (IPA_OSMO_PCU_PORT.checkstate("Connected")) {
+		IPA_OSMO_PCU_PORT.send(evt);
+	}
+#endif
 	/* FIXME: to other ports */
 }
 
@@ -585,6 +604,13 @@
 }
 #endif
 
+#ifdef IPA_EMULATION_OSMO_PCU
+private function f_osmo_pcu_to_user(octetstring msg) runs on IPA_Emulation_CT {
+	var PCUIF_Message pcuif_msg := dec_PCUIF_Message(msg);
+	IPA_OSMO_PCU_PORT.send(pcuif_msg);
+}
+#endif
+
 #ifdef IPA_EMULATION_MGCP
 private function f_mgcp_to_user(octetstring msg) runs on IPA_Emulation_CT {
 	var charstring msg_ch := oct2char(msg);
@@ -657,6 +683,9 @@
 #ifdef IPA_EMULATION_RSPRO
 	var RsproPDU rspro;
 #endif
+#ifdef IPA_EMULATION_OSMO_PCU
+	var PCUIF_Message pcu;
+#endif
 
 	/* Set function for dissecting the binary */
 	var f_IPL4_getMsgLen vl_f := refers(f_IPL4_fixedMsgLen);
@@ -733,6 +762,11 @@
 						f_rspro_to_user(ipa_rx.msg);
 					}
 #endif
+#ifdef IPA_EMULATION_OSMO_PCU
+					case (IPAC_PROTO_EXT_OSMO_PCU) {
+						f_osmo_pcu_to_user(ipa_rx.msg);
+					}
+#endif
 					case else {
 						IPA_SP_PORT.send(f_to_asp(ipa_rx));
 					}
@@ -826,6 +860,14 @@
 		}
 #endif
 
+#ifdef IPA_EMULATION_OSMO_PCU
+		[] IPA_OSMO_PCU_PORT.receive(PCUIF_Message:?) -> value pcu {
+			payload := enc_PCUIF_Message(pcu);
+			ipa_ud := valueof(t_ASP_IPA_UD(IPAC_PROTO_OSMO, payload, IPAC_PROTO_EXT_OSMO_PCU));
+			IPA_PORT.send(f_from_asp(f_ipa_conn_id(), ipa_ud));
+		}
+#endif
+
 #ifdef IPA_EMULATION_RSL
 		/* Received RSL -> down into IPA */
 		[] IPA_RSL_PORT.receive(ASP_RSL_Unitdata:?) -> value rsl {
diff --git a/library/IPA_Types.ttcn b/library/IPA_Types.ttcn
index 110e5b1..95623ef 100644
--- a/library/IPA_Types.ttcn
+++ b/library/IPA_Types.ttcn
@@ -35,7 +35,8 @@
 	IPAC_PROTO_EXT_ORC	('04'H),
 	IPAC_PROTO_EXT_GSUP	('05'H),
 	IPAC_PROTO_EXT_OAP	('06'H),
-	IPAC_PROTO_EXT_RSPRO	('07'H)
+	IPAC_PROTO_EXT_RSPRO	('07'H),
+	IPAC_PROTO_EXT_OSMO_PCU	('08'H)
 } with { variant "FIELDLENGTH(8)" }
 
 external function enc_PDU_IPA(in PDU_IPA pdu) return octetstring

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/24656
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: I3cd0988cb654f1c5816d1c4717255a5e802d7925
Gerrit-Change-Number: 24656
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210614/54078ee8/attachment.htm>


More information about the gerrit-log mailing list