break GTP_Templates dependency on Osmo_Gb_Types, BSSGP_Types, NS_Types
The resulting set of dependencies needed just to have one simple CellId
struct is huge. That was fine for sgsn testsuite since anyway those were
being used, but it's not acceptable for other testsuites (hnodeb) which
only really require the GTP side.
After this change, GTP_Templates only requires GSM_Types, which ends up
in a much smaller subset of dependencies being pulled in.
Change-Id: Icd8234908af445b798517fe110cd0648969179a4
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 2461962..3386f71 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -250,6 +250,12 @@
return ret;
};
+private function f_BssgpCellId_to_GTP_CellId(in BssgpCellId cell_id) return GTP_CellId
+{
+ template (value) GTP_CellId ret := ts_GTP_CellId(cell_id.ra_id, cell_id.cell_id);
+ return valueof(ret);
+}
+
private function f_init_gb(inout GbInstance gb, charstring id, integer offset) runs on test_CT {
gb.vc_NS := NS_CT.create(id & "-NS" & int2str(offset));
gb.vc_BSSGP := BSSGP_CT.create(id & "-BSSGP" & int2str(offset));
@@ -3373,20 +3379,21 @@
remName := mp_sgsn_gtp_ip,
remPort := GTP1C_PORT
}
+ var GTP_CellId gtp_ci := f_BssgpCellId_to_GTP_CellId(g_gb[1].cfg.bvc[0].cell_id);
var template (value) RIM_Routing_Address_GTPC gtpc_dst_addr, gtpc_src_addr;
var template (value) RAN_Information_Request_RIM_Container_GTPC gtpc_rim_req_cont;
var template (value) PDU_BSSGP_RAN_INFORMATION_REQUEST_GTPC gtpc_bssgp_cont;
var template (value) Gtp1cUnitdata gtpc_pdu;
- gtpc_dst_addr := t_GTPC_RIM_Routing_Address_cid(g_gb[1].cfg.bvc[0].cell_id);
- gtpc_src_addr := t_GTPC_RIM_Routing_Address_enbid(g_gb[1].cfg.bvc[0].cell_id, tac := 3, gnbid := '12345678123456'O);
+ gtpc_dst_addr := t_GTPC_RIM_Routing_Address_cid(gtp_ci);
+ gtpc_src_addr := t_GTPC_RIM_Routing_Address_enbid(gtp_ci, tac := 3, gnbid := '12345678123456'O);
gtpc_rim_req_cont := ts_GTPC_RAN_Information_Request_RIM_Container(ts_GTPC_RIM_Application_Identity(RIM_APP_ID_NACC),
ts_GTPC_RIM_Sequence_Number(1),
ts_GTPC_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
ts_GTPC_RIM_Protocol_Version_Number(1),
- tsu_GTPC_RAN_Information_Request_Application_Container_NACC(g_gb[1].cfg.bvc[0].cell_id),
+ tsu_GTPC_RAN_Information_Request_Application_Container_NACC(gtp_ci),
omit);
gtpc_bssgp_cont := ts_GTPC_RAN_Information_Request(ts_GTPC_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, gtpc_dst_addr),
ts_GTPC_RIM_Routing_Information(RIM_ADDR_EUTRAN_NODEB_ID, gtpc_src_addr),
@@ -3439,7 +3446,7 @@
ts_GTPC_RIM_Sequence_Number(2),
ts_GTPC_RIM_PDU_Indications(false, RIM_PDU_TYPE_SING_REP),
ts_GTPC_RIM_Protocol_Version_Number(1),
- tru_GTPC_ApplContainer_or_ApplErrContainer_NACC(tru_GTPC_ApplContainer_NACC(g_gb[1].cfg.bvc[0].cell_id, false, 3, si_default)),
+ tru_GTPC_ApplContainer_or_ApplErrContainer_NACC(tru_GTPC_ApplContainer_NACC(gtp_ci, false, 3, si_default)),
omit);
gtpc_bssgp_cont_ack := tr_GTPC_RAN_Information(tr_GTPC_RIM_Routing_Information(RIM_ADDR_EUTRAN_NODEB_ID, gtpc_src_addr),
tr_GTPC_RIM_Routing_Information(RIM_ADDR_GERAN_CELL_ID, gtpc_dst_addr),