OPC Studio User's Guide and Reference
DefineMapping(AbstractMappingSource,AbstractMapping,AbstractLinkingTarget,IEnumerable<String>) Method



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.LiveMapping Namespace > AbstractMapper Class > DefineMapping Method : DefineMapping(AbstractMappingSource,AbstractMapping,AbstractLinkingTarget,IEnumerable<String>) Method
The mapping source to be used with the mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

The mapping being defined.

The value of this parameter cannot be null (Nothing in Visual Basic).

The linking target to be set for the mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

The mapping tags to be attached to this mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

Defines a mapping, assuring that mapping sources are not duplicated. Allows to attach mapping tags to the mapping.
Syntax
'Declaration
 
Public Overloads Sub DefineMapping( _
   ByVal mappingSource As AbstractMappingSource, _
   ByVal mapping As AbstractMapping, _
   ByVal linkingTarget As AbstractLinkingTarget, _
   ByVal mappingTags As IEnumerable(Of String) _
) 
'Usage
 
Dim instance As AbstractMapper
Dim mappingSource As AbstractMappingSource
Dim mapping As AbstractMapping
Dim linkingTarget As AbstractLinkingTarget
Dim mappingTags As IEnumerable(Of String)
 
instance.DefineMapping(mappingSource, mapping, linkingTarget, mappingTags)

Parameters

mappingSource
The mapping source to be used with the mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

mapping
The mapping being defined.

The value of this parameter cannot be null (Nothing in Visual Basic).

linkingTarget
The linking target to be set for the mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

mappingTags
The mapping tags to be attached to this mapping.

The value of this parameter cannot be null (Nothing in Visual Basic).

Remarks

The method attempts to find an equivalent mapping source that already exists in the mapper, and if found, uses it. Otherwise, the new mapping source is added to mapping sources of the mapper.

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