summaryrefslogtreecommitdiff
path: root/libvxi11client/perlglue.c
blob: 697a480b7b64b84020aad52110492f4ae08644ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#include "perlglue.h"
#include "libvxi11client.h"
#include <stdbool.h>

#define INTERRUPTHANDLE "libvxi11client"

static void interruptcallback(void) {

}

int vopen(char* address, char* device) {
	return vxi11_open(address, device);
}

int vabort(void) {
	return vxi11_abort();
}

int vtrigger(bool waitforlock) {
	return vxi11_trigger(waitforlock);
}

int vclear(bool waitforlock) {
	return vxi11_clear(waitforlock);
}

int vwrite(char* data, unsigned int len, bool waitlock, bool end) {
	return vxi11_write(data, len, waitlock, end);
}

int vread(char* buffer, unsigned int bufferlen, bool waitlock, bool termchrset, char termchr) {
	return vxi11_read(buffer, bufferlen, waitlock, termchrset, termchr);
}

int vlock(bool waitforlock) {
	return vxi11_lock(waitforlock);
}

int vunlock(void) {
	return vxi11_unlock();
}

int vlocal(bool waitforlock) {
	return vxi11_local(waitforlock);
}

int vremote(bool waitforlock) {
	return vxi11_remote(waitforlock);
}

int vreadstatusbyte(bool waitforlock) {
	return vxi11_readstatusbyte(waitforlock);
}

int vcreate_intr_chan(void) {
	return vxi11_create_intr_chan();
}

int vdestroy_intr_chan(void) {
	return vxi11_destroy_intr_chan();
}

int venable_srq(bool enable) {
	return vxi11_enable_srq(enable, INTERRUPTHANDLE, interruptcallback);
}

int vdocmd(unsigned long cmd, bool waitforlock) {
	return vxi11_docmd(cmd, waitforlock);
}

int vclose(void) {
	return vxi11_close();
}