HELP
An object that captures events generated by
HP-IB or VXI devices.  This feature is
available in HP VEE-Test Only.

USE
The Device Event object can be configured to
detect various device events.  Depending upon
configuration, the object may wait for the
event, giving up execution to other parallel
threads, or it may simply return a boolean (0
or 1) or other indicator of the state of the
device.

If the Device Event object has been
configured to wait for the event, then upon
the event the object will execute.  Any
thread hosted by this object will have
priority over any other parallel threads, and
will execute to completion.  If the Device
Event object has been configured to simply
return an indicator of device state, the
thread containing it will have normal
priority, and will execute in parallel with
any other threads.

LOCATION
I/0 ==> Advanced I/O ==> Device Event

OPEN VIEW PARAMETERS

* Device - The currently selected device is
displayed in the Device field.  Click on this
field to display a list of the currently
configured HP-IB and VXI devices.

* Event - Allows selection of specific
events.  Click on this field to display the
choices:

* Spoll - Returns the status byte of HP-IB
devices and message-based VXI devices.  If an
HP-IB device has been selected, the only
possible selection is Spoll.  The returned
status byte is used with the Mask value.

* SRQ - For VXI, an SRQ is generated from a
message-based device when the device sends
either a VME interrupt or a signal register
write that is a request-true event.  When
this asynchronous event occurs, the device's
status byte is returned, thus causing the
device to generate a request-false event.
The returned status byte is used with the
Mask value.

* Signal Interrupt - This asynchronous event
is generated from either message-based or
register-based VXI devices.  The event occurs
when the device sends either a VME interrupt
or a signal register write that is a
device-defined event or an undefined event.
The returned 32-bit value is the value placed
in the signal write register, or the value
placed on the VXI Bus when the device does an
interrupt acknowledge (IACK).  This value is
used with the Mask value.

* Mask - You can enter a value to be used as
a bit mask (default = 0).  The Mask value is
used in a logical AND operation with the
value returned by the device when the
specified event occurs.

* Action - Determines the execution behavior
of the Device Event object upon detection of
the specified event, in conjunction with the
specified bit mask.

* No Wait - Execute immediately, outputting
the current state of the configured event, as
specified by a 32-bit integer, to the status
pin.  This value is either the boolean value
FALSE (0) or a device-dependent bit pattern.
If the event choice is Spoll, the low byte of
the returned integer is the status byte of
the device.  For the two asynchronous VXI
events, a FALSE (0) is returned if the event
has not occurred.  If the event has occurred,
the device-dependent bit pattern is returned.

* Any Set - Wait for the event to occur and
use the returned value in a logical AND
operation with the Mask value.  If any bit is
set in the resulting bit pattern, then
execute by placing the original, unmasked
value on the status output pin.

* All Clear - Wait for the event to occur and
use the returned value in a logical AND
operation with the Mask value.  If no bit is
set, then execute by placing the original,
unmasked value on the status output pin.

NOTES
The execution behavior of the Device Event
object can either be asynchronous or
synchronous as determined by the choice of
the Action parameter.  No Wait specifies a
synchronous, polling behavior.  The object
executes immediately and any attached thread
will have the same priority as all other
threads currently executing.  Choosing Any
Set or All Clear causes the Device Event
object to wait until both the event has
occurred, and the logical AND of the Mask
value and the value returned by the device
satisfies the "any bit set" or "no bit set"
criteria.  When both of these conditions have
been satisfied, the object executes.  Any
thread attached will have a higher priority,
and will execute to completion, blocking all
other concurrently executing threads.

Strictly speaking, the Spoll event is not
a true asynchronous event as are the VXI SRQ
and Signal Interrupt.  By using a Mask value
and the appropriate action, Any Set or All
Clear, the status byte can be evaluated
continuously with the Mask value until the
correct bits are modified by the device.  The
object will wait until this occurs, allowing
concurrent threads to continue execution.
For the Spoll event, choosing the No Wait
Action is identical to specifying the All
Clear Action with a mask value of zero -- the
Device Event object executes immediately.

For the true asynchronous events SRQ and
Signal Interrupt, the device waits until the
event occurs, allowing concurrent threads to
continue executing.  Once the interrupt
occurs, the resulting status byte, signal
write register contents, or IACK value will
be logically ANDed with the mask value.  The
object executes only if the resulting bit
pattern satisfies the Any Set or All Clear
criteria.  If the All Clear action is
specified with a mask value of zero, the
Device Event object will execute when the
interrupt occurs.

SEE ALSO
Interface Event, Interface Operations.
