Instrument/OI_ILM210.pm untested

filter: Statementstmt 0.0% 0 / 27 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 / 41 CC 2 SCAR 12.0
CC
2
Cov
0%
get_level
6.0
new
2.0
BEGIN
2.0
CRAP 3.3
1 package Lab::Instrument::OI_ILM210;
2 #ABSTRACT: Oxford Instruments ILM Intelligent Level Meter
3 $Lab::Instrument::OI_ILM210::VERSION = '3.899';
4 use v5.20;
5  
6 use strict;
7 use Lab::Instrument;
8  
9 our @ISA = ("Lab::Instrument");
10  
11 our %fields = ( supported_connections => ['IsoBus'], );
12  
13 sub new {
14 my $proto = shift;
15 my $class = ref($proto) || $proto;
16 my $self = $class->SUPER::new(@_);
17 $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__);
18  
19 return $self;
20 }
21  
22 sub get_level {
23 my $self = shift;
24 my $channel = shift;
25 $channel = "1" unless defined($channel);
26  
27 my $level = $self->query("R$channel");
28 $level =~ s/^R//;
29 $level /= 10;
30 return $level;
31 }
32  
33 1;
34  
35 __END__