![Teledyne Dock Server User Manual Download Page 197](http://html.mh-extra.com/html/teledyne/dock-server/dock-server_user-manual_1080796197.webp)
Revision 7.10
2/28/2012
3. No procedures or methods. Portions of a script can not be parameterized for
reuse.
4. No ability to “exec” OS shell commands or “call out” to other applications.
Modifying a script from the factoryscripts directory that is close to your desired task is a
good method for learning how to develop your own Dock Server scripts.
The remainder of this section explains script features and draws on the complete script
that follows for examples. Dock Server scripts are written as XML documents; thus,
they must begin with the XML header element whose tag is “?xml”. Embedded XML
comments begin with “<!“ and end with “>”. These embedded comments explain the
purpose of the script and of each state and transition. Please read them for a detailed
explanation of this script’s behavior. The following list enumerates general points that
apply to all scripts and refers to the shown script to exemplify these points.
1. All of a script’s states are nested within the <gliderScript> element.
2. All scripts must have an initial state and a final state. These states are coded
using the <initialState> and <finalState> elements. When a script is run, it
begins with the initial state. When the final state is reached, the script stops.
3. All states must have a name attribute that uniquely identifies the state. For
example the <initialState>’s name is “sendzModem”. These names are used in
transitions to specify the transition’s destination state.
4. Each state but the <finalState> has a <transitions> element that encapsulates
one or more <transition> elements.
5. Every transition has a single condition. There are two types of conditions. The
first type specifies a regular expression that is matched against glider output.
This type has a “matchExpression” attribute set to the regular expression. For
Example, the only <transition> in the <initialState> state has a matchExpression
equal to “Hit ControlR to RESUME”. When “Hit ControlR to RESUME” appears
in the glider output, this condition becomes true. Java’s regular expression
Page 197 of 228