Reference Guide

ZCOM C I/F Library Routines
ZSEND (3X)
Chapter 4312
Apart from the special bits, the mode value indicates the requested
completion status of the write:
*
Mode=0
(ZcMODE_NO_WAIT - send no wait)
The message to be sent is moved to a buffer and the caller
continues executing without waiting for return status. If this mode
is used, the program is responsible for controlling the flow of
messages. If the calling program (or thread) uses too many buffers
it will be suspended until some of the buffers have been sent.
Even if the caller uses this mode and does not care about the
return status, it must still call zopen() to allocate a primary or
auxiliary input ZLU before making the zsend call.
*
Mode=1
(ZcMODE_RPT_ERRS - send no wait, report errors)
The message is transmitted without waiting for completion. A
status response will be returned on the primary ZLU of the calling
program, only if transmission errors occur. The response is
retrieved by using a zread(3X) call; it will have a message type of
six (6) or fourteen (14). Only the status is returned (in the rstat
parameter of zread(3X)). The data buffer is discarded. This mode is
used if the caller is only interested in knowing about unsuccessful
zsend (transmit) requests.
*
Mode=2
(ZcMODE_DEF_STATUS - send no wait, definite status)
There is a definite response for every message sent with this mode.
The response is returned to the application’s program ZLU after
the message has been successfully sent or upon a transmit error.
The response is retrieved by using the zread(3X) call; it will have a
message type of six (6) or fourteen (14). Only the status is returned
(in the rstat parameter of zread(3X)). The data buffer is discarded.
This mode is useful in sending a large number of messages
through ZCOM with flow control.
*
Mode=5
(ZcMODE_RPT_ERRS_WBUF - send no wait, report errors with
buffer)
Similar to Mode 1, however the data buffer is returned along with
the status if any transmission errors occur. In this way the data
buffer can easily be rerouted, resent or logged.