ZCOM C I/F Library Routines
ZREAD (3X)
5.The type of message received is returned in
#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 */ |
#define ZCOM_MSTYPE_RSLT | 6 | /* Response from local terminal */ |
#define ZCOM_MSTYPE_RSLP | 7 | /* Response from local program */ |
#define ZCOM_MSTYPE____8 | 8 | /* Undefined type */ |
#define ZCOM_MSTYPE_MSRT | 9 | /* Remote terminal message */ |
#define ZCOM_MSTYPE_RPLP | 10 | /* Remote program to program */ |
#define ZCOM_MSTYPE_TORZ | 11 | /* Timer message for remote ZLU */ |
#define ZCOM_MSTYPE_RPLT | 12 | /* Remote program to terminal */ |
#define ZCOM_MSTYPE_RSEM | 13 | /* Remote system event message */ |
#define ZCOM_MSTYPE_RSRT | 14 | /* Response from remote terminal */ |
#define ZCOM_MSTYPE_RSRP | 15 | /* Response from remote program */ |
RETURN VALUE Routine zread returns 0 if the call is successful. In addition, for a response message, a
If the zread call itself failed, a
EXAMPLE
#include <zcom/zcomsys.h> #include <zcom/zcomcall.h>
int32 | ierr; |
zaddr_type | zaddr; |
uint32 | mode; |
zmhd_type | zmhd; |
char | ibuf[size]; /* where size is |
int32 | len; |
int32 | rlen; |
int32 | rstat; |
if (ierr = zread(&zaddr, mode, &zmhd, ibuf, len, &rlen, &rstat)) {
Chapter 4 | 301 |