File Coverage

blib/lib/Lab/Moose/Instrument/OI_ILM210.pm
Criterion Covered Total %
statement 14 25 56.0
branch n/a
condition n/a
subroutine 5 7 71.4
pod 0 2 0.0
total 19 34 55.8


line stmt bran cond sub pod time code
1             package Lab::Moose::Instrument::OI_ILM210;
2             $Lab::Moose::Instrument::OI_ILM210::VERSION = '3.881';
3             #ABSTRACT: Oxford Instruments ILM Intelligent Helium Level Meter
4              
5 1     1   2604 use v5.20;
  1         4  
6              
7 1     1   7 use Moose;
  1         2  
  1         8  
8 1         60 use Lab::Moose::Instrument qw/
9             validated_no_param_setter
10 1     1   7374 /;
  1         3  
11 1     1   11 use Carp;
  1         3  
  1         69  
12 1     1   9 use namespace::autoclean;
  1         2  
  1         9  
13              
14             extends 'Lab::Moose::Instrument';
15              
16             sub BUILD {
17 0     0 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             sub get_level {
32 0     0 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             __PACKAGE__->meta()->make_immutable();
46              
47             1;
48              
49             __END__
50              
51             =pod
52              
53             =encoding UTF-8
54              
55             =head1 NAME
56              
57             Lab::Moose::Instrument::OI_ILM210 - Oxford Instruments ILM Intelligent Helium Level Meter
58              
59             =head1 VERSION
60              
61             version 3.881
62              
63             =head1 DESCRIPTION
64              
65             Driver for the Oxford Instruments ILM210 Intelligent Level Meter.
66              
67             =head1 COPYRIGHT AND LICENSE
68              
69             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
70              
71             Copyright 2021 Andreas K. Huettel, Fabian Weinelt, Simon Reinhardt
72              
73              
74             This is free software; you can redistribute it and/or modify it under
75             the same terms as the Perl 5 programming language system itself.
76              
77             =cut