#============================================================ # TR6143_Dummy #============================================================ package TR6143_Dummy; use Device::DeviceObject; @ISA = qw(DeviceObject); #公開したいサブルーチン @EXPORT = qw(); use strict; use Deps; #============================================================ # コンストラクタ、デストラクタ #============================================================ BEGIN { } sub new { my ($module, @args) = @_; my $this = {}; bless $this; return $this; } sub DESTROY { my $this = shift; $this->Finish(); } #============================================================ # 変数取得関数 #============================================================ sub GetFunctions { return "|DCISource|DCVSource|DCIMeasure|DCVMeasure|"; } #============================================================ # 一般関数 #============================================================ sub Initialize { my ($this) = @_; $this->Reset(); $this->Clear(); } sub Finish { my ($this) = @_; } sub Clear { my ($this) = @_; } sub Reset { my ($this) = @_; } sub GetId { return "TR6143(Dummy module)"; } sub SetAutoSampling { my ($this, $f) = @_; # $f = 'on' or 'off'; } sub SetVSourceOutput { my ($this, $f) = @_; # $f = 'on' or 'off'; } sub SetISourceOutput { my ($this, $f) = @_; # $f = 'on' or 'off'; } sub SetSourceDCCurrentMode { # $Range: in mA my ($this, $Range) = @_; $this->{SourceMode} = 'DCI'; } sub SetMeasureDCCurrentMode { # $Range: in mA my ($this, $Range) = @_; $this->{MeasureMode} = 'DCI'; } sub SetCurrentLimit { my ($this, $I) = @_; $this->SetSourceCurrent($I); } sub SetSourceCurrent { my ($this, $I) = @_; $this->{PresentCurrent} = $I = uc $I; return $I; } sub SetSourceDCVoltageMode { # $Range: in mV my ($this, $Range) = @_; $this->{SourceMode} = 'DCV'; } sub SetMeasureDCVoltageMode { # $Range: in mV my ($this, $Range) = @_; $this->{MeasureMode} = 'DCV'; } sub SetVoltageLimit { my ($this, $V) = @_; $this->SetSourceVoltage($V); } sub SetVSource { my ($this, $V) = @_; return $this->SetSourceVoltage($V); } sub SetSourceVoltage { my ($this, $V) = @_; $this->{PresentVoltage} = $V = uc $V; return $V; } sub Measure { my ($this, $V) = @_; return $V * (1.0 + (rand() - 0.5) * 0.1); } 1;