diff options
author | erititan | 2017-10-09 09:47:21 +0000 |
---|---|---|
committer | erititan | 2017-10-09 09:47:21 +0000 |
commit | f9f864e56bafc99637b16bc954b58010971e494a (patch) | |
tree | 94893e082edeefefebfe43b4ba17fb341f1fab7c /demo | |
parent | aa5ae9368dc839dd0d6cd128181113699ab0eeca (diff) | |
download | titan.ProtocolModules.ISUP_Q.762-f9f864e56bafc99637b16bc954b58010971e494a.tar.gz titan.ProtocolModules.ISUP_Q.762-f9f864e56bafc99637b16bc954b58010971e494a.tar.xz titan.ProtocolModules.ISUP_Q.762-f9f864e56bafc99637b16bc954b58010971e494a.zip |
Initial commitR.8.A
Diffstat (limited to 'demo')
-rw-r--r-- | demo/ISUP_Mapping.ttcn | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/demo/ISUP_Mapping.ttcn b/demo/ISUP_Mapping.ttcn new file mode 100644 index 0000000..509717a --- /dev/null +++ b/demo/ISUP_Mapping.ttcn @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// Copyright (c) 2000-2017 Ericsson Telecom AB +// +// All rights reserved. This program and the accompanying materials +// are made available under the terms of the Eclipse Public License v1.0 +// which accompanies this distribution, and is available at +// http://www.eclipse.org/legal/epl-v10.html +/////////////////////////////////////////////////////////////////////////////// +// +// File: ISUP_Mapping.ttcn +// Rev: R8A +// Prodnr: CNL 113 365 +// Updated: 2006-05-10 +// Contact: http://ttcn.ericsson.se +/////////////////////////////////////////////////////////////////////////////// +module ISUP_Mapping +{ + import from MTP3asp_PortType all; + import from MTP3asp_Types all; + import from ISUP_Types all; + +group Types +{ + type record MSC_ISUP_MTP3_parameters + { + MTP3_Field_sio sio, + integer opc, + integer dpc, + integer sls + } + +group PortTypes +{ + //************************************************************************* + //* ISUP port types * + //************************************************************************* + type port MTP3asp_ISUP_PT message + { + inout PDU_ISUP; + } with {extension "internal"} + + type port MTC_ISUP_PT message // Coordination message + { + inout charstring; + inout octetstring; + } with {extension "internal"} +}//end group PortTypes + + +group ComponentTypes +{ + //************************************************************************* + //* ISUP Component types * + //************************************************************************* + type component ISUP_CT + { + //========================Component constants=========================== + + //========================Component variables=========================== + var PDU_ISUP v_PDU_ISUP; + + //========================Component Timers-============================= + + //========================Component Port Declarations==================== + port MTC_ISUP_PT MTC_ISUP_PORT; //up + port MTP3asp_ISUP_PT MTP3_ISUP_PORT; //down + } // end component type definition + + //************************************************************************* + //* ISUP EncDec component * + //************************************************************************* + type component ISUP_EncDec_CT + { + //========================Component Port Declarations==================== + port MTP3asp_ISUP_PT MTP3_ISUP_PORT; //<= SP_PT=_PT + port MTP3asp_PT MTP3_PORT; + } // end component type definition +}//end group ComponentTypes + +}//end group Types + + +//************************************************************************* +//* ISUP EncDec component behaviour * +//************************************************************************* +function f_ISUP_EncDecComp_Behaviour + ( MSC_ISUP_MTP3_parameters pl_address_ISUP ) runs on ISUP_EncDec_CT + { + var ASP_MTP3_TRANSFERind vl_ASP_MTP3_TRANSFERind; + var PDU_ISUP vl_PDU_ISUP; + pl_address_ISUP.sio.si := '0101'B; + + while (true) + { + alt + { + [] MTP3_ISUP_PORT.receive ( PDU_ISUP : ?) -> value vl_PDU_ISUP + { + MTP3_PORT.send (t_ASP_MTP3_TRANSFERreq + (pl_address_ISUP.sio, + pl_address_ISUP.opc, + pl_address_ISUP.dpc, + pl_address_ISUP.sls, + enc_PDU_ISUP(vl_PDU_ISUP))); + repeat; + } + + // receive message from below (to be decoded) + [] MTP3_PORT.receive (tr_ASP_MTP3_TRANSFERind_sio + (pl_address_ISUP.sio.ni, + ?, //priority: no filtering + pl_address_ISUP.sio.si, + ?, + ?, + ?, + ? )) -> value vl_ASP_MTP3_TRANSFERind + { + MTP3_ISUP_PORT.send (dec_PDU_ISUP(vl_ASP_MTP3_TRANSFERind.data)); + repeat; + } + + [] MTP3_PORT.receive (t_ASP_MTP3_TRANSFERind( ?, ?, ?, ?, ? )) + { log("Invalid SIO: MESSAGE dropped!!!"); } + } //end of alt + } // end while + } // end of f_ISUP_EncDecComp_Behaviour +} |