diff options
Diffstat (limited to 'libvxi11client/client.c')
-rw-r--r-- | libvxi11client/client.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvxi11client/client.c b/libvxi11client/client.c index 04753a8..804ef91 100644 --- a/libvxi11client/client.c +++ b/libvxi11client/client.c @@ -14,6 +14,8 @@ static char* geterrorstring(int errorcode) { return "channel not established"; case -8: return "operation not supported"; + case -9: + return "out of resources"; case -11: return "device locked by another link"; case -12: @@ -133,7 +135,21 @@ int main(int argc, char *argv[]) { // create interrupt channel if ((err = vxi11_create_intr_chan()) > 0) { printf("Created interrupt channel\n"); + + // enable interrupts + if ((err = vxi11_enable_srq(true, "handle")) > 0) + printf("Enabled interrupts\n"); + else + printf("Error enabling interrupts; %s\n", geterrorstring(err)); + sleep(10); + + // disable interrupts + if ((err = vxi11_enable_srq(false, NULL)) > 0) + printf("Disabled interrupts\n"); + else + printf("Error disabling interrupts; %s\n", geterrorstring(err)); + // destroy interrupt channel if ((err = vxi11_destroy_intr_chan()) > 0) printf("Destroyed interrupt channel\n"); |