Sync with 5.4.0
[deliverable/titan.core.git] / help / info / done.html
CommitLineData
970ed795 1<!--
3abe9331 2 Copyright (c) 2000-2015 Ericsson Telecom AB
970ed795
EL
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>done</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="do.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
26 <td><a href="else.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>done</h1>
33<hr align="left" width="75%">
34<p>The operation is used to wait for (a) given parallel test component(s) to finish executing the function that is running on this component.</p>
35<ul>
36 <li>Used in the body of an <a href="alt.html"><b><font face="Courier New" color="#003258" size="4">alt</font></b></a> statement, it does not block TTCN-3 program execution, i.e., it reflects
37 the momentarily state of the component.</li>
38 <li>Used as a stand-alone statement, it blocks&nbsp; program execution until the component finishes executing the function.</li>
39 <li><a name="stop_all">The</a> keyword <a href="any.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a> is used if it <a href="#any">does not
40 matter which component</a> terminates executiuon.</li>
41 <li><a name="stop_all">The</a> keyword <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> is used if <a href="#all">all components</a>
42 must finish execution.</li>
43 <li>The done operation can address parallel test components only.</li>
44</ul>
45<p>The done operation bears a slightly different meaning on the two kinds of parallel test components:
46<ul>
47 <li>User for normal parallel test components, it implies that the addressed parallel test component is terminated, since this kind of parallel test component can only be started once. When a
48 normal parallel test component is done then it is killed (i.e. killed operation does not block), not running and not alive (i.e. both running and alive operations return false), neither.
49 <li>When an alive parallel test component is done, it can be used to execute additional function(s), thus it is not killed (i.e. killed operation blocks). Consequently, it is alive (i.e. alive
50 operation returns true) but not running (i.e. running operation returns false).
51</ul>
52<p>Related keywords:</p>
53<ul>
54 <li><a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a></li>
55 <li><a href="any.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a></li>
56 <li><a href="alt.html"><b><font face="Courier New" color="#003258" size="4">alt</font></b></a></li>
57 <li><a href="component.html"> <b><font face="Courier New" color="#003258" size="4">component</font></b> </a></li>
58 <li><a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a>
59 <li><a href="alive.html"><b><font face="Courier New" color="#003258" size="4">alive</font></b></a>
60 <li><a href="running.html"><b><font face="Courier New" color="#003258" size="4">running</font></b></a>
61 <li><a href="killed.html"><b><font face="Courier New" color="#003258" size="4">killed</font></b></a>
62 <li><a href="stop.html"><b><font face="Courier New" color="#003258" size="4">stop</font></b></a>
63 <li><a href="kill.html"><b><font face="Courier New" color="#003258" size="4">kill</font></b></a></li>
64</ul>
65<hr align="left" width="50%">
66<div align="center">
67<center>
68<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
69 <tr>
70 <td width="100%">
71 <h3 align="center"><i>component_reference</i><font face="Courier New" color="#003258" size="5"><b>.done;</b></font> &nbsp;</h3>
72 </td>
73 </tr>
74</table>
75</center>
76</div>
77<ul>
78 <li>
79 <p>The <i>component_reference</i> is one of the following:</p>
80 <ul>
81 <li>a reference returned by the <a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a> operation to refer to a given parallel test
82 component,</li>
83 <li>the keyword pair <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> <a href="component.html"> <b><font
84 face="Courier New" color="#003258" size="4">component</font></b> </a> to check whether all parallel test components have finished execution,</li>
85 <li>
86 <p>the keyword pair <a href="mtc.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a> <a href="component.html"> <b><font
87 face="Courier New" color="#003258" size="4">component</font></b></a>&nbsp; to check whether at least one parallel test has finished execution.</p>
88 </li>
89 </ul>
90 </li>
91 <li>
92 <p>The <b><font face="Courier New" color="#003258" size="4">done</font> </b>keyword denotes that (a) component(s) should be checked.</p>
93 </li>
94</ul>
95<hr align="left" width="50%">
96<p><a href="#Example 1a">Examples</a></p>
97<hr align="left" width="75%">
98<p><a name="Example 1a:">Example 1a</a></p>
99<p><font face="Courier New">vc_AncienVolcan.done;<br>
100</font>
101<p>The program execution is suspended until the component with reference vc_AncienVolcan has finished execution.</p>
102<hr align="left" width="50%">
103<p><a name="all">Example</a> 1b:</p>
104<p><font face="Courier New"> all component.done;</font>
105<p>The program execution is suspended until all parallel components have finished execution.</p>
106<hr align="left" width="50%">
107<p><a name="any">Example</a> 1c:</p>
108<p><font face="Courier New">[] any component.done { … };&nbsp;<br>
109</font>
110<p>This alternative in the alt statement will be invoked when any of the components has just finished execution.</p>
111<hr align="left" width="25%">
112<p><a name="Example 2:">Example 2</a></p>
113<p><font face="Courier New"> var PTCType_CT vc_myAlivePtc := PTCType_CT.create alive;<br>
114vc_myAlivePtc.start(f_myPtcFunction1());<br>
115vc_myAlivePtc.done;<br>
116vc_myAlivePtc.start(f_myPtcFunction2());<br>
117vc_myAlivePtc.done;<br>
118vc_myAlivePtc.kill;<br>
119</font>
120<p>The above example demonstrates how a single parallel test component can be used to execute functions subsequently.
121<hr align="left" width="25%">
122<p><a HREF="BNF.html#donestatement">BNF definition</a> of <font face="Courier New">done</font></p>
123</body>
124</html>
This page took 0.033333 seconds and 5 git commands to generate.