This file is indexed.

/usr/share/titan/help/info/variant.html is in eclipse-titan 6.3.1-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
<!--
 Copyright (c) 2000-2017 Ericsson Telecom AB
 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Eclipse Public License v1.0
 which accompanies this distribution, and is available at
 http://www.eclipse.org/legal/epl-v10.html

 Contributors:
  Baji, Laszlo
  Balasko, Jeno
  Farkas, Laszlo
  Gecse, Roland
  Szabados, Kristof
-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="en-us">
<title>variant</title>
</head>
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258">
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top>
  <tr>
    <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>
  </tr>
</table>
<table border="0" align="right" cellpadding="0" cellspacing="0">
  <tr>
    <td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td>
    <td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td>
    <td><a href="var.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td>
    <td><a href="verdicttype.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td>
  </tr>
</table>
<p><br clear="all">
</p>
<hr>
<h1>variant</h1>
<hr align="left" width="75%">
<p>The attribute is used to refine the currently specified encoding scheme instead of its replacement.
<p>Currently, two encoding schemes are supported in TITAN: RAW and TEXT.
<p>The RAW coder encodes and decodes TTCN-3 values to/from bitstreams. The TEXT coder can be utilized for text-based protocols.
<p>There are presently twenty-two arguments for the RAW coder specified as follows
<ul>
  <li>FIELDLENGTH specifies the length of the encoded type;</li>
  <li>COMP specifies how negative integer numbers are encoded ;</li>
  <li>ALIGN specifies whether the actual value will be padded from left or right;</li>
  <li>BITORDERINFIELD specifies whether the most or the less significant bit will be sent first on the port;</li>
  <li>BYTEORDER specifies whether the first or the last byte will be sent first on the port;</li>
  <li>BITORDER specifies the sequence of the bits within an octet;</li>
  <li>HEXORDER specifies the sequencer of the hexadecimal digits in the encoded data;</li>
  <li>FIELDORDER specifies how consecutive fields of a structured type is framed into octets;</li>
  <li>EXTENSION_BIT manipulates the bit used in some protocols to code data spanning several octets;</li>
  <li>EXTENSION_BIT_GROUP&nbsp; limits the extension bit mechanism to a group of the fields in a record;</li>
  <li>PADDING&nbsp;is used when the encoded type shall end at a multiple of padding units;</li>
  <li>PREPADDING is used when the encoded type shall start at a multiple of padding units;</li>
  <li>PADDING_PATTERN specifies padding pattern used by padding mechanism;</li>
  <li>PADDALL means that the padding parameter specified for a whole&nbsp; record or set will be valid for every field of the record/set;</li>
  <li>LENGTHTO specifies which fields are considered when calculating the length parameter;</li>
  <li>LENGTHINDEX extends the LENGTHTO attribute;</li>
  <li>UNIT attribute is used in conjunction with the LENGTHTO or POINTERTO attribute;</li>
  <li>POINTERTO specifies to which field a pointer points;</li>
  <li>PTROFFSET specifies where the pointed field area starts and the base field of pointer calculating;</li>
  <li>TAG identifies specific values in certain fields of the set, record elements or union choices;</li>
  <li>CROSSTAG is used when one field of a record specifies the union member of an other field of a record;</li>
  <li>PRESENCE indicates the presence of an other optional field within records.</li>
</ul>
<p>The above arguments are described in detail in the Appendix B of the TITAN user documentation.</p>
<p>Related keywords:</p>
<ul>
  <li><a href="encode.html"><b><font face="Courier New" color="#003258" size="4">encode</font></b></a></li>
  <li><a href="with.html"><b><font face="Courier New" color="#003258" size="4">with</font></b></a></li>
  <li><a href="override.html"><b><font face="Courier New" color="#003258" size="4">override</font></b></a></li>
</ul>
<hr align="left" width="50%">
<div align="center">
<center>
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4">
  <tr>
    <td width="100%">
    <h3 align="center"><font face="Courier New" color="#003258" size="5"><b>variant</b></font> [ <font face="Courier New" color="#003258" size="5"><b>override</b></font> ] [ <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" size="5"><b>&quot;</b></font><i>argument</i><b><font
      face="Courier New" color="#003258" size="5">&quot;</font></b></h3>
    </td>
  </tr>
</table>
</center>
</div>
<ul>
  <li>
  <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>
  </li>
  <li>
  <p>the optional <i>qualifier</i> points out the entity for which the argument is valid.</p>
  </li>
  <li>
  <p><i>argument</i> is a free-text string specifying the actual attribute.</p>
  </li>
  <li>When using the variant attribute, it is very important to specify the desired codec in the with attributes of the module definition using the <code>encode</code> directive.
</ul>
<hr align="left" width="50%">
<p>Example:
<p><code> module m {<br>
type integer INT2 with { variant &quot;COMP(2scompl)&quot;, &quot;FIELDLENGTH(8)&quot; }&nbsp;</font><br>
} with { encode "RAW" } </code>
<p>The encoding of the integer value -1 results in the bit string 11111111.</p>
<hr align="left" width="25%">
<hr align="left" width="25%">
<p><a HREF="BNF.html#attribkeyword">BNF definition</a> of <font face="Courier New"> variant</font></p>
</body>
</html>