Difference between revisions of "Extensions.HMI.MessageType"

From emotive
Jump to navigation Jump to search
(Created page with "{{DISPLAYTITLE:Data Type '''MessageType'''}}Category:DataTypeCategory:HMI == Classification == {{ClassificationDataType | MessageType | Characteristics of a message sh...")
 
Line 38: Line 38:
  
 
{{ConversionTable |
 
{{ConversionTable |
Integer=Returns the index of the value in the ResultStates enumeration (smallest index is 0) | IntegerSample=<tt>Integer val = ToInteger(@MessageType:INFO); // Returns 0</tt> |
+
Integer=Returns the index of the value in the MessageTypes enumeration (smallest index is 0) | IntegerSample=<tt>Integer val = ToInteger(@MessageType:INFO); // Returns 0</tt> |
 
String=Returns the name of the enumeration value | StringSample=<tt>String s = ToString(@MessageType:INFO); // Returns "INFO"</tt>
 
String=Returns the name of the enumeration value | StringSample=<tt>String s = ToString(@MessageType:INFO); // Returns "INFO"</tt>
 
}}
 
}}

Revision as of 08:13, 4 August 2014

Classification

Name MessageType
Short Description Characteristics of a message shown in a ConfirmDialog
Class Simple Data Type
Base Data Type -
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 should be used, where the member value is one of the values in the list.

MessageTypes={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

MessageType MyMessageTypeVariable = @MessageType:INFO;