#include #include "vxi11.h" #define ERR_SYNTAXERROR -1 #define ERR_DEVICENOTACCESSIBLE -3 #define ERR_INVALIDLINKINDENTIFIER -4 #define ERR_PARAMETERERROR -5 #define ERR_CHANNELNOTESTABLISHED -6 #define ERR_OPERATIONNOTSUPPORTED -8 #define ERR_OUTOFRESOURCES -9 #define ERR_DEVICELOCKEDBYANOTHERLINK -11 #define ERR_NOLOCKHELDBYTHISLINK -12 #define ERR_IOTIMEOUT -15 #define ERR_IOERROR -17 #define ERR_INVALIDADDRESS -21 #define ERR_ABORT -23 #define ERR_CHANNELALREADYESTABLISHED -29 typedef struct { CLIENT* clnt; CLIENT* abortclnt; Device_Link devicelink; bool interruptsenabled; } Context; int vxi11_open(Context* context, char* address, char* device); int vxi11_abort(Context* context); int vxi11_trigger(Context* context, bool waitforlock); int vxi11_clear(Context* context, bool waitforlock); int vxi11_write(Context* context, char* data, unsigned int len, bool waitlock, bool end); int vxi11_read(Context* context, char* buffer, unsigned int bufferlen, bool waitlock, bool termchrset, char termchr); int vxi11_lock(Context* context, bool waitforlock); int vxi11_unlock(Context* context); int vxi11_local(Context* context, bool waitforlock); int vxi11_remote(Context* context, bool waitforlock); int vxi11_readstatusbyte(Context* context, bool waitforlock); int vxi11_create_intr_chan(Context* context); int vxi11_destroy_intr_chan(Context* context); int vxi11_enable_srq(Context* context, bool enable, char* handle, void (*callback)(void)); int vxi11_docmd(Context* context, unsigned long cmd, bool waitforlock); int vxi11_close(Context* context);