Instrument/IPSWeissDilfridge.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 45 CC 2 SCAR 12.0
CC
2
Cov
0%
check_magnet
6.0
new
2.0
BEGIN
2.0
CRAP 3.3
1 package Lab::Instrument::IPSWeissDillFridge;
2 #ABSTRACT: Derived IPS instrument for the AG Weiss dilution refrigerator
3 $Lab::Instrument::IPSWeissDillFridge::VERSION = '3.899';
4 use v5.20;
5  
6 use strict;
7 use Lab::Instrument::IPS;
8 our @ISA = ('Lab::Instrument::IPS');
9  
10 our %fields = (
11 supported_connections => [
12 'VISA', 'VISA_GPIB', 'GPIB', 'VISA_RS232', 'RS232', 'IsoBus', 'DEBUG'
13 ],
14  
15 # default settings for the supported connections
16 connection_settings => {
17 gpib_board => 0,
18 gpib_address => undef,
19 baudrate => 9600,
20 databits => 8,
21 stopbits => 2,
22 parity => 'none',
23 handshake => 'none',
24 termchar => "\r",
25 timeout => 2,
26  
27 },
28  
29 device_settings => { has_switchheater => 0 },
30  
31 device_cache => { id => "Weiss Dilution Fridge" }
32  
33 );
34  
35 sub new {
36 my $proto = shift;
37 my $class = ref($proto) || $proto;
38 my $self = $class->SUPER::new(@_);
39 $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__);
40  
41 $self->{LIMITS} = {
42 'magneticfield' => 17,
43 'field_intervall_limits' => [ 0, 10.99, 13.73, 16.48, 17 ],
44 'rate_intervall_limits' => [ 0.660, 0.552, 0.276, 0.138, 0.138 ]
45 };
46  
47 $self->connection()->Clear();
48 $self->check_magnet();
49  
50 #$self->_init_magnet();
51 $self->_device_init();
52  
53 return $self;
54 }
55  
56 sub check_magnet {
57 my $self = shift;
58  
59 my $version = $self->get_version();
60 if ( not( $version =~ /\b(IPS180)/ ) ) {
61 Lab::Exception::CorruptParameter->throw( error =>
62 "This Instrument driver is supposed to be used ONLY with LS Weiss Dilution Cryostat !\n"
63 );
64 }
65 }
66  
67  
68 1;
69  
70 __END__