US5974541AExpiredUtility

GPIB system and method which provides asynchronous event notification

60
Assignee: NAT INSTR CORPPriority: Jul 22, 1997Filed: Jul 22, 1997Granted: Oct 26, 1999
Est. expiryJul 22, 2017(expired)· nominal 20-yr term from priority
G06F 13/4226
60
PatentIndex Score
45
Cited by
5
References
20
Claims

Abstract

A GPIB system which includes asynchronous event notification. The GPIB application first provides a notify request to GPIB driver level software, preferably an ibnotify call or a GPIB Notify OLE control. The notify request includes a unit descriptor which uniquely identifies the GPIB device, event information regarding a plurality of GPIB events to monitor, a reference to a callback function in the GPIB application, and user defined reference data for the callback function. In response to the notify request, the GPIB driver level software begins monitoring events specified by the event information. When an event occurs which is being monitored, the GPIB driver level software recognizes the event and invokes the callback function. The invocation of the callback function is performed asynchronously to the GPIB application. The callback function may include one or more calls to one or more functions in the GPIB driver software. The callback function also uses the user defined reference data to aid in handling the event.

Claims

exact text as granted — not AI-modified
We claim: 
     
       1. A method of asynchronously notifying a GPIB application when one or more GPIB events occur in a GPIB system, wherein the system comprises the GPIB application which interfaces through GPIB driver software to a GPIB device, wherein the GPIB application and the GPIB driver software execute on a computer system, the method comprising: receiving an asynchronous notify request from the GPIB application, wherein the asynchronous notify request includes a unit descriptor, event information regarding a plurality of GPIB events to monitor, and a reference to a callback function in the GPIB application, wherein the unit descriptor uniquely identifies the GPIB device; and   monitoring events specified by said event information, wherein said monitoring is performed in response to said receiving said asynchronous notify request, wherein said events comprise state changes of the GPIB device identified by the unit descriptor;   determining that an event specified by said event information has occurred;   invoking said callback function in response to said determining that said event has occurred, wherein said invocation is performed asynchronously to the GPIB application.   
     
     
       2. The method of claim 1, wherein said callback function includes one or more calls to one or more functions in the GPIB driver software, the method further comprising: executing said callback function to handle the event, wherein said callback function invokes said one or more functions in the GPIB driver software.   
     
     
       3. The method of claim 2, wherein the asynchronous notify request further includes user defined reference data for said callback function; wherein said executing said callback function to handle the event includes using said user defined reference data.   
     
     
       4. The method of claim 1, further comprising: configuring the GPIB driver software to use interrupts prior to receiving the asynchronous notify request from the GPIB application;   said event occurring;   generating an interrupt in response to said event occurring wherein said determining that an event specified by said event information has occurred includes: receiving the interrupt indicating that said event has occurred; and   asynchronously notifying the GPIB application of said event.     
     
     
       5. The method of claim 1, wherein said event information comprises a bit mask, wherein said bit mask specifies said plurality of GPIB events to monitor, wherein said bit mask includes a plurality of bits, wherein each of said plurality of bits represents one of said GPIB events to monitor; wherein said monitoring comprises monitoring events identified by said bits in said bit mask.   
     
     
       6. The method of claim 5, the method further comprising: executing said callback function to handle the event, wherein said callback function returns a mask value; and   rearming said event information with said mask value returned by said callback function;   wherein said monitoring events, determining that an event specified by said event information has occurred, and invoking said callback are repeated using said mask value returned by said callback function.   
     
     
       7. The method of claim 5, wherein said plurality of GPIB events to monitor include a timeout event; wherein said bit mask includes a timeout bit, wherein said timeout bit is set to indicate monitoring of said timeout event;   when said timeout event occurs when a timeout period has elapsed.   
     
     
       8. The method of claim 1, wherein the GPIB device is a GPIB interface board comprised in the computer system, wherein the events comprise: TIMO, END, SRQI, CMPL, LOK, REM, CIC, ATN, TACS, LACS, DTAS, and DCAS. 
     
     
       9. The method of claim 1, wherein the GPIB device is a GPIB instrument coupled to the computer system, wherein the events comprise: TIMO, END, RQS, and CMPL. 
     
     
       10. The method of claim 1, wherein said monitoring events, determining that an event specified by said event information has occurred, and invoking said callback function are performed by the GPIB driver software. 
     
     
       11. The method of claim 10, wherein the GPIB application does not check the status of the GPIB device the GPIB driver software monitoring events. 
     
     
       12. The method of claim 1, further comprising: beginning an asynchronous I/O operation;   receiving a notify request from the GPIB application after beginning the asynchronous I/O operation; and   resynchronizing the GPIB driver level software in response to receiving the notify request.   
     
     
       13. The method of claim 1, wherein said notify request comprises an OLE control. 
     
     
       14. A GPIB system which asynchronously notifies a GPIB application when one or more GPIB events occur in the GPIB system, the GPIB system comprising: a computer system comprising a CPU and memory, wherein the memory stores the GPIB application and GPIB driver software, wherein the GPIB application and the GPIB driver software execute on the computer system; and   a GPIB device coupled to the computer system,   wherein the GPIB application interfaces through the GPIB driver software to the GPIB device;   wherein the GPIB application executing on the computer system is operable to provide an asynchronous notify request to the GPIB driver software, wherein the asynchronous notify request includes a unit descriptor, event information regarding a plurality of GPIB events to monitor, and a reference to a callback function in the GPIB application, wherein the unit descriptor uniquely identifies the GPIB device;   wherein the GPIB driver software executing on the computer system is operable to monitor events specified by said event information in response to the asynchronous notify request, wherein said events comprise state changes of the GPIB device identified by the unit descriptor;   wherein the GPIB driver software executing on the computer system is operable to determine that an event specified by said event information has occurred and is operable to invoke said callback function in response to determining that said event has occurred, wherein said invocation is performed asynchronously to the GPIB application.   
     
     
       15. The GPIB system of claim 14, wherein said callback function includes one or more calls to one or more functions in the GPIB driver software; wherein said callback function invokes said one or more functions in the GPIB driver software.   
     
     
       16. The GPIB system of claim 15, wherein the asynchronous notify request further includes user defined reference data for said callback function; wherein said callback function uses said user defined reference data during execution.   
     
     
       17. The GPIB system of claim 14, wherein said event information comprises a bit mask, wherein said bit mask specifies said plurality of GPIB events to monitor, wherein said bit mask includes a plurality of bits, wherein each of said plurality of bits represents one of said GPIB events to monitor. 
     
     
       18. The GPIB system of claim 14, wherein the GPIB device is a GPIB interface board comprised in the computer system, wherein the events comprise: TIMO, END, SRQI, CMPL, LOK, REM, CIC, ATN, TACS, LACS, DTAS, and DCAS. 
     
     
       19. The GPIB system of claim 14, wherein the GPIB device is a GPIB instrument coupled to the computer system, wherein the events comprise: TIMO, END, RQS, and CMPL. 
     
     
       20. A memory media which stores program instructions for asynchronously notifying a GPIB application when one or more GPIB events occur in a GPIB system, wherein the system comprises the GPIB application which interfaces through GPIB driver software to a GPIB device, wherein the GPIB application and the GPIB driver software execute on a computer system, wherein the program instructions are executable to implement the steps of: receiving an asynchronous notify request from the GPIB application, wherein the asynchronous notify request includes a unit descriptor, event information regarding a plurality of GPIB events to monitor, and a reference to a callback function in the GPIB application, wherein the unit descriptor uniquely identifies the GPIB device;   monitoring events specified by said event information, wherein said monitoring is performed in response to said receiving said asynchronous notify request, wherein said events comprise state changes of the GPIB device identified by the unit descriptor;   determining that an event specified by said event information has occurred; and   invoking said callback function in response to said determining that said event has occurred, wherein said invocation is performed asynchronously to the GPIB application.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.