Debian Codegraph @

help/info/setstate.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 Baranyi, Botond
10 Szabo, Bence Janos
11 -->
12 <html>
13 <head>
14 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
15 <meta http-equiv="Content-Language" content="en-us">
16 <title>set</title>
17 </head>
18 <body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
19 <table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
20 <tr>
21 <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>
22 </tr>
23 </table>
24 <table border="0" align="right" cellpadding="0" cellspacing="0">
25 <tr>
26 <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
27 <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
28 <td><a href="setencode.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
29 <td><a href="setverdict.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
30 </tr>
31 </table>
32 <p><br clear="all">
33 </p>
34 <hr>
35 <h1>setstate</h1>
36 <hr align="left" width="75%">
37 <p>The setstate operation can change the state of the port during a translation procedure. It can only be used inside a function that is called during a translation procedure to translate a sent or received message.
38 <ul>
39 <li>The setstate operation has two parameters. The second parameter is optional.</li>
40 <li>The first parameter has to be a type of integer and only the 0 (translated), 1 (not translated), 2 (fragmented) and 3 (partially translated) values are accepted.</li>
41 <li>The second parameter can be used for logging purposes.</li>
42 </ul>
43 <p>Related keywords:</p>
44 <ul>
45 <li><a href="port.html"><font face="Courier New" color="#003258" size="4"><b>port</b></font></a></li>
46 <li><a href="map.html"><font face="Courier New" color="#003258" size="4"><b>map</b></font></a></li>
47 </ul>
48 <hr align="left" width="50%">
49 <div align="center">
50 <center>
51 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
52 <tr>
53 <td width="100%">
54 <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>port.setstate</b>&nbsp;</font> (<i>SimpleExpression&nbsp; ,</i> <font
55 face="Courier New" color="#003258" size="5"><b> {</b></font>&nbsp; <i>Freetext | TemplateInstance</i>&nbsp;[ <font face="Courier New" color="#003258" size="5"><b>optional</b></font>
56 ]<font face="Courier New" color="#003258" size="5"><b>};</b></font></h3>
57 </td>
58 </tr>
59 </table>
60 </center>
61 </div>
62 <ul>
63 <li>
64 <p><i>SimpleExpression</i> is the&nbsp; state which the ports state will be changed, and has to be of integer type.</p>
65 </li>
66 <li>
67 <p><i>FreeText or TemplateInstance</i> can be used&nbsp; for logging. Its value will be present in the logfile.</p>
68 </li>
69 </ul>
70 <hr align="left" width="50%">
71 <p><a name="Example 1">Example 1</a>: set ports state to translated without additional information
72 <p><font face="Courier New">port.setstate(0);
73 </font>
74 <hr align="left" width="50%">
75 <p><a name="Example 2">Example 2</a>: set the state of the port to not translated with additional information
76 <p><font face="Courier New">port.setstate(1, "Not successful");<br>
77 </font>
78 <hr align="left" width="25%">
79 <hr align="left" width="25%">
80 <p><a HREF="BNF.html#setstatedef">BNF definition</a> of <font face="Courier New"> setstate</font></p>
81 </body>
82 </html>