| 1 | package Lab::Instrument::TemperatureControl; | ||||||||||||||||||||
| 2 | #ABSTRACT: Generic temperature control instrument base class | ||||||||||||||||||||
| 3 | 1 | $Lab::Instrument::TemperatureControl::VERSION = '3.881'; | |||||||||||||||||||
| 4 | 1 | ▶ | use v5.20; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | our @ISA = ('Lab::Instrument'); | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 1 | our %fields = ( | |||||||||||||||||||
| 11 | supported_connections => [], | ||||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | # supported config options | ||||||||||||||||||||
| 14 | device_settings => { | ||||||||||||||||||||
| 15 | has_pidcontroller => undef, | ||||||||||||||||||||
| 16 | num_heaters => 0, | ||||||||||||||||||||
| 17 | num_sensors => 0, | ||||||||||||||||||||
| 18 | sample_sensor => undef, | ||||||||||||||||||||
| 19 | sample_heater => undef, | ||||||||||||||||||||
| 20 | }, | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | # Config hash passed to subchannel objects or $self->configure() | ||||||||||||||||||||
| 23 | default_device_settings => {}, | ||||||||||||||||||||
| 24 | ); | ||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | sub new { | ||||||||||||||||||||
| 27 | 0 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 28 | 0 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 29 | 0 | my $self = $class->SUPER::new(@_); | |||||||||||||||||||
| 30 | 0 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | |||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | 0 | ||||||||||||||||||||
| 33 | "Temperature control support is experimental. You have been warned.\n"; | ||||||||||||||||||||
| 34 | 0 | return $self; | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | sub set_sample_sensor() { | ||||||||||||||||||||
| 38 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
set_sample_sensor: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 39 | 0 | my $channel = shift; | |||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | # setze sample sensor if this is a valid channel number | ||||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | sub get_temperature() { | ||||||||||||||||||||
| 45 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
get_temperature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 46 | 0 | my $channel = shift; | |||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | # no channel -> use default channel | ||||||||||||||||||||
| 49 | # use method from hardware | ||||||||||||||||||||
| 50 | 0 | return $self->_get_temperature($channel); | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | sub get_sample_temperature() { | ||||||||||||||||||||
| 54 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
get_sample_temperature: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 55 | 0 | return $self->get_temperature( $self->get_sample_sensor ); | |||||||||||||||||||
| 56 | } | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | sub _get_temperature() { | ||||||||||||||||||||
| 59 | 0 | ▶ | die "get_temperature not implemented for this instrument\n"; | ||||||||||||||||||
|
Subroutine
_get_temperature: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 1 | 1; | |||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | __END__ | ||||||||||||||||||||
| 65 | |||||||||||||||||||||
| 66 | =pod | ||||||||||||||||||||
| 67 | |||||||||||||||||||||
| 68 | =encoding UTF-8 | ||||||||||||||||||||
| 69 | |||||||||||||||||||||
| 70 | =head1 NAME | ||||||||||||||||||||
| 71 | |||||||||||||||||||||
| 72 | Lab::Instrument::TemperatureControl - Generic temperature control instrument base class | ||||||||||||||||||||
| 73 | |||||||||||||||||||||
| 74 | =head1 VERSION | ||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | version 3.881 | ||||||||||||||||||||
| 77 | |||||||||||||||||||||
| 78 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||
| 79 | |||||||||||||||||||||
| 80 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||||||||||||||||||||
| 81 | |||||||||||||||||||||
| 82 | Copyright 2009 Andreas K. Huettel | ||||||||||||||||||||
| 83 | 2010 Andreas K. Huettel, Daniel Schroeer | ||||||||||||||||||||
| 84 | 2011 Andreas K. Huettel, Florian Olbrich | ||||||||||||||||||||
| 85 | 2012 Andreas K. Huettel | ||||||||||||||||||||
| 86 | 2016 Simon Reinhardt | ||||||||||||||||||||
| 87 | 2017 Andreas K. Huettel | ||||||||||||||||||||
| 88 | 2020 Andreas K. Huettel | ||||||||||||||||||||
| 89 | |||||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||
| 92 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | =cut | ||||||||||||||||||||