Moose/Instrument/OI_ILM210.pm

filter: Statementstmt 62.0% 18 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 60.5% 23 / 38 CC 1 SCAR 2.5
CC
1
Cov
62%
BUILD
2.0
get_level
2.0
BEGIN
1.0
CRAP 1.3
« Moose/Sweep/Step/Repeat.pm ↑ Summary Moose/Instrument/KeysightB2901A.pm »
1 package Lab::Moose::Instrument::OI_ILM210;
2 1 $Lab::Moose::Instrument::OI_ILM210::VERSION = '3.931';
3 #ABSTRACT: Oxford Instruments ILM Intelligent Helium Level Meter
4  
5 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Lab::Moose::Instrument qw/
Subroutine BEGIN: called CC=1 SCAR=0.0
9 validated_no_param_setter
10 1 /;
11 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 extends 'Lab::Moose::Instrument';
15  
16 0 ▶sub BUILD {
Subroutine BUILD: not called CC=1 SCAR=6.9
Pod undocumented
17 0 my $self = shift;
18  
19 0 warn "The ILM driver is work in progress. You have been warned\n";
20  
21 # Unlike modern GPIB equipment, this device does not assert the EOI
22 # at end of message. The controller shell stop reading when receiving the
23 # eos byte.
24  
25 0 $self->connection->set_termchar( termchar => "\r" );
26 0 $self->connection->enable_read_termchar();
27 0 $self->clear();
28  
29 }
30  
31 0 ▶sub get_level {
Subroutine get_level: not called CC=1 SCAR=6.9
Pod undocumented
32 0 my ( $self, %args ) = validated_no_param_setter(
33 \@_,
34 channel => { isa => 'Int', default => 1 },
35 );
36  
37 0 my $channel = delete $args{channel};
38  
39 0 my $level = $self->query( command => "R$channel\r" );
40 0 $level =~ s/^R//;
41 0 $level /= 10;
42 0 return $level;
43 }
44  
45 1 __PACKAGE__->meta()->make_immutable();
46  
47 1 1;
48  
49 __END__
« Moose/Sweep/Step/Repeat.pm ↑ Summary Moose/Instrument/KeysightB2901A.pm »