EMS Manual

EMS Procedures
EMS Manual426909-005
15-2
Which Procedures to Use
Which Procedures to Use
Because of the way TAL handles procedure parameters, it is inconvenient to use one
procedure to handle all types of tokens. To understand this issue, you must know about
passing tokens as parameters to EMS and SPI procedures.
Passing Token Parameters by Value or by Reference
Some tokens are identified by token codes and other tokens by token maps. The way
your TAL applications pass tokens as parameters to the EMS or SPI procedures
depends on the way the token is identified and, to a certain extent, on personal
preference. To help decide whether to pass tokens by reference or by value, consider
the following:
Always pass a token map, which represents an extensible structured token, by
reference (by address).
It is usually more efficient to pass a token code by value.
To pass a token code by reference, you must first store the code in a temporary
variable if it is not already stored that way.
Procedure Summary Tables
Table 15-1 through Table 15-3 summarize procedures that help you process event
messages.
EMS procedures begin with the letters EMS and are described in Procedure
Descriptions on page 15-8. SPI procedures begin with the letters SS and are described
in the SPI Programming Manual. Other procedures are Guardian system procedures
and are described in the Guardian Procedure Calls Reference Manual.
Table 15-1. EMS Procedures for Retrieving Event Information
Name Token-Parameter Type Description
EMSGET
EMSGETTKN
Reference
Value
Gets tokens and their values or related
information from an event message
EMSTEXT (Does not apply) Produces displayable text derived from an
event message