ZCOM C I/F Library Routines

ZSEND (3X)

NOTES

If mhp is specified (i.e., a non-NULL pointer), some header fields must be

 

set up by the caller because they are extracted and sent with the data

 

buffer. These fields are:

mhp->mid.mzsrce

- source ZCOM address (ZLU)

mhp->mid.mtagw1

- header tag word 1

mhp->mid.mtagw2

- header tag word 2

mhp->mrq.mrqtag

- protocol tag parameter (for terminal ZLU only)

The other header fields are set up by the ZCOM subsystem exclusively.

The source ZCOM address field provides a way to redirect the response to a different ZLU rather than the primary ZLU. The Primary ZLU is used if it is zero. The two header tag words provide a means of identifying the response in the case where a “no wait” mode is used. The protocol tag parameter controls special options supported by the protocol module (protocol specific). Refer to the relevant Protocol Manual for its use.

It is important to zero out undesirable fields to avoid unexpected results. For example, if the caller only wants to specify the two header tag words, then the source ZLU and protocol tag must be zeroed out. If NULL is specified for mhp, zsend defaults the source ZLU to the primary ZLU and the rest to zeros.

If bit ZCOM_ZSEND_MHD (0x8000) of mode is set, zsend allows more header fields to be specified by the caller, hence having more control in the message sent. This implies mhp must be specified, i.e., non-NULL. The header fields that must be set up by the caller are:

mhp->mid.mstype

- message type

mhp->mid.msresp

- message response code

mhp->mid.mzdest

- destination ZCOM address

mhp->mid.mzsrce

- source ZCOM address

mhp->mid.mtagw1

- header tag word 1

mhp->mid.mtagw2

- header tag word 2

mhp->mid.mzaux1

- auxiliary ZCOM address

310

Chapter 4