.NET Based OPC UA Client/Server SDK  3.3.3.537
UnifiedAutomation.UaClient.ModelManager Class Reference

Provides access to a UA information model using classes with special attributes defined. More...

Inherits UnifiedAutomation.UaClient.SessionMethodHelper, and UnifiedAutomation.UaClient.SessionMethodHelper.

Public Member Functions

 ModelManager (ApplicationInstanceBase application)
 Initializes a new instance of the ModelManager class. More...
 
 ModelManager (Session session)
 Initializes a new instance of the ModelManager class. More...
 
 ModelManager (Subscription subscription)
 Initializes a new instance of the ModelManager class. More...
 
ModelHandle Read (NodeId rootId, object instanceOrHandle)
 Reads the properties of instance of type which has a model mapping. More...
 
IAsyncResult BeginRead (NodeId rootId, object instanceOrHandle, AsyncCallback callback, object callbackData)
 Begins an operation to read the properties of instance of type which has a model mapping. More...
 
ModelHandle EndRead (IAsyncResult result)
 Completes an operation to read properties of instance of type which has a model mapping. More...
 
ModelHandle Write (NodeId rootId, object instanceOrHandle)
 Writes the properties of instance of type which has a model mapping. More...
 
IAsyncResult BeginWrite (NodeId rootId, object instanceOrHandle, AsyncCallback callback, object callbackData)
 Begins an operation to write the properties of instance of type which has a model mapping. More...
 
ModelHandle EndWrite (IAsyncResult result)
 Completes an operation to write the properties of instance of type which has a model mapping. More...
 
ModelSubscription Subscribe (NodeId rootId, object instanceOrHandle, double samplingInterval)
 Subscribes the properties of instance of type which has a model mapping. More...
 
IAsyncResult BeginSubscribe (NodeId rootId, object instanceOrHandle, double samplingInterval, AsyncCallback callback, object callbackData)
 Begins an operation to Subscribe the properties of instance of type which has a model mapping. More...
 
ModelSubscription EndSubscribe (IAsyncResult result)
 Completes an operation to Subscribe properties of instance of type which has a model mapping. More...
 
List< StatusCodeUnsubscribe (ModelSubscription subscriptionHandle)
 Unsubscribes the properties of instance of type which has a model mapping. More...
 
IAsyncResult BeginUnsubscribe (ModelSubscription subscriptionHandle, AsyncCallback callback, object callbackData)
 Begins an operation to unsubscribe the properties of instance of type which has a model mapping. More...
 
List< StatusCodeEndUnsubscribe (IAsyncResult result)
 Completes an operation to unsubscribe to properties of instance of type which has a model mapping. More...
 
TypeDescription GetTypeDescription (NodeId typeId, TypeDescriptionSelection selection, RequestSettings settings)
 Begins the get method description. More...
 
IAsyncResult BeginGetTypeDescription (NodeId typeId, TypeDescriptionSelection selection, RequestSettings settings, AsyncCallback callback, object userData)
 Begins the get method description. More...
 
TypeDescription EndGetTypeDescription (IAsyncResult result)
 Ends the get type description. More...
 
MethodDescription GetMethodDescription (NodeId methodId)
 Begins the get method description. More...
 
MethodDescription GetMethodDescription (NodeId methodId, RequestSettings settings)
 Begins the get method description. More...
 
MethodDescription GetMethodDescription (NodeId objectId, IList< QualifiedName > browsePath, RequestSettings settings)
 Begins the get method description. More...
 
IAsyncResult BeginGetMethodDescription (NodeId methodId, AsyncCallback callback, object userData)
 Begins the get method description. More...
 
IAsyncResult BeginGetMethodDescription (NodeId methodId, RequestSettings settings, AsyncCallback callback, object userData)
 Begins the get method description. More...
 
IAsyncResult BeginGetMethodDescription (NodeId startingNodeId, IList< QualifiedName > browsePath, RequestSettings settings, AsyncCallback callback, object userData)
 Begins the get method description. More...
 
MethodDescription EndGetMethodDescription (IAsyncResult result)
 Ends the get method description. More...
 
Task< ModelHandleReadAsync (NodeId rootId, object instanceOrHandle)
 Asynchronously reads the properties of instance of type which has a model mapping. More...
 
Task< ModelHandleWriteAsync (NodeId rootId, object instanceOrHandle)
 Asynchronously writes the properties of instance of type which has a model mapping. More...
 
Task< ModelSubscriptionSubscribeAsync (NodeId rootId, object instanceOrHandle, double samplingInterval)
 Asynchronously subscribes the properties of instance of type which has a model mapping. More...
 
