ibrda

Name

ibrda -- read data bytes asynchronously (board or device)

Synopsis

#include <gpib/ib.h>

int ibrda(int ud, void *buffer, long num_bytes);

Description

ibrda() is similar to ibrd() except it operates asynchronously. ibrda() does not wait for the reception of the data bytes to complete, but rather returns immediately.

While an asynchronous operation is in progress, most library functions will fail with an EOIP error. In order to sucessfully complete an asynchronous operation and resynchronize its results with the current thread, you must call ibwait() with CMPL set in the wait mask, until the CMPL bit is set ibsta. Asynchronous operations may also be completed by a call to ibstop() or ibonl() call. Note, ibwait() will only complete the asynchronous operation if you explicitly set the CMPL bit in the wait mask parameter of ibwait().

After the asynchronous I/O has completed and the results resynchronized with the current thread, the Linux-GPIB extensions AsyncIbsta, AsyncIberr, AsyncIbcnt and AsyncIbcntl may be useful to more cleanly separate the results of the asynchronous I/O from the results of the ibwait or similar call used to resynchronize.

Return value

The value of ibsta is returned.