summaryrefslogtreecommitdiff
path: root/libvxi11client
diff options
context:
space:
mode:
Diffstat (limited to 'libvxi11client')
-rw-r--r--libvxi11client/perlbits/Client.pm5
-rw-r--r--libvxi11client/perlbits/VXI11-Client.t4
-rwxr-xr-x[-rw-r--r--]libvxi11client/perlbits/testscript.pl4
3 files changed, 7 insertions, 6 deletions
diff --git a/libvxi11client/perlbits/Client.pm b/libvxi11client/perlbits/Client.pm
index cff79f5..3c24def 100644
--- a/libvxi11client/perlbits/Client.pm
+++ b/libvxi11client/perlbits/Client.pm
@@ -45,13 +45,14 @@ sub vxi_disable_srq {
sub vxi_write {
my $self = shift;
+ my $data = shift;
my %args = (
len => -1,
waitlock => 0,
end => 1,
@_
);
- return vxi_write_long($self, $args{data}, $args{len}, $args{waitlock}, $args{end});
+ return vxi_write_long($self, $data, $args{len}, $args{waitlock}, $args{end});
}
sub vxi_read {
@@ -60,7 +61,7 @@ sub vxi_read {
bufferlen => 1024,
waitlock => 0,
termchrset => 0,
- termch => 0,
+ termchr => 0,
@_
);
return vxi_read_long($self, $args{bufferlen}, $args{waitlock}, $args{termchrset},$args{termchr});
diff --git a/libvxi11client/perlbits/VXI11-Client.t b/libvxi11client/perlbits/VXI11-Client.t
index 8d24475..affa622 100644
--- a/libvxi11client/perlbits/VXI11-Client.t
+++ b/libvxi11client/perlbits/VXI11-Client.t
@@ -18,10 +18,10 @@ BEGIN { use_ok('VXI11::Client') };
&VXI11::Client::vxi_startinterruptserver();
-my $instr = &VXI11::Client::vxi_open("roi", 0);
+my $instr = &VXI11::Client::vxi_open("192.168.0.62", 0);
is($instr->vxi_lock(0), 1, "Lock");
-ok($instr->vxi_write(data => "*IDN?") > 0, "Write");
+ok($instr->vxi_write("*idn?") > 0, "Write");
my ($bytes, $buff, $reason) = $instr->vxi_read();
print "got " . $bytes . ";" . $buff . "\n";
diff --git a/libvxi11client/perlbits/testscript.pl b/libvxi11client/perlbits/testscript.pl
index 9ba7053..f7e9e42 100644..100755
--- a/libvxi11client/perlbits/testscript.pl
+++ b/libvxi11client/perlbits/testscript.pl
@@ -7,10 +7,10 @@ use VXI11::Client;
vxi_startinterruptserver();
-my $instr = vxi_open("roi", 0);
+my $instr = vxi_open("192.168.0.62", 0);
$instr->vxi_lock(0);
-$instr->vxi_write(data => "*IDN?");
+$instr->vxi_write("*idn?");
my ($bytes, $buff, $reason) = $instr->vxi_read();
print "got " . $bytes . ";" . $buff . " reason " . $reason ."\n";