Debian Codegraph @

help/info/timer.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 Szabados, Kristof
13 Szabo, Janos Zoltan – initial implementation
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>timer</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="timeout.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
32 <td><a href="timestamp.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>timer</h1>
39 <hr align="left" width="75%">
40 <p>The keyword is used to declare timers in the module control part, test cases, functions and altsteps. These timers are considered as local.&nbsp;<br>
41 Additionally, global timers can be declared in component type definitions.</p>
42 <ul>
43 <li>A timer declaration may have an <a href="#default">optional default duration</a> value assigned to it.</li>
44 <li>It is possible to declare <a href="#several">several timers</a> with one keyword.</li>
45 </ul>
46 <p>Related keywords:</p>
47 <ul>
48 <li><a href="read.html"><b><font face="Courier New" color="#003258" size="4">read</font></b></a></li>
49 <li><a href="running.html"><b><font face="Courier New" color="#003258" size="4">running</font></b></a></li>
50 <li><a href="start.html"><b><font face="Courier New" color="#003258" size="4">start</font></b></a></li>
51 <li><a href="stop.html"><b><font face="Courier New" color="#003258" size="4">stop</font></b></a></li>
52 <li><a href="timeout.html"><b><font face="Courier New" color="#003258" size="4">timeout</font></b></a></li>
53 </ul>
54 <hr align="left" width="50%">
55 <div align="center">
56 <center>
57 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
58 <tr>
59 <td width="100%">
60 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>timer </b></font><i>timer_identifier</i> [<font face="Courier New" color="#003258" size="5"><b>:=</b></font> <i>default_value</i>
61 ]<font face="Courier New" color="#003258" size="5"><b>;</b></font></h3>
62 </td>
63 </tr>
64 </table>
65 </center>
66 </div>
67 <ul>
68 <li>
69 <p><i>timer_identifier</i> is the&nbsp;name used to refer to the timer. It must begin with a letter, may contain letters, numbers and underscore characters.<br>
70 &nbsp;According to the&nbsp; Naming convention, the following prefixes are recommended:&nbsp;
71 <ul>
72 <li><b>T_</b> for timers declared within component type definitions,</li>
73 <li>
74 <p><b>Tl_</b> for timers declared in test cases, functions, altsteps, block of statements or in the control part.</p>
75 </li>
76 </ul>
77 </li>
78 <li><i>default_value</i> optionally states the value of the timer in seconds unless otherwise given in the statement <a href="start.html"> <b><font face="Courier New" color="#003258"
79 size="4">start</font></b></a>.<br>
80 <a href="float.html"><b><font face="Courier New" color="#003258" size="4">Float</font></b></a>ing point values must be used.</li>
81 </ul>
82 <hr align="left" width="75%" color="#0094D2">
83 <p>It is possible to define an <a href="#array">array of timers</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>timer</b></font> <i>timer_identifier</i> <font face="Courier New" color="#003258" size="5"><b>[</b></font><i>array_dimension</i><font
91 face="Courier New" color="#003258" size="5"><b>]</b></font> [<font face="Courier New" color="#003258" size="5"><b>:=</b></font> <i>default_value_list</i> ]<font face="Courier New"
92 color="#003258" size="5"><b>;</b></font></h3>
93 </td>
94 </tr>
95 </table>
96 </center>
97 </div>
98 <div align="center"></div>
99 <ul>
100 <li>
101 <p><i>timer_identifier</i> is the&nbsp;name used to refer to the timer. It must begin with a letter, may contain letters, numbers and underscore characters.</p>
102 </li>
103 <li>
104 <p><i>array_dimension</i> gives the number of timers to be defined.</p>
105 </li>
106 <li><i>default_value</i> optionally states the value array of the timers in seconds unless otherwise given in the statement <b><a href="start.html"><font face="Courier New"
107 color="#003258" size="4">start</font></a></b>.<br>
108 <a href="float.html"><b><font face="Courier New" color="#003258" size="4">Float</font></b></a>ing point values must be used.</li>
109 </ul>
110 <hr align="left" width="50%">
111 <p>Example 1:
112 <p><font face="Courier New">timer T_tidsoevervakning;<br>
113 </font>
114 <p>The global timer T_tidsoevervakning is declared.</p>
115 <hr align="left" width="50%">
116 <p><a name="default">Example 2:</a>
117 <p><font face="Courier New">timer Tl_tiempo := 5.5E-2;<br>
118 </font>
119 <p>The local timer Tl_tiempo is declared and given the initial value 55 ms.</p>
120 <hr align="left" width="50%">
121 <p><a name="several">Example 3</a>:
122 <p><font face="Courier New">timer T_tempilo := 5E-3, T_tijd;<br>
123 </font>
124 <p>Two global timers are defined. T_tempilo gets the default value of 5 ms, whereas T_tijd has no default value.</p>
125 <hr align="left" width="50%">
126 <p><a name="array">Example 4:</a>
127 <p><font face="Courier New">timer Tl_temporisation[4] := {-, 1E-1, -, -, -};<br>
128 </font>
129 <p>The array of&nbsp; local timers declared is called Tl_temporisation and consists of five timers. The second timer has the default value of 100 ms, the others have no default value.&nbsp;</p>
130 <hr align="left" width="25%">
131 <hr align="left" width="25%">
132 <p><a HREF="BNF.html#timerinstance">BNF definition</a> of <font face="Courier New">timer</font></p>
133 </body>
134 </html>