QuickOPC User's Guide and Reference
UAPublisherIdType Enumeration



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.PubSub Namespace : UAPublisherIdType Enumeration
The type of the publisher Id.
Syntax
'Declaration
 
<ComVisibleAttribute(True)>
<DisplayName2Attribute("OPC UA Publisher Id Type")>
<GuidAttribute("1A9A5A7B-767C-4A00-ADFD-19549393E8FA")>
Public Enum UAPublisherIdType 
   Inherits System.Enum
   Implements System.IComparable, System.IConvertible, System.IFormattable 
'Usage
 
Dim instance As UAPublisherIdType
[ComVisible(true)]
[DisplayName2("OPC UA Publisher Id Type")]
[Guid("1A9A5A7B-767C-4A00-ADFD-19549393E8FA")]
public enum UAPublisherIdType : System.Enum, System.IComparable, System.IConvertible, System.IFormattable  
[ComVisible(true)]
[DisplayName2("OPC UA Publisher Id Type")]
[Guid("1A9A5A7B-767C-4A00-ADFD-19549393E8FA")]
public enum class UAPublisherIdType : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable  
Members
MemberValueDescription
Byte1A publisher Id represented by an 8-bit unsigned integer. Enum value is 1.
None0No type (a null publisher Id). Enum value is 0.
String5A publisher Id represented by a string. Enum value is 5.
UInt162A publisher Id represented by a 16-bit unsigned integer. Enum value is 2.
UInt323A publisher Id represented by a 32-bit unsigned integer. Enum value is 3.
UInt644A publisher Id represented by a 64-bit unsigned integer. Enum value is 4.
Remarks

 

This article describes the physical identifiers used in OPC UA PubSub communication. For a distinction between physical and logical identifiers, see Identifying information in OPC UA PubSub.

Network Address and Resource Address

Network address is an abstract concept used to represent the basic information needed to make a PubSub connection to the message oriented middleware. In QuickOPC, it represented by the NetworkAddress Class. The network address specifies a network interface used for the communication, with its InterfaceName Property. This is an empty string if you want to leave the choice of the network interface up to the component, or a non-empty string specifying the name of the network interface on the computer where the component runs.

Resource address is a concrete derivation of network address, in which the network address information is represented by a resource string - essentially, a URL string. Currently, all network addresses used in OPC UA PubSub are resource addresses. In QuickOPC, resource address is represented by the ResourceAddress Class. The actual URL information is stored in its ResourceDescriptor Property.

URL schemes and syntaxes

The URL schemes and syntaxes for OPC UA PubSub are described in OPC specifications. The ones currently supported by core QuickOPC are:

With UDP, both IPv4 and IPv6 addresses are supported.

QuickOPC supports Enhanced Host Name Resolution in OPC UA PubSub URLs. This allows you to conveniently and reliably use some pre-defined host names as shortcuts for IP and MAC addresses with the above URL schemes, such as "ip6-allrouters" or "eth-broadcast".

QuickOPC will, by default, use MQTT protocol with any of the URL schemes below:

The details of the URL syntax are then left on the concrete MQTT communication package used (see MQTT communication packages). Some communication packages define useful extensions to the URL syntax, which are described with each communication package. The basic syntax options, described in the OPC UA PubSub specification, are supported by every communication (as long as the corresponding scheme is supported at all), i.e.:

Publisher Id

The publisher Id is a unique identifier for a publisher with the message-oriented middleware. A publisher can use a publisher Id of one of these types:

Publisher Ids are only equal if both their type and their value are equal. For example, a UInt16 publisher Id with value 31 is different from UInt32 publisher Id with the same value. You therefore need to be careful when specifying the publisher Ids, and with numerical Ids, pay attention to their precise type. Also, a String publisher Id is different from any numerical publisher Id, even if it carries a string representation of the same numerical value (such as a string "31", in our example).

In QuickOPC, the publisher Id is represented by the UAPublisherId Class, and the types of publisher Ids are expressed by the UAPublisherIdType Enumeration. The easiest way to create a publisher Id is to use one of the static CreateXXXX methods, defined on the class:

In a Message Filtering (OPC UA PubSub), you can also use a publisher Id with type None. This specifies that no filtering on publisher Ids should be performed.

Writer Group Id

The writer group Id is an unsigned 16-bit integer that identifies the writer group. It is unique across writer groups for a publisher Id. Writer groups can only have non-zero Ids, but a zero writer group Id may be used in a Message Filtering (OPC UA PubSub) to specify that no filtering on writer group Ids should be performed.

Dataset Writer Id

The dataset writer Id identifies the dataset writer in the writer group. It is an unsigned 16-bit integer that is unique across all dataset writers for a publisher Id. Dataset writers can only have non-zero Ids, but a zero dataset writer Id may be used in a Message Filtering (OPC UA PubSub) to specify that no filtering on dataset writer Ids should be performed.

Field Name and Field Index

Each dataset consists of a collection of dataset fields. Each field has a unique name within a dataset. Some message mappings (such as JSON) transfer the field names in the dataset message, others (such as UADP) do not, and they rely on the order of fields, which then must be the same as in the dataset metadata.

When QuickOPC delivers information to you, it preferably uses field names, but it resorts to field indexes when the field names are not available. When you need to specify a dataset field to QuickOPC, you can use either form (name or index). Normally, we recommend using field names and not field indexes, but an exception must be made in case when message mapping such as UADP is sued, and metadata (as a source of field names) is not available).

Dataset Metadata (OPC UA PubSub) can be provided through OPC UA PubSub logical resolution, or you can supply it manually (from the code).

 

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         OpcLabs.EasyOpc.UA.PubSub.UAPublisherIdType

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