Task< List< StatusCode > > UnsubscribeAsync (ModelSubscription subscriptionHandle)
 Asynchronously unsubscribes the properties of instance of type which has a model mapping. More...
 
Task< TypeDescriptionGetTypeDescriptionAsync (NodeId typeId, TypeDescriptionSelection selection, RequestSettings settings)
 Asynchronously gets the type description. More...
 
Task< MethodDescriptionGetMethodDescriptionAsync (NodeId methodId)
 Asynchronously gets the method description. More...
 
Task< MethodDescriptionGetMethodDescriptionAsync (NodeId methodId, RequestSettings settings)
 Asynchronously gets the method description. More...
 
Task< MethodDescriptionGetMethodDescriptionAsync (NodeId startingNodeId, IList< QualifiedName > browsePath, RequestSettings settings)
 Asynchronously gets the method description. More...
 
- Public Member Functions inherited from UnifiedAutomation.UaClient.SessionMethodHelper
 SessionMethodHelper (ApplicationInstanceBase application)
 Initializes a new instance of the SessionMethodHelper class. More...
 
 SessionMethodHelper (Session session)
 Initializes a new instance of the SessionMethodHelper class. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
void Connect (int timeout)
 Connects to the server. More...
 
void BeginConnect (AsyncCallback callback, object callbackData)
 Connects to the server. More...
 
void Disconnect ()
 Disconnects from the server. More...
 

Events

EventHandler
< ModelObjectChangedEventArgs
ObjectChanged
 Raised when the value of one or more components of an object changes. More...
 
- Events inherited from UnifiedAutomation.UaClient.SessionMethodHelper
EventHandler ServerStatusChanged
 Occurs when the server status changes. More...
 
EventHandler
< CredentialsRequiredEventArgs
AdminCredentialsRequired
 Raised when admin credentials are required. More...
 

Additional Inherited Members

- Protected Member Functions inherited from UnifiedAutomation.UaClient.SessionMethodHelper
virtual void Dispose (bool disposing)
 Releases unmanaged and—optionally—managed resources. More...
 
UserIdentity RequestAdminCredentials ()
 Gets the admin credentials. More...
 
- Properties inherited from UnifiedAutomation.UaClient.SessionMethodHelper
string EndpointUrl [get, set]
 Gets or sets the endpoint URL. More...
 
Session Session [get]
 Gets the session. More...
 
RequestSettings DefaultRequestSettings [get, set]
 Gets or sets the default request settings. More...
 
int DefaultTimeout [get]
 Gets the default timeout. More...
 
UserIdentity AdminCredentials [get, set]
 Gets or sets the administrator credentials. More...
 
bool IsConnected [get]
 Gets a value indicating whether a connection to the server is active. More...
 
bool MustCloseSession [get]
 A flag indicating that the object created the session and therefore must close it. More...
 

Detailed Description

Provides access to a UA information model using classes with special attributes defined.

Constructor & Destructor Documentation

UnifiedAutomation.UaClient.ModelManager.ModelManager ( ApplicationInstanceBase  application)

Initializes a new instance of the ModelManager class.

Parameters
applicationThe application.
UnifiedAutomation.UaClient.ModelManager.ModelManager ( Session  session)

Initializes a new instance of the ModelManager class.

Parameters
sessionThe session.
UnifiedAutomation.UaClient.ModelManager.ModelManager ( Subscription  subscription)

Initializes a new instance of the ModelManager class.

Parameters
subscriptionThe subscription.

Member Function Documentation

IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginGetMethodDescription ( NodeId  methodId,
AsyncCallback  callback,
object  userData 
)

Begins the get method description.

Parameters
methodIdThe method id.
callbackThe callback.
userDataThe user data.
Returns
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginGetMethodDescription ( NodeId  methodId,
RequestSettings  settings,
AsyncCallback  callback,
object  userData 
)

Begins the get method description.

Parameters
methodIdThe method id.
settingsThe settings.
callbackThe callback.
userDataThe user data.
Returns
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginGetMethodDescription ( NodeId  startingNodeId,
IList< QualifiedName browsePath,
RequestSettings  settings,
AsyncCallback  callback,
object  userData 
)

Begins the get method description.

Parameters
startingNodeIdThe starting node id.
browsePathThe browse path.
settingsThe settings.
callbackThe callback.
userDataThe user data.
Returns
The async results.
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginGetTypeDescription ( NodeId  typeId,
TypeDescriptionSelection  selection,
RequestSettings  settings,
AsyncCallback  callback,
object  userData 
)

Begins the get method description.

Parameters
typeIdThe type id.
selectionThe selection.
settingsThe settings.
callbackThe callback.
userDataThe user data.
Returns
The async results.
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginRead ( NodeId  rootId,
object  instanceOrHandle,
AsyncCallback  callback,
object  callbackData 
)

