2 Copyright (c) 2000-2015 Ericsson Telecom AB
4 All rights reserved. This program and the accompanying materials
5 are made available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html
11 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
12 <meta http-equiv=
"Content-Language" content=
"en-us">
15 <body bgcolor=
"#DAD3C5" vlink=
"#0094D2" link=
"#003258">
16 <table align=
"left" border=
"0" cellspacing=
"0" cellpadding=
"0" valign=top
>
18 <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>
21 <table border=
"0" align=
"right" cellpadding=
"0" cellspacing=
"0">
23 <td><a href=
"../titan_main.html" alt=
"contents"><img border=
"0" src=
"../images/ao.jpg" width=
"53" height=
"40"></a></td>
24 <td><a href=
"../titan_index.html" alt=
"index"><img border=
"0" src=
"../images/up.jpg" width=
"53" height=
"40"></a></td>
25 <td><a href=
"while.html" alt=
"previous"><img border=
"0" src=
"../images/left.jpg" width=
"53" height=
"40"></a></td>
26 <td><a href=
"xor.html" alt=
"next"><img border=
"0" src=
"../images/right.jpg" width=
"53" height=
"40"></a></td>
33 <hr align=
"left" width=
"75%">
34 <p>The statement is used to associate attributes with TTCN-
3 language elements. The syntax for the argument of the statement (i.e. the actual attributes) is defined as a free text string.
35 <p>There are four kinds of attributes:
37 <li><b><font face=
"Courier New" color=
"#003258" size=
"4">display
</font></b>: allows the specification of display attributes related to specific presentation formats;
</li>
38 <li><b><font face=
"Courier New" color=
"#003258" size=
"4">encode
</font></b>: allows references to specific encoding rules;
</li>
39 <li><b><font face=
"Courier New" color=
"#003258" size=
"4">variant
</font></b>: allows references to specific encoding variants;
</li>
40 <li><b><font face=
"Courier New" color=
"#003258" size=
"4">extension
</font></b>: allows the specification of user-defined attributes.
</li>
42 <p>Related keywords:
</p>
44 <li><a href=
"display.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">display
</font></b></a></li>
45 <li><a href=
"encode.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">encode
</font></b></a></li>
46 <li><a href=
"extension.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">extension
</font></b></a></li>
47 <li><a href=
"override.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">override
</font></b></a></li>
48 <li><a href=
"variant.html"><b><font face=
"Courier New" color=
"#003258" size=
"4">variant
</font></b></a>:
</li>
50 <hr align=
"left" width=
"50%">
53 <table border=
"0" width=
"90%" bgcolor=
"#FFB599" cellpadding=
"4">
56 <h3 align=
"center"><font face=
"Courier New" color=
"#003258" size=
"5"><b>with { display
</b></font> |
<font face=
"Courier New" color=
"#003258" size=
"5"><b>encode
</b></font> |
<font
57 face=
"Courier New" color=
"#003258" size=
"5"><b>variant
</b></font> |
<font face=
"Courier New" color=
"#003258" size=
"5"><b>extension
</b></font> [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>override
</b></font>
58 ] [
<font face=
"Courier New" color=
"#003258" size=
"5"><b>(
</b></font><i>qualifier
</i><font face=
"Courier New" color=
"#003258" size=
"5"><b>)
</b></font> ]
<font face=
"Courier New" color=
"#003258"
59 size=
"5"><b>"</b></font><i>argument
</i><b><font face=
"Courier New" color=
"#003258" size=
"5">"};
</font></b></h3>
67 <p>the optional
<b><font face=
"Courier New">override
</font></b> directive forces all contained types at all lower scopes to be forced to the specified attribute.
</p>
70 <p>the optional
<i>qualifier
</i> points out the entity for which the argument is valid.
</p>
73 <p><i>argument
</i> is a free-text string specifying the actual attribute.
</p>
76 <p>It is possible to specify several arguments in one
<b><font face=
"Courier New">with
</font></b> statement by using semicolons to separate the groups of the attribute keyword, qualifier and
78 When an attribute has more than one arguments, the arguments are separated by commas.
</p>
79 <hr align=
"left" width=
"50%">
81 <p><font face=
"Courier New">type record SinlgeRecord {
<br>
82 bitstring fram,
<br>
83 bitstring till
<br>
84 } with { variant (fram)
"FIELDLENGTH(
2)
" }
</font>
85 <p>The first field of the record (fram) will be coded on
2 bits.
</p>
86 <hr align=
"left" width=
"25%">
88 <p><font face=
"Courier New">type octetstring OCT10 with { variant
"ALIGN(left)
"; variant
"FIELDLENGTH(
10)
" }
</font>
89 <p>The octetstring OCT10 will be coded left-aligned on ten bits.
</p>
90 <hr align=
"left" width=
"25%">
92 <p><font face=
"Courier New">type integer NewInt with { variant
"FIELDLENGTH(
8), BITORDERINFIELD(msb)
" }
</font>
93 <p>The type NewInt will be coded on eight bit and the most significant bit will be sent first.
</p>
94 <hr align=
"left" width=
"25%">
95 <hr align=
"left" width=
"25%">
96 <p><a HREF=
"BNF.html#withstatement">BNF definition
</a> of
<font face=
"Courier New"> with
</font></p>