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: 13.0.40.167

Syntax

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

C#
public class MessageBasedSession : Session, 
	IMessageBasedSession, IServiceProvider

Remarks

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

System.Object
    System.MarshalByRefObject
        NationalInstruments.VisaNS.Session
            NationalInstruments.VisaNS.MessageBasedSession
                NationalInstruments.VisaNS.GpibSession
                NationalInstruments.VisaNS.SerialSession
                NationalInstruments.VisaNS.TcpipSession
                NationalInstruments.VisaNS.TcpipSocket
                NationalInstruments.VisaNS.UsbRaw
                NationalInstruments.VisaNS.UsbSession

Thread Safety

All members of this type are safe for multithreaded operations.

See Also

Reference

MessageBasedSession Members

NationalInstruments.VisaNS Namespace

WAS THIS ARTICLE HELPFUL?

Not Helpful