Interface IAsyncMessage
Description
This is the asynchronous messaging interface exported by most resources, including all INSTR and SOCKET resources. This interface provides basic 488.2-style I/O capabilities.
IAsyncMessage derives from IBaseMessage.
Methods
Use of this method is discouraged. All the non-deprecated standard attributes are accessible via properties on the appropriate COM interfaces. |
|
Use of this method is discouraged. All the non-deprecated standard attributes are accessible via properties on the appropriate COM interfaces. |
|
Locks the resource. |
|
Unlocks the resource |
|
Opens the resource. This is the first method on IVisaSession or any of its derived interfaces to be called. In general, you will not call this method because you will use the Resource Manager to create resources. |
|
Closes the resource. Sending the resource's COM object's reference count to zero (and thus destroying the object) also executes a close, but this method may be useful for environments with garbage collection or other facilities that make object lifetimes non-deterministic. |
|
Asserts a software or hardware trigger dependent on the interface type. For a GPIB device, the device is addressed to listen, and then the GPIB GET command is sent. For a VXI device, if VI_ATTR_TRIG_ID is VI_TRIG_SW, then the device is sent the Word Serial Trigger command; if VI_ATTR_TRIG_ID is any other value, a hardware trigger is sent on the line corresponding to the value of that attribute. For GPIB and VXI software triggers, TRIG_PROT_DEFAULT is the only valid protocol. For VXI hardware triggers, TRIG_PROT_DEFAULT is equivalent to TRIG_PROT_SYNC. |
|
Performs an IEEE 488.1-style clear of the device. VXI uses the Word Serial Clear command, and GPIB uses the Selective Device Clear command. |
|
Reads a status byte of the service request from a service requester (the message-based device). For example, on the IEEE 488.2 interface, the message is read by polling devices; for other types of interfaces, a message is sent in response to a service request to retrieve status information. If the status information is only one byte long, the most significant byte is returned with the zero value. If the service requester does not respond in the actual timeout period, VI_ERROR_TMO is returned. |
|
Reads data from the resource asynchronously. The asynchronous read operation asynchronously transfers data. The data read is returned in the I/O Completion event object. This operation returns before the transfer terminates. An I/O Completion event will be posted when the transfer is actually completed. Note: the termination character must be enabled in the program when reading from a SOCKET device that does not support EOI; otherwise the SOCKET read will timeout The operation returns jobId, which you can use either with Terminate to abort the operation, or with an I/O Completion event to identify which asynchronous read operation completed. |
|
Writes data to device asynchronously. The data is passed in an array of bytes. The write operation asynchronously transfers data. The data to be written is in the buffer represented by buf. This operation normally returns before the transfer terminates. An I/O Completion event will be posted when the transfer is actually completed. The operation returns jobId, which you can use either with Terminate to abort the operation, or with an I/O Completion event to identify which asynchronous write operation completed. |
|
Writes data to device asynchronously. The data argument is a string. The write operation asynchronously transfers data. The data to be written is in the buffer represented by buf. This operation normally returns before the transfer terminates. An I/O Completion event will be posted when the transfer is actually completed. The operation returns jobId, which you can use either with Terminate to abort the operation, or with an I/O Completion event to identify which asynchronous write operation completed. |
|
Requests the session to terminate normal execution of an asynchronous I/O operation. This operation requests a session to terminate normal execution of an operation, as specified by the jobId parameter. The jobId parameter is a unique value generated from each call to an asynchronous operation. If a user passes 0 as the jobId value to Terminate, VISA should abort any calls executing on the session object. Any call that is terminated this way should return E_VISA_ABORT. Due to the nature of multithreaded systems, for example where operations in other threads may complete normally before the operation Terminate has any effect, the specified return value is not guaranteed. |
Properties
A numeric version for this component. |
|
The VISA-defined version information for the specification version to which this component complies. |
|
The name of the hardware interface (GPIB, ASRL, etc.). |
|
The board number of the hardware interface. |
|
The type number of the hardware interface. |
|
The current locking state of the interface. |
|
The option string corresponding to the current state of the resource. |
|
The programmatic ID that can be used by COM to create this object. |
|
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 string used to open/init the resource. |
|
The session type string, such as "INSTR" or "INTFC". |
|
The ID number of the vendor of this software component. |
|
The name of the vendor of this software component. |
|
The I/O timeout in milliseconds for I/O communication on this resource session. |
|
The return value from the last method call on this interface. This property may be useful in Visual Basic, where positive return values, such as warnings and other non-error return values, cannot be retrieved. See the Return Values page for a list of positive return values. |
|
The protocol type for I/O communication with the physical resource. |
|
Enables/disables sending the END signal on the last byte of a write. Most resource types have an out-of-band end signal to deterministically end reading. |
|
The ASCII character used to end reading. Setting this property does not enable/disable the sending of this character; that is done by the TerminationCharacterEnabled property. The default character in most VISA implementations and most instruments is ASCII code 10 (linefeed). |
|
Enables/disables ending reads upon reception of the termination character. Enabling this property does not cause the termination character to be appended to writes. |