Debian Codegraph @

help/info/port.html

raw symbols SCIP
1 <!--
2 Copyright (c) 2000-2021 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 v2.0
5 which accompanies this distribution, and is available at
6 https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
7
8 Contributors:
9 Baji, Laszlo
10 Balasko, Jeno
11 Farkas, Laszlo
12 Forstner, Matyas
13 Szabados, Kristof
14 -->
15 <html>
16 <head>
17 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
18 <meta http-equiv="Content-Language" content="en-us">
19 <title>port</title>
20 </head>
21 <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
22 <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
23 <tr>
24 <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>
25 </tr>
26 </table>
27 <table border="0" align="right" cellpadding="0" cellspacing="0">
28 <tr>
29 <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
30 <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
31 <td><a href="permutation.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
32 <td><a href="private.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
33 </tr>
34 </table>
35 <p><br clear="all">
36 </p>
37 <hr>
38 <h1>port</h1>
39 <hr align="left" width="75%">
40 <p>The keyword is used to define a test port. Ports facilitate communication between test components and between test components and the test system interface. Ports are always bidirectional.
41 <ul>
42 <li>Each port shall be defined as being <a href="#message">message-based</a>(1) or <a href="#procedure">procedure-based</a>(2)</li>
43 <li>A <a href="#mixed">mixed port</a>(3) is a shorthand notation for two ports: a message-based and a procedure-based</li>
44 <li>Ports include a list of messages and/or procedures allowed to pass that port together with their direction (in, out, inout)&nbsp;</li>
45 </ul>
46 <p>Related keywords:</p>
47 <ul>
48 <li><a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a></li>
49 <li><a href="in.html"><b><font face="Courier New" color="#003258" size="4">in</font></b></a></li>
50 <li><a href="inout.html"><b><font face="Courier New" color="#003258" size="4">inout</font></b></a></li>
51 <li><a href="message.html"><b><font face="Courier New" color="#003258" size="4">message</font></b></a></li>
52 <li><a href="mixed.html"><b><font face="Courier New" color="#003258" size="4">mixed</font></b></a></li>
53 <li><a href="out.html"><b><font face="Courier New" color="#003258" size="4">out</font></b></a></li>
54 <li><a href="procedure.html"><b><font face="Courier New" color="#003258" size="4">procedure</font></b></a></li>
55 <li><a href="type.html"><b><font face="Courier New" color="#003258" size="4">type</font></b></a></li>
56 </ul>
57 <hr align="left" width="75%">
58 <h4><a name="message">1. Declaring a message-based port</a></h4>
59 <hr align="left" width="50%">
60 <div align="center">
61 <center>
62 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
63 <tr>
64 <td width="100%">
65 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>type port </b></font> <i>port_identifier&nbsp;</i><font face="Courier New" color="#003258" size="5"><b>
66 message {</b></font> [&nbsp; <font face="Courier New" color="#003258" size="5"><b>in all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp; <font
67 face="Courier New" color="#003258" size="5"><b>out all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp; <font
68 face="Courier New" color="#003258" size="5"><b>inout all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; <font face="Courier New"
69 color="#003258" size="5"><b>};</b></font></h3>
70 </td>
71 </tr>
72 </table>
73 </center>
74 </div>
75 <ul>
76 <li>
77 <p>The <a href="type.html"><font face="Courier New" color="#003258" size="4"><b>type</a> port</b></font> keywords introduce the port definition.</p>
78 </li>
79 <li>
80 <p><i>port_identifier</i> is the&nbsp;name used to refer to the port. Must begin with a letter, may contain letters, numbers and underscore characters.&nbsp;<br>
81 According to the&nbsp; Naming convention, the suffix _<b>PT</b> is recommended.</p>
82 </li>
83 <li>
84 <p>The <a href="message.html"><font face="Courier New" color="#003258" size="4"><b>message</b></font></a> keyword indicates that only messages are allowed to pass through the
85 port.</p>
86 </li>
87 <li>
88 <p>The <a href="in.html"><font face="Courier New" color="#003258" size="4"><b>in</b></font></a> keyword introduces the list of messages allowed to pass the port in the incoming
89 direction..</p>
90 </li>
91 <li>
92 <p><i>type_list</i> enumerates the allowed message types separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used
93 when no restriction applies.</p>
94 </li>
95 <li>
96 <p>The <a href="out.html"><font face="Courier New" color="#003258" size="4"><b>out</b></font></a> keyword introduces the list of messages allowed to pass the port in the outgoing
97 direction..</p>
98 </li>
99 <li>
100 <p><i>type_list</i> enumerates the allowed message types separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used
101 when no restriction applies.</p>
102 </li>
103 <li>
104 <p>The <a href="inout.html"><font face="Courier New" color="#003258" size="4"><b>inout</b></font></a> keyword introduces the list of messages allowed to pass the port both in
105 incoming and outgoing direction..</p>
106 </li>
107 <li>
108 <p><i>type_list</i> enumerates the allowed message types separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used
109 when no restriction applies.</p>
110 </li>
111 </ul>
112 <p>No element may be repeated within the curly brackets.</p>
113 <p><a href="#Example">Example</a></p>
114 <hr align="left" width="75%">
115 <h4><a name="procedure">2. Declaring a procedure-based port</a></h4>
116 <hr align="left" width="50%">
117 <div align="center">
118 <center>
119 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
120 <tr>
121 <td width="100%">
122 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>type port </b></font> <i>port_identifier&nbsp;</i><font face="Courier New" color="#003258" size="5"><b>
123 procedure {</b></font> [&nbsp; <font face="Courier New" color="#003258" size="5"><b>in all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp;
124 <font face="Courier New" color="#003258" size="5"><b>out all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp; <font
125 face="Courier New" color="#003258" size="5"><b>inout all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; <font face="Courier New"
126 color="#003258" size="5"><b>};</b></font></h3>
127 </td>
128 </tr>
129 </table>
130 </center>
131 </div>
132 <ul>
133 <li>
134 <p>The <a href="type.html"><font face="Courier New" color="#003258" size="4"><b>type</b></font></a><b><font face="Courier New" color="#003258" size="4"> port</font> </b> keywords
135 introduce the port definition.</p>
136 </li>
137 <li>
138 <p><i>port_identifier</i> is the&nbsp;name used to refer to the port. Must begin with a letter, may contain letters, numbers and underscore characters.&nbsp;<br>
139 According to the&nbsp; Naming convention, the suffix _PT is recommended.</p>
140 </li>
141 <li>
142 <p>The <a href="procedure.html"><font face="Courier New" color="#003258" size="4"><b>procedure</b></font></a> keyword indicates that only procedures are allowed to be called
143 through the port.</p>
144 </li>
145 <li>
146 <p>The <a href="in.html"><font face="Courier New" color="#003258" size="4"><b>in</b></font></a> keyword introduces the list of procedures allowed to be called on the port in the
147 incoming direction..</p>
148 </li>
149 <li>
150 <p><i>type_list</i> enumerates the allowed signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used when
151 no restriction applies.</p>
152 </li>
153 <li>
154 <p>The <a href="out.html"><font face="Courier New" color="#003258" size="4"><b>out</b></font></a> keyword introduces the list of procedures allowed to be called on the port in
155 the outgoing direction..</p>
156 </li>
157 <li>
158 <p><i>type_list</i> enumerates the allowed signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used when
159 no restriction applies.</p>
160 </li>
161 <li>
162 <p>The <a href="inout.html"><font face="Courier New" color="#003258" size="4"><b>inout</b></font></a> keyword introduces the list of procedures allowed to be called on the port
163 both in incoming and outgoing direction..</p>
164 </li>
165 <li>
166 <p><i>type_list</i> enumerates the allowed signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used when
167 no restriction applies.</p>
168 </li>
169 </ul>
170 <p>No element may be repeated within the curly brackets.</p>
171 <p><a href="#ex2">Example</a></p>
172 <hr align="left" width="75%">
173 <h4><a name="mixed">3. Declaring a mixed port</a></h4>
174 <hr align="left" width="50%">
175 <div align="center">
176 <center>
177 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
178 <tr>
179 <td width="100%">
180 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>type port </b></font> <i>port_identifier&nbsp;</i><font face="Courier New" color="#003258" size="5"><b>
181 mixed {</b></font> [&nbsp; <font face="Courier New" color="#003258" size="5"><b>in all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp; <font
182 face="Courier New" color="#003258" size="5"><b>out all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp;&nbsp; [&nbsp; <font
183 face="Courier New" color="#003258" size="5"><b>inout all</b></font> | <i>type_list</i><font face="Courier New" color="#003258" size="5"><b>;</b></font> ]&nbsp; <font face="Courier New"
184 color="#003258" size="5"><b>};</b></font></h3>
185 </td>
186 </tr>
187 </table>
188 </center>
189 </div>
190 &nbsp;
191 <table border="0" width="100%" bgcolor="#C9C2BB" cellpadding="4">
192 <tr>
193 <td width="100%">
194 <blockquote>
195 <p><u>TITAN specific restriction compared to the standard:</u></p>
196 </blockquote>
197 <p>&nbsp;Mixed ports are not implemented. When encountered in the TTCN-3 program, it will cause a compilation error.</p>
198 </td>
199 </tr>
200 </table>
201 <ul>
202 <li>
203 <p>The <a href="type.html"><font face="Courier New" color="#003258" size="4"><b>type</b></font></a><b><font face="Courier New" color="#003258" size="4"> port</font> </b> keywords
204 introduce the port definition.</p>
205 </li>
206 <li>
207 <p><i>port_identifier</i> is the&nbsp;name used to refer to the port. Must begin with a letter, may contain letters, numbers and underscore characters.&nbsp;<br>
208 According to the&nbsp; Naming convention, the suffix _PT is recommended.</p>
209 </li>
210 <li>
211 <p>The <a href="mixed.html"><font face="Courier New" color="#003258" size="4"><b>mixed</b></font></a> keyword indicates that both messages and signatures are allowed to pass
212 through the port.</p>
213 </li>
214 <li>
215 <p>The <a href="in.html"><font face="Courier New" color="#003258" size="4"><b>in</b></font></a> keyword introduces the list of messages and signatures allowed to pass the port in
216 the incoming direction..</p>
217 </li>
218 <li>
219 <p><i>type_list</i> enumerates the allowed messages and signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a>
220 is used when no restriction applies.</p>
221 </li>
222 <li>
223 <p>The <a href="out.html"><font face="Courier New" color="#003258" size="4"><b>out</b></font></a> keyword introduces the list of messages and signatures allowed to pass the port
224 in the outgoing direction..</p>
225 </li>
226 <li>
227 <p><i>type_list</i> enumerates the allowed messages and signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a>
228 is used when no restriction applies.</p>
229 </li>
230 <li>
231 <p>The <a href="inout.html"><font face="Courier New" color="#003258" size="4"><b>inout</b></font></a> keyword introduces the list of messages and signatures allowed to pass the
232 port both in incoming and outgoing direction..</p>
233 </li>
234 <li>
235 <p><i>type_list</i> enumerates the allowed messages and signatures separated by commas; <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a>
236 is used when no restriction applies.</p>
237 </li>
238 </ul>
239 <p>No element may be repeated within the curly brackets.</p>
240 <p><a href="#ex3">Example</a></p>
241 <hr align="left" width="50%">
242 <p><a name="Example">Example</a> 1:
243 <p><font face="Courier New">type port MyMessagePortType_PT message {&nbsp;<br>
244 &nbsp;&nbsp;&nbsp;in ASP_RxType1, ASP_RxType2;&nbsp;<br>
245 &nbsp;&nbsp;&nbsp;out ASP_TxType;&nbsp;<br>
246 &nbsp;&nbsp;&nbsp;inout integer, octetstring;&nbsp;<br>
247 }</font>
248 <p>The message-based port called MyMessagePortType_PT is declared.&nbsp;<br>
249 In incoming directions messages of type ASP_RxType1, ASP_RxType2,&nbsp;<br>
250 in outgoing directions messages of type ASP_TxType1,&nbsp;<br>
251 in both outgoing and incoming direction messages of type integer and octetstring<br>
252 are allowed to pass the port.</p>
253 <hr align="left" width="50%">
254 <p><a name="ex2">Example</a> 2:</p>
255 <p><font face="Courier New">type port MyProcedurePortType_PT procedure {&nbsp;<br>
256 &nbsp;&nbsp;&nbsp;out Proc1, Proc2, Proc3&nbsp;<br>
257 }</font>
258 <p>The procedure-based port called MyProcedurePortType_PT is declared.&nbsp;<br>
259 In outgoing directions the signatures Proc1, Proc2 and Proc3&nbsp;are allowed to pass the port.</p>
260 <hr align="left" width="50%">
261 <p><a name="ex3">Example</a> 3:</p>
262 <p><font face="Courier New">type port MyAllMixedPortType_PT mixed {&nbsp;<br>
263 &nbsp;&nbsp;&nbsp;inout all&nbsp;<br>
264 }</font>
265 <p>The mixed port called MyAllMixedPortType_PT is declared.&nbsp;<br>
266 In both outgoing and incoming direction all message types and all signatures defined in the module can be used at this port to communicate with either the system under test (SUT) or other test
267 components.</p>
268 <hr align="left" width="25%">
269 <hr align="left" width="25%">
270 <p><a HREF="BNF.html#portdef">BNF definition</a> of <font face="Courier New"> port</font></p>
271 </body>
272 </html>