EMS Manual

EMS Procedures
EMS Manual426909-005
15-11
EMSADDTOKENS and EMSADDTOKENMAPS
Procedures
tkn-triplet
is the token code or token map of the token to be added to the buffer followed by
the token value and the length of that value. tkn-triplet has the following
syntax:
token-id , [ data-buf ] , [ data-len ]
token-id
INT(32):value (EMSADDTOKENS)
INT .EXT:ref:* (EMSADDTOKENMAPS)
is the token code or token map of a token to be added to this event message.
data-buf
STRING .EXT:ref:*
if present, is the value of the token to be added to the event message. This
parameter must be present if the token takes a value.
data-len
INT:value
is the length, in bytes, of the value in data-buf. This parameter is ignored
unless token-id is defined as a variable-length token. For other ways to
specify the length of a variable-length token, see Considerations.
Considerations
For each token that you add—each tkn-triplet—use three commas,
regardless of whether you include a token value or token length. You can omit
trailing commas on the last tkn-triplet.
Choose one of these ways to specify the length, in bytes, if data-buf contains a
variable-length value:
Use the data-len parameter to specify the length.
Place the token length in the two bytes that immediately precede the token
value; make the data-buf parameter point to the extra bytes. (Do not count
the extra bytes as part of the length.) When using this method, omit the data-
len parameter.
If the length of the value of a variable-length token is zero, you cannot just omit
both value and length parameters. Use either previously described method to
specify the length (zero) explicitly.
If the subsystem that generates the event message needs to include tokens from
another subsystem (often a lower-level subsystem), the call to EMSADDTOKENS
must include the ssid parameter, which specifies the subsystem ID of the other
subsystem. When you specify the ssid parameter, every token placed in the