#============================================================ # GPIBDevice #============================================================ package GPIBDevice; use Device::GPIBDeviceObject; @ISA = qw(GPIBDeviceObject); #公開したいサブルーチン @EXPORT = qw(); use strict; use Deps; #============================================================ # コンストラクタ、デストラクタ #============================================================ BEGIN { } sub new { my ($module, $interface, $devname, $timeout, $EOT, $EOS) = @_; $interface = 'ni' if($interface eq ''); $timeout = GPIB->T1s if(!defined $timeout); $EOT = 1 if(!defined $EOT); $EOS = 1 if(!defined $EOS); my $this = {}; bless $this; my ($name, $addr) = ($devname =~ /(\w+):(\d+)/); if(defined $addr) { $this->Open($interface, 0, $name, $addr, 0, $timeout, $EOT, $EOS); } return $this; } sub DESTROY { my $this = shift; } 1;