Difference between revisions of "OtfLiteralExamples"

From emotive
Jump to navigation Jump to search
m
Line 14: Line 14:
 
| '''Core''' ||  ||  
 
| '''Core''' ||  ||  
 
|-{{TableRow2}}
 
|-{{TableRow2}}
| '''[[Core.DataTypes.SimpleDataType.Boolean|Boolean]]''' || '''true''', '''false''' || Without case sensitive
+
| '''[[Core.DataTypes.SimpleDataType.Boolean|Boolean]]''' || '''true''', '''false''' || Not case sensitive
 
|-{{TableRow1}}
 
|-{{TableRow1}}
 
| '''[[Core.DataTypes.SimpleDataType.Integer|Integer]]''' || '''-9223372036854775808''', ..., '''-2''', '''-1''', '''0''', '''1''', '''2''', ..., '''9223372036854775807''' ||  
 
| '''[[Core.DataTypes.SimpleDataType.Integer|Integer]]''' || '''-9223372036854775808''', ..., '''-2''', '''-1''', '''0''', '''1''', '''2''', ..., '''9223372036854775807''' ||  
Line 20: Line 20:
 
|rowspan="2"| '''[[Core.DataTypes.SimpleDataType.Float|Float]]''' || ..., '''-2.56899''', '''-1.03344''', '''0.0''', '''0.0125''', '''1.0''', '''2.1''', ... || Range: [-1.7 x 10^308, 1.7 x 10^308]
 
|rowspan="2"| '''[[Core.DataTypes.SimpleDataType.Float|Float]]''' || ..., '''-2.56899''', '''-1.03344''', '''0.0''', '''0.0125''', '''1.0''', '''2.1''', ... || Range: [-1.7 x 10^308, 1.7 x 10^308]
 
|-{{TableRow2}}
 
|-{{TableRow2}}
| '''-0''', '''NaN''', '''-INF''', '''INF''' || (Special float values without case sensitive)
+
| '''-0''', '''NaN''', '''-INF''', '''INF''' || (Special float values are not case sensitive)
 
|-{{TableRow1}}
 
|-{{TableRow1}}
|rowspan="2"| '''[[Core.DataTypes.SimpleDataType.String|String]]''' || '''"Hello"''', '''"Füße"''', '''"abc0123!@#$%^"''' || Case sensitive
+
|rowspan="2"| '''[[Core.DataTypes.SimpleDataType.String|String]]''' || '''"Hello"''', '''"abc0123!@#$%^"''' || Case sensitive
 
|-{{TableRow1}}
 