Begins an operation to read the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginSubscribe ( NodeId  rootId,
object  instanceOrHandle,
double  samplingInterval,
AsyncCallback  callback,
object  callbackData 
)

Begins an operation to Subscribe the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
samplingIntervalThe sampling interval in milliseconds.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginUnsubscribe ( ModelSubscription  subscriptionHandle,
AsyncCallback  callback,
object  callbackData 
)

Begins an operation to unsubscribe the properties of instance of type which has a model mapping.

Parameters
subscriptionHandleThe handle returned from the Subscribe method.
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
IAsyncResult UnifiedAutomation.UaClient.ModelManager.BeginWrite ( NodeId  rootId,
object  instanceOrHandle,
AsyncCallback  callback,
object  callbackData 
)

Begins an operation to write the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
callbackThe callback.
callbackDataThe callback data.
Returns
The object used to manage the state of the asynchronous operation.
MethodDescription UnifiedAutomation.UaClient.ModelManager.EndGetMethodDescription ( IAsyncResult  result)

Ends the get method description.

Parameters
resultThe result.
Returns
The method description.
TypeDescription UnifiedAutomation.UaClient.ModelManager.EndGetTypeDescription ( IAsyncResult  result)

Ends the get type description.

Parameters
resultThe result.
Returns
The type description.
ModelHandle UnifiedAutomation.UaClient.ModelManager.EndRead ( IAsyncResult  result)

Completes an operation to read properties of instance of type which has a model mapping.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The handle (the same as instanceOrHandle parameter if it was a ModelHandle).

When the method completes the properties of the instance are updated with the current values from the Server. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.

ModelSubscription UnifiedAutomation.UaClient.ModelManager.EndSubscribe ( IAsyncResult  result)

Completes an operation to Subscribe properties of instance of type which has a model mapping.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The handle for the newly created subscription.

When the method completes the properties of the instance are updated whenever the Server reports a data change. These data changes are reported with the ObjectChanged event. If any error occurs creating MonitoredItems for individual properties the LastErrors array in the handle is updated with the error code.

List<StatusCode> UnifiedAutomation.UaClient.ModelManager.EndUnsubscribe ( IAsyncResult  result)

Completes an operation to unsubscribe to properties of instance of type which has a model mapping.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The errors for the individual monitored items created for mapped object.
ModelHandle UnifiedAutomation.UaClient.ModelManager.EndWrite ( IAsyncResult  result)

Completes an operation to write the properties of instance of type which has a model mapping.

Parameters
resultThe object used to manage the state of the asynchronous operation.
Returns
The handle (the same as instanceOrHandle parameter if it was a ModelHandle).

This method updates the mapped properties on the Server with the current values stored in the instance. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.

MethodDescription UnifiedAutomation.UaClient.ModelManager.GetMethodDescription ( NodeId  methodId)

Begins the get method description.

Parameters
methodIdThe method id.
Returns
MethodDescription UnifiedAutomation.UaClient.ModelManager.GetMethodDescription ( NodeId  methodId,
RequestSettings  settings 
)

Begins the get method description.

Parameters
methodIdThe method id.
settingsThe settings.
Returns
MethodDescription UnifiedAutomation.UaClient.ModelManager.GetMethodDescription ( NodeId  objectId,
IList< QualifiedName browsePath,
RequestSettings  settings 
)

Begins the get method description.

Parameters
objectIdThe object id.
browsePathThe browse path.
settingsThe settings.
Returns
Task<MethodDescription> UnifiedAutomation.UaClient.ModelManager.GetMethodDescriptionAsync ( NodeId  methodId)

Asynchronously gets the method description.

Parameters
methodIdThe method id.
Returns

An asynchronous task that completes with the method description.

Note
This method is not available on .NET framework versions prior 4.5.
Task<MethodDescription> UnifiedAutomation.UaClient.ModelManager.GetMethodDescriptionAsync ( NodeId  methodId,
RequestSettings  settings 
)

Asynchronously gets the method description.

Parameters
methodIdThe method id.
settingsThe settings.
Returns
An asynchronous task that completes with the method description.
Note
This method is not available on .NET framework versions prior 4.5.
Task<MethodDescription> UnifiedAutomation.UaClient.ModelManager.GetMethodDescriptionAsync ( NodeId  startingNodeId,
IList< QualifiedName browsePath,
RequestSettings  settings 
)

Asynchronously gets the method description.

