The OptionSetType VariableType is used to represent a bit mask. Each array element of the OptionSetValues Property contains either the human-readable representation for the corresponding bit used in the option set or an empty LocalizedText for a bit that has no specific meaning. The order of the bits of the bit mask maps to a position of the array, i.e. the first bit (least significant bit) maps to the first entry in the array, etc.

In addition to this VariableType, the DataType OptionSet can alternatively be used to represent a bit mask. As a guideline the DataType would be used when the bit mask is fixed and applies to several Variables. The VariableType would be used when the bit mask is specific for only that Variable.

The DataType of this VariableType shall be capable of representing a bit mask. It shall be either a numeric DataType representing a signed or unsigned integer, or a ByteString. For example, it can be the BitFieldMaskDataType.

The optional BitMask Property provides the bit mask in an array of Booleans. This allows subscribing to individual entries of the bit mask. The order of the bits of the bit mask points to a position of the array, i.e. the first bit points to the first entry in the array, etc. The VariableType is formally defined in Table 83.

Table 83 – OptionSetType definition

Attribute

Value

BrowseName

OptionSetType

IsAbstract

False

ValueRank

−1 (−1 = Scalar)

DataType

BaseDataType

References

NodeClass

Browse

Name

DataType

TypeDefinition

ModellingRule

Subtype of the BaseDataVariableType defined in 7.4

HasProperty

Variable

OptionSetValues

LocalizedText[]

PropertyType

Mandatory

HasProperty

Variable

BitMask

Boolean[]

PropertyType

Optional

Conformance Units

Base Info OptionSet