Interface IEventManager
Description
The interface for event management exported by all resource types that support events. Clients can enable, disable, and receive events from this interface and can register event handler interfaces for receiving events via asynchronous callbacks.
IEventManager derives from IVisaSession.
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. |
|
Enables notification of an event identified by the eventType parameter for mechanisms specified in the mechanism parameter. The specified session can be enabled to queue events by specifying EVENT_QUEUE. Applications can enable the session to invoke a callback function to execute the handler by specifying EVENT_HNDLR. The applications are required to install at least one handler to be enabled for this mode. Specifying EVENT_SUSPEND_HNDLR enables the session to receive callbacks, but the invocation of the handler is deferred to a later time. Successive calls to this function replace the old callback mechanism with the new callback mechanism. Specifying ALL_ENABLED_EVENTS for the eventType parameter refers to all events which have previously been enabled on this session, making it easier to switch between the two callback mechanisms for multiple events. Any combination of VISA-defined values for different parameters of this function is also supported (except for EVENT_HNDLR and EVENT_SUSPEND_HNDLR, which apply to different modes of the same mechanism). |
|
Disables servicing of an event identified by the eventType parameter for the mechanisms specified in the mechanism parameter. Specifying ALL_ENABLED_EVENTS for the eventType parameter allows a session to stop receiving all events. The session can stop receiving queued events by specifying EVENT_QUEUE. Applications can stop receiving callback events by specifying either EVENT_HNDLR or EVENT_SUSPEND_HNDLR. Specifying EVENT_ALL_MECH disables both the queuing and callback mechanisms. |
|
Discards all pending occurrences of the specified event types for the mechanisms specified in a given session. The information about all the event occurrences that have not yet been handled is discarded. This function is useful to remove event occurrences that an application no longer needs. |
|
Waits for an occurrence of the specified event for a given session. In particular, this function suspends execution of an application thread and waits for an event inEventType for at least the time period specified by timeout. The resource will continue to service the Windows Message Loop, allowing single-threaded clients to continue to be responsive. See the individual event descriptions for context definitions. If the specified inEventType is ALL_ENABLED_EVENTS, the function waits for any event that is enabled for the given session. If the specified timeout value is TMO_INFINITE, the function is suspended indefinitely. |
|
Allows applications to install handlers on sessions for event callbacks. The handler specified in the handler parameter is installed along with previously installed handlers for the specified event. Applications can specify a value in the userHandle parameter that is passed to the handler on its invocation. VISA identifies handlers uniquely using the handler reference and this value. |
|
Allows applications to uninstall handlers for events on sessions. Applications should also specify the value in the userHandle parameter that was passed to InstallHandler while installing the handler. VISA identifies handlers uniquely using the handler reference and this value. All the handlers for which the handler reference and the value matches are uninstalled. |
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 maximum size of the event queue. The Queue will be at least as large as the MaximumQueueLength property after modifying this value. |