Please enable JavaScript to view this site.

ESL Documentation

If you want ESL to ignore all stimuli it receives outside of the specified block while the block is being executed, specify the keyword guarded in a block definition; for example:

 

response to Dial

    send "ATDT\r\n" to DJNS

    begin guarded WaitForOK

        response to line "Connect" from DJNS

            leave block

        response to line "ERROR" from DJNS

            action ErrorWait

    end WaitForOK

 

response to SendQuery

    ...

 

response to line from DJNS

    ...

 

response to Stop

    ...

 

When the object Dial is selected, the string "ATDT\r\n" is sent to the application DJNS, and ESL will wait for a response to occur in the WaitForOK block. If SendQuery, Stop, or a line other than "Connect" or "ERROR" occurs, the responses will not be taken until the WaitForOK block has been exited.

 

When a guarded block is being executed, ESL holds keyboard and application input which is not applicable to the responses within the block, making them available when the guarded block exits. Selections will not be taken for objects which do not have responses within that block, no matter what level of nesting they occupy.

 

A guarded block can be left only by the explicit statements leave block, leave loop (if the guarded block is within a loop), exit, change to program (which must be specified within the block), or response to low memory (outside the block).

 

A guarded block cannot contain a response to low memory or a response to termination response definition. Specifying a response to termination in a guarded block does not result in an error message, but will have no effect.