summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-06-11 15:35:19 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-06-13 16:33:49 +0200
commitacc5119bacc59308aa42c51e0226ed12d1733480 (patch)
treee0466537f8963efe0d6d2df596cebcd8b7c5cb81
parent8ab9a7936bbf4b4c2b2de8bb703acadeb94fa358 (diff)
lib/IPA_Emulation: Build IPA_CTRL conditionally based on define
-rwxr-xr-xbts/regen_makefile.sh2
-rw-r--r--library/IPA_Emulation.ttcnpp8
-rwxr-xr-xmsc/regen_makefile.sh2
-rwxr-xr-xsccp/regen_makefile.sh2
-rwxr-xr-xselftest/regen_makefile.sh2
-rwxr-xr-xsgsn/regen_makefile.sh2
-rwxr-xr-xsip/regen_makefile.sh2
7 files changed, 14 insertions, 6 deletions
diff --git a/bts/regen_makefile.sh b/bts/regen_makefile.sh
index c912da8..9f1bf1d 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"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_OML -DIPA_EMULATION_CTRL"
../regen-makefile.sh BTS_Tests.ttcn $FILES
diff --git a/library/IPA_Emulation.ttcnpp b/library/IPA_Emulation.ttcnpp
index 3ec6922..2305b7b 100644
--- a/library/IPA_Emulation.ttcnpp
+++ b/library/IPA_Emulation.ttcnpp
@@ -186,8 +186,10 @@ type component IPA_Emulation_CT {
/* up-facing port for OML */
port IPA_OML_PT IPA_OML_PORT;
#endif
+#ifdef IPA_EMULATION_CTRL
/* up-facing port for CTRL */
port IPA_CTRL_PT IPA_CTRL_PORT;
+#endif
#ifdef IPA_EMULATION_GSUP
/* up-facing port for GSUP */
port IPA_GSUP_PT IPA_GSUP_PORT;
@@ -300,9 +302,11 @@ private function f_send_IPA_EVT(template ASP_IPA_Event evt) runs on IPA_Emulatio
IPA_OML_PORT.send(evt);
}
#endif
+#ifdef IPA_EMULATION_CTRL
if (IPA_CTRL_PORT.checkstate("Connected")) {
IPA_CTRL_PORT.send(evt);
}
+#endif
#ifdef IPA_EMULATION_GSUP
if (IPA_GSUP_PORT.checkstate("Connected")) {
IPA_GSUP_PORT.send(evt);
@@ -497,10 +501,12 @@ runs on IPA_Emulation_CT {
ScanEvents();
}
+#ifdef IPA_EMULATION_CTRL
private function f_ctrl_to_user(octetstring msg) runs on IPA_Emulation_CT {
var charstring msg_ch := oct2char(msg);
IPA_CTRL_PORT.send(dec_CtrlMessage(msg_ch));
}
+#endif
#ifdef IPA_EMULATION_GSUP
private function f_gsup_to_user(octetstring msg) runs on IPA_Emulation_CT {
@@ -703,11 +709,13 @@ private function ScanEvents() runs on IPA_Emulation_CT {
}
#endif
+#ifdef IPA_EMULATION_CTRL
[] IPA_CTRL_PORT.receive(CtrlMessage:?) -> value ctrl_msg {
payload := char2oct(enc_CtrlMessage(ctrl_msg));
ipa_ud := valueof(t_ASP_IPA_UD(IPAC_PROTO_OSMO, payload, IPAC_PROTO_EXT_CTRL));
IPA_PORT.send(f_from_asp(g_ipa_conn_id, ipa_ud));
}
+#endif
#ifdef IPA_EMULATION_GSUP
[] IPA_GSUP_PORT.receive(GSUP_PDU:?) -> value gsup_msg {
diff --git a/msc/regen_makefile.sh b/msc/regen_makefile.sh
index e89daa6..9278530 100755
--- a/msc/regen_makefile.sh
+++ b/msc/regen_makefile.sh
@@ -2,7 +2,7 @@
FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc UD_PT.cc MNCC_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc SDP_EncDec.cc RTP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc RTP_CodecPort_CtrlFunctDef.cc MGCP_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc SMPP_EncDec.cc SMPP_CodecPort_CtrlFunctDef.cc MAP_EncDec.cc SS_EncDec.cc TCCEncoding.cc SGsAP_CodecPort_CtrlFunctDef.cc RANAP_EncDec.cc *.c *.asn"
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_MGCP -DIPA_EMULATION_GSUP -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DRAN_EMULATION_RANAP -DUSE_MTP3_DISTRIBUTOR"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_MGCP -DIPA_EMULATION_CTRL -DIPA_EMULATION_GSUP -DIPA_EMULATION_SCCP -DRAN_EMULATION_BSSAP -DRAN_EMULATION_MGCP -DRAN_EMULATION_CTRL -DRAN_EMULATION_RANAP -DUSE_MTP3_DISTRIBUTOR"
../regen-makefile.sh MSC_Tests.ttcn $FILES
diff --git a/sccp/regen_makefile.sh b/sccp/regen_makefile.sh
index fc9e6d2..08db33e 100755
--- a/sccp/regen_makefile.sh
+++ b/sccp/regen_makefile.sh
@@ -2,6 +2,6 @@
FILES="*.ttcn *.ttcnpp SCCP_EncDec.cc SCTPasp_PT.cc TCCConversion.cc TCCInterface.cc UD_PT.cc IPL4asp_PT.cc IPL4asp_discovery.cc IPA_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc TCCEncoding.cc "
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_SCCP -DUSE_MTP3_DISTRIBUTOR"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_CTRL -DIPA_EMULATION_SCCP -DUSE_MTP3_DISTRIBUTOR"
../regen-makefile.sh SCCP_Tests.ttcn $FILES
diff --git a/selftest/regen_makefile.sh b/selftest/regen_makefile.sh
index 2503fca..9d302ac 100755
--- a/selftest/regen_makefile.sh
+++ b/selftest/regen_makefile.sh
@@ -4,6 +4,6 @@ MAIN=Selftest.ttcn
FILES="*.ttcn *.ttcnpp IPA_CodecPort_CtrlFunctDef.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc"
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DUSE_MTP3_DISTRIBUTOR"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_RSL -DIPA_EMULATION_CTRL -DUSE_MTP3_DISTRIBUTOR"
../regen-makefile.sh $MAIN $FILES
diff --git a/sgsn/regen_makefile.sh b/sgsn/regen_makefile.sh
index a85f79c..0cf2e64 100755
--- a/sgsn/regen_makefile.sh
+++ b/sgsn/regen_makefile.sh
@@ -2,6 +2,6 @@
FILES="*.ttcn *.ttcnpp BSSGP_EncDec.cc LLC_EncDec.cc IPL4asp_PT.cc IPL4asp_discovery.cc TCCConversion.cc TCCInterface.cc NS_CodecPort_CtrlFunctDef.cc RLCMAC_EncDec.cc Native_FunctionDefs.cc TELNETasp_PT.cc IPA_CodecPort_CtrlFunctDef.cc GTPU_EncDec.cc GTPC_EncDec.cc GTP_CodecPort_CtrlFunctDef.cc"
-export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP"
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_GSUP -DIPA_EMULATION_CTRL"
../regen-makefile.sh SGSN_Tests.ttcn $FILES
diff --git a/sip/regen_makefile.sh b/sip/regen_makefile.sh
index 86f71b8..722620b 100755
--- a/sip/regen_makefile.sh
+++ b/sip/regen_makefile.sh
@@ -3,6 +3,6 @@
FILES="*.ttcn *.ttcnpp TCCConversion.cc TCCInterface.cc UD_PT.cc MNCC_EncDec.cc IPL4asp_PT.cc
IPL4asp_discovery.cc SDP_EncDec.cc RTP_EncDec.cc IPA_CodecPort_CtrlFunctDef.cc RTP_CodecPort_CtrlFunctDef.cc TELNETasp_PT.cc Native_FunctionDefs.cc SIPmsg_PT.cc *.c "
-export CPPFLAGS_TTCN3=""
+export CPPFLAGS_TTCN3="-DIPA_EMULATION_CTRL -DRAN_EMULATION_CTRL"
../regen-makefile.sh SIP_Tests.ttcn $FILES