ZCOM C I/F Library Routines

ZSEND (3X)

If Bit ZCOM_ZSEND_NOMX (0x4000) of mode is set and the request is to a outbound-multiplexed terminal ZLU, the outbound multiplexing is over-ridden. This results in the data being sent directly to the terminal (instead of the multiplexing program).

The ZCOM_ZSEND_MHD and ZCOM_ZSEND_NOMX bits are intended for use by multiplexing programs to intercept terminal messages and build specific messages or responses as required.

They can cause strange ZCOM subsystem behavior if used improperly; hence, they must be used with caution.

If bit ZCOM_ZSEND_LPR (0x0080) or ZCOM_ZSEND_XPS (0x0040) is set and the request is to a terminal, then the message will be queued on the low priority or express transmit queue, respectively. Otherwise, it defaults to the high priority queue.

The different transmit queues allow the caller to have some control over the order of messages being sent. The express queue is always processed first and is not bounded by queue limit. It is intended for sending critical control data and should never be used for normal data. The high priority queue is subject to queue limit checks and is intended for sending normal data. The low priority queue is processed only after all express and high priority messages are sent and is also bounded by queue limit checks. It is intended for sending data in a background mode. For a busy terminal, low priority messages will not be sent until all its higher priority activities are completed.

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.

282

Chapter 4