|-{{TableRow1}}
| '''"\a"''', '''"\b"''', '''"\f"''', '''"\n"''', '''"\r"''', '''"\t"''', '''"\v"''', '''"\'"''', '''"\""''', '''"\\"''',  '''"\x''hhhh''"''' e.g. '''"Line1\r\nLine2"''','''"He said \"Hello!\""''',  '''"\x''0023''"''' || ([https://docs.microsoft.com/en-us/previous-versions/h21280bw(v=vs.140) Escape sequences] supported in OTF with case sensitive)
+
| '''"\a"''', '''"\b"''', '''"\f"''', '''"\n"''', '''"\r"''', '''"\t"''', '''"\v"''', '''"\'"''', '''"\""''', '''"\\"''',  '''"\x''hhhh''"''' e.g. '''"Line1\r\nLine2"''','''"He said \"Hello!\""''',  '''"\x''0023''"''' || ([https://docs.microsoft.com/en-us/previous-versions/h21280bw(v=vs.140) Escape sequences] supported in OTF are case sensitive)
 
|-{{TableRow2}}
 
|-{{TableRow2}}
| '''[[Core.DataTypes.ComplexDataType.ByteField|ByteField]]''' || '''&0A''', '''&0F10''', '''&0123456789ABCDEF'''  || Without case sensitive
+
| '''[[Core.DataTypes.ComplexDataType.ByteField|ByteField]]''' || '''&0A''', '''&0F10''', '''&0123456789ABCDEF'''  || Not case sensitive
 
|-{{TableRow1}}
 
|-{{TableRow1}}
 
| '''[[Core.DataTypes.ComplexDataType.List|List]]''' || '''{"literal of list", "with type has literals"}''', '''{&01, &02, &FF}''', '''{{1,2}, {3,4}}''', '''{{{1,2}}, {{3,4}}}''' ||  
 
| '''[[Core.DataTypes.ComplexDataType.List|List]]''' || '''{"literal of list", "with type has literals"}''', '''{&01, &02, &FF}''', '''{{1,2}, {3,4}}''', '''{{{1,2}}, {{3,4}}}''' ||  

Revision as of 12:03, 7 December 2018

Introduction

The OTF displays the literal values in the simple self-defined formats for the underlined OTX codes. The following example table will help users get acquainted with these formats.

Literal Examples

Below are all the data types which support the literals.

Data Types   Examples Notes
Core
Boolean true, false Not case sensitive
Integer -9223372036854775808, ..., -2, -1, 0, 1, 2, ..., 9223372036854775807
Float ..., -2.56899, -1.03344, 0.0, 0.0125, 1.0, 2.1, ... Range: [-1.7 x 10^308, 1.7 x 10^308]
-0, NaN, -INF, INF (Special float values are not case sensitive)
String "Hello", "abc0123!@#$%^" Case sensitive
"\a", "\b", "\f", "\n", "\r", "\t", "\v", "\'", "\"", "\\", "\xhhhh" e.g. "Line1\r\nLine2","He said \"Hello!\"", "\x0023" (Escape sequences supported in OTF are case sensitive)
ByteField &0A, &0F10, &0123456789ABCDEF Not case sensitive
List {"literal of list", "with type has literals"}, {&01, &02, &FF}, {{1,2}, {3,4}}, {{{1,2}}, {{3,4}}}
Map {"Key1" = "literal of map with value type has literals"}, {1 = &01, 5 = &02, 2 = &FF}, {"k1" = {1, 2, 3}}, {1 = {"key1" = true, "key2" = false}, 2 = {"k1" = true}}
UserException @UserException:"Indentifier"/"ExceptionText", @UserException:"SelfDefinedException1"/"Incorrect data input."
Quantities
Quantity @Quantity:12.56/"km/h"/3, @Quantity:37.5/"°C"
Unit @Unit:"1/min2", @Unit:"kΩ"
HMI
ConfirmationType @ConfirmationType:YES, @ConfirmationType:CANCEL {YES | NO | CANCEL}
MessageType @MessageType:INFO, @MessageType:YESNO_QUESTION {INFO | WARNING | ERROR | YESNO_QUESTION | YESNOCANCEL_QUESTION}
i18n
TranslationKey @TranslationKey:"text_ID_value", @TranslationKey:"Key01"
Logging
LogLevel @LogLevel:ALL, @LogLevel:ERROR, @LogLevel:OFF {ALL | TRACE | DEBUG | INFO | WARN | ERROR | FATAL | OFF}
SeverityLevel @SeverityLevel:TRACE, @SeverityLevel:FATAL {TRACE | DEBUG | INFO | WARN | ERROR | FATAL}
StringUtil
Encoding @Encoding:ISO-8859-1, @Encoding:BIN {US-ASCII | ISO-8859-1 | UTF-8 | UTF-16BE | UTF-16LE | UTF-16 | BIN | OCT | HEX}
DiagCom
ResponseState @ResponseState:FAILED, @ResponseState:POSITIVE {FAILED | INVALID | NEGATIVE | POSITIVE}
ResultState @ResultState:ALL_NEGATIVE, @ResultState:INVALID {ALL_FAILED | ALL_INVALID | ALL_NEGATIVE | ALL_POSITIVE | FAILED | INVALID | NEGATIVE | POSITIVE}
DiagDataBrowsing
ComChannelCategory @ComChannelCategory:BASE_VARIANT, @ComChannelCategory:PROTOCOL {BASE_VARIANT | FUNCTIONAL_GROUP | PROTOCOL}
DiagDataBrowsingPlus
McdDataType @McdDataType:ASCIISTRING, @McdDataType:END_OF_PDU {ASCIISTRING | BITFIELD | BOOLEAN | BYTEFIELD | FLOAT32 | FLOAT64 | INT16 | INT32 | UINT64 | INT8 | UINT16 | UINT32 | UINT64 | UINT8 | UNICODE2STRING | DTC | END_OF_PDU | ENVDATA | ENVDATADESC | FIELD | KEY | LENGTHKEY | MULTIPLEXER | NO_TYPE | STRUCT_FIELD | STRUCTURE | TABLE | TABLE_ROW | TEXTTABLE}
McdParameterType @McdParameterType:CODED_CONST, @McdParameterType:MATCHING_REQUEST_PARAM {CODED_CONST | DYNAMIC | GENERATED | LENGTH_KEY | MATCHING_REQUEST_PARAM | NRC_CONST | PHYS_CONST | RESERVED | SYSTEM | TABLE_ENTRY | TABLE_KEY | TABLE_STRUCT | VALUE}
McdResponseType @McdResponseType:GLOBAL_NEG_RESPONSE@McdResponseType:POSITIVE_RESPONSE           {GLOBAL_NEG_RESPONSE | LOCAL_NEG_RESPONSE | POSITIVE_RESPONSE}
Flash
Audience @Audience:SUPPLIER, @Audience:AFTERSALES {SUPPLIER | DEVELOPMENT | MANUFACTURING | AFTERSALES | AFTERMARKET}
FlashFileFormat @FlashFileFormat:BINARY, @FlashFileFormat:INTEL {BINARY | SREC | INTEL}
DataType
Enumeration EnumerationSignatureName.EnumerationElementName, EnumerationSignature1.EnumerationElement1