File Coverage

blib/lib/Lab/Instrument/LabViewHeater.pm
Criterion Covered Total %
statement 20 54 37.0
branch n/a
condition 0 3 0.0
subroutine 7 16 43.7
pod 1 9 11.1
total 28 82 34.1


line stmt bran cond sub pod time code
1             package Lab::Instrument::LabViewHeater;
2             #ABSTRACT: ?????
3             $Lab::Instrument::LabViewHeater::VERSION = '3.881';
4 1     1   1658 use v5.20;
  1         5  
5              
6 1     1   5 use strict;
  1         2  
  1         20  
7 1     1   4 use warnings;
  1         2  
  1         28  
8 1     1   5 use Lab::Instrument;
  1         2  
  1         18  
9 1     1   561 use IO::File;
  1         1104  
  1         128  
10 1     1   9 use Time::HiRes qw/usleep/;
  1         2  
  1         7  
11 1     1   90 use Time::HiRes qw/sleep/;
  1         3  
  1         4  
12              
13             our @ISA = ("Lab::Instrument");
14              
15             our %fields = ( supported_connections => ['Socket'], );
16              
17             sub new {
18 0     0 1   my $proto = shift;
19 0   0       my $class = ref($proto) || $proto;
20 0           my $self = $class->SUPER::new(@_);
21 0           $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__);
  0            
22              
23 0           return $self;
24             }
25              
26             sub set_T {
27 0     0 0   my $self = shift;
28 0           my $set_T = shift;
29 0           my $command = sprintf( "SET_T %f", $set_T );
30 0           my $result = $self->query($command);
31 0           return $result;
32             }
33              
34             sub get_T0 {
35 0     0 0   my $self = shift;
36 0           my $result = $self->query("GET_T0");
37 0           return $result;
38             }
39              
40             sub get_T {
41 0     0 0   my $self = shift;
42 0           my $result = $self->query("GET_T");
43 0           return $result;
44             }
45              
46             sub get_mean_T {
47 0     0 0   my $self = shift;
48 0           my $result = $self->query("GET_MEAN_T");
49 0           return $result;
50             }
51              
52             sub get_sigma_T {
53 0     0 0   my $self = shift;
54 0           my $result = $self->query("GET_SIGMA_T");
55 0           return $result;
56             }
57              
58             sub get_max_dT {
59 0     0 0   my $self = shift;
60 0           my $result = $self->query("GET_MAX_dT");
61 0           return $result;
62             }
63              
64             # returns two boolean bits: first bit is SETPOINT_REMOTE, second bit is PID_ON
65             sub get_mode {
66 0     0 0   my $self = shift;
67 0           my $result = $self->query("GET_MODE");
68 0           return $result;
69             }
70              
71             sub set_mode {
72 0     0 0   my $self = shift;
73 0           my $remote = shift;
74 0           my $pid = shift;
75 0           my $result = $self->query("SET_MODE $remote,$pid");
76 0           return $result;
77             }
78              
79             1;
80              
81             __END__
82              
83             =pod
84              
85             =encoding UTF-8
86              
87             =head1 NAME
88              
89             Lab::Instrument::LabViewHeater - ?????
90              
91             =head1 VERSION
92              
93             version 3.881
94              
95             =head1 COPYRIGHT AND LICENSE
96              
97             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
98              
99             Copyright 2012 David Kalok
100             2016 Simon Reinhardt
101             2017 Andreas K. Huettel
102             2020 Andreas K. Huettel
103              
104              
105             This is free software; you can redistribute it and/or modify it under
106             the same terms as the Perl 5 programming language system itself.
107              
108             =cut