Commit | Line | Data |
---|---|---|
970ed795 EL |
1 | <!-- |
2 | Copyright (c) 2000-2014 Ericsson Telecom AB | |
3 | ||
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 | |
8 | --> | |
9 | <html> | |
10 | <head> | |
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> | |
14 | </head> | |
15 | <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> | |
16 | <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> | |
17 | <tr> | |
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> | |
19 | </tr> | |
20 | </table> | |
21 | <table border="0" align="right" cellpadding="0" cellspacing="0"> | |
22 | <tr> | |
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> | |
27 | </tr> | |
28 | </table> | |
29 | <p><br clear="all"> | |
30 | </p> | |
31 | <hr> | |
32 | <h1>connect</h1> | |
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. | |
35 | <ul> | |
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> | |
39 | </ul> | |
40 | <p>Related keywords:</p> | |
41 | <ul> | |
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> | |
45 | </ul> | |
46 | <hr align="left" width="50%"> | |
47 | <div align="center"> | |
48 | <center> | |
49 | <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> | |
50 | <tr> | |
51 | <td width="100%"> | |
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> | |
55 | </td> | |
56 | </tr> | |
57 | </table> | |
58 | </center> | |
59 | </div> | |
60 | <ul> | |
61 | <li> | |
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> | |
63 | </li> | |
64 | <li> | |
65 | <p><i>component_reference</i> is one of the following:</p> | |
66 | <ul> | |
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> | |
71 | </li> | |
72 | </ul> | |
73 | </li> | |
74 | <li> | |
75 | <p><i> port_reference</i> points out the port to be connected.</p> | |
76 | </li> | |
77 | </ul> | |
78 | <hr align="left" width="50%"> | |
79 | <p>Example: | |
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> | |
88 | </body> | |
89 | </html> |