Lab::Connection::USBtmc - /dev/usbtmc Linux USB Test&Measurement kernel driver connection
version 3.691
This is not called directly. To make a GPIB suppporting instrument use Lab::Connection::USBtmc, set the connection_type parameter accordingly:
$instrument = U2000->new( connection_type => 'USBtmc', usb_vendor => 0x3838, usb_product => 0x1234, )
Ways to indicate device:
tmc_address => number (for /dev/usbtmcN) visa_name => 'USB::0x1234::0x5678::serial:INSTR'; usb_vendor => 0x1234, usb_product => 0x5678
Lab::Connection::USBtmc provides a GPIB-type connection with the bus Lab::Bus::USBtmc, using /dev/usbtmc* as backend.
It inherits from Lab::Connection::GPIB and subsequently from Lab::Connection.
For Lab::Bus::USBtmc, the generic methods of Lab::Connection suffice, so only a few defaults are set:
wait_status=>0, # usec; wait_query=>10, # usec; read_length=>1000, # bytes
my $connection = Lab::Connection::USBtmc->new( usb_vendor => 0x1234, # vendor id usb_product => 0x5678, # product id }
Mostly, this just falls back on the methods inherited from Lab::Connection.
Provides unified access to the attributes of all the child classes. E.g.
$USB_product = $instrument->config('usb_product');
Without arguments, returns a reference to the complete $self->config created by the constructor.
$self->config
$config = $connection->config(); $USB_product = $connection->config()->{'usb_product'};
Probably few. Mostly because there's not a lot to be done here. Please report.
Lab::Connection
Lab::Connection::GPIB
This software is copyright (c) 2019 by the Lab::Measurement team; in detail:
Copyright 2011 Andreas K. Huettel, Florian Olbrich 2012 Florian Olbrich, Hermann Kraus 2016 Charles Lane, Simon Reinhardt 2017 Andreas K. Huettel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.