1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2019 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
// which accompanies this distribution, and is available at
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.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
}
|