Extensions.HMI.ConfirmationType

From emotive
Jump to navigation Jump to search

Classification

Name ConfirmationType
Short Description The button-choice of a user dismissing a ConfirmDialog
Class Simple Data Type
Base Data Type SimpleType
Default Value YES
Provide a Literal Yes
SpecifiedBy ISO 13209-3
Standard Compliant Yes

Description

ConfirmationType is an enumeration type describing the button-choice of a user dismissing a ConfirmDialog. The information may later be used to find out which button was clicked for confirmation of the dialog.

The list of allowed enumeration values is defined as follows:

Value Literal Description
YES @ConfirmationType:YES Confirmation by "Yes" button or "OK" button.
NO @ConfirmationType:NO Confirmation by "No" button.
CANCEL @ConfirmationType:CANCEL Confirmation by "Cancel" button.

Order Relation

ConfirmationType values may occur as operands of comparisons. For this case, the following order relation is defined. Started with the lowest value YES = 0:

YES < NO < CANCEL

Literal

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

@ConfirmationType:YES|NO|CANCEL

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 ConfirmationType enumeration (smallest index is 0) Integer val = ToInteger(@ConfirmationType:YES); // Returns 0
ToFloat Undefined (should not be used)
ToString Returns the name of the enumeration value String s = ToString(@ConfirmationType:YES); // Returns "YES"
ToByteField Undefined (should not be used)

Sample

HMI.ConfirmationType ConfirmationTypeVariable = @ConfirmationType:YES;