Description
The StatusStringToStatusEnum component is used to convert text to a list value.
Implementation
The entry must be linked to a text that must match an item in the list defined in the facets. The input value can take 3 forms to define the element:
-
Its display name (allowing special characters)
-
Its name (with special characters encoded)
-
Its ordinal
If the input value does not match any element of the list, then the component registers a fault.
However, if no facets are configured, if the input value corresponds to a numeric value, the enum takes the corresponding ordinal.
Properties
-
Facets: Configures the elements of the list
-
Out: StatusEnum output Slot. Takes the value of the input string element.
-
PropagateFlags: Choose the states to propagate to the output Out
-
In: Input Slot to link to the string to convert.
Example
Considering an enum with the following elements:
-
0 - On
-
1 - Auto
-
2 - Stopped
If the input value is "0" or "On" then the output of the enum will be set to "On".