OSI/AS Programming Manual
Basic Concatenation
APS Procedures Programming Concepts
056783 Tandem Computers Incorporated 2–49
Avoiding Concatenation of Incoming User Data
If your buffer is too small to contain all of the user data from an incoming primitive,
you must call APS_DATA_GETPARAM_ several times, as shown above. Your
application program must then concatenate the data to make it usable. Wherever
possible, you can avoid concatenating the data by reading all of the data into the
buffer at once, as follows:
In the first call to APS_DATA_GETPARAM_ , set
data-buffer-size
to zero.
No data is returned to your application from this call. The value returned by
more-data
indicates the buffer size needed to hold all the data.
In the second call to APS_DATA_GETPARAM_ , set
data-buffer-size
to the
value returned by
more-data
in the first call. (Ensure that your declared buffer is
large enough to receive the data.)
Basic Concatenation The basic concatenation feature of the session protocol allows your application to give
or ask for (please) tokens while sending another primitive. You use this feature to give
tokens by specifying
give-tokens
in a call to one of the following procedures:
APS_ACTIVITY_ENDREQ_
APS_ACTIVITY_RESUMEREQ_
APS_ACTIVITY_STARTREQ_
APS_DATA_REQ_
APS_SYNC_MAJORREQ_
APS_SYNC_MINORREQ_
Likewise, you use basic concatenation to ask for tokens by specifying
please-tokens
in one of the following procedures:
APS_ACTIVITY_DISCARDRSP_
APS_ACTIVITY_ENDRSP_
APS_ACTIVITY_INTERRUPTRSP_
APS_CAPDATA_RSP_
APS_EXCEPTIONREQ_
APS_RESYNCRSP_
APS_SYNC_MAJORRSP_
APS_SYNC_MINORRSP_
OSI/AS concatenates the give tokens or please tokens session protocol data unit
(SPDU) with the SPDU for the specified primitive. The tokens are sent in one
transport service data unit (TSDU) concatenated with the specified primitive.
If you do not specify
give-tokens
or
please-tokens
in a call to one of the
procedures listed above, basic concatenation still occurs, but no tokens are transferred.
In this case, OSI/AS concatenates a dummy give tokens or please tokens SPDU to the
SPDU for the specified primitive.
Similarly, indication and confirm primitives from the remote user can be concatenated
with meaningful give tokens or please tokens primitives. However, this concatenation
is transparent to you. You will receive two separate events, one for the first primitive