Reference Guide

ZCOM C I/F Library Routines
ZSEND (3X)
Chapter 4 313
The following data structures are used for the zsend call. See
/opt/acc/include/zcom/zcomsys.h for further details.
/*-- ZCOM Message ID Header --*/
typedef struct {
uint8 mstype; /* Message Type */
uint8 msresp; /* Message response code */
zaddr_type mzdest; /* Destination zcom addr */
zaddr_type mzsrce; /* Source zcom addr */
uint16 mtagw1; /* Message tag word 1 */
uint16 mtagw2; /* Message tag word 2 */
zaddr_type mzaux1; /* Auxiliary zcom addr */
} zmid_type;
/* Mask and values for message type */
#define ZCOM_MSTYPE_REMOTE 0x08 /* Mask for remote message bit */
#define ZCOM_MSTYPE____0 0 /* Undefined type */
#define ZCOM_MSTYPE_MSLT 1 /* From local terminal */
#define ZCOM_MSTYPE_LPLP 2 /* Local program to program */
#define ZCOM_MSTYPE_TOLZ 3 /* Timer message for local ZLU */
#define ZCOM_MSTYPE_LPLT 4 /* Local program to terminal */
#define ZCOM_MSTYPE_LSEM 5 /* Local system event message */
*
Mode=7
(ZcMODE_DEF_STATUS_WBUF - send no wait, definite status
with buffer)
Similar to Mode 2, however both the status and the data buffer are
returned with the response. This enables a message to be sent to
multiple ZLUs in a particular order, without the program having
to store the message temporarily.
*
Mode=8
(ZcMODE_WAIT - send and await status)
The return status rstat indicates whether there is any problem
with the send (zero means successful). The calling program (or
thread) is suspended by this call while the transmission is in
progress. In a multi-threaded application, only the calling thread
will be suspended, the other threads are not affected. When
transmission is completed, the call is returned with the return
status in rstat. This mode is used if the caller cannot continue
unless the data message is completely sent.
This mode of transmission is not only slower but also has a higher
processing overhead than the no wait options described above.
This mode does not provide for any timeouts at this level, i.e., it
returns only if the protocol completes or times out the
transmission. It should therefore be used with caution.