NAME
Lab::Connection::USBtmc - /dev/usbtmc Linux USB Test&Measurement kernel driver connection
VERSION
version 3.663
SYNOPSIS
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
DESCRIPTION
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
CONSTRUCTOR
new
my $connection = Lab::Connection::USBtmc->new(
usb_vendor => 0x1234, # vendor id
usb_product => 0x5678, # product id
}
METHODS
Mostly, this just falls back on the methods inherited from Lab::Connection.
config
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.
$config = $connection->config();
$USB_product = $connection->config()->{'usb_product'};
CAVEATS/BUGS
Probably few. Mostly because there's not a lot to be done here. Please report.
SEE ALSO
COPYRIGHT AND LICENSE
This software is copyright (c) 2018 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.