Opc.Ua.Com.Client.HdaModelUtils.ConstructIdForHdaAggregate C# (CSharp) Method

ConstructIdForHdaAggregate() public static method

Constructs the node id for an aggregate function.
public static ConstructIdForHdaAggregate ( uint aggregateId, ushort namespaceIndex ) : Opc.Ua.NodeId
aggregateId uint The aggregate id.
namespaceIndex ushort Index of the namespace.
return Opc.Ua.NodeId
        public static NodeId ConstructIdForHdaAggregate(uint aggregateId, ushort namespaceIndex)
        {
            // check for built in aggregates.
            NodeId nodeId = ComUtils.GetHdaAggregateId(aggregateId);

            if (nodeId != null)
            {
                return nodeId;
            }

            // server specific aggregates.
            ParsedNodeId parsedNodeId = new ParsedNodeId();
            
            parsedNodeId.RootId = aggregateId.ToString();
            parsedNodeId.NamespaceIndex = namespaceIndex;
            parsedNodeId.RootType = HdaAggregate;

            return parsedNodeId.Construct();
        }