message_queued.l2.v = lrdast([icntrl.i2.r])
This routine allows an application to determine whether there are any
Receive Data packets queued to it. It is necessary to periodically
invoke the function and test the returned value. The service is
implemented by specifying a Receive Data AST receiver address internal
to LRDAST. The routine will keep track of the running balance of data
packets received incrementing a counter each time an AST is received.
Each time the routine returns a value of TRUE (indicating the
availability of a packet) the counter is decremented. Thus,
the caller should only issue one Read Data request for each value
of TRUE returned by this routine!
In addition, since the routine has no way of determining
whether packets are waiting at the time it is initialized, the
preferred use is to (at initialization):
1. Disable AST delivery via a SYS$SETAST (0)
2. Read and process any oustanding data packets until
RECEIV_RSX indicates that no more data packets are
currently queued to the application.
3. Initialize the LRDAST service.
4. Enable AST delivery via a SYS$SETAST (1)
The following values are defined for the control parameter:
ICNTRL > 0 Initiate AST counting for Receive Data ASTs.
ICNTRL = 0 Return TRUE if a Read Data packet is available.
Return FALSE if no packet is available. If no
argument is specified a value of 0 (check
operation) is assumed.