Parameters
startingNodeIdThe starting node id.
browsePathThe browse path.
settingsThe settings.
Returns
An asynchronous task that completes with the method description.
Note
This method is not available on .NET framework versions prior 4.5.
TypeDescription UnifiedAutomation.UaClient.ModelManager.GetTypeDescription ( NodeId  typeId,
TypeDescriptionSelection  selection,
RequestSettings  settings 
)

Begins the get method description.

Parameters
typeIdThe type id.
selectionThe selection.
settingsThe settings.
Returns
The async results.
Task<TypeDescription> UnifiedAutomation.UaClient.ModelManager.GetTypeDescriptionAsync ( NodeId  typeId,
TypeDescriptionSelection  selection,
RequestSettings  settings 
)

Asynchronously gets the type description.

Parameters
typeIdThe type id.
selectionThe selection.
settingsThe settings.
Returns
An asynchronous task that completes with the type description.
Note
This method is not available on .NET framework versions prior 4.5.
ModelHandle UnifiedAutomation.UaClient.ModelManager.Read ( NodeId  rootId,
object  instanceOrHandle 
)

Reads the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
Returns
The handle (the same as instanceOrHandle parameter if it was a ModelHandle).

When the method completes the properties of the instance are updated with the current values from the Server. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.

Task<ModelHandle> UnifiedAutomation.UaClient.ModelManager.ReadAsync ( NodeId  rootId,
object  instanceOrHandle 
)

Asynchronously reads the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
Returns
An asynchronous task that completes with the handle (the same as instanceOrHandle parameter if it was a ModelHandle). When the task completes the properties of the handle instance are updated with the current values from the Server. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.
Note
This method is not available on .NET framework versions prior 4.5.
ModelSubscription UnifiedAutomation.UaClient.ModelManager.Subscribe ( NodeId  rootId,
object  instanceOrHandle,
double  samplingInterval 
)

Subscribes the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
samplingIntervalThe sampling interval in milliseconds.
Returns
The handle for the newly created subscription.

When the method completes the properties of the instance are updated whenever the Server reports a data change. These data changes are reported with the ObjectChanged event. If any error occurs creating MonitoredItems for individual properties the LastErrors array in the handle is updated with the error code.

Task<ModelSubscription> UnifiedAutomation.UaClient.ModelManager.SubscribeAsync ( NodeId  rootId,
object  instanceOrHandle,
double  samplingInterval 
)

Asynchronously subscribes the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
samplingIntervalThe sampling interval in milliseconds.
Returns
An asynchronous task that completes with the handle for the newly created subscription.

The properties of the instance are updated whenever the Server reports a data change. These data changes are reported with the ObjectChanged event. If any error occurs creating MonitoredItems for individual properties the LastErrors array in the handle is updated with the error code.

Note
This method is not available on .NET framework versions prior 4.5.
List<StatusCode> UnifiedAutomation.UaClient.ModelManager.Unsubscribe ( ModelSubscription  subscriptionHandle)

Unsubscribes the properties of instance of type which has a model mapping.

Parameters
subscriptionHandleThe handle returned from the Subscribe method.
Returns
The errors for the individual monitored items created for mapped object.
Task<List<StatusCode> > UnifiedAutomation.UaClient.ModelManager.UnsubscribeAsync ( ModelSubscription  subscriptionHandle)

Asynchronously unsubscribes the properties of instance of type which has a model mapping.

Parameters
subscriptionHandleThe handle returned from the Subscribe method.
Returns
An asynchronous task that completes with the errors for the individual monitored items created for mapped object.
Note
This method is not available on .NET framework versions prior 4.5.
ModelHandle UnifiedAutomation.UaClient.ModelManager.Write ( NodeId  rootId,
object  instanceOrHandle 
)

Writes the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
Returns
The handle (the same as instanceOrHandle parameter if it was a ModelHandle).

This method updates the mapped properties on the Server with the current values stored in the instance. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.

Task<ModelHandle> UnifiedAutomation.UaClient.ModelManager.WriteAsync ( NodeId  rootId,
object  instanceOrHandle 
)

Asynchronously writes the properties of instance of type which has a model mapping.

Parameters
rootIdThe NodeId for the root of the instance in the Server address space.
instanceOrHandleThe instance or handle (an instance of the ModelHandle class).
Returns
An asynchronous task that completes with the handle (the same as instanceOrHandle parameter if it was a ModelHandle).

This method updates the mapped properties on the Server with the current values stored in the instance. If any error occurs for individual properties the LastErrors array in the handle is updated with the error code.

Note
This method is not available on .NET framework versions prior 4.5.

Event Documentation

EventHandler<ModelObjectChangedEventArgs> UnifiedAutomation.UaClient.ModelManager.ObjectChanged

Raised when the value of one or more components of an object changes.


The documentation for this class was generated from the following files: