OPC Studio User's Guide and Reference
ArrayRankToValueRank Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA Namespace > UAUtilities Class : ArrayRankToValueRank Method
A common array rank to be converted.
Converts an array rank to OPC UA value rank.
Syntax
'Declaration
 
Public Shared Function ArrayRankToValueRank( _
   ByVal arrayRank As Integer _
) As Integer
'Usage
 
Dim arrayRank As Integer
Dim value As Integer
 
value = UAUtilities.ArrayRankToValueRank(arrayRank)
public static int ArrayRankToValueRank( 
   int arrayRank
)
public:
static int ArrayRankToValueRank( 
   int arrayRank
) 

Parameters

arrayRank
A common array rank to be converted.

Return Value

Returns an OPC UA value rank (one of UAValueRanks values) that corresponds to the common array rank arrayRank.
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

OPC UA defines a value rank that differs from the common understanding of array rank. Scalars have OPC UA value rank of -1 (not 0), and there are other special value ranks defined.

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