diff options
Diffstat (limited to 'library/BSSAP_LE_Adapter.ttcn')
-rw-r--r-- | library/BSSAP_LE_Adapter.ttcn | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/library/BSSAP_LE_Adapter.ttcn b/library/BSSAP_LE_Adapter.ttcn index dba8841b..9305c63b 100644 --- a/library/BSSAP_LE_Adapter.ttcn +++ b/library/BSSAP_LE_Adapter.ttcn @@ -56,7 +56,7 @@ type record BSSAP_LE_Configuration { integer peer_pc, integer peer_ssn, octetstring sio, - integer rctx + integer rctx optional }; type record of BSSAP_LE_Configuration BSSAP_LE_Configurations; @@ -84,18 +84,25 @@ function f_bssap_le_adapter_init(inout BSSAP_LE_Adapter ba, in BSSAP_LE_Configur ops.sccp_addr_local := ba.sccp_addr_own; ops.sccp_addr_peer := ba.sccp_addr_peer; + var template (omit) integer rctx; + if (not ispresent(cfg.rctx)) { + rctx := omit; + } else { + rctx := cfg.rctx; + } + /* create components */ - ba.vc_SCCP := SCCP_CT.create(id & "-SCCP"); + ba.vc_SCCP := SCCP_CT.create(id & "-SCCP") alive; if (isvalue(ops)) { - ba.vc_BSSAP_LE := BSSAP_LE_Emulation_CT.create(id & "-BSSAP_LE"); + ba.vc_BSSAP_LE := BSSAP_LE_Emulation_CT.create(id & "-BSSAP_LE") alive; } else { ba.vc_BSSAP_LE := null; } - ba.vc_M3UA := M3UA_CT.create(id & "-M3UA"); + ba.vc_M3UA := M3UA_CT.create(id & "-M3UA") alive; map(ba.vc_M3UA:SCTP_PORT, system:sctp); /* connect MTP3 service provider (M3UA) to lower side of SCCP */ connect(ba.vc_M3UA:MTP3_SP_PORT, ba.vc_SCCP:MTP3_SCCP_PORT); - ba.vc_M3UA.start(f_M3UA_Emulation(cfg.sctp_addr, cfg.rctx)); + ba.vc_M3UA.start(f_M3UA_Emulation(cfg.sctp_addr, rctx)); if (isvalue(ops)) { timer T := 5.0; |