RiskWare  On-line Reference Manual

 Release Level 1.9 Release Date 2000 06

 Revision Level 1

# ACTION file format

ACTIONS are used to communicate instructions or guidance to the operator or users of RTXPS;

ACTIONS are compiled in one or more ASCII files, listed in the KBconfig file; they have the following format:

###### emergency_type: toxic_spill
ACTION
get_source
TI Define_the_Source
T Auto
V ready / pending / ignored / failed / done /
P 120
Q \vspace{20pt}
Q Please define the source type of this emergency:
Q Does it involve \newline
Q \hspace{30pt} a \font{bm}fixed installation \font{nm}or \newline
Q \hspace{30pt} a \font{bm}transportation accident \font{nm} ?
FUNCTION
get_descriptor_value(source_type)
IN:
OUT: source_type /
LOG: source_type /
ENDFUNCTION
ENDACTION


Individual ACTION declaration are blocked between the keywords ACTION and ENDACTION.

The ACTION keyword is followed with a record containing the internal name (reference) of the action; please not that this string must not contain any blanks, use undersocre character "_" to separate words where necessary.

TI: This is followed by the display title, introduced by TI; please note that there is a space limit in the ACTION window header that will allow between 20 to 30 characters at most withou interference with the set of control buttons in the ACTION window header.

T:   Auto declares the ACTION as automatic: its corresponding FUNCTION (see below) will be executed automatically; the default requires a manual triggering with the button: DIOT, and acknowledgement of completion with the button: DONE.

V:   introduces the set of legal values or states of an ACTION; Rules can check for these states in their IF clauses, and set ACTIONS to ready to trigger them.

P:   pending timer setting, in seconds; ACTIONS that can, for whatever reason, not be complete immediately (e.g., because of a busy phone line), can be set to pending by the PENDING button ; they will be "backgrounded", and considered again in the forward-chaining rule evaluation loop as soon as the timer is expired.

Q:   Question (hypertext) fields: Please note that the records the Q keyword must not exceed 80 characters. The records contain hypertext, which can include text, imakes (the \picture{file.gif} keyword), values of other Descriptors defined in the Knowledge Base (the \value{DESCRIPTOR(descriptor_name)} contruct), hypertext links (\key{string}{file} and \icon{icon}{file} constructcs.

Text can be formatted with \font{}, \color{}, \hspace{}, \vspace{}, \newline and \bigpara commands.
For a complete description of hypertext syntax, please refer to the
RiskWare Reference Manual Section: HyperText Format.

FUNCTION:   ACTIONs can be used to trigger built-in or external functions; these functions are declared between the FUNCTION and ENDFUNCTION keywords. Depending on the setting of a T Auto record, they may be executed automatically when the ACTION is triggered or require a manual start with the DOIT button, see above.

FUNCTIONS a defined by name, and have in interface definition in terms of:

• IN: list of input parameters (Descriptors)
• OUT: list of output parameters (Descriptors)
• LOG: the subset of parameters that should be placed into the Emergency Parameter Log.

| print page