View Issue Details

IDProjectCategoryView StatusLast Update
001022910000-003: Address SpaceSpecpublic2025-03-14 14:41
ReporterHock, Christian Assigned ToJeff Harding  
PriorityhighSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product Version1.04 
Target Version?.?? 
Summary0010229: OptionSet clarification needed
Description
  • OptionSetValues (https://reference.opcfoundation.org/Core/Part3/v105/docs/5.8.3)
    • The OptionSetValues Property shall be applied to OptionSet DataTypes and UInteger DataTypes representing bit masks.
    • An OptionSet DataType or UInteger DataType is used to represent a bit mask and the OptionSetValues Property contains the human-readable representation for each bit of the bit mask.
    • The OptionSetValues Property shall provide an array of LocalizedText containing the human-readable representation for each bit.
  • OptionSetType (https://reference.opcfoundation.org/Core/Part5/v105/docs/7.17)
    • 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 85.
  • OptionSet (https://reference.opcfoundation.org/Core/Part3/v105/docs/8.40)
    • This abstract DataType is the base DataType for all DataTypes representing a bit mask which is larger than 64 bits or where the validity of the bits within the set are to be identified. All OptionSet DataTypes representing bit masks shall inherit from this DataType. Its elements are described in Table 31.
  • The Problem:
    • ValidBits
      • Array of bytes shall be the same size as value representing the valid bits in the value parameter. A Server shall return the StateCode BadOutOfRange if it receives a different array size.
        • When the Server returns the value to the Client, the validBits provides information of which bits in the bit mask have a meaning. If a bit is 1 then the corresponding bit in the value is used by the Server. If it is set to a 0 it should be ignored as it has no meaning. When the Client passes the OptionSet value to the Server, it sets the bits of validBits to 1 for each bit the Client expects the Server to apply to the value. The Server shall use the following logic when applying the requested change β€œnew value = (value & validBits) | (current value & ~validBits)”.
        • A Server shall return the StateCode BadOutOfRange if it receives validBits with a bit set to 1 which it does not consider a valid bit and shall not apply any bit changes.
TagsNo tags attached.
Commit Version1.05.06 RC1
Fix Due Date2025-05-01

Activities

Jim Luth

2025-03-14 14:41

administrator   ~0022533

Agreed to better describe "A Server shall return the StateCode BadOutOfRange if it receives validBits with a bit set to 1 which it does not consider a valid bit and shall not apply any bit changes."

Fix StateCode typos -- should be StatusCode

Issue History

Date Modified Username Field Change
2025-03-12 16:51 Hock, Christian New Issue
2025-03-14 14:39 Jim Luth Assigned To => Jeff Harding
2025-03-14 14:39 Jim Luth Status new => assigned
2025-03-14 14:40 Jim Luth Commit Version => 1.05.06 RC1
2025-03-14 14:40 Jim Luth Fix Due Date => 2025-05-01
2025-03-14 14:41 Jim Luth Note Added: 0022533