MessageBasedSession Members

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)

MessageBasedSession Class Constructors Methods Properties Events See Also


The MessageBasedSession type exposes the following members.

Constructors

NameDescription
MessageBasedSession

Overloaded. Initializes a new instance of the MessageBasedSession object from the specified resource name.

Methods

NameDescription
AssertTrigger Asserts a software or hardware trigger.
BeginRead

Overloaded. Initiates an asynchronous read from a device.

BeginWrite

Overloaded. Initiates an asynchronous write with ASCII-encoded string data to a device.

Clear Clears a device.
CreateObjRefCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
DisableEvent

Overloaded. Disables notification of the specified event type on the specified event-handling mechanism.

DiscardEvent

Overloaded. Discards event occurrences for the specified event type on the queuing mechanism for a session.

Dispose

Overloaded. Releases all resources used by Session.

EnableEvent

Overloaded. Enables notification of an event.

EndReadByteArray Handles the end of an asynchronous read and returns the read byte array.
EndReadString Handles the end of an asynchronous read and returns the ASCII-encoded read string.
EndWrite Handles the end of an asynchronous write.
EqualsDetermines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize Finalizes the instance of the Session class. (Inherited from Session.)
GetAttributeBoolean Provides direct read access to the NI-VISA driver-level attributes of Boolean data type. (Inherited from Session.)
GetAttributeByte Provides direct read access to the NI-VISA driver-level attributes of Byte data type. (Inherited from Session.)
GetAttributeInt16 Provides direct read access to the NI-VISA driver-level attributes of Int16 data type. (Inherited from Session.)
GetAttributeInt32 Provides direct read access to the NI-VISA driver-level attributes of Int32 data type. (Inherited from Session.)
GetAttributeInt64 Provides direct read access to the NI-VISA driver-level attributes of Int64 data type. (Inherited from Session.)
GetAttributeString Provides direct read access to the NI-VISA driver-level attributes of String data type. (Inherited from Session.)
GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
GetLifetimeServiceRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
GetService Returns an object that represents a service provided by the MessageBasedSession.
GetTypeGets the Type of the current instance. (Inherited from Object.)
InitializeLifetimeServiceObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
InstallCustomEventHandler Installs a handler for a nonstandard or new event type. (Inherited from Session.)
LockResource

Overloaded. Establishes an exclusive lock to the specified resource using the Timeout property.

MemberwiseClone

Overloaded. Creates a shallow copy of the current Object.

OnServiceRequest Raises the ServiceRequest event of the MessageBasedSession object.
Query

Overloaded. Performs a synchronous write of byte array data, followed by a synchronous read.

ReadByteArray

Overloaded. Synchronously reads byte array data from a device or interface.

ReadStatusByte Reads the status byte of a service request.
ReadString

Overloaded. Synchronously reads ASCII-encoded string data from a device or interface.

ReadToFile

Overloaded. Synchronously reads data and stores the transferred data in a file.

SetAttributeBoolean Provides direct write access to the NI-VISA driver-level attributes of Boolean data type. (Inherited from Session.)
SetAttributeByte Provides direct write access to the NI-VISA driver-level attributes of Byte data type. (Inherited from Session.)
SetAttributeInt16 Provides direct write access to the NI-VISA driver-level attributes of Int16 data type. (Inherited from Session.)
SetAttributeInt32 Provides direct write access to the NI-VISA driver-level attributes of Int32 data type. (Inherited from Session.)
SetAttributeInt64 Provides direct write access to the NI-VISA driver-level attributes of Int64 data type. (Inherited from Session.)
SetAttributeString Provides direct write access to the NI-VISA driver-level attributes of String data type. (Inherited from Session.)
Terminate

Overloaded. Aborts all in-progress asynchronous read and write operations.

ToString Overrides ToString. (Inherited from Session.)
UninstallCustomEventHandler Uninstalls a handler for a nonstandard or new event type that was installed with InstallCustomEventHandler. (Inherited from Session.)
UnlockResource Relinquishes a lock for the specified resource. (Inherited from Session.)
WaitOnEvent

Overloaded. Waits infinitely long for an occurrence of the specified event for a session.

Write

Overloaded. Synchronously writes an array of bytes to the device or interface.

WriteFromFile

Overloaded. Synchronously reads data from a file and writes it to the device or interface.

Properties

NameDescription
DefaultBufferSize Gets or sets the default size of read or write buffers when they are not explicitly defined as a parameter on read or write operations.
Handle Gets access to the NI-VISA driver session handle that NI-VISA driver operations use internally. (Inherited from Session.)
HardwareInterfaceName Gets human-readable text that describes the current hardware interface. (Inherited from Session.)
HardwareInterfaceNumber Gets the board number for the current hardware interface. (Inherited from Session.)
HardwareInterfaceType Gets the hardware interface type of this session. (Inherited from Session.)
IOProtocol Gets or sets which I/O protocol to use for the current hardware interface.
LastStatus Gets the last NI-VISA driver status code that was received when this API called a NI-VISA driver method. (Inherited from Session.)
ReadToFileAppends Gets or sets a value indicating whether the ReadToFile method overwrites or appends data when opening a file.
ResourceClass Gets the resource class (for example, "INSTR") as defined by the canonical resource name. (Inherited from Session.)
ResourceImplementationVersion Gets the resource version that uniquely identifies each revision or implementation of a resource. (Inherited from Session.)
ResourceLockState Gets the current locking state of the resource. (Inherited from Session.)
ResourceManufacturerID Gets a value that corresponds to the VXI manufacturer ID of the vendor that implemented the VISA library. (Inherited from Session.)
ResourceManufacturerName Gets a string that corresponds to the manufacturer name of the vendor that implemented the VISA library. (Inherited from Session.)
ResourceName Gets the unique identifier for a resource. (Inherited from Session.)
ResourceSpecificationVersion Gets the resource version that uniquely identifies the VISA specification version to which the implementation is compliant. (Inherited from Session.)
SendEndEnabled Gets or sets a value indicating whether to assert END during the transfer of the last byte of the buffer.
SynchronizeCallbacks Specifies how events and callback delegates are invoked. (Inherited from Session.)
SynchronizingObject Obsolete. Gets or sets the object that marshals event-handler and callback calls. (Inherited from Session.)
TerminationCharacter Gets or sets the termination character.
TerminationCharacterEnabled Gets or sets a value indicating whether the read operation terminates when a termination character is received.
Timeout Gets or sets the minimum timeout value to use in milliseconds when accessing the device associated with the session. (Inherited from Session.)
VisaEventQueueLength Gets or sets the maximum number of events that can be queued at any time on the session. (Inherited from Session.)

Events

NameDescription
ServiceRequest Occurs when the device associated with the session receives a service request.

See Also

Reference

MessageBasedSession Class

NationalInstruments.VisaNS Namespace

WAS THIS ARTICLE HELPFUL?

Not Helpful