diff options
Diffstat (limited to 'libvxi11client/libvxi11client.h')
-rw-r--r-- | libvxi11client/libvxi11client.h | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/libvxi11client/libvxi11client.h b/libvxi11client/libvxi11client.h index d94662e..27da46c 100644 --- a/libvxi11client/libvxi11client.h +++ b/libvxi11client/libvxi11client.h @@ -1,4 +1,5 @@ #include <stdbool.h> +#include "vxi11.h" #define ERR_SYNTAXERROR -1 #define ERR_DEVICENOTACCESSIBLE -3 @@ -15,19 +16,29 @@ #define ERR_ABORT -23 #define ERR_CHANNELALREADYESTABLISHED -29 -int vxi11_open(char* address, char* device); -int vxi11_abort(void); -int vxi11_trigger(bool waitforlock); -int vxi11_clear(bool waitforlock); -int vxi11_write(char* data, unsigned int len, bool waitlock, bool end); -int vxi11_read(char* buffer, unsigned int bufferlen, bool waitlock, bool termchrset, char termchr); -int vxi11_lock(bool waitforlock); -int vxi11_unlock(void); -int vxi11_local(bool waitforlock); -int vxi11_remote(bool waitforlock); -int vxi11_readstatusbyte(bool waitforlock); -int vxi11_create_intr_chan(void); -int vxi11_destroy_intr_chan(void); -int vxi11_enable_srq(bool enable, char* handle, void (*callback)(void)); -int vxi11_docmd(unsigned long cmd, bool waitforlock); -int vxi11_close(void); +typedef struct { + CLIENT* clnt; + CLIENT* abortclnt; + Device_Link devicelink; + bool interruptchannelopen; + 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); +int vxi11_start_interrupt_server(void (*callback)(char* handle)); +int vxi11_stop_interrupt_server(); +int vxi11_docmd(Context* context, unsigned long cmd, bool waitforlock); +int vxi11_close(Context* context); |