ibcmda

Name

ibcmda -- write command bytes asynchronously (board)

Synopsis

#include <gpib/ib.h>

int ibcmda(int ud, const void *commands, long num_bytes);

Description

ibcmda() is similar to ibcmd() except it operates asynchronously. ibcmda() does not wait for the sending of the command 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, you must call ibwait() with CMPL set in the wait mask, until the CMPL bit is set ibsta. Asynchronous operations may also be aborted with an ibstop() or ibonl() call.

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.