summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client')
-rw-r--r--libvxi11client/perlbits/Client.xs9
-rw-r--r--libvxi11client/perlbits/VXI11-Client.t6
2 files changed, 9 insertions, 6 deletions
diff --git a/libvxi11client/perlbits/Client.xs b/libvxi11client/perlbits/Client.xs
index 339444f..65597b9 100644
--- a/libvxi11client/perlbits/Client.xs
+++ b/libvxi11client/perlbits/Client.xs
@@ -122,18 +122,17 @@ open(address, device)
OUTPUT:
RETVAL
-int
-read(context, buffer, bufferlen, waitlock, termchrset, termchr)
+void
+read(context, OUTLIST bytesread, OUTLIST buffer, bufferlen, waitlock, termchrset, termchr)
VXI11::Client context
char * buffer
+ int bytesread
unsigned int bufferlen
bool waitlock
bool termchrset
char termchr
CODE:
- RETVAL = vxi11_read(context, buffer, bufferlen, waitlock, termchrset, termchr);
- OUTPUT:
- RETVAL
+ bytesread = vxi11_read(context, buffer, bufferlen, waitlock, termchrset, termchr);
int
readstatusbyte(context, waitforlock)
diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t
index f2e74b1..31f3b1b 100644
--- a/libvxi11client/perlbits/VXI11-Client.t
+++ b/libvxi11client/perlbits/VXI11-Client.t
@@ -8,7 +8,7 @@
use strict;
use warnings;
-use Test::More tests => 16;
+use Test::More tests => 17;
BEGIN { use_ok('VXI11::Client') };
#########################
@@ -22,6 +22,10 @@ my $instr = &VXI11::Client::open("roi", 0);
is($instr->lock(0), 1, "Lock");
ok($instr->write("*IDN?", -1, 0, 0) > 0, "Write");
+
+my ($bytes, $buff) = $instr->read(256, 0, 0, 0);
+ok($bytes > 0, "Read");
+
ok($instr->readstatusbyte(0) >= 0 , "Read status byte");
is($instr->create_intr_chan(), 1, "Create intr channel");
is($instr->enable_srq(1, "myhandle"), 1, "Enable interrupts");