summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bts/BTS_Tests.ttcn74
-rw-r--r--library/PCUIF_Types.ttcn4
2 files changed, 77 insertions, 1 deletions
diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index d9e989c..21e5634 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -32,6 +32,8 @@ import from MobileL3_CommonIE_Types all;
import from MobileL3_RRM_Types all;
import from MobileL3_Types all;
import from L3_Templates all;
+import from L3_Common all;
+import from MobileL3_GMM_SM_Types all;
import from Osmocom_VTY_Functions all;
import from TELNETasp_PortType all;
@@ -3799,6 +3801,77 @@ testcase TC_pcu_oml_alert() runs on test_CT {
setverdict(pass);
}
+template (value) PDU_ML3_MS_NW ts_RRM_GprsSuspReq(template (value) OCT4 tlli,
+ template (value) RoutingAreaIdentificationV rai,
+ template (value) OCT1 cause) := {
+ discriminator := '0000'B, /* overwritten */
+ tiOrSkip := {
+ skipIndicator := '0000'B
+ },
+ msgs := {
+ rrm := {
+ gPRS_suspensionRequest := {
+ messageType := '00110100'B,
+ tLLI := tlli,
+ routingAreaIdentification := rai,
+ suspensionCause := cause,
+ service_Support := omit
+ }
+ }
+ }
+}
+
+/* test for forwarding of RR SUSPEND from CS lchan to PCU via PCU socket */
+private function f_TC_rr_suspend_req(charstring id) runs on ConnHdlr {
+ var PCUIF_Message first_info;
+ var integer pcu_conn_id := -1;
+ var RslLinkId link_id := valueof(ts_RslLinkID_DCCH(0));
+ var RoutingAreaIdentificationV rai := f_RAI('262'H, '42F'H, '2342'O, '55'O);
+ var OCT4 tlli := '01020304'O;
+ var OCT1 cause := '23'O;
+ timer T := 5.0;
+
+ f_init_pcu(PCU, id, pcu_conn_id, first_info);
+
+ f_l1_tune(L1CTL);
+ RSL.clear;
+
+ f_est_dchan();
+ L1CTL.clear;
+
+ f_est_rll_mo(link_id.sapi, link_id, '23420815'O);
+
+ var PDU_ML3_MS_NW susp_req := valueof(ts_RRM_GprsSuspReq(tlli, rai, cause));
+ var octetstring l3 := enc_PDU_ML3_MS_NW(susp_req);
+ f_tx_lapdm(ts_LAPDm_I(link_id.sapi, cr_MO_CMD, true, 1, 0, l3), link_id);
+
+ /* ConnHdlr has terminated after sending the RR SUSP REQ over a dedicaed channel */
+ T.start;
+ alt {
+ [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(0, tlli, ?, oct2int(cause)))) {
+ setverdict(pass);
+ }
+ [] PCU.receive(t_SD_PCUIF(pcu_conn_id, tr_PCUIF_SUSP_REQ(?, ?, ?, ?))) {
+ setverdict(fail, "Received unexpected PCUIF SUSPE REQ: ");
+ }
+ [] PCU.receive {
+ repeat;
+ }
+ [] T.timeout {
+ setverdict(fail, "Timeout waiting for SUSP REQ on PCUIF");
+ }
+ }
+}
+testcase TC_pcu_rr_suspend() runs on test_CT {
+ var ConnHdlrPars pars;
+ var ConnHdlr vc_conn;
+
+ f_init();
+
+ pars := valueof(t_Pars(t_RslChanNr_SDCCH4(0,3), ts_RSL_ChanMode_SIGN));
+ vc_conn := f_start_handler(refers(f_TC_rr_suspend_req), pars, true);
+ vc_conn.done;
+}
/***********************************************************************
@@ -5107,6 +5180,7 @@ control {
execute( TC_pcu_time_ind() );
execute( TC_pcu_rts_req() );
execute( TC_pcu_oml_alert() );
+ execute( TC_pcu_rr_suspend() );
} else {
log("PCU socket path not available, skipping PCU tests");
}
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn
index 750e0b4..455082a 100644
--- a/library/PCUIF_Types.ttcn
+++ b/library/PCUIF_Types.ttcn
@@ -193,7 +193,9 @@ type record PCUIF_susp_req {
OCT4 tlli,
OCT6 ra_id,
uint8_t cause
-} with { variant "" };
+} with {
+ variant (tlli) "BYTEORDER(last)"
+};
type union PCUIF_MsgUnion {