ZCOM C I/F Library Routines
ZSEND (3X)
*(ZcMODE_DEF_STATUS_WBUF - send no wait, definite status Mode=7 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
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.
The following data structures are used for the zsend call. See /opt/acc/include/zcom/zcomsys.h for further details.
| |||
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 */ |
Chapter 4 | 313 |