| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
<html> |
| 15 |
<head> |
| 16 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 17 |
<meta http-equiv="Content-Language" content="en-us"> |
| 18 |
<title>raise</title> |
| 19 |
</head> |
| 20 |
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> |
| 21 |
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> |
| 22 |
<tr> |
| 23 |
<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> |
| 24 |
</tr> |
| 25 |
</table> |
| 26 |
<table border="0" align="right" cellpadding="0" cellspacing="0"> |
| 27 |
<tr> |
| 28 |
<td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td> |
| 29 |
<td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td> |
| 30 |
<td><a href="public.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td> |
| 31 |
<td><a href="read.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td> |
| 32 |
</tr> |
| 33 |
</table> |
| 34 |
<p><br clear="all"> |
| 35 |
</p> |
| 36 |
<hr> |
| 37 |
<h1>raise</h1> |
| 38 |
<hr align="left" width="75%"> |
| 39 |
<p>The operation belongs to the family of procedure-based communication operations. It is used to raise an exception as a reaction to an accepted procedure call the result of which leads to an |
| 40 |
exceptional event. |
| 41 |
<ul> |
| 42 |
<li>The operation can be used on connected procedure-based (or mixed) ports.</li> |
| 43 |
<li>In case of multiple connections the receiver may be addressed.</li> |
| 44 |
</ul> |
| 45 |
<p>Related keywords:</p> |
| 46 |
<ul> |
| 47 |
<li><a href="address.html"><b><font face="Courier New" color="#003258" size="4">address</font></b></a></li> |
| 48 |
<li><a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a></li> |
| 49 |
<li><a href="signature.html"><b><font face="Courier New" color="#003258" size="4">signature</font></b></a></li> |
| 50 |
<li><a href="system.html"><b><font face="Courier New" color="#003258" size="4">system</font></b></a></li> |
| 51 |
<li><a href="to.html"><b><font face="Courier New" color="#003258" size="4">to</font></b></a></li> |
| 52 |
</ul> |
| 53 |
<hr align="left" width="50%"> |
| 54 |
<div align="center"> |
| 55 |
<center> |
| 56 |
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> |
| 57 |
<tr> |
| 58 |
<td width="100%"> |
| 59 |
<h3 align="center"><i>port_reference</i><font face="Courier New" color="#003258" size="5"><b>.raise (</b></font><i> signature_reference </i><font face="Courier New" color="#003258" size="5"><b>,</b></font> |
| 60 |
[ <i>exception_type</i><font face="Courier New" color="#003258" size="5"><b>:</b></font>]<i>exception_value </i><font face="Courier New" color="#003258" size="5"><b>)</b></font> [ <font |
| 61 |
face="Courier New" color="#003258" size="5"><b>to</b></font><i> address_reference</i> ] <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> port_reference</i> points out the port where the exception is sent through.</p> |
| 70 |
</li> |
| 71 |
<li> |
| 72 |
<p>The <b><font face="Courier New" color="#003258" size="4">raise</font> </b>keyword introduces the exception.</p> |
| 73 |
</li> |
| 74 |
<li> |
| 75 |
<p><i>signature_reference</i> points out the signature where the exception is defined</p> |
| 76 |
</li> |
| 77 |
<li> |
| 78 |
<p>The optional <i>exception_type</i> is used to point out the type of the value representing the exception when several types have been defined in the signature.</p> |
| 79 |
</li> |
| 80 |
<li> |
| 81 |
<p><i>exception_value</i> is the value representing the exception </p> |
| 82 |
</li> |
| 83 |
<li> |
| 84 |
<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 |
| 85 |
is required.</p> |
| 86 |
</li> |
| 87 |
</ul> |
| 88 |
<ul> |
| 89 |
<li> |
| 90 |
<p><i>address_reference</i> is one of the following:</p> |
| 91 |
<ul> |
| 92 |
<li>a component reference (cf. <a href="create.html"><b><font face="Courier New" color="#003258" size="4">create</font></b></a>) or the keyword <a href="system.html" |
| 93 |
target="_blank"><b><font face="Courier New" color="#003258" size="4">system</font></b></a>, in case of one-to-many connections.</li> |
| 94 |
<li>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 |
| 95 |
system under test.</li> |
| 96 |
</ul> |
| 97 |
</li> |
| 98 |
</ul> |
| 99 |
<hr align="left" width="50%"> |
| 100 |
<p><a name="Example 1">Example 1</a>: |
| 101 |
<p><font face="Courier New">signature S_MyProccc (in charset pl_MyPar71) exception (integer, float);<br> |
| 102 |
<br> |
| 103 |
MujPort_PCO.raise(S_MyProccc, integer:19) to system;</font> |
| 104 |
<p>The signature S_MyProccc suitable for blocking communication is defined in the first line. It has one parameter (pl_MyPar71) and it may raise exceptions of integer and floating point type. In |
| 105 |
the second line, the exception is raised at the port MujPort_PCO. The port is connected to several components therefore it must be addressed, in our case to the test system interface. The |
| 106 |
exception raised is represented by an integer value (19) </p> |
| 107 |
<hr align="left" width="25%"> |
| 108 |
<hr align="left" width="25%"> |
| 109 |
<p><a HREF="BNF.html#raisestatement">BNF definition</a> of <font face="Courier New"> raise</font></p> |
| 110 |
</body> |
| 111 |
</html> |