laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22256 )

Change subject: BSGSP_Emulation: Route STATUS to GLOBAL port for both SIG and 
PTP
......................................................................

BSGSP_Emulation: Route STATUS to GLOBAL port for both SIG and PTP

Change-Id: I6573562c0e7638f153798ee178c7c69d07c26756
Related: OS#4951
---
M library/BSSGP_Emulation.ttcnpp
1 file changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  daniel: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/library/BSSGP_Emulation.ttcnpp b/library/BSSGP_Emulation.ttcnpp
index 5c825d6..7996f96 100644
--- a/library/BSSGP_Emulation.ttcnpp
+++ b/library/BSSGP_Emulation.ttcnpp
@@ -1,7 +1,7 @@
 module BSSGP_Emulation {

 /* BSSGP Emulation in TTCN-3
- * (C) 2018-2020 Harald Welte <[email protected]>
+ * (C) 2018-2021 Harald Welte <[email protected]>
  * All rights reserved.
  *
  * Released under the terms of GNU General Public License, Version 2 or
@@ -306,7 +306,7 @@
 private template PDU_BSSGP tr_GLOBAL_SIG := (
        {pDU_BSSGP_SUSPEND:=?}, {pDU_BSSGP_SUSPEND_ACK:=?}, 
{pDU_BSSGP_SUSPEND_NACK:=?},
        {pDU_BSSGP_RESUME:=?}, {pDU_BSSGP_RESUME_ACK:=?}, 
{pDU_BSSGP_RESUME_NACK:=?},
-       {pDU_BSSGP_SGSN_INVOKE_TRACE:=?}, {pDU_BSSGP_OVERLOAD:=?}
+       {pDU_BSSGP_SGSN_INVOKE_TRACE:=?}, {pDU_BSSGP_OVERLOAD:=?}, 
{pDU_BSSGP_STATUS:=?}
 );

 /* BSSGP messages that should arrive on the RIM port */
@@ -784,6 +784,10 @@
 };
 type record length(16) of LLC_Entity LLC_Entities;

+private template PDU_BSSGP tr_GLOBAL_PTP := (
+       {pDU_BSSGP_STATUS:=?}
+);
+
 function f_llc_create(boolean sgsn_role := false) return LLC_Entities {
        var LLC_Entities llc;
        for (var integer i := 0; i < 16; i := i+1) {
@@ -1141,6 +1145,14 @@
                }
        }

+       [] BVC.receive(tr_ptp_BnsUdInd(tr_GLOBAL_PTP, g_cfg.bvci)) -> value udi 
{
+               if (GLOBAL.checkstate("Connected")) {
+                       GLOBAL.send(udi.bssgp);
+               } else {
+                       setverdict(fail, "Received BSSGP STATUS ", udi.bssgp);
+               }
+       }
+
        /* Any other PTP BSSGP message: If it has TLLI, route to component; 
otherwise broadcast */
        [] BVC.receive(tr_ptp_BnsUdInd(?, g_cfg.bvci)) -> value udi {
                var BssgpDecoded dec := f_dec_bssgp(udi.bssgp);

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/22256
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I6573562c0e7638f153798ee178c7c69d07c26756
Gerrit-Change-Number: 22256
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: lynxis lazus <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to