diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp index 898b38dc2..a9a15f50c 100644 --- a/library/BSSGP_Emulation.ttcnpp +++ b/library/BSSGP_Emulation.ttcnpp @@ -233,6 +233,10 @@ type component BSSGP_CT { /* control by the user */ port BSSGP_CT_PROC_PT PROC; + /* global port for procedures without any relation to a BVC + * (currently only) SUSPEND/RESUME */ + port BSSGP_SP_PT GLOBAL; + var BssgpConfig g_cfg; /* Signaling BVC (BVCI=0) */ @@ -286,12 +290,18 @@ altstep as_sig_wait_reset() runs on BSSGP_CT { } } +private template PDU_BSSGP tr_GLOBAL := ( + {pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, {pDU_BSSGP_SUSPEND_NACK:=?}, + {pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, {pDU_BSSGP_RESUME_NACK:=?} +); + /* We are in BVC_S_UNBLOCKED state */ altstep as_sig_unblocked() runs on BSSGP_CT { var BSSGP_BVC_CT bvc_comp_ref; var BSSGP_Client_CT vc_conn; var NsUnitdataIndication udi; var NsUnitdataRequest udr; + var PDU_BSSGP bssgp; /* Messages PTP BVCI in BVCI field of NS: dispatch by that */ [] BSCP.receive(f_BnsUdInd(?, (2..65535))) -> value udi { @@ -306,6 +316,9 @@ altstep as_sig_unblocked() runs on BSSGP_CT { } /* Messages with BVCI = 0 (Signaling) in BVCI field of NS */ + [] BSCP.receive(f_BnsUdInd(tr_GLOBAL, 0)) -> value udi { + GLOBAL.send(udi.bssgp); + } /* Route based on PTP BVCI in payload/IE of signaling PDU */ [] BSCP.receive(f_BnsUdInd(?, 0)) -> value udi { @@ -354,6 +367,10 @@ altstep as_sig_unblocked() runs on BSSGP_CT { udr.nsei := g_cfg.nsei; BSCP.send(udr); } + + [] GLOBAL.receive(tr_GLOBAL) -> value bssgp { + BSCP.send(f_BnsUdReq(bssgp, 0, 0)); + } } /* We are in BVC_S_WAIT_NS_ALIVE_UNBLOCKED (only happens in BSS role) */