Skip to content

Reference

OpcSession Members

Represents a session which a client has created on the server.

Reference

OpcSession Members ​

Type
OpcSession
Namespace
Opc.UaFx.Server
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0

Properties ​

Certificate ​

Gets the certificate of the client.

csharp
public X509Certificate2 Certificate { get; }
vbnet
Public ReadOnly Property Certificate As X509Certificate2

Property value

X509Certificate2

The X509Certificate2 the client has provided when it created the session or a null reference (Nothing in Visual Basic) if it has provided none.

ConnectTime ​

Gets the time at which the client has created the session.

csharp
public DateTime ConnectTime { get; }
vbnet
Public ReadOnly Property ConnectTime As Date

Property value

DateTime

The DateTime in UTC at which the session has been created.

Diagnostics ​

Gets the diagnostic information about the session.

csharp
public OpcSessionDiagnostics Diagnostics { get; }
vbnet
Public ReadOnly Property Diagnostics As OpcSessionDiagnostics

Property value

OpcSessionDiagnostics

The OpcSessionDiagnostics of the session or a null reference (Nothing in Visual Basic) if there is none.

EndpointUrl ​

Gets the URL of the endpoint through which the client has created the session.

csharp
public Uri EndpointUrl { get; }
vbnet
Public ReadOnly Property EndpointUrl As Uri

Property value

Uri

The Uri of the endpoint or a null reference (Nothing in Visual Basic) if the URL is not an absolute URI.

Id ​

Gets the identifier of the session.

csharp
public OpcNodeId Id { get; }
vbnet
Public ReadOnly Property Id As OpcNodeId

Property value

OpcNodeId

The OpcNodeId which identifies the session on the server.

IsActive ​

Gets a value indicating whether the session has been activated.

csharp
public bool IsActive { get; }
vbnet
Public ReadOnly Property IsActive As Boolean

Property value

Boolean

The value true if the client has activated the session; otherwise the value false.

IsExpired ​

Gets a value indicating whether the session has expired.

csharp
public bool IsExpired { get; }
vbnet
Public ReadOnly Property IsExpired As Boolean

Property value

Boolean

The value true if the time since the LastContactTime exceeds the timeout of the session; otherwise the value false.

LastContactTime ​

Gets the time of the last contact with the client.

csharp
public DateTime LastContactTime { get; }
vbnet
Public ReadOnly Property LastContactTime As Date

Property value

DateTime

The DateTime in UTC at which the server has received the last request of the session.

Name ​

Gets the name of the session.

csharp
public string Name { get; }
vbnet
Public ReadOnly Property Name As String

Property value

String

The name of the session as specified by the client.

PreferredLocales ​

since v2.11

Gets a collection of preferred locales (see Name) to use to localize data and information.

csharp
public OpcLocaleCollection PreferredLocales { get; }
vbnet
Public ReadOnly Property PreferredLocales As OpcLocaleCollection

Property value

OpcLocaleCollection

An instance of the OpcLocaleCollection class with Names of the cultures to use to localize data and information for this OpcSession.

ServerUri ​

Gets the URI of the server recorded in the diagnostic information about the session.

csharp
public Uri ServerUri { get; }
vbnet
Public ReadOnly Property ServerUri As Uri

Property value

Uri

The recorded URI as an absolute Uri; otherwise a null reference (Nothing in Visual Basic). The server does not record a URI for its sessions, therefore the value is currently always a null reference.

Socket ​

since v2.7

Gets the identity of the socket through which the client has created the session.

csharp
public OpcSocketIdentity Socket { get; }
vbnet
Public ReadOnly Property Socket As OpcSocketIdentity

Property value

OpcSocketIdentity

The OpcSocketIdentity of the socket or a null reference (Nothing in Visual Basic) if it is not known.

SuppliedIdentity ​

Gets the user identity which the client has supplied.

csharp
public OpcUserIdentity SuppliedIdentity { get; }
vbnet
Public ReadOnly Property SuppliedIdentity As OpcUserIdentity

Property value

OpcUserIdentity

The OpcUserIdentity supplied by the client or a null reference (Nothing in Visual Basic) if there is none.

UsedIdentity ​

Gets the user identity which the server uses for the session.

csharp
public OpcUserIdentity UsedIdentity { get; }
vbnet
Public ReadOnly Property UsedIdentity As OpcUserIdentity

Property value

OpcUserIdentity

The OpcUserIdentity which the server has mapped the SuppliedIdentity to or a null reference (Nothing in Visual Basic) if there is none.

Methods ​

Close ​

Closes the session.

csharp
public void Close()
vbnet
Public Sub Close()

Dispose ​

2 overloads

OverloadDescription
Dispose()Releases all resources used by the OpcSession.
Dispose(bool)protected · virtualReleases the unmanaged resources used by the OpcSession and optionally releases the managed resources.

Dispose() ​

Releases all resources used by the OpcSession.

csharp
public void Dispose()
vbnet
Public Sub Dispose()

Implements

Dispose()

Dispose(bool) ​

protected · virtual

Releases the unmanaged resources used by the OpcSession and optionally releases the managed resources.

csharp
protected virtual void Dispose(bool disposing)
vbnet
Protected Overridable Sub Dispose(disposing As Boolean)

Parameters

NameTypeDescription
disposingBooleanThe value true to release both managed and unmanaged resources; otherwise the value false to release only unmanaged resources.

GetSubscriptions ​

since v2.50

Provides a sequence of OpcSubscription instances associated with this OpcSession.

csharp
public IEnumerable<OpcSubscription> GetSubscriptions()
vbnet
Public Function GetSubscriptions() As IEnumerable(Of OpcSubscription)

Returns

IEnumerable<OpcSubscription>

An IEnumerable<T> of OpcSubscription instances.