MessageBasedSession Class
- Updated2026-08-05
- 1 minute(s) read
Provides access to the message-based functionality, such as reading and writing, available in VISA.
Derives from
- Session
- IMessageBasedSession
Syntax
Namespace: NationalInstruments.Visa
public class MessageBasedSession : Session, IMessageBasedSession
Constructors
| Name | Description |
|---|---|
| MessageBasedSession(string, AccessModes, int) | Initializes a new instance of the MessageBasedSession object from the specified resource name, access modes, and timeout. |
Properties
| Name | Description |
|---|---|
| FormattedIO | Gets a reference to the formatted I/O interface for this session. |
| IOProtocol | Gets or sets the protocol type for I/O communication with the physical resource. In some cases you may not be able to change the protocol, so reading this property value may not return the same value that was set. |
| RawIO | Gets a reference to the raw I/O interface for this session. |
| SendEndEnabled | Enables/disables sending the END signal on the last byte of a write. |
| TerminationCharacter | Gets or sets the ASCII character used to end reading. |
| TerminationCharacterEnabled | Specifies whether the read operation ends when a termination character is received. |
Methods
| Name | Description |
|---|---|
| AssertTrigger() | Asserts a software or hardware trigger dependent on the interface type. |
| Clear() | Performs an IEEE 488.1-style clear of the device and clears the input and output buffer (both raw and formatted I/O buffers). It also may terminate pending operations on the device. |
| ReadStatusByte() | Reads the status from the device. For 488.2 instruments, this is the 488.2 status byte. |
Events
| Name | Description |
|---|---|
| ServiceRequest | Occurs when a service request is received from the device. |