2 Copyright (c) 2000-2016 Ericsson Telecom AB
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/epl-v10.html
16 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
17 <meta http-equiv=
"Content-Language" content=
"en-us">
18 <title>connect
</title>
20 <body bgcolor=
"#DAD3C5" vlink=
"#0094D2" link=
"#003258">
21 <table align=
"left" border=
"0" cellspacing=
"0" cellpadding=
"0" valign=top
>
23 <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>
26 <table border=
"0" align=
"right" cellpadding=
"0" cellspacing=
"0">
28 <td><a href=
"../titan_main.html" alt=
"contents"><img border=
"0" src=
"../images/ao.jpg" width=
"53" height=
"40"></a></td>
29 <td><a href=
"../titan_index.html" alt=
"index"><img border=
"0" src=
"../images/up.jpg" width=
"53" height=
"40"></a></td>
30 <td><a href=
"component.html" alt=
"previous"><img border=
"0" src=
"../images/left.jpg" width=
"53" height=
"40"></a></td>
31 <td><a href=
"const.html" alt=
"next"><img border=
"0" src=
"../images/right.jpg" width=
"53" height=
"40"></a></td>
38 <hr align=
"left" width=
"75%">
39 <p>The operation is used to connect the ports of a test component to the ports of another components.
41 <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>
42 <li>a port may be connected to several ports (
<b><font face=
"Courier New">connect
</font></b> used several times);
</li>
43 <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>
45 <p>Related keywords:
</p>
47 <li><a href=
"create.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">create
</font></b></a></li>
48 <li><a href=
"mtc.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">mtc
</font></b></a></li>
49 <li><a href=
"self.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">self
</font></b></a></li>
51 <hr align=
"left" width=
"50%">
54 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
57 <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
58 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
59 face=
"Courier New" color=
"#003258" size=
"5"><b>);
</b></font> </h3>
67 <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>
70 <p><i>component_reference
</i> is one of the following:
</p>
72 <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>
73 <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
74 face=
"Courier New" color=
"#003258" size=
"4">connect
</font></b> is given,
</li>
75 <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>
80 <p><i> port_reference
</i> points out the port to be connected.
</p>
83 <hr align=
"left" width=
"50%">
85 <p><font face=
"Courier New">var MyComponentType_CT vc_MyNewPTC := MyComponentType_CT.create;
<br>
86 connect(vc_MyNewPTC:Port1_PCO, mtc:Port3_PCO);
</font>
87 <p>The component of type MyComponentType_CT is created in the first line.
<br>
88 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>
89 On the side B of the connection is the port called Port3_PCO of the main test component.
</p>
90 <hr align=
"left" width=
"25%">
91 <hr align=
"left" width=
"25%">
92 <p><a HREF=
"BNF.html#connectstatement">BNF definition
</a> of
<font face=
"Courier New"> connect
</font></p>