System and method for handling events in an instrumentation system
First Claim
1. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, the method comprising the computer-implemented steps of:
- one of said one or more instruments generating an event in the system;
a resource trapping the event;
the resource determining which sessions have been enabled with callback mechanisms for said event after said step of trapping;
the resource invoking handlers in a handler list of each session determined to be enabled with a callback mechanism for said event after said step of determining which sessions have been enabled with callback mechanisms;
the resource determining if any current sessions are waiting on said event;
the resource unblocking wait of said sessions determined to be waiting on said event;
the resource determining if any sessions are enabled for queueing if current sessions are not waiting on events;
the resource placing an event in a session queue if any sessions are enabled for queueing and current sessions are not waiting on events;
the resource determining if any sessions have enabled handlers suspended; and
the resource queuing the event occurrence for sessions determined to have enabled handlers suspended.
1 Assignment
0 Petitions
Accused Products
Abstract
A system and method for improved handling of events in an instrumentation system which provides numerous features and advantages over prior art methods. The present invention provides simplified application development and improved performance for instrumentation systems. The instrumentation system of the present invention provides event queueing, event handling, and suspend handling features, thus providing the user or developer with greater freedom in designing his test and measurement or process control application. The present invention includes a single operation referred to as viEnableEvent which is used for enabling events of all event types, and a single operation for installing handlers for all event types, referred to as viInstallHandlr. The operation viEnableEvent includes one or more parameters which can be specified as a filter to qualify the types of events desired to be received at the time of the event occurrence. This provides the user with greater control over which events are specified to be received. The present invention further includes an auto-acknowledge capability which enables a resource to automatically provide an acknowledge to an instrument generating an interrupt. An auto-enable feature is included for resources within the system which provides that if there are multiple sessions, the first session for which events are enabled enables the respective event receiving hardware, and the hardware remains enabled until the last session has been disabled. The present invention further provides several different mechanisms for generating interrupts within the system. For example, a user application can cause a resource to signal a session that an event has occurred, thus enabling the user application to create events within the system. Alternatively, an event can be generated internally to a resource and constructed within a resource. Further, an asynchronous notification method is provided whereby an event could be generated by a first resource and trapped by a second resource.
-
Citations
58 Claims
-
1. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, the method comprising the computer-implemented steps of:
-
one of said one or more instruments generating an event in the system; a resource trapping the event; the resource determining which sessions have been enabled with callback mechanisms for said event after said step of trapping; the resource invoking handlers in a handler list of each session determined to be enabled with a callback mechanism for said event after said step of determining which sessions have been enabled with callback mechanisms; the resource determining if any current sessions are waiting on said event; the resource unblocking wait of said sessions determined to be waiting on said event; the resource determining if any sessions are enabled for queueing if current sessions are not waiting on events; the resource placing an event in a session queue if any sessions are enabled for queueing and current sessions are not waiting on events; the resource determining if any sessions have enabled handlers suspended; and the resource queuing the event occurrence for sessions determined to have enabled handlers suspended. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, wherein a single operation is used to enable events of all event types, the method comprising the computer implemented steps of:
-
opening a first session to a resource; invoking a first operation to enable said first session to receive events of a first type from said resource using a queuing mechanism; invoking said first operation to enable said first session to receive events of a second type from said resource using a queueing mechanism; one of said one or more instruments causing an event of said first type to occur in the system; the resource trapping said event of said first type; the resource placing said event of said first type in a queue of said first session, wherein said first session can access said event in said session queue using a second operation; one of said one or more instruments causing an event of said second type to occur in the system; the resource trapping said event of said second type; and the resource placing said event of said second type in a queue of said first session, wherein said first session can access said event in said session queue using said second operation. - View Dependent Claims (7, 8, 9, 10, 11)
-
-
12. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, wherein a single operation is used to install handlers for events of all event types, the method comprising the computer implemented steps of:
-
opening a first session to a resource; invoking a first operation to install one or more first handlers which perform functions when an event of a first type occurs; invoking said first operation to install said one or more second handlers which perform functions when an event of a second type occurs; enabling said first session to receive events of said first type using a callback mechanism; enabling said first session to receive events of said second type using a callback mechanism; one of said one or more instruments generating an event of said first type in the system; the resource trapping said event of said first type; the resource invoking said one or more first handlers for said first session in response to said event occurrence of said first type; one of said one or more instruments generating an event of said second type in the system; the resource trapping said event of said second type; the resource invoking said one or more second handlers for said first session in response to said event occurrence of said second type. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19)
-
-
20. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, the method comprising the computer implemented steps of:
-
opening a first session to a resource; enabling said first session to receive events of a first type from said resource using a queuing mechanism, wherein said step of enabling is qualified by one or more filter parameters, wherein a first filter function is applied to events using said one or more filter parameters when events are received and said first filter only allows a subset of received events to be received by said first session; one of said one or more instruments generating an event of said first type in the system; the resource trapping said event of said first type; the resource invoking said first filter function; said first filter function comparing said event of said first type with said filter parameters; said first filter function determining if said event of said first type should be received by said first session based on said step of comparing; and the resource placing said event of said first type in a queue of said first session if said comparison indicates that said session should receive said event, wherein said first session can access said event in said session queue, wherein said event is not placed in said queue if said comparison indicates that said session should not receive said event. - View Dependent Claims (21, 22, 23, 24, 25, 26)
-
-
27. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, the method comprising:
-
opening a first session to a resource; installing one or more handlers which perform functions when an event of a first type occurs; enabling said first session to receive events of said first type using a callback mechanism wherein said step of enabling is qualified by one or more filter parameters, wherein a first filter function is applied to events using said one or more filter parameters when events are received and said first filter only allows a subset of received events to be received by said first session; one of said one or more instruments generating an event of said first type in the system; the resource trapping said event of said first type; the resource invoking said first filter function; said first filter function comparing said event of said first type with said filter parameters; said first filter function determining if said event of said first type should be received by said first session based on said step of comparing; and the resource invoking said one or more handlers for said first session in response to said event occurrence of said first type if said comparison indicates that said session should receive said event, wherein said one or more handlers are not invoked if said comparison indicates that said session should not receive said event. - View Dependent Claims (28, 29, 30, 31, 32, 33)
-
-
34. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, one or more resources comprised in the computer system for controlling functions of said one or more instruments, and an application executing in the computer system which controls one or more of said one or more resources to perform desired instrumentation functions, the method comprising the computer implemented steps of:
-
the application opening a first session to a resource; the application enabling said first session to receive events of a first type from said resource using a queuing mechanism, wherein said step of enabling includes configuring said resource with an auto-acknowledge mechanism to direct said resource to automatically acknowledge events of said first type; one of said one or more instruments causing an event of said first type to occur in the system; the resource trapping said event of said first type; the resource placing said event of said first type in a queue of said first session, wherein said first session can access said event in said session queue; the application accessing said event of said first type from said session queue; the application discarding said event of said first type after said step of accessing; the resource determining if said auto-acknowledge mechanism is enabled and if the application has not already acknowledged said event of said first type, wherein said step of determining is performed in response to said step of discarding; and the resource automatically providing an acknowledge to said instrument if said auto-acknowledge mechanism is enabled and the application has not already acknowledged said event of said first type. - View Dependent Claims (35, 36, 37, 38)
-
-
39. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, and an application executing in the computer system which controls one or more of said one or more resources to perform desired instrumentation functions, the method comprising the computer implemented steps of:
-
the application opening a first session to a resource; the application installing one or more handlers which perform functions when an event of a first type occurs; the application enabling said first session to receive events of said first type using a callback mechanism, wherein said step of enabling comprises configuring said resource with an auto-acknowledge mechanism to direct said resource to automatically acknowledge events of said first type; one of said one or more instruments generating an event of said first type in the system; the resource trapping said event of said first type; the resource invoking said one or more handlers for said first session in response to said event occurrence of said first type; executing said one or more handlers; the resource determining if said auto-acknowledge mechanism is enabled and if the application has not already acknowledged said event of said first type, wherein said step of determining is performed after said step of executing said one or more handlers; the resource automatically providing an acknowledge to said instrument if said auto-acknowledge mechanism is enabled and the application has not already acknowledged said event of said first type. - View Dependent Claims (40, 41, 42, 43)
-
-
44. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, wherein the computer system includes hardware for monitoring signal conditions and reporting interrupts, the method comprising the computer implemented steps of:
-
opening a first session to a resource; opening a second session to said resource; enabling said first session to receive events of a first type from said resource using a queuing mechanism, wherein said step of enabling enables first hardware in the instrumentation system to report events, wherein said first hardware is associated with the event type of said first session; enabling said second session to receive events of a first type from said resource using a queuing mechanism, wherein said first hardware is already enabled to report events; an event of said first type occurring in the system; the resource trapping said event of said first type; the resource placing said event of said first type in a queue of said first session, wherein said first session can access said event in said session queue; the application disabling events of said first type in said first session, wherein said first hardware is not disabled; the application disabling events of said first type in said second session; and the resource disabling the first hardware associated with the event type of said session in response to application second session disabling events of said first type in said second session. - View Dependent Claims (45, 46, 47, 48)
-
-
49. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, wherein the computer system includes hardware for monitoring signal conditions and reporting interrupts, wherein an application executing in the computer system which controls one or more of said one or more resources to perform desired instrumentation functions, wherein the application can disable hardware associated with an event type of a session, the computer implemented steps of:
-
the application opening a first session to a resource; the application opening a second session to said resource; the application enabling said first session to receive events of a first type from said resource using a queuing mechanism, wherein said step of enabling enables first hardware in the instrumentation system associated with the event type of said first session to report events; the application disabling said first hardware associated with the event type of said first session; the application enabling said second session to receive events of a first type from said resource using a queuing mechanism after said step of the application disabling said first hardware, wherein said first hardware remains disabled; an event of said first type occurring in the system; the resource not trapping said event due to said first hardware being disabled. - View Dependent Claims (50, 51, 52, 53)
-
-
54. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, one or more resources comprised in the computer system for controlling functions of said one or more instruments, and an application executing in the computer system which controls one or more of said one or more resources to perform desired instrumentation functions, the method comprising:
-
the application opening a first session to a resource, wherein said resource includes a queue of size N for receiving events of a first type; the application enabling said first session to receive events of said first type from said resource using a queuing mechanism; a plurality N of events of said first type occurring in the system; the resource placing said N events of said first type in said queue of said first session, wherein said queue becomes full in response to said step of placing, wherein said first session can access said events in said session queue; the resource disabling said queue of size N in response to said queue becoming full; the application accessing an event in said queue, wherein said queue is no longer full; the resource re-enabling said queue to receive additional events in response to said application accessing said event in said queue and said queue no longer being full. - View Dependent Claims (55, 56, 57)
-
-
58. A method for handling events in an instrumentation system comprising a computer system, one or more instruments coupled to the computer system, and one or more resources comprised in the computer system for controlling functions of said one or more instruments, and an application executing in the computer system which controls one or more of said one or more resources to perform desired instrumentation functions, the method comprising the computer implemented steps of:
-
an application establishing a first session to a resource; said application installing one or more handlers which perform functions when an event of a first type occurs; said application enabling said first session to receive events of said first type using a callback mechanism; said application causing said resource to signal its session that an event has occurred; and the resource invoking said one or more handlers for said first session in response to said event occurrence of said first type.
-
Specification