Opc.Ua.Com.Server.ComHdaItemManager.GetAnnotationsPropertyNodeId C# (CSharp) Method

GetAnnotationsPropertyNodeId() public method

Gets the annotations property node id.
public GetAnnotationsPropertyNodeId ( Session session, HdaItemHandle itemHandle ) : NodeId
session Opc.Ua.Client.Session The session.
itemHandle HdaItemHandle The item handle.
return NodeId
        public NodeId GetAnnotationsPropertyNodeId(Session session, HdaItemHandle itemHandle)
        {
            // check handle.
            InternalHandle handle = itemHandle as InternalHandle;

            if (handle == null)
            {
                return null;
            }

            // look up the supported attributes for an item.
            ReadValueIdCollection supportedAttributes = handle.Item.SupportedAttributes;

            if (supportedAttributes == null)
            {
                handle.Item.SupportedAttributes = supportedAttributes = GetAvailableAttributes(session, handle.NodeId);
            }

            // check if annotations are supported.
            ReadValueId valueToRead = GetReadValueId(supportedAttributes, ComHdaProxy.INTERNAL_ATTRIBUTE_ANNOTATION);

            if (valueToRead == null)
            {
                return null;
            }

            // return node id.
            return valueToRead.NodeId;
        }