2 Copyright (c) 2000-2015 Ericsson Telecom AB
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html
11 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
12 <meta http-equiv=
"Content-Language" content=
"en-us">
13 <title>connect
</title>
15 <body bgcolor=
"#DAD3C5" vlink=
"#0094D2" link=
"#003258">
16 <table align=
"left" border=
"0" cellspacing=
"0" cellpadding=
"0" valign=top
>
18 <td width=
105 height=
40><a href=
"https://projects.eclipse.org/projects/tools.titan"><img src=
"../images/titan_transparent.gif" border=
0 width=
105 height=
40 align=
"left" alt=
"Titan"></a></td>
21 <table border=
"0" align=
"right" cellpadding=
"0" cellspacing=
"0">
23 <td><a href=
"../titan_main.html" alt=
"contents"><img border=
"0" src=
"../images/ao.jpg" width=
"53" height=
"40"></a></td>
24 <td><a href=
"../titan_index.html" alt=
"index"><img border=
"0" src=
"../images/up.jpg" width=
"53" height=
"40"></a></td>
25 <td><a href=
"component.html" alt=
"previous"><img border=
"0" src=
"../images/left.jpg" width=
"53" height=
"40"></a></td>
26 <td><a href=
"const.html" alt=
"next"><img border=
"0" src=
"../images/right.jpg" width=
"53" height=
"40"></a></td>
33 <hr align=
"left" width=
"75%">
34 <p>The operation is used to connect the ports of a test component to the ports of another components.
36 <li>The operation directly connects one port to another with the
<b><font face=
"Courier New">in
</font></b> side connected to the
<b><font face=
"Courier New">out
</font></b> side and vice versa.;
</li>
37 <li>a port may be connected to several ports (
<b><font face=
"Courier New">connect
</font></b> used several times);
</li>
38 <li>the messages (signatures) defined for both ports must match, i.e., the incoming port must be able to receive all outgoing messages from the connected port;
</li>
40 <p>Related keywords:
</p>
42 <li><a href=
"create.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">create
</font></b></a></li>
43 <li><a href=
"mtc.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">mtc
</font></b></a></li>
44 <li><a href=
"self.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">self
</font></b></a></li>
46 <hr align=
"left" width=
"50%">
49 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
52 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>connect (
</b></font><i>component_reference
</i><sub>A
</sub><font face=
"Courier New" color=
"#003258" size=
"5"><b>:
</b></font><i>port_reference
</i><sub>A
</sub><font
53 face=
"Courier New" color=
"#003258" size=
"5"><b> ,
</b></font><i>component_reference
</i><sub>B
</sub><font face=
"Courier New" color=
"#003258" size=
"5"><b>:
</b></font><i>port_reference
</i><sub>B
</sub><font
54 face=
"Courier New" color=
"#003258" size=
"5"><b>);
</b></font> </h3>
62 <p>The
<b><font face=
"Courier New" color=
"#003258" size=
"4">connect
</font> </b> keyword introduces the port connection. The indices A and B refer to the two sides of the connection.
</p>
65 <p><i>component_reference
</i> is one of the following:
</p>
67 <li>a reference returned by the
<a href=
"create.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">create
</font></b></a> operation,
</li>
68 <li>the keyword
<a href=
"self.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">self
</font></b></a> when referring to the component where
<b><font
69 face=
"Courier New" color=
"#003258" size=
"4">connect
</font></b> is given,
</li>
70 <li>the keyword
<a href=
"mtc.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">mtc
</font></b></a> when referring to the main test component.
<br>
75 <p><i> port_reference
</i> points out the port to be connected.
</p>
78 <hr align=
"left" width=
"50%">
80 <p><font face=
"Courier New">var MyComponentType_CT vc_MyNewPTC := MyComponentType_CT.create;
<br>
81 connect(vc_MyNewPTC:Port1_PCO, mtc:Port3_PCO);
</font>
82 <p>The component of type MyComponentType_CT is created in the first line.
<br>
83 In the second line, its reference (vc_MyNewPTC) is used to point out the port on the side A of the connection (vc_MyNewPTC:Port1_PCO).
<br>
84 On the side B of the connection is the port called Port3_PCO of the main test component.
</p>
85 <hr align=
"left" width=
"25%">
86 <hr align=
"left" width=
"25%">
87 <p><a HREF=
"BNF.html#connectstatement">BNF definition
</a> of
<font face=
"Courier New"> connect
</font></p>