Debian Codegraph @

help/info/reply.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 Kovacs, Ferenc
13 Szabados, Kristof
14 Szabo, Janos Zoltan – initial implementation
15 -->
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>reply</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="replace.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
33 <td><a href="return.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>reply</h1>
40 <hr align="left" width="75%">
41 <p>The operation belongs to the family of procedure-based communication operations. It is used to reply to a previously accepted call according to the procedure signature.
42 <ul>
43 <li>The operation can be used on connected procedure-based (or mixed) ports.</li>
44 <li>It may return a value to the calling party.</li>
45 <li>In case of multiple connections the receiver may be addressed.</li>
46 </ul>
47 <p>Related keywords:</p>
48 <ul>
49 <li><a href="address.html"><b><font face="Courier New" color="#003258" size="4">address</font></b></a></li>
50 <li><a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a></li>
51 <li><a href="modifies.html"><b><font face="Courier New" color="#003258" size="4">modifies</font></b></a></li>
52 <li><a href="signature.html"><b><font face="Courier New" color="#003258" size="4">signature</font></b></a></li>
53 <li><a href="system.html"><b><font face="Courier New" color="#003258" size="4">system</font></b></a></li>
54 <li><a href="to.html"><b><font face="Courier New" color="#003258" size="4">to</font></b></a></li>
55 <li><a href="value.html"><b><font face="Courier New" color="#003258" size="4">value</font></b></a></li>
56 </ul>
57 <hr align="left" width="50%">
58 <div align="center">
59 <center>
60 <table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
61 <tr>
62 <td width="100%">
63 <h3 align="center"><i>port_reference</i><font face="Courier New" color="#003258" size="5"><b>.reply (</b></font><i> template_instance&nbsp; </i><font face="Courier New" color="#003258"
64 size="5"><b>)</b></font> [ <font face="Courier New" color="#003258" size="5"><b>to</b></font><i> address_reference</i> ] [ <font face="Courier New" color="#003258" size="5"><b>value</b></font><i>
65 reply_value</i> ]<font face="Courier New" color="#003258" size="5"><b>;</b></font> &nbsp;</h3>
66 </td>
67 </tr>
68 </table>
69 </center>
70 </div>
71 <ul>
72 <li>
73 <p><i> port_reference</i> points out the port where the reply is sent through.</p>
74 </li>
75 <li>
76 <p>The <b><font face="Courier New" color="#003258" size="4">reply</font> </b> keyword introduces the response.</p>
77 </li>
78 <li>
79 <p><i>template_instance</i> is one of the following:</p>
80 <ul>
81 <li>in-line signature template (see the <a href="#Example 1">example1</a>);</li>
82 <li>a specific value signature template (see the <a href="#Example 2">example 2</a>);</li>
83 <li>a modified signature template (see the <a href="#Example 3">example 3</a>);<br>
84 &nbsp;</li>
85 </ul>
86 </li>
87 <table border="0" width="100%" bgcolor="#C9C2BB" cellpadding="4">
88 <tr>
89 <td width="100%">
90 <p><u>TITAN specific restriction compared to the standard:</u></p>
91 <ul>
92 <li>
93 <p>&nbsp;modified template is not implemented. When encountered in the TTCN-3 program, an error message will be generated.</p>
94 </li>
95 </ul>
96 </td>
97 </tr>
98 </table>
99 <li>
100 <p>The optional <b><font face="Courier New" color="#003258" size="4">to</font> </b> keyword is used when a port is connected to several entities and identification of the communication partner
101 is required.</p>
102 </li>
103 </ul>
104 <ul>
105 <li>
106 <p><i>address_reference</i> is one of the following:</p>
107 <ul>
108 <li>a component reference (cf. <a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a>)&nbsp; or the keyword <a href="system.html"
109 target="_blank"><b><font face="Courier New" color="#003258" size="4">system</font></b></a>, in case of one-to-many connections.</li>
110 <li>
111 <p>an address reference (cf. <a href="address.html"><b><font face="Courier New" color="#003258" size="4">address</font></b></a>) , when there are several entities within the
112 system under test.</p>
113 </li>
114 </ul>
115 </li>
116 <li>
117 <p>The optional <b><font face="Courier New" color="#003258" size="4">value</font></b> keyword indicates that the called procedure returns a value. It is mandatory when the <a
118 href="signature.html" target="_blank"><b><font face="Courier New" color="#003258" size="4">signature</font></b></a> definition contains the keyword <b><font face="Courier New" color="#003258"
119 size="4">return</font></b>.</p>
120 </li>
121 <li>
122 <p><i> reply_value</i> is the value the called procedure returns.</p>
123 </li>
124 </ul>
125 <hr align="left" width="50%">
126 <p><a name="Example 1">Example 1</a>: in-line signature template
127 <p><font face="Courier New">signature S_MyProc (out integer pl_MyPar1, inout boolean pl_MyPar2, in charset pl_MyPar3) return float;<br>
128 <br>
129 MujPort_PCO.reply(S_MyProc:{ 19, true, -}) to system value 3.141;</font>
130 <p>The signature S_MyProc suitable for blocking communication is defined in the first line. It has three parameters (pl_MyPar1, pl_MyPar2 and pl_MyPar3) and it will return a floating point value.
131 In the second line, the response to the procedure is call is sent at&nbsp; the port MujPort_PCO. The port is connected to several components therefore it must be addressed, in our case to the test
132 system interface. The third parameter has no value assigned because it is an <b><font face="Courier New">in</font></b> parameter from the point of view of the called procedure. The second parameter
133 (pl_MyPar2) has the value true, the first one equals 19.&nbsp;</p>
134 <hr align="left" width="50%">
135 <p><a name="Example 2">Example 2</a>: signature template</p>
136 <p><font face="Courier New">template S_MyProc t_NiaTemplate (boolean pl_param) := {<br>
137 &nbsp;&nbsp;&nbsp;field1 := 16,<br>
138 &nbsp;&nbsp;&nbsp;field2 := pl_param,<br>
139 &nbsp;&nbsp;&nbsp;field3 := &quot;massepain&quot;<br>
140 }</font>
141 <p><font face="Courier New">MujPort_PCO.reply (t_NiaTemplate(true)) value 2.71;</font></p>
142 <p>The parameterized template (t_NiaTemplate) has three fields. When the response is sent as shown in the second line, the values 16 and true will be sent to the port MujPort_PCO. The third
143 parameter is don't care because it is defined as an <b><font face="Courier New">in</font></b> parameter. The returned floating point value equals 2.71.</p>
144 <hr align="left" width="50%">
145 <p><a name="Example 3">Example 3</a>: modified signature template</p>
146 <p><font face="Courier New">MujPort_PCO.call (modifies t_NiaTemplate(false) := {field1 := 166}) value 4.3316;</font></p>
147 <p>The template defined in example 2 is modified. When sent as shown, the values 116 and false will be sent to the port MujPort_PCO as first and second parameters. The returned floating point
148 value equals 4.3316.</p>
149 <hr align="left" width="25%">
150 <hr align="left" width="25%">
151 <p><a HREF="BNF.html#replystatement">BNF definition</a> of <font face="Courier New"> reply</font></p>
152 </body>
153 </html>