Commit | Line | Data |
---|---|---|
970ed795 | 1 | <!-- |
d44e3c4f | 2 | Copyright (c) 2000-2016 Ericsson Telecom AB |
970ed795 EL |
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 | |
d44e3c4f | 7 | |
8 | Contributors: | |
9 | Baji, Laszlo | |
10 | Balasko, Jeno | |
11 | Farkas, Laszlo | |
12 | Kovacs, Ferenc | |
13 | Szabados, Kristof | |
14 | Szabo, Janos Zoltan – initial implementation | |
15 | --> | |
970ed795 EL |
16 | <html> |
17 | <head> | |
18 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
19 | <meta http-equiv="Content-Language" content="en-us"> | |
20 | <title>timeout</title> | |
21 | </head> | |
22 | <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> | |
23 | <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> | |
24 | <tr> | |
25 | <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> | |
26 | </tr> | |
27 | </table> | |
28 | <table border="0" align="right" cellpadding="0" cellspacing="0"> | |
29 | <tr> | |
30 | <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td> | |
31 | <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td> | |
32 | <td><a href="testcasename.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td> | |
33 | <td><a href="timer.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td> | |
34 | </tr> | |
35 | </table> | |
36 | <p><br clear="all"> | |
37 | </p> | |
38 | <hr> | |
39 | <h1>timeout</h1> | |
40 | <blockquote> | |
41 | <p>1. <a href="#1.">Catching timeout exceptions</a></p> | |
42 | <p>2. <a href="#timer">Wating for timer expiry</a></p> | |
43 | </blockquote> | |
44 | <hr align="left" width="75%"> | |
45 | <p>2. <a name="timer">Waiting for timer expiry</a></p> | |
46 | <hr align="left" width="50%"> | |
47 | <p>The operation allows to wait for the <a href="#timer_start">expiration</a> of a timer.</p> | |
48 | <ul> | |
49 | <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 | |
50 | the momentarily state of the timer.</li> | |
51 | <li>Used as a stand-alone statement, it blocks program execution until the timer expires.</li> | |
52 | <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="#default">does not matter which | |
53 | timer</a> will expire.</li> | |
54 | </ul> | |
55 | <p>Related keywords:</p> | |
56 | <ul> | |
57 | <li><a href="any.html"><b><font face="Courier New" color="#003258" size="4">any</font></b></a></li> | |
58 | <li><a href="read.html"><b><font face="Courier New" color="#003258" size="4">read</font></b></a></li> | |
59 | <li><a href="start.html"><b><font face="Courier New" color="#003258" size="4">start</font></b></a></li> | |
60 | <li><a href="stop.html"><b><font face="Courier New" color="#003258" size="4">stop</font></b></a></li> | |
61 | <li><a href="timer.html"><b><font face="Courier New" color="#003258" size="4">timer</font></b></a></li> | |
62 | <li><a href="running.html"><b><font face="Courier New" color="#003258" size="4">running</font></b></a></li> | |
63 | </ul> | |
64 | <hr align="left" width="50%"> | |
65 | <div align="center"> | |
66 | <center> | |
67 | <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> | |
68 | <tr> | |
69 | <td width="100%"> | |
70 | <h3 align="center">( <i>timer_identifier</i> | <font face="Courier New" color="#003258" size="5"><b>any timer</b></font> )<font face="Courier New" color="#003258" size="5"><b>.timeout</b></font> | |
71 | <font face="Courier New" color="#003258" size="5"><b>;</b></font></h3> | |
72 | </td> | |
73 | </tr> | |
74 | </table> | |
75 | </center> | |
76 | </div> | |
77 | <ul> | |
78 | <li> | |
79 | <p><i>timer_identifier</i> is the name used to refer to the timer. It must begin with a letter, may contain letters, numbers and underscore characters.</p> | |
80 | </li> | |
81 | </ul> | |
82 | <hr align="left" width="75%" color="#0094D2"> | |
83 | <p>It is possible to check a member of an <a href="#array">timer array</a>.</p> | |
84 | <hr align="left" width="50%" color="#0094D2"> | |
85 | <div align="center"> | |
86 | <center> | |
87 | <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> | |
88 | <tr> | |
89 | <td width="100%"> | |
90 | <h3 align="center"><font face="Courier New" color="#003258" size="5"><b></b></font> <i>timer_identifier</i><font face="Courier New" color="#003258" size="5"><b>[</b></font><i>array_index</i><font | |
91 | face="Courier New" color="#003258" size="5"><b>].timeout; </b></font></h3> | |
92 | </td> | |
93 | </tr> | |
94 | </table> | |
95 | </center> | |
96 | </div> | |
97 | <div align="center"></div> | |
98 | <ul> | |
99 | <li> | |
100 | <p><i>timer_identifier</i> is the name used to refer to the timer. It must begin with a letter, may contain letters, numbers and underscore characters.</p> | |
101 | </li> | |
102 | <li> | |
103 | <p><i>array_index</i> points out the timer to be checked.</p> | |
104 | </li> | |
105 | </ul> | |
106 | <hr align="left" width="50%"> | |
107 | <p><a name="timer_start">Example 2a</a>: | |
108 | <p><font face="Courier New">T_rejaillir.timeout;<br> | |
109 | </font> | |
110 | <p>The program execution is suspended until the timer T_rejaillir expires.</p> | |
111 | <hr align="left" width="50%"> | |
112 | <p><a name="default">Example 2b:</a> | |
d44e3c4f | 113 | <p><font face="Courier New">[] any timer.timeout { â\80¦ }; <br> |
970ed795 EL |
114 | </font> |
115 | <p>This alternative in the alt statement will be invoked when any of the timers has just expired.</p> | |
116 | <hr align="left" width="50%"> | |
117 | <p><a name="array">Example 2c:</a> | |
118 | <p><font face="Courier New">Tl_feu[4].timeout;</font> | |
119 | <p>The program execution is suspended until the fifth timer in the array T_feu expires.</p> | |
120 | <hr align="left" width="25%"> | |
121 | <hr align="left" width="25%"> | |
122 | <p><a HREF="BNF.html#timeoutstatement">BNF definition</a> of <font face="Courier New">timeout</font></p> | |
123 | </body> | |
124 | </html> |