Titan



variant


The attribute is used to refine the currently specified encoding scheme instead of its replacement.

Currently, two encoding schemes are supported in TITAN: RAW and TEXT.

The RAW coder encodes and decodes TTCN-3 values to/from bitstreams. The TEXT coder can be utilized for text-based protocols.

There are presently twenty-two arguments for the RAW coder specified as follows

The above arguments are described in detail in the Appendix B of the TITAN user documentation.

Related keywords:


variant [ override ] [ (qualifier) ] "argument"


Example:

module m {
type integer INT2 with { variant "COMP(2scompl)", "FIELDLENGTH(8)" } 
} with { encode "RAW" }

The encoding of the integer value -1 results in the bit string 11111111.



BNF definition of variant