| 1 | package Lab::Connection::VISA; | ||
| 2 | #ABSTRACT: VISA-type connection | ||
| 3 | $Lab::Connection::VISA::VERSION = '3.899'; | ||
| 4 | use v5.20; | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use Lab::Bus::VISA; | ||
| 8 | use Lab::Connection; | ||
| 9 | use Lab::Exception; | ||
| 10 | |||
| 11 | our @ISA = ("Lab::Connection"); | ||
| 12 | |||
| 13 | our %fields = ( | ||
| 14 | bus_class => 'Lab::Bus::VISA', | ||
| 15 | resource_name => undef, | ||
| 16 | wait_status => 0, # sec; | ||
| 17 | wait_query => 10e-6, # sec; | ||
| 18 | read_length => 1000, # bytes | ||
| 19 | ); | ||
| 20 | |||
| 21 | sub new { | ||
| 22 | my $proto = shift; | ||
| 23 | my $class = ref($proto) || $proto; | ||
| 24 | my $twin = undef; | ||
| 25 | my $self = $class->SUPER::new(@_) | ||
| 26 | ; # getting fields and _permitted from parent class, parameter checks | ||
| 27 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | ||
| 28 | |||
| 29 | return $self; | ||
| 30 | } | ||
| 31 | |||
| 32 | 1; | ||
| 33 | |||
| 34 | # | ||
| 35 | # That's all, all that was needed was the additional field "resource_name". | ||
| 36 | # | ||
| 37 | |||
| 38 | |||
| 39 | 1; | ||
| 40 | |||
| 41 | __END__ |