Titan Core Initial Contribution
[deliverable/titan.core.git] / help / info / alive.html
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>alive</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="address.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
26 <td><a href="all.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>alive</h1>
33 <p>The alive operation can used to see whether a given parallel test component is alive or not. It works similarly to the running operation, the difference is when used for alive parallel test
34 components.
35 <p>Normal parallel test component is alive when it is running. <code>vc_ptc.alive</code> always returns the same value as <code>vc_ptc.running</code> if <code>vc_ptc</code> is a normal parallel
36 test component.
37 <p>Alive parallel test component is alive from the point of its first start until it is killed implicitely at MTC termination or explicitely using the kill operation.
38 <ul>
39 <li>The operation does not block TTCN-3 program execution, i.e., it reflects the momentary state of the parallel test component and does not wait for its termination.</li>
40 <li>When the <a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a> keyword is used with the operation, it will return true if all parallel
41 test components started are executing their behavior.</li>
42 <li>When the <a href="any.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a> keyword is used with the operation, it will return true if at least one
43 parallel test component is executing its behavior.</li>
44 </ul>
45 <p>Related keywords:</p>
46 <ul>
47 <li><a href="alive.html"><b><font face="Courier New" color="#003258" size="4">alive</font></b></a></li>
48 <li><a href="all.html"><b><font face="Courier New" color="#003258" size="4">all</font></b></a></li>
49 <li><a href="any.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a></li>
50 <li><a href="component.html"> <b><font face="Courier New" color="#003258" size="4">component</font></b> </a></li>
51 <li><a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a>
52 <li><a href="done.html"><b><font face="Courier New" color="#003258" size="4">done</font></b></a>
53 <li><a href="kill.html"><b><font face="Courier New" color="#003258" size="4">kill</font></b></a>
54 <li><a href="killed.html"><b><font face="Courier New" color="#003258" size="4">killed</font></b></a>
55 <li><a href="running.html"><b><font face="Courier New" color="#003258" size="4">running</font></b></a>
56 <li><a href="stop.html"><b><font face="Courier New" color="#003258" size="4">stop</font></b></a></li>
57 </ul>
58 <hr align="left" width="50%">
59 <div align="center">
60 <center>
61 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
62 <tr>
63 <td width="100%">
64 <h3 align="center"><i>component_reference</i><font face="Courier New" color="#003258" size="5"><b>.alive;</b></font> &nbsp;</h3>
65 </td>
66 </tr>
67 </table>
68 </center>
69 </div>
70 <ul>
71 <li>
72 <p>The <i>component_reference</i> is one of the following:</p>
73 <ul>
74 <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
75 component,</li>
76 <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
77 face="Courier New" color="#003258" size="4">component</font></b> </a> to check whether all parallel test components are still alive,</li>
78 <li>
79 <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
80 face="Courier New" color="#003258" size="4">component</font></b></a>&nbsp; to check whether at least one parallel test component is still alive</p>
81 </li>
82 </ul>
83 </li>
84 <li>
85 <p>The <b><font face="Courier New" color="#003258" size="4">alive</font> </b> keyword denotes that (a) component(s) should be checked.</p>
86 </li>
87 </ul>
88 <hr align="left" width="75%">
89 <p>Examples:</p>
90 <hr align="left" width="50%">
91 <p>Example 1</a>:</p>
92 <p><font face="Courier New">var boolean v_Tbana := vc_metro.alive;<br>
93 </font>
94 <p>The variable v_Tbana gets the value true if the component with the reference vc_metro is alive, i.e. one of the following conditions apply:
95 <ul>
96 <li>vc_metro is a normal parallel test component executing a function; or
97 <li>vc_metro is an alive parallel test component that has been started al least once and not killed yet.
98 </ul>
99 <hr align="left" width="50%">
100 <p>Example 1b:</p>
101 <p><font face="Courier New">var boolean v_Ubahn := all component.alive;</font>
102 <p>The variable v_Ubahn will true if all started parallel components are still alive.</p>
103 <hr align="left" width="75%">
104 <p><a HREF="BNF.html#aliveop">BNF definition</a> of <font face="Courier New">component alive</font></p>
105 </body>
106 </html>
This page took 0.032985 seconds and 6 git commands to generate.