Merge github.com:eclipse/titan.core
[deliverable/titan.core.git] / help / info / connect.html
1 <!--
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
7
8 Contributors:
9 Baji, Laszlo
10 Balasko, Jeno
11 Farkas, Laszlo
12 Szabados, Kristof
13 -->
14 <html>
15 <head>
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>
19 </head>
20 <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
21 <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
22 <tr>
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>
24 </tr>
25 </table>
26 <table border="0" align="right" cellpadding="0" cellspacing="0">
27 <tr>
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>
32 </tr>
33 </table>
34 <p><br clear="all">
35 </p>
36 <hr>
37 <h1>connect</h1>
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.&nbsp;
40 <ul>
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;&nbsp;</li>
44 </ul>
45 <p>Related keywords:</p>
46 <ul>
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>
50 </ul>
51 <hr align="left" width="50%">
52 <div align="center">
53 <center>
54 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
55 <tr>
56 <td width="100%">
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> &nbsp;</h3>
60 </td>
61 </tr>
62 </table>
63 </center>
64 </div>
65 <ul>
66 <li>
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>
68 </li>
69 <li>
70 <p><i>component_reference</i> is one of the following:</p>
71 <ul>
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>
76 &nbsp;</li>
77 </ul>
78 </li>
79 <li>
80 <p><i> port_reference</i> points out the port to be connected.</p>
81 </li>
82 </ul>
83 <hr align="left" width="50%">
84 <p>Example:
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>
93 </body>
94 </html>
This page took 0.033068 seconds and 5 git commands to generate.