OSI/FTAM Programming Guide

NonStop FTAM Programming
HP NonStop OSI/FTAM Programming Guide528612-001
3-15
Data-Value Parameter
Limits on Data-Value Sizes
The calculation of the maximum size of the data-value parameter is based on the
number and length of character strings in the encoded data and the associated data
header information. Because the data-value parameter contains more overhead of
data header information than the encoded data, it can be larger than the maximum size
of the encoded data, which is 16 KB.
In calculations of the data-value and encoded-data sizes, a single character string
always equates with a single data element in the data-value parameter. For
example, when receiving encoded data from the remote responder, the initiator
decodes the data by placing each character string in a separate data element—each
with its own element header—which the initiator uses to build the data-value
parameter returned to the application by the FTM_DATA_IND_ call. Conversely, when
the application sends data to the initiator via the data-value parameter of the
FTM_DATA_REQ_ call, the initiator encodes the data by forming each data element
into a character string and adding a data tag to each string.
The maximum size of the data-value parameter depends on whether the application
is receiving or sending data. When the application receives data, the data-value
parameter can be no more than 25 KB; when it sends data, the data-value
parameter can be no more than 24 KB. The paragraphs below explain how to calculate
the size of the data-value parameter.
Receiving Data From a Remote Responder. When you pass data from the initiator to
the application, the following formulas for calculating data-value size apply. These
formulas are based on the encoded data received in FTM_DATA_IND_ calls and the
data-value structure; for an explanation of the data-value structure for each
FTAM document type, refer to the subsections on the individual document types that
follow.
The data-value limit is just under 25 KB, excluding the internal initiator header.
Two formulas are used: one for calculating the data-value limit on transfers of
FTAM-1, FTAM-2 files with UA access context, and FTAM-3 files, and one for
calculating the limit on transfers of FTAM-2 files with an FA access context: