Program Interface Library
AR_GETBLOCK
CEI-100/CEI-200/CEI-
x20 User’s Manual
93
AR_GETBLOCK
CEI_INT32 ar_getblock (CEI_UINT32 board, CEI_UINT32 channel,
CEI_INT32 MaxWords, CEI_INT32 Offset717, CEI_INT32 *
ActualCount, CEI_INT32 * ARINCData, CEI_INT32 *TimeTag)
This function is used to get multiple ARINC words from a channel’s
receiver buffer. It is supported on the CEI-520/520A/620/820/820TX,
using the enhanced interface only.
All of the available ARINC words (or the specified number) are retrieved
from the specified buffer and copied to the caller’s buffer. If time tagging
is enabled for this channel, the time tags are copied to the “TimeTag”
destination. If time tagging isn’t enabled, this pointer is not used. If this
pointer is NULL, and time tags are enabled, the time tags are retrieved and
discarded. ARINC-573/717 data contains a time tag in the upper bits of
the data word. This time tag is returned as part of the ‘ARINCData’ array,
not
in the ‘TimeTag’ array.
If the buffer is empty, this routine returns ARS_NODATA.
If ( ActualCount = MaxWords ) when this function returns, there may or
may not be more data in the buffer. Subsequent calls are required to
determine if more words are available in the buffer.
ARS_NODATA
No ARINC data is available.
ARS_GOTDATA
One or more ARINC words were read.
ARS_INVARG
Board not initialized.
ARS_BOARD_MUTEX
Failed to acquire/release the board lock.
board
(input) the board number.
channel
(input) the receive channel number.
MaxWords
(input) the maximum number of 32-bit ARINC
words to return. If timetags are enabled this is the
number of labels to return; an equal number of
timetags are returned if TimeTag is not NULL.
Offset717
(input) beginning offset in frame if this is a 573/717
receiver in Frame mode, ignored otherwise.
‘MaxWords’ are copied from the receiver buffer to
the users buffer, and the ‘TimeTag’ pointer is
ignored.
Syntax
Description
Return Value
Arguments
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com