Advanced
Programming in Expect:
A Bulletproof Interface
Controlling The Behavior
Of The Interface:
The sendGlobals array
contains all of the parameters used by the interface, and is initialized
with send_expect_init.
It may be modified at runtime to control how the interface works.
This section will cover the meanings of these parameters and how they may
be modified.
The failure limit elements
(Mode1FailMax, Mode2FailMax, and Mode3FailMax) determine how many
failures are permitted for modes 1, 2 and 3 (respectively). A value
of zero disables this limitation, and any positive integer sets the maximum
number of failures for that mode before it is no longer used by the interface.
There is no failure limit for the last mode.
The element useMode allows
the system to determine which transmission mode should be used first, so
that the less reliable modes (the first and second) can be bypassed.
Allowable values for this parameter are 1, 2, 3, or 4. Invalid values
will be replaced by the default mode (1).
If transmission errors are
not considered fatal, the sendErrorSeverity element may be specified
to a more tolerant value. Note that this parameter is not used internally,
so if the automated system does not access this value, it won't affect
the interface.
The kill element defines
the command line kill character, which is defaulted to the Gnu-standard
control-U.
The diagFile parameter
names the temporary internal diagnostics file (generated from exp_internal).
The logDiags allows
disabling of all diagnostics output for faster execution, but be forewarned
that disabling this feature well make debugging much more difficult.
The interval and delay
elements represent the two items in the send_slow
list, which is used by the second and third modes.
For experimentation purposes,
it is recommended that these parameters be modified by the automated system
at runtime, rather than directly editing the defaults in the initialization
procedure. Once valid settings are found the defaults may be changed
to reflect them.
Prev
Next
Introduction
Setting
Up The Interface
Using
The send_expect Procedure
How
It Works
Moving
Window Snapshot Diagnostics
Controlling
The Behavior Of The Interface
Failures
|