OPC Studio User's Guide and Reference
UAReferenceTypeIds Class
Members 



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.AddressSpace.Standard Namespace : UAReferenceTypeIds Class
A class that declares constants for Reference Types in the Model Design.
Object Model
UAReferenceTypeIds ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId ClassUANodeId Class
Syntax
'Declaration
 
<ComVisibleAttribute(False)>
Public MustInherit NotInheritable Class UAReferenceTypeIds 
'Usage
 
Dim instance As UAReferenceTypeIds
[ComVisible(false)]
public static class UAReferenceTypeIds 
[ComVisible(false)]
public ref class UAReferenceTypeIds abstract sealed 
Remarks
This class contains definitions for nodes such as Aggregates, HasChild, HasComponent, HasProperty, HierarchicalReferences, Organizes, and more.

 

OPC Data Client-UA provides static classes with standard Node IDs defined by OPC Foundation: UADataTypeIdsUAMethodIdsUAObjectIdsUAObjectTypeIdsUAReferenceTypeIdsUAVariableIds, and UAVariableTypeIds. You can use properties of these static classes to easily specify “well-known” nodes you need to refer to, for example, the “ObjectsFolder” node which is a common starting node for browsing.

There are following classes with standard Node IDs for OPC-UA:

When you need to pass a standard node to any method, simply use the corresponding property from the static class, such as UAObjectIds.ObjectsFolder.

You can use the command-line OpcCmd Utility (installed with OPC Data Client, or downloadable separately) to:

  • Get standard name that corresponds to OPC UA Node Id
  • Get the OPC UA Node Id that corresponds to given standard name
  • Display tables of node IDs and their standard names
  • Filter the tables to find out matching names.

See Using OpcCmd Utility for Static OPC UA Operations.

.NET

// This example shows how to read the build information of the server.
// See also: https://reference.opcfoundation.org/Core/Part5/v105/docs/7.7 and
// https://reference.opcfoundation.org/Core/Part5/v104/docs/12.4 .
//
// Find all latest examples here: https://opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Latest/examples.html .
// OPC client and subscriber examples in C# on GitHub: https://github.com/OPCLabs/Examples-QuickOPC-CSharp .
// Missing some example? Ask us for it on our Online Forums, https://www.opclabs.com/forum/index ! You do not have to own
// a commercial license in order to use Online Forums, and we reply to every post.

using System;
using OpcLabs.BaseLib.OperationModel;
using OpcLabs.EasyOpc.UA;
using OpcLabs.EasyOpc.UA.AddressSpace.Standard;
using OpcLabs.EasyOpc.UA.OperationModel;

namespace UADocExamples.InformationModel
{
    partial class BuildInfoType
    {
        public static void Main1()
        {
            UAEndpointDescriptor endpointDescriptor =
                "opc.tcp://opcua.demo-this.com:51210/UA/SampleServer";
            // or "http://opcua.demo-this.com:51211/UA/SampleServer" (currently not supported)
            // or "https://opcua.demo-this.com:51212/UA/SampleServer/"

            // Instantiate the client object.
            var client = new EasyUAClient();

            // Obtain values. By default, the Value attributes of the nodes will be read.
            var readArgumentsArray = new[]
            {
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_BuildDate),
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_BuildNumber),
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_ManufacturerName),
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_ProductName),
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_ProductUri),
                new UAReadArguments(endpointDescriptor, UAVariableIds.ServerStatusType_BuildInfo_SoftwareVersion),
            };
            ValueResult[] valueResultArray = client.ReadMultipleValues(readArgumentsArray);

            // Display results.
            for (int i = 0; i < valueResultArray.Length; i++)
            {
                UAReadArguments readArguments = readArgumentsArray[i];
                ValueResult valueResult = valueResultArray[i];
                if (valueResult.Succeeded)
                    Console.WriteLine($"{readArguments.NodeDescriptor.NodeId}: {valueResult.Value}");
                else
                    Console.WriteLine($"{readArguments.NodeDescriptor.NodeId}: *** Failure: {valueResult.ErrorMessageBrief}");
            }
            
            // Note that as of time of writing this code, the public sample server does not have the build information
            // filled in, and the displayed information is thus largely empty (but correct). The example gives better
            // results with servers that provide meaningful build information.
        }
    }
}

 

Inheritance Hierarchy

System.Object
   OpcLabs.EasyOpc.UA.AddressSpace.Standard.UAReferenceTypeIds

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also