Difference between revisions of "Extensions.HMI.MessageType"
Jump to navigation
Jump to search
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Data Type '''MessageType'''}}[[Category:DataType]][[Category:HMI]] | {{DISPLAYTITLE:Data Type '''MessageType'''}}[[Category:DataType]][[Category:HMI]] | ||
== Classification == | == Classification == | ||
− | {{ClassificationDataType | MessageType | Characteristics of a message shown in a '''ConfirmDialog''' | [[Core.DataTypes. | + | {{ClassificationDataType | MessageType | Characteristics of a message shown in a '''ConfirmDialog''' | [[Core.DataTypes.SimpleDataType|Simple Data Type]] | [[Core.DataTypes.SimpleDataType.SimpleType|SimpleType]]| DefaultValue=INFO | Literal=Yes }} |
== Description == | == Description == | ||
Line 31: | Line 31: | ||
==Literal== | ==Literal== | ||
− | The syntax for [[Literals| Literals for complex data types]] | + | The syntax for [[Literals| Literals for complex data types]] will be used, where the '''member value''' is one of the values in the list. |
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | + | @MessageType:INFO|WARNING|ERROR|YESNO_QUESTION|YESNOCANCEL_QUESTION | |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 44: | Line 44: | ||
==Sample== | ==Sample== | ||
<syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
− | MessageType | + | HMI.MessageType MessageTypeVariable = @MessageType:INFO; |
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 02:39, 13 September 2019
Classification
Name | MessageType |
Short Description | Characteristics of a message shown in a ConfirmDialog |
Class | Simple Data Type |
Base Data Type | SimpleType |
Default Value | INFO |
Provide a Literal | Yes |
SpecifiedBy | ISO 13209-3 |
Standard Compliant | Yes |
Description
MessageType is an enumeration type describing the characteristics of a message shown in a ConfirmDialog.
The list of allowed enumeration values is defined as follows:
Value | Literal | Description |
INFO | @MessageType:INFO | Displayed message is just for information. |
WARNING | @MessageType:WARNING | Displayed message is a warning. |
ERROR | @MessageType:ERROR | Displayed message describes an error. |
YESNO_QUESTION | @MessageType:YESNO_QUESTION | Displayed message represents a question answerable by "yes" or "no". |
YESNOCANCEL_QUESTION | @MessageType:YESNOCANCEL_QUESTION | Displayed message is a question which does not require a response. |
Order Relation
MessageType values may occur as operands of comparisons. For this case, the following order relation is defined. Started with the lowest value INFO = 0:
INFO < WARNING < ERROR < YESNO_QUESTION < YESNOCANCEL_QUESTION
Literal
The syntax for Literals for complex data types will be used, where the member value is one of the values in the list.
@MessageType:INFO|WARNING|ERROR|YESNO_QUESTION|YESNOCANCEL_QUESTION
Core Conversion
The following table shows the rules for conversion to another data type:
Conversion | Result | Sample |
ToBoolean | Undefined (should not be used) | |
ToInteger | Returns the index of the value in the MessageTypes enumeration (smallest index is 0) | Integer val = ToInteger(@MessageType:INFO); // Returns 0 |
ToFloat | Undefined (should not be used) | |
ToString | Returns the name of the enumeration value | String s = ToString(@MessageType:INFO); // Returns "INFO" |
ToByteField | Undefined (should not be used) |
Sample
HMI.MessageType MessageTypeVariable = @MessageType:INFO;