++ed by:
AMBA

1 PAUSE user
1 non-PAUSE user.

Andreas K. Hüttel
and 4 contributors

NAME

Lab::Connection::USBtmc - /dev/usbtmc connection

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

AUTHOR/COPYRIGHT

 Copyright 2011      Florian Olbrich

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.