OPC Studio User's Guide and Reference
CreateUInt32 Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.PubSub Namespace > UAPublisherId Class : CreateUInt32 Method
A UInt32 identifier of the publisher Id.
Creates a publisher Id with given UInt32 identifier.
Syntax
'Declaration
 
<JetBrains.Annotations.MustUseReturnValueAttribute()>
<JetBrains.Annotations.NotNullAttribute()>
<JetBrains.Annotations.PureAttribute()>
Public Shared Function CreateUInt32( _
   ByVal uint32Identifier As Long _
) As UAPublisherId
'Usage
 
Dim uint32Identifier As Long
Dim value As UAPublisherId
 
value = UAPublisherId.CreateUInt32(uint32Identifier)
[JetBrains.Annotations.MustUseReturnValue()]
[JetBrains.Annotations.NotNull()]
[JetBrains.Annotations.Pure()]
public static UAPublisherId CreateUInt32( 
   long uint32Identifier
)
[JetBrains.Annotations.MustUseReturnValue()]
[JetBrains.Annotations.NotNull()]
[JetBrains.Annotations.Pure()]
public:
static UAPublisherId^ CreateUInt32( 
   int64 uint32Identifier
) 

Parameters

uint32Identifier
A UInt32 identifier of the publisher Id.

Return Value

Returns a UInt32 publisher Id with the specified identifier.

Because the UASubscribeDataSetFilter has an implicit conversion from UAPublisherId, in languages that support implicit conversion operators (such as C# or VB.NET), you can simply use the returned UAPublisherId (containing the publisher Id that you want to allow in the filter) in any place where UASubscribeDataSetFilter is expected as input, and the corresponding OPC UA subscribe dataset filter will be constructed automatically. When the implicit conversion operators are not supported (such as with Python.NET), you can use the UASubscribeDataSetFilter.FromUAPublisherId static method instead.

This method never returns null (Nothing in Visual Basic).

This return value of this method should not be ignored.

Exceptions
ExceptionDescription

The value of an argument is outside the allowable range of values as defined by the invoked method.

This is a usage error, i.e. it will never occur (the exception will not be thrown) in a correctly written program. Your code should not catch this exception.

Remarks

Intentionally, CLS-compliant wider input type is used.

It is intentional that there is no way to directly construct a numerical UAPublisherId without having to somehow explicitly state the desired type. This design attempts to prevent unwanted creation of publisher Ids with wrong type.

This method is pure, i.e. it does not have observable side effects.

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