MessageBasedSession Class

NI-VisaNS .NET Class Library Help for Visual Studio 2010

Edition Date: August 2012

Part Number: 370627F-01

»View Product Info
Download Help (Windows Only)

Members See Also

Provides access to the message-based functionality, such as reading and writing, available in VISA.

Namespace: NationalInstruments.VisaNS

Assembly: NationalInstruments.VisaNS (in NationalInstruments.VisaNS.dll) Version:


Visual Basic (Declaration)
Public Class MessageBasedSession _
	Inherits Session _
	Implements IMessageBasedSession, IServiceProvider

public class MessageBasedSession : Session, 
	IMessageBasedSession, IServiceProvider


This class provides access to the message-based functionality, such as synchronous and asynchronous reading and writing that is available in VISA. It also provides higher-level functionality, such as Query, which performs a synchronous read and write in the same step. This class can be instantiated directly, but it is recommended that you use the Open method to instantiate sessions. This way allows you to access functionality specific to the resource type that you are using, but keep rest of your code generic. Refer to Open for more information.
Note: In the .NET interface to NI-VISA, a VISA session is opened when Session or one of its subclasses is instantiated. A VISA session is closed when Session or one of its subclasses is disposed by calling the Dispose method. Ensure that the Dispose method is called when you are finished with Session.

Inheritance Hierarchy


Thread Safety

All members of this type are safe for multithreaded operations.

See Also


MessageBasedSession Members

NationalInstruments.VisaNS Namespace


Not Helpful