| 1 | package Lab::Instrument::LabViewHeater; | ||
| 2 | #ABSTRACT: ????? | ||
| 3 | $Lab::Instrument::LabViewHeater::VERSION = '3.899'; | ||
| 4 | use v5.20; | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use warnings; | ||
| 8 | use Lab::Instrument; | ||
| 9 | use IO::File; | ||
| 10 | use Time::HiRes qw/usleep/; | ||
| 11 | use Time::HiRes qw/sleep/; | ||
| 12 | |||
| 13 | our @ISA = ("Lab::Instrument"); | ||
| 14 | |||
| 15 | our %fields = ( supported_connections => ['Socket'], ); | ||
| 16 | |||
| 17 | sub new { | ||
| 18 | my $proto = shift; | ||
| 19 | my $class = ref($proto) || $proto; | ||
| 20 | my $self = $class->SUPER::new(@_); | ||
| 21 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | ||
| 22 | |||
| 23 | return $self; | ||
| 24 | } | ||
| 25 | |||
| 26 | sub set_T { | ||
| 27 | my $self = shift; | ||
| 28 | my $set_T = shift; | ||
| 29 | my $command = sprintf( "SET_T %f", $set_T ); | ||
| 30 | my $result = $self->query($command); | ||
| 31 | return $result; | ||
| 32 | } | ||
| 33 | |||
| 34 | sub get_T0 { | ||
| 35 | my $self = shift; | ||
| 36 | my $result = $self->query("GET_T0"); | ||
| 37 | return $result; | ||
| 38 | } | ||
| 39 | |||
| 40 | sub get_T { | ||
| 41 | my $self = shift; | ||
| 42 | my $result = $self->query("GET_T"); | ||
| 43 | return $result; | ||
| 44 | } | ||
| 45 | |||
| 46 | sub get_mean_T { | ||
| 47 | my $self = shift; | ||
| 48 | my $result = $self->query("GET_MEAN_T"); | ||
| 49 | return $result; | ||
| 50 | } | ||
| 51 | |||
| 52 | sub get_sigma_T { | ||
| 53 | my $self = shift; | ||
| 54 | my $result = $self->query("GET_SIGMA_T"); | ||
| 55 | return $result; | ||
| 56 | } | ||
| 57 | |||
| 58 | sub get_max_dT { | ||
| 59 | my $self = shift; | ||
| 60 | my $result = $self->query("GET_MAX_dT"); | ||
| 61 | return $result; | ||
| 62 | } | ||
| 63 | |||
| 64 | # returns two boolean bits: first bit is SETPOINT_REMOTE, second bit is PID_ON | ||
| 65 | sub get_mode { | ||
| 66 | my $self = shift; | ||
| 67 | my $result = $self->query("GET_MODE"); | ||
| 68 | return $result; | ||
| 69 | } | ||
| 70 | |||
| 71 | sub set_mode { | ||
| 72 | my $self = shift; | ||
| 73 | my $remote = shift; | ||
| 74 | my $pid = shift; | ||
| 75 | my $result = $self->query("SET_MODE $remote,$pid"); | ||
| 76 | return $result; | ||
| 77 | } | ||
| 78 | |||
| 79 | 1; | ||
| 80 | |||
| 81 | __END__ |