OTX Reference  
OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encoding Class Reference

Describing different kinds of string encodings More...

Inheritance diagram for OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encoding:
Inheritance graph

Public Attributes

EncodingLiteral init
 Cardinality [0..1]
This optional element stands for the hard-coded initialisation value of the identifier at declaration time. More...
 

Detailed Description

Describing different kinds of string encodings

Encoding is an enumeration type describing different kinds of string encodings which shall be supported by OTX applications.

Order Relation
Encoding values may occur as operands of comparisons. For this case, the following order relation is defined. Started with the lowest value US-ASCII = 0:

US-ASCII < ISO-8859-1 < UTF-8 < UTF-16BE < UTF-16LE < UTF-16 < BIN < OCT < HEX


Literal
The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.

@Encoding:US-ASCII|ISO-8859-1|UTF-8|UTF-16BE|UTF-16LE|UTF-16|BIN|OCT|HEX



Conversion terms
The following table shows the rules for conversion to another data type:

ConversionResultSample
ToBooleanUndefined (should not be used)
ToIntegerReturns the index of the value in the Encodings enumeration (smallest index is 0)Integer val = ToInteger(@Encoding:US-ASCII); // Returns 0
ToFloatUndefined (should not be used)
ToStringReturns the name of the enumeration valueString s = ToString(@Encoding:US-ASCII); // Returns "US-ASCII"
ToByteFieldUndefined (should not be used)

Sample

StringUtil.Encoding EncodingVariable = @Encoding:US-ASCII;

Member Data Documentation

◆ init

EncodingLiteral OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encoding.init

Cardinality [0..1]
This optional element stands for the hard-coded initialisation value of the identifier at declaration time.

OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encodings.HEX
@ HEX
Simple radix-based string encodingfor hexadecimal-dump strings
OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encodings.OCT
@ OCT
Simple radix-based string encoding for octal-dump strings
OpenTestSystem.Otx.Extensions.StringUtil.DataTypes.Encodings.BIN
@ BIN
Simple radix-based string encoding for binary-dump strings