Reference
OpcContext Members
Provides information and services about the system which belong to the current situation (process, thread, session, etc.).
Reference
OpcContext Members
- Type
- OpcContext
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Properties
Current
Gets or sets the OpcContext for the current thread.
public static OpcContext Current { get; }Public Shared ReadOnly Property Current As OpcContextProperty value
The OpcContext that represents the context of the current thread.
Empty
Gets an empty OpcContext which can be used in cases there a session nor system specific context is not necessarily required.
public static OpcContext Empty { get; }Public Shared ReadOnly Property Empty As OpcContextProperty value
An instance of the OpcContext class without any contextual information.
Identity
Gets the OpcUserIdentity which belongs to the situation represented.
public OpcUserIdentity Identity { get; }Public ReadOnly Property Identity As OpcUserIdentityProperty value
The OpcUserIdentity which belongs to the situation represented or a null reference (Nothing in Visual Basic) if there is no identity information available.
Namespaces
Gets a read-only collection of namespaces valid in the current OpcContext.
public OpcReadOnlyNamespaceCollection Namespaces { get; }Public ReadOnly Property Namespaces As OpcReadOnlyNamespaceCollectionProperty value
OpcReadOnlyNamespaceCollection
An instance of the OpcReadOnlyNamespaceCollection class with OpcNamespace items for each 'NamespaceUri' used to organize the nodes in an address space.
NodeIdFactory
Gets the OpcNodeIdFactory used to create new node identifiers using this context.
public OpcNodeIdFactory NodeIdFactory { get; }Public ReadOnly Property NodeIdFactory As OpcNodeIdFactoryProperty value
The OpcNodeIdFactory used through this context or a null reference (Nothing in Visual Basic) if there is not node identifier factory associated with this context.
Owner
Gets the owner of the current OpcContext.
public IOpcApplicationInstance Owner { get; }Public ReadOnly Property Owner As IOpcApplicationInstanceProperty value
An instance implementing the IOpcApplicationInstance interface which has defined the current OpcContext.
PreferredLocales
Gets a collection of preferred locales (see Name) to use to localize data and information.
public virtual OpcLocaleCollection PreferredLocales { get; }Public Overridable ReadOnly Property PreferredLocales As OpcLocaleCollectionProperty value
An instance of the OpcLocaleCollection class with Names of the cultures to use to localize data and information in order of this OpcContext.
SessionId
Gets the session identifier which identifies the session within that the context has been created and is valid.
public virtual OpcNodeId SessionId { get; }Public Overridable ReadOnly Property SessionId As OpcNodeIdProperty value
The OpcNodeId of the session.
Methods
Enter
| Overload | Description |
|---|---|
| Enter( | Enters a new OpcContext using the namespaces specified. |
| Enter( | Enters a new OpcContext using the namespaces specified. |
Enter(params OpcNamespace[])
Enters a new OpcContext using the namespaces specified.
public static OpcContext.Local Enter(params OpcNamespace[] namespaces)Public Shared Function Enter(
ParamArray namespaces As OpcNamespace()) As OpcContext.LocalParameters
| Name | Type | Description |
|---|---|---|
namespaces | params OpcNamespace[] | An array of OpcNamespace instances known by the Namespaces of the new OpcContext to create. |
Returns
A new instance of the OpcContext class.
Enter(IEnumerable<OpcNamespace>)
Enters a new OpcContext using the namespaces specified.
public static OpcContext.Local Enter(IEnumerable<OpcNamespace> namespaces)Public Shared Function Enter(
namespaces As IEnumerable(Of OpcNamespace)) As OpcContext.LocalParameters
| Name | Type | Description |
|---|---|---|
namespaces | IEnumerable<OpcNamespace> | A sequence of OpcNamespace instances known by the Namespaces of the new OpcContext to create. |
Returns
A new instance of the OpcContext class.
GetDataType
| Overload | Description |
|---|---|
| GetDataType( | Retrieves the OpcDataTypeInfo object which is known under the name specified. |
| GetDataType( | Retrieves the OpcDataTypeInfo object which is known under the name specified. |
| GetDataType( | Retrieves the OpcDataTypeInfo object which declares the type which is identified by the typeId specified. |
| GetDataType( | Retrieves the OpcDataTypeInfo object which declares the type implemented by the underlyingType specified. |
| GetDataType( | Retrieves the OpcDataTypeInfo object which declares the type which is identified by the encoding specified. |
| GetDataType( | Retrieves the OpcDataTypeInfo object which is known under the xmlName specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Object | The object has been disposed of. |
GetDataType(string)
Retrieves the OpcDataTypeInfo object which is known under the name specified.
public OpcDataTypeInfo GetDataType(string name)Public Function GetDataType(name As String) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
name | String | The string to use to identify the OpcDataTypeInfo object to retrieve. |
Returns
The OpcDataTypeInfo object its Name is equals (regarding its Value) to the name specified; otherwise a null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| Argument | The name is equals Empty. |
| Argument | The name is a null reference ( |
GetDataType(OpcName)
Retrieves the OpcDataTypeInfo object which is known under the name specified.
public OpcDataTypeInfo GetDataType(OpcName name)Public Function GetDataType(name As OpcName) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName of the OpcDataTypeInfo object to retrieve. |
Returns
The OpcDataTypeInfo object its Name is equals to the name specified; otherwise a null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| Argument | The name is a null reference ( |
GetDataType(OpcNodeId)
Retrieves the OpcDataTypeInfo object which declares the type which is identified by the typeId specified.
public OpcDataTypeInfo GetDataType(OpcNodeId typeId)Public Function GetDataType(typeId As OpcNodeId) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
typeId | OpcNodeId | The OpcNodeId which identifies the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo object which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo object which is associated with the typeId specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The typeId is a null reference ( |
GetDataType(Type)
Retrieves the OpcDataTypeInfo object which declares the type implemented by the underlyingType specified.
public OpcDataTypeInfo GetDataType(Type underlyingType)Public Function GetDataType(underlyingType As Type) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
underlyingType | Type | The Type which implements the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo object which declares the underlyingType specified or a null reference (Nothing in Visual Basic) if there isn't a OpcDataTypeInfo object associated with the underlyingType specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The underlyingType is a null reference ( |
GetDataType(OpcEncoding)
Retrieves the OpcDataTypeInfo object which declares the type which is identified by the encoding specified.
public OpcDataTypeInfo GetDataType(OpcEncoding encoding)Public Function GetDataType(encoding As OpcEncoding) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
encoding | OpcEncoding | The OpcEncoding which identifies the OpcDataTypeInfo to retrieve. |
Returns
The OpcDataTypeInfo object which is known under the encoding specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcDataTypeInfo which is associated with the encoding specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The encoding is a null reference ( |
GetDataType(XmlQualifiedName)
Retrieves the OpcDataTypeInfo object which is known under the xmlName specified.
public OpcDataTypeInfo GetDataType(XmlQualifiedName xmlName)Public Function GetDataType(xmlName As XmlQualifiedName) As OpcDataTypeInfoParameters
| Name | Type | Description |
|---|---|---|
xmlName | XmlQualifiedName | The XmlQualifiedName of the OpcDataTypeInfo object to retrieve. |
Returns
The OpcDataTypeInfo object its XmlName is equals to the xmlName specified; otherwise a null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| Argument | The xmlName is a null reference ( |
GetNodeType
| Overload | Description |
|---|---|
| GetNodeType( | Retrieves the OpcNodeTypeInfo object which is known under the name specified. |
| GetNodeType( | Retrieves the OpcNodeTypeInfo object which is known under the name specified. |
| GetNodeType( | Retrieves the OpcNodeTypeInfo object which declares the type which is identified by the typeId specified. |
| GetNodeType( | Retrieves the OpcNodeTypeInfo object which declares the type implemented by the underlyingType specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Object | The object has been disposed of. |
GetNodeType(string)
Retrieves the OpcNodeTypeInfo object which is known under the name specified.
public OpcNodeTypeInfo GetNodeType(string name)Public Function GetNodeType(name As String) As OpcNodeTypeInfoParameters
| Name | Type | Description |
|---|---|---|
name | String | The string to use to identify the OpcNodeTypeInfo object to retrieve. |
Returns
The OpcNodeTypeInfo object its Name is equals (regarding its Value) to the name specified; otherwise a null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| Argument | The name is equals Empty. |
| Argument | The name is a null reference ( |
GetNodeType(OpcName)
Retrieves the OpcNodeTypeInfo object which is known under the name specified.
public OpcNodeTypeInfo GetNodeType(OpcName name)Public Function GetNodeType(name As OpcName) As OpcNodeTypeInfoParameters
| Name | Type | Description |
|---|---|---|
name | OpcName | The OpcName of the OpcNodeTypeInfo object to retrieve. |
Returns
The OpcNodeTypeInfo object its Name is equals to the name specified; otherwise a null reference (Nothing in Visual Basic).
Exceptions
| Exception | Condition |
|---|---|
| Argument | The name is a null reference ( |
GetNodeType(OpcNodeId)
Retrieves the OpcNodeTypeInfo object which declares the type which is identified by the typeId specified.
public OpcNodeTypeInfo GetNodeType(OpcNodeId typeId)Public Function GetNodeType(typeId As OpcNodeId) As OpcNodeTypeInfoParameters
| Name | Type | Description |
|---|---|---|
typeId | OpcNodeId | The OpcNodeId which identifies the OpcNodeTypeInfo to retrieve. |
Returns
The OpcNodeTypeInfo object which is known under the typeId specified or a null reference (Nothing in Visual Basic) if there doesn't exist a known OpcNodeTypeInfo object which is associated with the typeId specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The typeId is a null reference ( |
GetNodeType(Type)
Retrieves the OpcNodeTypeInfo object which declares the type implemented by the underlyingType specified.
public OpcNodeTypeInfo GetNodeType(Type underlyingType)Public Function GetNodeType(underlyingType As Type) As OpcNodeTypeInfoParameters
| Name | Type | Description |
|---|---|---|
underlyingType | Type | The Type which implements the OpcNodeTypeInfo to retrieve. |
Returns
The OpcNodeTypeInfo object which declares the underlyingType specified or a null reference (Nothing in Visual Basic) if there isn't a OpcNodeTypeInfo object associated with the underlyingType specified.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The underlyingType is a null reference ( |
OfNode
Creates a context for the node specified which uses the information of the current OpcContext.
public OpcNodeContext OfNode(OpcNode node)Public Function OfNode(node As OpcNode) As OpcNodeContextParameters
| Name | Type | Description |
|---|---|---|
node | OpcNode | The OpcNode to that the new context belongs. |
Returns
A new instance of the OpcNodeContext class for the node.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The node is a null reference ( |

