.NET Based OPC UA Client/Server SDK
3.3.1.531
|
The model manager interface. More...
Inherited by UnifiedAutomation.UaServer.BaseNodeManager, and UnifiedAutomation.UaServer.RootNodeManager.
Public Member Functions | |
IDisposable | BindModel (NodeId rootId, object instance, Func< object, CreateInstanceSettings > createInstanceSettings, SynchronizationContext context, NodeId parentNotifierId=null) |
Binds the model instance to the given node id. More... | |
The model manager interface.
IDisposable UnifiedAutomation.UaServer.IModelManager.BindModel | ( | NodeId | rootId, |
object | instance, | ||
Func< object, CreateInstanceSettings > | createInstanceSettings, | ||
SynchronizationContext | context, | ||
NodeId | parentNotifierId = null |
||
) |
Binds the model instance to the given node id.
The driving idea behind the BindModel mechanism is that the model is independent of the Server or NodeManager. This makes it easier to write unit tests for parts of the model and relieves the user of the tedious OPC UA interactions. He can fully concentrate on the business logic within the model.
If the parameter createInstanceSettings is null
, a null
returning delegate will be used as fallback value.
rootId | The root node id. |
instance | The model instance. |
createInstanceSettings | Delegate to get the creation settings for a dynamically created instance. |
context | The synchronization context to be used for the binding. |
parentNotifierId | The parent notifier. If null the Server object will be used as fallback. |
Implemented in UnifiedAutomation.UaServer.RootNodeManager, and UnifiedAutomation.UaServer.BaseNodeManager.