Serves as the base class for all VISA session objects.

Derives from

  • NationalInstruments.Visa.Internal.Disposable
  • INativeVisaSession

Syntax

Namespace: NationalInstruments.Visa

public class Session : Disposable, INativeVisaSession

Properties

NameDescription
EventQueueCapacity

Gets or sets the maximum number of events that can be queued at any time on the session.

HardwareInterfaceName

Gets human readable text that describes the hardware interface.

HardwareInterfaceNumber

Gets the board number for the hardware interface.

HardwareInterfaceType

Gets the hardware interface type (GPIB, ASRL, etc.) of this session.

ResourceClass

Gets the resource class (INSTR, INTFC, etc.) as defined by the canonical resource name.

ResourceImplementationVersion

Gets the resource version that uniquely identifies each revision or implementation of a resource.

ResourceLockState

Gets the current lock state of the resource for this session.

ResourceManufacturerId

Gets a value that corresponds to the VXI manufacturer ID of the vendor that implemented the VISA library.

ResourceManufacturerName

Gets a string that corresponds to the manufacturer name of the vendor that implemented the VISA library.

ResourceName

Gets the VISA resource name of the currently open resource. This name is the canonical version of the resource name and therefore may vary from the resource descriptor used to open/initialize the resource.

ResourceSpecificationVersion

Gets the resource version that uniquely identifies the VISA specification version to which the implementation is compliant.

SynchronizeCallbacks

Specifies whether callbacks must be performed in a specific synchronization context.

TimeoutMilliseconds

The I/O timeout in milliseconds for I/O communication on this resource session.

Methods

NameDescription
DisableEvent(EventType)

Disables a client from receiving events of type(s) specified by the eventType  argument.

DiscardEvents(EventType)

Discard all pending events of type(s) specified by the eventType  argument.

EnableEvent(EventType)

Enables a client to receive events of the type specified by the eventType  argument using a WaitOnEvent method.

LockResource(int, string)

Locks the resource for this session with a shared lock, with the specified timeout period.

LockResource()

Locks the resource for this session with an exclusive lock, with an infinite timeout.

LockResource(TimeSpan, string)

Locks the resource for this session with a shared lock, with the specified timeout period.

LockResource(int)

Locks the resource for this session with an exclusive lock, with the specified timeout period.

LockResource(TimeSpan)

Locks the resource for this session with an exclusive lock, with the specified timeout period.

UnlockResource()

Unlock the resource.

WaitOnEvent(EventType, int)

Wait for events of type(s) specified by the eventType  argument.

WaitOnEvent(EventType, out EventQueueStatus)

Wait for events of type(s) specified by the eventType  argument.

WaitOnEvent(EventType)

Wait for events of type(s) specified by the eventType  argument.

WaitOnEvent(EventType, TimeSpan, out EventQueueStatus)

Wait for events of type(s) specified by the eventType  argument.

WaitOnEvent(EventType, int, out EventQueueStatus)

Wait for events of type(s) specified by the eventType  argument.

WaitOnEvent(EventType, TimeSpan)

Wait for events of type(s) specified by the eventType  argument.

DisposeManagedResources()

Disposes internal managed resources and handles to the session and resource manager objects.