nt gp_idle vs. idle

On occasion, we have received complaints about the fact that it takes “gp_test” several seconds to process the “nt gp_idle” command and start the “gp_idle” procedure.

A much quicker alternative is to use the “idle” command. 

If you type the “nt gp_idle” command, you are instructing “gp_test” that it has a new root procedure and the processing of this takes a few seconds.

The “gp_test” program was designed so that an “idle”,  “shutdown” or “emergency” procedure can always be present in memory and can be started very quickly in response to an event.  Most users are aware of the “abort_limit” and “emergency” events that can quickly activate a procedure such as “gp_shutdown” or “gp_emergency”.  These responses are usually defined in a test procedure with the keyword @GLOBAL_EVENTS or in the header file with the @UNIVERSAL_EVENTS keyword.  Likewise, the “gp_idle” procedure can be defined to be started in response to the “idle_mode” event and that event is sent to “gp_test” by issuing the “Idle” command. 

SPECIAL NOTE: The “idle” command actually has one optional argument.  Type “use idle” for help.  The optional argument is the registered name of the particular instance of “gp_test” for which the message is intended and the default name is “test”, which is normally the instance that manages the engine, so just typing “idle” is the same as typing “idle test”.  The “idle” command sends an event named “idle_mode” and that message contains the registered name.  All instances of “gp_test” that are running will receive this message, but only the instance whose name matches will respond to the event.  The @REGISTERED_EVENTS (in procedure files) and @UNIVERSAL_REGISTERED_EVENTS (in the header file) are used to define events that will contain the registered name and the appropriate response.  Most systems have the following in the header file of the “test” instance to make this work properly:

@UNIVERAL_REGISTERED_EVENTS
Idle_mode           /specs/gp/gp_idle

The events specified with @GLOBAL_EVENTS and @UNIVERSAL_EVENTS are events that do not contain any information for the “gp_test” application.  They are just interpreted as a directive to jump to the defined mode or procedure that has already been loaded into memory.  Any instance of gp_test that is configured to handle an “emergency” event will jump to its defined procedure.  So, an instance of “gp_test” which is configured to handle a smoke meter, shouldn’t jump into gp_shutdown or gp_emergency, but might have a special procedure to stop sampling.

See Section 3.3 of the Test Manager User Guide document for a description of the “idle” command and Section 9 of the same document for a deeper discussion of how to use the “GLOBAL” and “UNIVERSAL” event handling definitions.