/// <summary>
/// Gets the item annotations node.
/// </summary>
/// <param name="itemId">The item id.</param>
/// <param name="namespaceIndex">Index of the namespace.</param>
/// <returns></returns>
public static PropertyState GetItemAnnotationsNode(string itemId, ushort namespaceIndex)
{
if (itemId == null)
{
return(null);
}
PropertyState component = new PropertyState(null);
component.NodeId = HdaParsedNodeId.Construct(HdaModelUtils.HdaItemAnnotations, itemId, null, namespaceIndex);
component.SymbolicName = Opc.Ua.BrowseNames.Annotations;
component.BrowseName = new QualifiedName(component.SymbolicName);
component.DisplayName = component.BrowseName.Name;
component.DataType = DataTypeIds.Annotation;
component.ValueRank = ValueRanks.Scalar;
component.MinimumSamplingInterval = MinimumSamplingIntervals.Indeterminate;
component.Historizing = false;
component.AccessLevel = AccessLevels.HistoryRead;
component.UserAccessLevel = AccessLevels.HistoryRead;
component.ReferenceTypeId = Opc.Ua.ReferenceTypeIds.HasProperty;
component.TypeDefinitionId = Opc.Ua.VariableTypeIds.PropertyType;
component.AddReference(ReferenceTypeIds.HasProperty, true, HdaModelUtils.ConstructIdForHdaItem(itemId, namespaceIndex));
return(component);
}