NAME
Lab::VXI11 - Perl interface to VXI-11 Test&Measurement backend
SYNOPSIS
use Lab::VXI11;
my $client = Lab::VXI11->new('132.199.1.2', DEVICE_CORE, DEVICE_CORE_VERSION, "tcp");
($error, $lid, $abortPort, $maxRecvSize) = $client->create_link(0, 0, 0, "inst0");
# Send "*IDN\n" command and read answer.
($error, $size) = $client->device_write($lid, 1000, 0, 0, "*IDN?\n");
($error, $reason, $data) = $client->device_read($lid, 100, 1000, 0, 0, 0);
($error) = $client->destroy_link($lid);
DESCRIPTION
Raw XS interface for VXI-11. Uses Sun's RPC library and C-code created by rpcgen.
The VXI-11 API is documented in the VXI-11 specification. A good tutorial can be found in Agilent's application note Using Linux to Control LXI Instruments Through VXI-11.
INSTALLATION
On Linux, Sun's RPC library is part of the libc (glibc). Just use your CPAN client:
$ cpanm Lab::VXI11
On Windows this module is untested (VISA contains a VXI11 driver).
METHODS
See the VXI-11 specs for more details.
new
$client = Lab::VXI11->new($host, $prog, $vers, $proto);
create_link
($erro, $lid, $abortPort, $maxRecvSize) = $client->create_link($clientId, $lockDevice, $lock_timeout, $device);
device_write
($error, $size) = $client->device_write($lid, $io_timeout, $lock_timeout, $flags, $data);
device_read
($error, $reason, $data) = $client->device_read($lid, $requestSize, $io_timeout, $lock_timeout, $flags, $termChar);
$termChar
needs to be a number, e.g. ord("\n")
.
device_readstb
($error, $stb) = $client->device_readstb($lid, $flags, $lock_timeout, $io_timeout);
device_trigger
($error) = $client->device_trigger($lid, $flags, $lock_timeout, $io_timeout);
device_clear
($error) = $client->device_clear($lid, $flags, $lock_timeout, $io_timeout);
device_remote
($error) = $client->device_remote($lid, $flags, $lock_timeout, $io_timeout);
device_local
($error) = $client->device_local($lid, $flags, $lock_timeout, $io_timeout);
device_lock
($error) = $client->device_remote($lid, $flags, $lock_timeout);
device_unlock
($error) = $client->device_unlock($lid);
device_enable_srq
($error) = $client->device_enable_srq($lid, $enable, $handle);
device_docmd
($error, $data_out) = $client->device_docmd($lid, $flags, $io_timeout, $lock_timeout, $cmd, $network_order, $datasize, $data_in);
destroy_link
($error) = $client->destroy_link($lid);
create_intr_chan
($error) = $client->create_intr_chan($hostAddr, $hostPort, $progNum, $progVers, $progFamily);
destroy_intr_chan
($error) = $client->destroy_intr_chan();
REPORTING BUGS
Please report bugs at https://github.com/amba/Lab-VXI11/issues.
CONTACT
Feel free to contact us at the #labmeasurement channel on Freenode IRC.
AUTHOR
Simon Reinhardt, <simon.reinhardt@stud.uni-regensburg.de>
COPYRIGHT AND LICENSE
Copyright (C) 2017 by Simon Reinhardt
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.24.0 or, at your option, any later version of Perl 5 you may have available.