QuickOPC User's Guide and Reference
CommonMappingContext Class
Members 



OpcLabs.EasyOpcClassicCore Assembly > OpcLabs.EasyOpc.LiveMapping Namespace : CommonMappingContext Class
A mapping context for OPC "Classic" specifications.
Object Model
CommonMappingContext ClassAbstractMapping ClassServerDescriptor Class
Syntax
'Declaration
 
<ComVisibleAttribute(False)>
<CLSCompliantAttribute(True)>
Public MustInherit Class CommonMappingContext 
   Inherits OpcLabs.BaseLib.LiveMapping.AbstractMappingContext
   Implements System.ICloneable 
'Usage
 
Dim instance As CommonMappingContext
[ComVisible(false)]
[CLSCompliant(true)]
public abstract class CommonMappingContext : OpcLabs.BaseLib.LiveMapping.AbstractMappingContext, System.ICloneable  
[ComVisible(false)]
[CLSCompliant(true)]
public ref class CommonMappingContext abstract : public OpcLabs.BaseLib.LiveMapping.AbstractMappingContext, System.ICloneable  
Remarks

 

The mapping context holds information about the state of the mapping process. In OPC Data Access (OPC-DA), the mapping context is represented by an instance of DAMappingContext class. In OPC Unified Architecture (OPC-UA), the mapping context is represented by an instance of UAMappingContext class.

The state of mapping changes in the mapping context, as the mapping process proceeds from your given “starting” object, to its possible constituent objects.

For example, the mapping context contains the information about the OPC server and current OPC node, and parameters for reading and subscription. As the mapping proceeds to deeper level, the properties in the mapping context are propagated to the deeper levels as well, and they change accordingly. For example, if a member is mapped to an OPC-DA node, the NodeDescriptor property of the DAMappingContext changes to reflect the information about the node. If the member represents an OPC branch and contains another object, this new NodeDescriptor will be the basis for mapping the members of the inner object.

Refer to Propagated Parameters for descriptions of attributes that are maintained in the mapping context.

You need to make sure that enough information is provided for the mapping, either through the “starting” mapping context used with the Map method, or by means of the mapping attributes. Typically, for example, the OPC server’s computer and ProgID (or endpoint URL) will not be specified through the mapping attributes, but will come from your code, so that it can be modified in run-time. In OPC-DA, you will therefore create a new DAMappingContext with properly filled ServerDescriptor, and pass it to the Map method. In OPC-UA, you will create a new UAMappingContext with properly filled EndpointDescriptor, and pass it to the Map method.

 

Inheritance Hierarchy

System.Object
   OpcLabs.BaseLib.LiveMapping.AbstractMappingContext
      OpcLabs.EasyOpc.LiveMapping.CommonMappingContext
         OpcLabs.EasyOpc.DataAccess.LiveMapping.DAMappingContext

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