diff options
author | daniel <danieruru@gmail.com> | 2013-01-18 03:51:04 +0900 |
---|---|---|
committer | daniel <danieruru@gmail.com> | 2013-01-18 03:51:04 +0900 |
commit | 4e01ae716c25937daa7d1c82e6d0da8fdd0ad857 (patch) | |
tree | 4f4da26832f993ae5c1caa52b81d1357cea9c764 /libvxi11client/perlbits/testscript.pl | |
parent | 50a7131bba4d6cc161e0531fe194e75d07e05cec (diff) |
Add prefix, fix read (probably leaks..).
Diffstat (limited to 'libvxi11client/perlbits/testscript.pl')
-rw-r--r-- | libvxi11client/perlbits/testscript.pl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libvxi11client/perlbits/testscript.pl b/libvxi11client/perlbits/testscript.pl new file mode 100644 index 0000000..b487ab4 --- /dev/null +++ b/libvxi11client/perlbits/testscript.pl @@ -0,0 +1,30 @@ +use strict; +use warnings; + +use VXI11::Client; + +&VXI11::Client::vxi_startinterruptserver(); + +my $instr = &VXI11::Client::vxi_open("roi", 0); + +$instr->vxi_lock(0); +$instr->vxi_write("*IDN?", -1, 0, 0); +my ($bytes, $buff) = $instr->vxi_read(256, 0, 0, 0); +print "got " . $bytes . ";" . $buff . "\n"; + +$instr->vxi_readstatusbyte(0); +$instr->vxi_create_intr_chan(); +$instr->vxi_enable_srq(1, "myhandle"); +&VXI11::Client::vxi_wait_for_interrupt(); +$instr->vxi_enable_srq(0, ""); +$instr->vxi_destroy_intr_chan(); +$instr->vxi_abort(); +$instr->vxi_clear(0); +$instr->vxi_trigger(0); +$instr->vxi_local(0); +$instr->vxi_remote(0); +$instr->vxi_unlock(); + +$instr->vxi_close(); + +&VXI11::Client::vxi_stopinterruptserver(); |