BSSGP_Emulation: Add MGMT port to per-NSE (BVCI=0) component
We recently introduced a MGMT port in the per-BVC component for the
PTP BVC. Let's add this also to the signaling BVC.
Change-Id: I24df4cb290c9f9dc1a7398994af101711f12d42e
diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index c39adaa..a6bdbb5 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -237,6 +237,9 @@
* (currently only) SUSPEND/RESUME */
port BSSGP_SP_PT GLOBAL;
+ /* port to a management instance */
+ port BSSGP_BVC_MGMT_SP_PT MGMT;
+
var BssgpConfig g_cfg;
/* Signaling BVC (BVCI=0) */
@@ -278,15 +281,21 @@
/* Respond to RESET for signalling BVCI 0 */
[] BSCP.receive(f_BnsUdInd(tr_BVC_RESET(?, 0, omit), 0)) -> value udi {
log("Rx BVC-RESET for Signaling BVCI=0");
- BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, omit), 0, 0));
f_sign_change_state(BVC_S_UNBLOCKED);
+ if (MGMT.checkstate("Connected")) {
+ MGMT.send(BssgpResetIndication:{0});
+ }
+ BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, omit), 0, 0));
}
/* work-around for old, buggy libosmogb before Change-Id Ie87820537d6d616da4fd4bbf73eab06e28fda5e1 */
[mp_tolerate_bvc_reset_cellid] BSCP.receive(f_BnsUdInd(tr_BVC_RESET(?, 0, g_cfg.bvc[0].cell_id), 0)) -> value udi {
log("Rx BVC-RESET for Signaling BVCI=0");
- BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, omit), 0, 0));
f_sign_change_state(BVC_S_UNBLOCKED);
+ if (MGMT.checkstate("Connected")) {
+ MGMT.send(BssgpResetIndication:{0});
+ }
+ BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, omit), 0, 0));
}
}
@@ -400,6 +409,9 @@
/* Respond to RESET for signalling BVCI 0 */
[] BSCP.receive(f_BnsUdInd(tr_BVC_RESET(?, 0, omit), 0)) -> value udi {
log("Rx BVC-RESET for Signaling BVCI=0");
+ if (MGMT.checkstate("Connected")) {
+ MGMT.send(BssgpResetIndication:{0});
+ }
BSCP.send(f_BnsUdReq(ts_BVC_RESET_ACK(0, omit), 0, 0));
for (var integer i := 0; i < sizeof(BvcTable); i := i+1) {
if (isbound(BvcTable[i].comp_ref) and BvcTable[i].comp_ref != null) {