{"id":1664,"date":"2018-09-19T14:20:00","date_gmt":"2018-09-19T14:20:00","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/?p=1664"},"modified":"2022-04-06T13:27:14","modified_gmt":"2022-04-06T18:27:14","slug":"nt-gp_idle-vs-idle","status":"publish","type":"post","link":"https:\/\/cyflex.com\/index.php\/nt-gp_idle-vs-idle\/","title":{"rendered":"nt gp_idle   vs.   idle"},"content":{"rendered":"<p><span style=\"font-family: Calibri;\"><span style=\"color: #000000;\">On occasion, we have received complaints about the fact that it takes \u201cgp_test\u201d several seconds to process the \u201cnt gp_idle\u201d<\/span><span style=\"color: #000000;\"> command and start the \u201cgp_idle\u201d procedure.<\/span><\/span><\/p>\n<p><span style=\"font-family: Calibri;\"><span style=\"color: #000000;\">A much quicker alternative is to use the \u201cidle\u201d<\/span><span style=\"color: #000000;\"> command.\u00a0 <\/span><\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">If you type the \u201cnt gp_idle\u201d command, you are instructing \u201cgp_test\u201d that it has a new root procedure and the processing of this takes a few seconds.<\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">The \u201cgp_test\u201d program was designed so that an \u201cidle\u201d, \u00a0\u201cshutdown\u201d or \u201cemergency\u201d procedure can always be present in memory and can be started very quickly in response to an event.\u00a0 Most users are aware of the \u201cabort_limit\u201d and \u201cemergency\u201d events that can quickly activate a procedure such as \u201cgp_shutdown\u201d or \u201cgp_emergency\u201d.\u00a0 These responses are usually defined in a test procedure with the keyword @GLOBAL_EVENTS or in the header file with the @UNIVERSAL_EVENTS keyword.\u00a0 Likewise, the \u201cgp_idle\u201d procedure can be defined to be started in response to the \u201cidle_mode\u201d event and that event is sent to \u201cgp_test\u201d by issuing the \u201cIdle\u201d command.\u00a0 <\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">SPECIAL NOTE: The \u201cidle\u201d command actually has one optional argument.\u00a0 Type \u201cuse idle\u201d for help.\u00a0 The optional argument is the registered name of the particular instance of \u201cgp_test\u201d for which the message is intended and the default name is \u201ctest\u201d, which is normally the instance that manages the engine, so just typing \u201cidle\u201d is the same as typing \u201cidle test\u201d.\u00a0 The \u201cidle\u201d command sends an event named \u201cidle_mode\u201d and that message contains the registered name.\u00a0 All instances of \u201cgp_test\u201d that are running will receive this message, but only the instance whose name matches will respond to the event.\u00a0 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.\u00a0 Most systems have the following in the header file of the \u201ctest\u201d instance to make this work properly:<\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">@UNIVERAL_REGISTERED_EVENTS<\/span><span style=\"color: #000000; font-family: Calibri;\"><br \/>\n<\/span><span style=\"color: #000000; font-family: Calibri;\">Idle_mode\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/specs\/gp\/gp_idle<\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">The events specified with @GLOBAL_EVENTS and @UNIVERSAL_EVENTS are events that do not contain any information for the \u201cgp_test\u201d application.\u00a0 They are just interpreted as a directive to jump to the defined mode or procedure that has already been loaded into memory.\u00a0 Any instance of gp_test that is configured to handle an \u201cemergency\u201d event will jump to its defined procedure.\u00a0 So, an instance of \u201cgp_test\u201d which is configured to handle a smoke meter, shouldn\u2019t jump into gp_shutdown or gp_emergency, but might have a special procedure to stop sampling.<\/span><\/p>\n<p><span style=\"color: #000000; font-family: Calibri;\">See Section 3.3 of the <a href=\"https:\/\/cyflexdoc.wpengine.com\/wp-content\/uploads\/Test-Manager-Program.pdf\">Test Manager User Guid<\/a>e\u00a0document for a description of the \u201cidle\u201d command and Section 9 of the same document for a deeper discussion of how to use the \u201cGLOBAL\u201d and \u201cUNIVERSAL\u201d event handling definitions.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On occasion, we have received complaints about the fact that it takes \u201cgp_test\u201d several seconds to process the \u201cnt gp_idle\u201d command and start the \u201cgp_idle\u201d procedure. A much quicker alternative is to use the \u201cidle\u201d command.\u00a0 If you type the \u201cnt gp_idle\u201d command, you are instructing \u201cgp_test\u201d that it has a new root procedure and [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1664","post","type-post","status-publish","format-standard","hentry","category-did-you-know"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/posts\/1664","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=1664"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/posts\/1664\/revisions"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=1664"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/categories?post=1664"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/tags?post=1664"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}