DSM Template Services Manual

DSM Template Services Manual427187-004
2-1
2 Display-Text Procedures
The SPI_BUFFER_FORMAT procedures are three procedures that together produce
display text. These procedures produce a token-by-token representation of an SPI
buffer.
The EMSTEXT procedure, another major display-text procedure, produces operator
display text for event messages. For details, see the
EMS Manual
. EMSTEXT does not
take a token-by-token approach. It uses a format template to guide display-text
generation.
Standard conversion procedures provide at least one display-text representation (and
usually a large choice of representations) for each token or field. In some cases,
however, special circumstances make a nonstandard conversion procedurea
custom-formatting proceduredesirable.
The SPI_FORMAT_CLOSE_ procedure closes the template file. You can use
SPI_FORMAT_CLOSE_ with procedures that use the template file; that is, with the
SPI_BUFFER_FORMAT procedures or EMSTEXT.
SPI_BUFFER_FORMAT Procedures
The SPI_BUFFER_FORMAT procedures work together to produce display text that
represents the tokens in an SPI buffer. The display text includes a labeled, external
value for each token, which is presented in the order of the tokens occurrence in the
buffer. To represent a buffer, an application calls all three procedures:
Topic Page
SPI_BUFFER_FORMAT Procedures
2-1
Custom-Formatting Procedures 2-19
SPI_FORMAT_CLOSE_ 2-26
Procedure Description Page
SPI_BUFFER_FORMATSTART_ Allocates and initializes the internal storage for
the representation of one SPI message.
2-2
SPI_BUFFER_FORMATNEXT_ Represents an SPI message as display text.
One procedure call is sufficient to complete
the display text if the text buffer is large
enough. Otherwise, one or more follow-up
calls to the procedure completes it.
2-6
SPI_BUFFER_FORMATFINISH_ Releases the internal storage, which is needed
only until the display text for a message is
complete.
2-16