summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2020-06-17 22:11:43 +0200
committerHarald Welte <laforge@osmocom.org>2020-06-18 13:32:53 +0200
commitf2f3c9bf79f50667501d6cedb4f5a00c24797f3d (patch)
treed4ce68dcd48a1ca79f58272806991230d9eb1734
parenta36b2464629b2019cfd40758d864ce214ae4675c (diff)
sgsn: Add functions for BSSGP suspend + resume procedure
-rw-r--r--sgsn/SGSN_Tests.ttcn40
1 files changed, 40 insertions, 0 deletions
diff --git a/sgsn/SGSN_Tests.ttcn b/sgsn/SGSN_Tests.ttcn
index 57c9e02..77ebbcd 100644
--- a/sgsn/SGSN_Tests.ttcn
+++ b/sgsn/SGSN_Tests.ttcn
@@ -799,6 +799,46 @@ friend function f_gmm_attach(boolean umts_aka_challenge, boolean force_gsm_sres,
f_sleep(0.05);
}
+friend function f_bssgp_suspend(integer ran_idx := 0) runs on BSSGP_ConnHdlr return OCT1 {
+ timer T := 5.0;
+ var PDU_BSSGP rx_pdu;
+ BSSGP_SIG[ran_idx].send(ts_BSSGP_SUSPEND(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id));
+ T.start;
+ alt {
+ [] BSSGP_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_ACK(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+ return rx_pdu.pDU_BSSGP_SUSPEND_ACK.suspend_Reference_Number.suspend_Reference_Number_value;
+ }
+ [] BSSGP_SIG[ran_idx].receive(tr_BSSGP_SUSPEND_NACK(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id, ?)) -> value rx_pdu {
+ setverdict(fail, "SUSPEND-NACK in response to SUSPEND for TLLI ", g_pars.tlli);
+ mtc.stop;
+ }
+ [] T.timeout {
+ setverdict(fail, "No SUSPEND-ACK in response to SUSPEND for TLLI ", g_pars.tlli);
+ mtc.stop;
+ }
+ }
+ return '00'O;
+}
+
+friend function f_bssgp_resume(OCT1 susp_ref, integer ran_idx := 0) runs on BSSGP_ConnHdlr {
+ timer T := 5.0;
+ BSSGP_SIG[ran_idx].send(ts_BSSGP_RESUME(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id, susp_ref));
+ T.start;
+ alt {
+ [] BSSGP_SIG[ran_idx].receive(tr_BSSGP_RESUME_ACK(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id));
+ [] BSSGP_SIG[ran_idx].receive(tr_BSSGP_RESUME_NACK(g_pars.tlli, g_pars.bssgp_cell_id[ran_idx].ra_id,
+?)) {
+ setverdict(fail, "RESUME-NACK in response to RESUME for TLLI ", g_pars.tlli);
+ mtc.stop;
+ }
+ [] T.timeout {
+ setverdict(fail, "No RESUME-ACK in response to SUSPEND for TLLI ", g_pars.tlli);
+ mtc.stop;
+ }
+ }
+}
+
+
private function f_TC_attach(charstring id) runs on BSSGP_ConnHdlr {
f_gmm_attach(false, false);
setverdict(pass);