Session Class

Abstract Session base class.

Inheritance Hierarchy

System.Object
  TwinCAT.Session
    TwinCAT.Ads.AdsSession
Namespace:  TwinCAT
Assembly:  TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 4.3.0.0

Syntax

C#

public abstract class Session : ISession, 
    IConnectionStateProvider, IDisposable

VB

Public MustInherit Class Session
    Implements ISession, IConnectionStateProvider, IDisposable

The Session type exposes the following members.

Properties

 

Name

Description

AddressSpecifier

Gets the communication endpoint address string representation.

Connection

Gets the (established) connection.

ConnectionState

Gets the current Connection state of the Session

Disposed

Gets a value indicating whether this Session is disposed.

EstablishedAt

Gets the UTC time when the session was established.

Id

Gets the Session Identifier

IsConnected

Gets a value indicating whether this instance is connected.

Name

Gets the name of the session

SymbolServer

Gets the symbol server.

Methods

 

Name

Description

Close

Closes this ISession

Connect

Connects the session.

Disconnect

Disconnects the session from the target.

Dispose.

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Equals

Determines whether the specified object is equal to the current object. (Inherited from Object.)

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)

GetHashCode

Serves as the default hash function. (Inherited from Object.)

GetSessionName

Gets the name/string identifier of the session.

GetType

Gets the Type of the current instance. (Inherited from Object.)

MemberwiseClone

Creates a shallow copy of the current Object. (Inherited from Object.)

OnConnect

Handler function connecting the Session.

OnCreateSymbolServer

Handler function creating the ISymbolServer

OnDisconnect

Handler function disconnecting the session.

OnGetAddress

Handler function getting the address of the session.

ToString

Returns a string that represents the current object. (Inherited from Object.)

Events

 

Name

Description

ConnectionStateChanged

Occurs when connection status of the IConnectionStateProvider has been changed.

Fields

 

Name

Description

connection

The (established) connection

Reference

TwinCAT Namespace

TwinCAT.ISession

System.IDisposable