diff options
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r-- | libvxi11client/client.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c index 804ef91..77554f2 100644 --- a/libvxi11client/client.c +++ b/libvxi11client/client.c @@ -27,6 +27,10 @@ static char* geterrorstring(int errorcode) { } } +static void interruptcallback(void) { + printf("Interrupt fired\n"); +} + int main(int argc, char *argv[]) { printf("VXI-11 test client\n"); @@ -137,7 +141,7 @@ int main(int argc, char *argv[]) { printf("Created interrupt channel\n"); // enable interrupts - if ((err = vxi11_enable_srq(true, "handle")) > 0) + if ((err = vxi11_enable_srq(true, "handle", interruptcallback)) > 0) printf("Enabled interrupts\n"); else printf("Error enabling interrupts; %s\n", geterrorstring(err)); @@ -145,7 +149,7 @@ int main(int argc, char *argv[]) { sleep(10); // disable interrupts - if ((err = vxi11_enable_srq(false, NULL)) > 0) + if ((err = vxi11_enable_srq(false, NULL, NULL)) > 0) printf("Disabled interrupts\n"); else printf("Error disabling interrupts; %s\n", geterrorstring(err)); |