QuickOPC User's Guide and Reference
RelatedTo(UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand) Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Filtering Namespace > UAFilterElements Class > RelatedTo Method : RelatedTo(UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand,UAFilterOperand) Method
TRUE if the target Node is of type Operand[0] and is related to a NodeId of the type defined in Operand[1] by the Reference type defined in Operand[2].

Remarks:

Operand[0] or Operand[1] can also point to an element Reference where the referred to element is another RelatedTo operator. This allows chaining of relationships (e.g. A is related to B is related to C), where the relationship is defined by the ReferenceType defined in Operand[2]. In this case, the referred to element returns a list of NodeIds instead of TRUE or FALSE. In this case if any errors occur or any of the operands cannot be resolved to an appropriate value, the result of the chained relationship is an empty list of nodes.
Operand[3] defines the number of hops for which the relationship should be followed. If Operand[3] is 1, then objects shall be directly related. If a hop is greater than 1, then a NodeId of the type described in Operand[1] is checked for at the depth specified by the hop. In this case, the type of the intermediate Node is undefined, and only the Reference type used to reach the end Node is defined. If the requested number of hops cannot be followed, then the result is FALSE, i.e., an empty Node list. If Operand[3] is 0, the relationship is followed to its logical end in a forward direction and each Node is checked to be of the type specified in Operand[1]. If any Node satisfies this criterion, then the result is TRUE, i.e., the NodeId is included in the sub-list.
Operand [4] defines if Operands [0] and [1] should include support for subtypes of the types defined by these operands. A TRUE indicates support for subtypes.
Operand [5] defines if Operand [2] should include support for subtypes of the reference type. A TRUE indicates support for subtypes.

The following restrictions apply to the operands:
[0]: Any operand that resolves to a NodeId or ExpandedNodeId that identifies an ObjectType or VariableType Node or a reference to another element which is a RelatedTo operator.
[1]: Any operand that resolves to a NodeId or ExpandedNodeId that identifies an ObjectType or VariableType Node or a reference to another element which is a RelatedTo operator.
[2]: Any operand that resolves to a NodeId that identifies a ReferenceType Node.
[3]: Any operand that resolves to a value implicitly convertible to Uint32.
[4]: Any operand that resolves to a value implicitly convertible to a boolean; if this operand does not resolve to a Boolean, then a value of FALSE is used.
[5]: Any operand that resolves to a value implicitly convertible to a boolean; if this operand does not resolve to a Boolean, then a value of FALSE is used.
If none of the operands [0], [1], [2], [3] resolves to an appropriate value then the result of this operation shall always be False (or an Empty set in the case of a nested RelatedTo operand).

Syntax
'Declaration
 
<NotNullAttribute()>
Public Overloads Shared Function RelatedTo( _
   ByVal operand0 As UAFilterOperand, _
   ByVal operand1 As UAFilterOperand, _
   ByVal operand2 As UAFilterOperand, _
   ByVal operand3 As UAFilterOperand, _
   ByVal operand4 As UAFilterOperand, _
   ByVal operand5 As UAFilterOperand _
) As UAContentFilterElement
'Usage
 
Dim operand0 As UAFilterOperand
Dim operand1 As UAFilterOperand
Dim operand2 As UAFilterOperand
Dim operand3 As UAFilterOperand
Dim operand4 As UAFilterOperand
Dim operand5 As UAFilterOperand
Dim value As UAContentFilterElement
 
value = UAFilterElements.RelatedTo(operand0, operand1, operand2, operand3, operand4, operand5)

Parameters

operand0
operand1
operand2
operand3
operand4
operand5
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