ACC Programmer's Reference Guide

146 Chapter4
ZCOM C I/F Library Routines
LTQDGET (3X)
RETURN VALUE Routine ltqdget returns 0 ifsuccessful. Otherwise, a non-zero error code
is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM
error codes and their meanings.
Ifthespecifiedqueueisempty,thentheZENODATA error ( -24)is
returned and ibuf contains invalid data.
EXAMPLE
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h>
int32 ierr;
zaddr_type zaddr;
uint32 queue;
char ibuf[size]; /*Where size is user-determined; must be >= len */
int32 len;
int32 rlen;
if (ierr = ltqdget (&zaddr, queue, ibuf, len, &rlen)) {
/* error return code */
}
else {
/* good return code */
}
FILES
SEE ALSO
ltqdput(3X), zltqueue(3X), zltstore(3X), zltup(3X)
/opt/acc/include/zcom/zcomsys.h ZCOM system general include file,
containing data types, data structures,
constants, error codes, masks, etc. Note
that this must be the first include file
before any other ZCOM include files.
/opt/acc/include/zcom/zcomcall.h ZCOM routine function prototypes
(requires ANSI C compilation).