Opc.Ua.InstanceStateSnapshot.GetAttributeValue C# (CSharp) Method

GetAttributeValue() public method

Returns the value of the attribute for the specified child.
public GetAttributeValue ( FilterContext context, Opc.Ua.NodeId typeDefinitionId, IList relativePath, uint attributeId, NumericRange indexRange ) : object
context FilterContext The context to use when evaluating the operand.
typeDefinitionId Opc.Ua.NodeId The type of the instance.
relativePath IList The path from the instance to the node which defines the attribute.
attributeId uint The attribute to return.
indexRange NumericRange The sub-set of an array value to return.
return object
        public object GetAttributeValue(
            FilterContext context, 
            NodeId typeDefinitionId, 
            IList<QualifiedName> relativePath, 
            uint attributeId, 
            NumericRange indexRange)
        {
            if (!NodeId.IsNull(typeDefinitionId))
            {
                if (!context.TypeTree.IsTypeOf(m_typeDefinitionId, typeDefinitionId))
                {
                    return null;
                }
            }

            object value = GetAttributeValue(
                m_snapshot,
                relativePath,
                0,
                attributeId);

            if (indexRange != NumericRange.Empty)
            {
                StatusCode error = indexRange.ApplyRange(ref value);

                if (StatusCode.IsBad(error))
                {
                    value = null;
                }
            }

            return value;
        }
        #endregion

Same methods

InstanceStateSnapshot::GetAttributeValue ( ChildNode node, IList relativePath, int index, uint attributeId ) : object