12/06/2021
I am trying to understand if my method of exposing enumeration values is best practice.
My current strategy has been to do something similar to the following:
- Define an Enumeration DataType
- Define an EnumStrings Property on the above Enumeration containing the LocalizedText values
- Define Variable instances with TypeDefinitionn BaseDataVariableType, and DataType as the above Enumeration
Given those three components, it is possible for clients (e.g. UaExpert) to show the localized text for the variables current value.
However I am unsure about whether MultiStateDiscreteType is supposed to be used instead. What is the rationale behind this type? Would it be better to use MultiStateDiscreteType instead?
05/30/2017
What you are doing makes sense for generic enumerations that can be used on any variable.
The MultiStateDiscreteType is for process values (i.e. values that are coming from a sensor or GPIO).
MultiStateDiscreteType cannot be used on a Property and you need to create a subtype if you want to re-use the same set of EnumStrings.
Moderators-Specifications
Moderators-Companion
Moderators-Implementation
Moderators-Certification
Moderators-COM
02/24/2014
If you are building an information model, the MultiStateDiscreteType is used when every instance of the given variable may have a unique set of enumerations. If you define a type where a variable has a DataType of a specific enumeration, all instance of that variable will always have the given enumeration. So it depends on what it is you are trying to model - if you are building a model for a pump and it has two state "Running" / "Stopped" then then enumeration makes more sense. I f your model would have a verity of states that could be displayed depending on the given instance say one instance is Running/Stopped next instance has On/Off/initialize/error and a third instance off/lowspeed/mediumSpeed/HighSpeed, then the MultiStateDiscreteType makes more sense.
Paul Hunkar - DSInteroperability
1 Guest(s)