Support signalling BVC to send/receive messages

Change-Id: Icbe9f918d16efd01ede4e060f8af53a5e2c9253f
Related: SYS#5210
This commit is contained in:
Daniel Willmann 2020-11-24 16:23:29 +01:00 committed by laforge
parent 7f1d78e164
commit 4798fd7d65
1 changed files with 30 additions and 6 deletions

View File

@ -537,20 +537,32 @@ runs on BSSGP_ConnHdlr {
/* Send 'tx' on PTP-BVCI from PCU; expect 'rx' on SGSN */
friend function f_pcu2sgsn(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx,
integer pcu_idx := 0, integer sgsn_idx := 0) runs on BSSGP_ConnHdlr {
integer pcu_idx := 0, integer sgsn_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr {
var PDU_BSSGP rx;
timer T := 1.0;
PCU[pcu_idx].send(tx);
if (use_sig) {
PCU_SIG[pcu_idx].send(tx);
} else {
PCU[pcu_idx].send(tx);
}
T.start;
alt {
[] SGSN[sgsn_idx].receive(exp_rx) {
[use_sig] SGSN_SIG[sgsn_idx].receive(exp_rx) {
setverdict(pass);
}
[not use_sig] SGSN[sgsn_idx].receive(exp_rx) {
setverdict(pass);
}
[] SGSN[sgsn_idx].receive(PDU_BSSGP:?) -> value rx {
setverdict(fail, "Unexpected BSSGP on SGSN side: ", rx);
mtc.stop;
}
[] SGSN_SIG[sgsn_idx].receive(PDU_BSSGP:?) -> value rx {
setverdict(fail, "Unexpected SIG BSSGP on SGSN side: ", rx);
mtc.stop;
}
[] T.timeout {
setverdict(fail, "Timeout waiting for BSSGP on SGSN side: ", rx);
mtc.stop;
@ -560,20 +572,32 @@ friend function f_pcu2sgsn(template (value) PDU_BSSGP tx, template (present) PDU
/* Send 'tx' on PTP-BVCI from SGSN; expect 'rx' on PCU */
friend function f_sgsn2pcu(template (value) PDU_BSSGP tx, template (present) PDU_BSSGP exp_rx,
integer sgsn_idx:= 0, integer pcu_idx := 0) runs on BSSGP_ConnHdlr {
integer sgsn_idx:= 0, integer pcu_idx := 0, boolean use_sig := false) runs on BSSGP_ConnHdlr {
var PDU_BSSGP rx;
timer T := 1.0;
SGSN[sgsn_idx].send(tx);
if (use_sig) {
SGSN_SIG[sgsn_idx].send(tx);
} else {
SGSN[sgsn_idx].send(tx);
}
T.start;
alt {
[] PCU[pcu_idx].receive(exp_rx) {
[use_sig] PCU_SIG[pcu_idx].receive(exp_rx) {
setverdict(pass);
}
[not use_sig] PCU[pcu_idx].receive(exp_rx) {
setverdict(pass);
}
[] PCU[pcu_idx].receive(PDU_BSSGP:?) -> value rx {
setverdict(fail, "Unexpected BSSGP on PCU side: ", rx);
mtc.stop;
}
[] PCU_SIG[pcu_idx].receive(PDU_BSSGP:?) -> value rx {
setverdict(fail, "Unexpected SIG BSSGP on PCU side: ", rx);
mtc.stop;
}
[] T.timeout {
setverdict(fail, "Timeout waiting for BSSGP on PCU side: ", rx);
mtc.stop;