Moose/Instrument/Lakeshore350.pm

filter: Statementstmt 17.0% 30 / 176 Branchbran n/a Conditioncond 0.0% 0 / 33 MC/DCmcdc 0.0% 0 / 22 Subroutinesub 15.2% 7 / 46 Podpod 94.8% 37 / 39 totaltotal 23.4% 74 / 316 CC 12 SCAR 12.3
CC
12
Cov
14%
get_T
6.0
get_sensor_units_reading
6.0
get_setpoint
6.0
CRAP 3.4
« Moose/Instrument/Lakeshore340/Helium3.pm ↑ Summary Moose/Sweep/Step/Frequency.pm »
1 package Lab::Moose::Instrument::Lakeshore350;
2 1 $Lab::Moose::Instrument::Lakeshore350::VERSION = '3.931';
3 #ABSTRACT: Lakeshore Model 350 Temperature Controller
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 Moose::Util::TypeConstraints qw/enum/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use MooseX::Params::Validate;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Lab::Moose::Instrument qw/
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 validated_getter validated_setter setter_params /;
12 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 extends 'Lab::Moose::Instrument';
16  
17 1 with qw(
18 Lab::Moose::Instrument::Common
19 );
20  
21 1 has input_channel => (
22 is => 'ro',
23 isa => enum( [qw/A B C D/] ),
24 default => 'A',
25 );
26  
27 1 has default_loop => (
28 is => 'ro',
29 isa => enum( [ 1, 2, 3, 4 ] ),
30 default => 1,
31 );
32  
33 0 ▶sub BUILD {
Subroutine BUILD: not called CC=1 SCAR=6.9
Pod undocumented
34 0 my $self = shift;
35 0 $self->clear();
36 0 $self->cls();
37 }
38  
39 1 my %channel_arg
40 = ( channel => { isa => enum( [qw/ A B C D/] ), optional => 1 } );
41 1 my %loop_arg = ( loop => { isa => enum( [ 1, 2, 3, 4 ] ), optional => 1 } );
42 1 my %output_arg = ( output => { isa => enum( [ 1, 2, 3, 4 ] ) } );
43  
44  
45 0 ▶sub get_T {
Subroutine get_T: not called CC=2 SCAR=17.9
Pod documented
46 0 my ( $self, %args ) = validated_getter(
47 \@_,
48 %channel_arg
49 );
50 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
51 0 return $self->query( command => "KRDG? $channel", %args );
52 }
53  
54 0 ▶sub get_value {
Subroutine get_value: not called CC=1 SCAR=6.9
Pod documented
55 0 my $self = shift;
56 0 return $self->get_T(@_);
57 }
58  
59  
60 0 ▶sub get_sensor_units_reading {
Subroutine get_sensor_units_reading: not called CC=2 SCAR=17.9
Pod documented
61 0 my ( $self, %args ) = validated_getter(
62 \@_,
63 %channel_arg
64 );
65 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
66 0 return $self->query( command => "SRDG? $channel", %args );
67 }
68  
69  
70 0 ▶sub get_setpoint {
Subroutine get_setpoint: not called CC=2 SCAR=17.9
Pod documented
71 0 my ( $self, %args ) = validated_getter(
72 \@_,
73 %loop_arg
74 );
75 0 ▶ my $loop = delete $args{loop} // $self->default_loop;
Condition0%0/3
delete $args{"loop"} // $self->default_loop
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"} $self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
ABresult
1X1
011
000
76 0 return $self->query( command => "SETP? $loop", %args );
77 }
78  
79 0 ▶sub set_setpoint {
Subroutine set_setpoint: not called CC=2 SCAR=17.9
Pod documented
80 0 my ( $self, $value, %args ) = validated_setter(
81 \@_,
82 %loop_arg
83 );
84 0 ▶ my $loop = delete $args{loop} // $self->default_loop;
Condition0%0/3
delete $args{"loop"} // $self->default_loop
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"loop"} // $self->default_loop
delete $args{"loop"} $self->default_loop
Truth table0%0/3
A // B
A= delete $args{"loop"}B= $self->default_loop
ABresult
1X1
011
000
85  
86 # Device bug. The 340 cannot parse values with too many digits.
87 0 $value = sprintf( "%.6G", $value );
88 0 $self->write( command => "SETP $loop,$value", %args );
89 }
90  
91  
92 0 ▶sub set_T {
Subroutine set_T: not called CC=1 SCAR=6.9
Pod documented
93 0 my $self = shift;
94 0 $self->set_setpoint(@_);
95 }
96  
97  
98 0 ▶sub set_heater_range {
Subroutine set_heater_range: not called CC=1 SCAR=6.9
Pod documented
99 0 my ( $self, $value, %args ) = validated_setter(
100 \@_,
101 %output_arg,
102 value => { isa => enum( [ 0 .. 5 ] ) }
103 );
104 0 my $output = delete $args{output};
105 0 $self->write( command => "RANGE $output, $value", %args );
106 }
107  
108 0 ▶sub get_heater_range {
Subroutine get_heater_range: not called CC=1 SCAR=6.9
Pod documented
109 0 my ( $self, %args ) = validated_getter(
110 \@_,
111 %output_arg,
112 );
113 0 my $output = delete $args{output};
114 0 return $self->query( command => "RANGE? $output", %args );
115 }
116  
117  
118 0 ▶sub set_heater_setup {
Subroutine set_heater_setup: not called CC=1 SCAR=6.9
Pod documented
119 0 my ( $self, %args ) = validated_getter(
120 \@_,
121 output => { isa => enum( [ 1, 2 ] ) },
122 resistance => { isa => 'Lab::Moose::PosNum' },
123 max_current => { isa => enum( [ 0, 1, 2, 3, 4 ] ) },
124 max_user_current => { isa => 'Lab::Moose::PosNum' },
125 display => { isa => enum( [ 0, 1 ] ) },
126 );
127 my ( $output, $resistance, $max_current, $max_user_current, $display )
128 = delete @args{
129 0 qw/output resistance max_current max_user_current display/};
130 0 $self->write(
131 command =>
132 "HTRSET $output, $resistance, $max_current, $max_user_current, $display",
133 %args
134 );
135 }
136  
137 0 ▶sub get_heater_setup {
Subroutine get_heater_setup: not called CC=1 SCAR=6.9
Pod documented
138 0 my ( $self, %args ) = validated_getter(
139 \@_,
140 output => { isa => enum( [ 1, 2 ] ) },
141 );
142 0 my $output = delete $args{output};
143 0 my $rv = $self->query( command => "HTRSET? $output", %args );
144 0 my %htr;
145 0 @htr{qw/resistance max_current max_user_current display/} = split ',',
146 $rv;
147 0 return %htr;
148 }
149  
150  
151 0 ▶sub get_sample_heater_output {
Subroutine get_sample_heater_output: not called CC=1 SCAR=6.9
Pod undocumented
152 0 my ( $self, %args ) = validated_getter(
153 \@_,
154 output => { isa => enum( [ 1, 2 ] ) },
155 );
156 0 my $output = delete $args{output};
157 0 return $self->query( command => "HTR? $output", %args );
158 }
159  
160  
161 0 ▶sub set_outmode {
Subroutine set_outmode: not called CC=2 SCAR=17.9
Pod documented
162 0 my ( $self, %args ) = validated_getter(
163 \@_,
164 %output_arg,
165 mode => { isa => enum( [ 0 .. 5 ] ) },
166 %channel_arg,
167 powerup_enable => { isa => enum( [ 0, 1 ] ), default => 0 },
168 );
169 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
170 my ( $output, $mode, $powerup_enable )
171 0 = delete @args{qw/output mode powerup_enable/};
172 0 $self->write(
173 command => "OUTMODE $output, $mode, $channel, $powerup_enable",
174 %args
175 );
176 }
177  
178 0 ▶sub get_outmode {
Subroutine get_outmode: not called CC=1 SCAR=6.9
Pod documented
179 0 my ( $self, %args ) = validated_getter(
180 \@_,
181 %output_arg,
182 );
183 0 my $output = delete $args{output};
184 0 my $rv = $self->query( command => "OUTMODE? $output", %args );
185 0 my @rv = split /,/, $rv;
186 0 return ( mode => $rv[0], channel => $rv[1], powerup_enable => $rv[2] );
187 }
188  
189  
190 0 ▶sub set_input_curve {
Subroutine set_input_curve: not called CC=2 SCAR=17.9
Pod documented
191 0 my ( $self, $value, %args ) = validated_setter(
192 \@_,
193 %channel_arg,
194 value => { isa => enum( [ 0 .. 59 ] ) },
195 );
196 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
197 0 $self->write( command => "INCRV $channel,$value", %args );
198 }
199  
200 0 ▶sub get_input_curve {
Subroutine get_input_curve: not called CC=2 SCAR=17.9
Pod documented
201 0 my ( $self, %args ) = validated_getter(
202 \@_,
203 %channel_arg,
204 );
205 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
206 0 return $self->query( command => "INCRV? $channel", %args );
207 }
208  
209  
210 0 ▶sub set_remote_mode {
Subroutine set_remote_mode: not called CC=1 SCAR=6.9
Pod documented
211 0 my ( $self, $value, %args )
212 = validated_setter( \@_, value => { isa => enum( [ 0 .. 2 ] ) } );
213 0 $self->write( command => "MODE $value", %args );
214 }
215  
216 0 ▶sub get_remote_mode {
Subroutine get_remote_mode: not called CC=1 SCAR=6.9
Pod documented
217 0 my ( $self, %args ) = validated_getter( \@_ );
218 0 return $self->query( command => "MODE?", %args );
219 }
220  
221  
222 0 ▶sub set_pid {
Subroutine set_pid: not called CC=1 SCAR=6.9
Pod documented
223 0 my ( $self, %args ) = validated_getter(
224 \@_,
225 %output_arg,
226 P => { isa => 'Lab::Moose::PosNum' },
227 I => { isa => 'Lab::Moose::PosNum' },
228 D => { isa => 'Lab::Moose::PosNum' }
229 );
230 0 my ( $output, $P, $I, $D ) = delete @args{qw/output P I D/};
231 0 $self->write(
232 command => sprintf( "PID $output, %.1f, %d, %d", $P, $I, $D ),
233 %args
234 );
235 }
236  
237 0 ▶sub get_pid {
Subroutine get_pid: not called CC=1 SCAR=6.9
Pod documented
238 0 my ( $self, %args ) = validated_getter(
239 \@_,
240 %output_arg
241 );
242 0 my $output = delete $args{output};
243 0 my $pid = $self->query( command => "PID? $output", %args );
244 0 my %pid;
245 0 @pid{qw/P I D/} = split /,/, $pid;
246 0 return %pid;
247 }
248  
249  
250 0 ▶sub set_zone {
Subroutine set_zone: not called CC=1 SCAR=6.9
Pod documented
251 0 my ( $self, %args ) = validated_getter(
252 \@_,
253 %output_arg,
254 zone => { isa => enum( [ 1 .. 10 ] ) },
255 top => { isa => 'Lab::Moose::PosNum' },
256 P => { isa => 'Lab::Moose::PosNum' },
257 I => { isa => 'Lab::Moose::PosNum' },
258 D => { isa => 'Lab::Moose::PosNum' },
259 mout => { isa => 'Lab::Moose::PosNum', default => 0 },
260 range => { isa => enum( [ 0 .. 3 ] ) },
261 input => { isa => enum( [ 0 .. 8 ] ) },
262 rate => { isa => 'Lab::Moose::PosNum' },
263 );
264 my ( $output, $zone, $top, $P, $I, $D, $mout, $range, $input, $rate )
265 0 = delete @args{qw/output zone top P I D mout range input rate/};
266  
267 0 $self->write(
268 command => sprintf(
269 "ZONE $output, $zone, %.6G, %.1f, %.1f, %d, $mout, $range, $input, $rate",
270 $top, $P, $I, $D
271 ),
272 %args
273 );
274 }
275  
276 0 ▶sub get_zone {
Subroutine get_zone: not called CC=1 SCAR=6.9
Pod documented
277 0 my ( $self, %args ) = validated_getter(
278 \@_,
279 %output_arg,
280 zone => { isa => enum( [ 1 .. 10 ] ) }
281 );
282 0 my $output = delete $args{output};
283 0 my $zone = delete $args{zone};
284 0 my $result = $self->query( command => "ZONE? $output, $zone", %args );
285 0 my %zone;
286 0 @zone{qw/top P I D mout range input rate/} = split /,/, $result;
287 0 return %zone;
288 }
289  
290 # =head2 set_filter/get_filter
291  
292 # $lakeshore->set_filter(
293 # channel => 5,
294 # on => 1,
295 # settle_time => 1, # (1s..200s)
296 # window => 2, # % 2 percent of full scale window (1% ... 80%)
297 # );
298  
299 # my %filter = $lakeshore->get_filter(channel => 5);
300  
301 # =cut
302  
303 # sub set_filter {
304 # my ( $self, %args ) = validated_getter(
305 # \@_,
306 # %channel_arg,
307 # on => { isa => enum( [ 0, 1 ] ) },
308 # settle_time => { isa => enum( [ 1 .. 200 ] ) },
309 # window => { isa => enum( [ 1 .. 80 ] ) }
310 # );
311 # my ( $channel, $on, $settle_time, $window )
312 # = delete @args{qw/channel on settle_time window/};
313 # $channel = $channel // $self->input_channel();
314  
315 # $self->write(
316 # command => "FILTER $channel,$on,$settle_time,$window",
317 # %args
318 # );
319 # }
320  
321 # sub get_filter {
322 # my ( $self, %args ) = validated_getter(
323 # \@_,
324 # %channel_arg,
325 # );
326 # my $channel = delete $args{channel} // $self->input_channel();
327 # my $result = $self->query( command => "FILTER? $channel", %args );
328  
329 # my %filter;
330 # @filter{qw/on settle_time window/} = split /,/, $result;
331 # return %filter;
332 # }
333  
334  
335 0 ▶sub set_mout {
Subroutine set_mout: not called CC=1 SCAR=6.9
Pod documented
336 0 my ( $self, $value, %args ) = validated_setter(
337 \@_,
338 %output_arg,
339 value => { isa => 'Num' }
340 );
341 0 my $output = delete $args{output};
342 0 $self->write( command => "MOUT $output, $value", %args );
343 }
344  
345 0 ▶sub get_mout {
Subroutine get_mout: not called CC=1 SCAR=6.9
Pod documented
346 0 my ( $self, %args ) = validated_getter(
347 \@_,
348 %output_arg,
349 );
350 0 my $output = delete $args{output};
351 0 return $self->query( command => "MOUT? $output" );
352 }
353  
354  
355 0 ▶sub set_intype {
Subroutine set_intype: not called CC=2 SCAR=17.9
Pod documented
356 0 my ( $self, %args ) = validated_getter(
357 \@_,
358 %channel_arg,
359 sensor_type => { isa => enum( [ 0 .. 5 ] ) },
360 autorange => { isa => enum( [ 0, 1 ] ) },
361 range => { isa => enum( [ 1 .. 9 ] ) },
362 compensation => { isa => enum( [ 0, 1 ] ) },
363 units => { isa => enum( [ 1, 2, 3 ] ), default => 1 },
364 sensor_excitation => { isa => enum( [ 0, 1 ] ) }
365 );
366  
367 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
368 my (
369 $sensor_type, $autorange, $range, $compensation, $units,
370 $sensor_excitation
371 )
372 = delete @args{
373 0 qw/sensor_type autorange range compensation units sensor_excitation/};
374 0 $self->write(
375 command =>
376 "INTYPE $channel, $sensor_type, $autorange, $range, $compensation, $units, $sensor_excitation",
377 %args
378 );
379 }
380  
381 0 ▶sub get_intype {
Subroutine get_intype: not called CC=2 SCAR=17.9
Pod documented
382 0 my ( $self, %args ) = validated_getter(
383 \@_,
384 %channel_arg,
385 );
386 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
387 0 my $rv = $self->query( command => "INTYPE? $channel", %args );
388 0 my %intype;
389 @intype{
390 0 qw/sensor_type autorange range compensation units sensor_excitation/}
391 = split /,/,
392 $rv;
393 0 return %intype;
394 }
395  
396  
397 0 ▶sub curve_delete {
Subroutine curve_delete: not called CC=1 SCAR=6.9
Pod documented
398 0 my ( $self, %args ) = validated_getter(
399 \@_,
400 curve => { isa => enum( [ 21 .. 59 ] ) },
401 );
402 0 my $curve = delete $args{curve};
403 0 $self->write( command => "CRVDEL $curve", %args );
404 }
405  
406  
407 0 ▶sub set_curve_header {
Subroutine set_curve_header: not called CC=1 SCAR=6.9
Pod documented
408 0 my ( $self, %args ) = validated_getter(
409 \@_,
410 curve => { isa => enum( [ 21 .. 59 ] ) },
411 name => { isa => 'Str' },
412 SN => { isa => 'Str' },
413 format => { isa => enum( [ 1, 2, 3, 4 ] ) },
414 limit => { isa => 'Lab::Moose::PosNum' },
415 coefficient => { isa => enum( [ 1, 2 ] ) }
416 );
417 my ( $curve, $name, $SN, $format, $limit, $coefficient )
418 0 = delete @args{qw/curve name SN format limit coefficient/};
419 0 $self->write(
420 command => "CRVHDR $curve, $name, $SN, $format, $limit, $coefficient",
421 %args
422 );
423 }
424  
425 0 ▶sub get_curve_header {
Subroutine get_curve_header: not called CC=1 SCAR=6.9
Pod documented
426 0 my ( $self, %args ) = validated_getter(
427 \@_,
428 curve => { isa => enum( [ 1 .. 59 ] ) },
429 );
430 0 my $curve = delete $args{curve};
431 0 my $rv = $self->query( command => "CRVHDR? $curve", %args );
432 0 my %header;
433 0 @header{qw/name SN format limit coefficient/} = split /,/,
434 $rv;
435 0 return %header;
436 }
437  
438  
439 0 ▶sub set_curve_point {
Subroutine set_curve_point: not called CC=1 SCAR=6.9
Pod documented
440 0 my ( $self, %args ) = validated_getter(
441 \@_,
442 curve => { isa => enum( [ 21 .. 59 ] ) },
443 index => { isa => enum( [ 1 .. 200 ] ) },
444 units => { isa => 'Num' },
445 temp => { isa => 'Num' },
446 );
447 my ( $curve, $index, $units, $temp )
448 0 = delete @args{qw/curve index units temp/};
449 0 $self->write( command => "CRVPT $curve, $index, $units, $temp", %args );
450 }
451  
452 0 ▶sub get_curve_point {
Subroutine get_curve_point: not called CC=1 SCAR=6.9
Pod documented
453 0 my ( $self, %args ) = validated_getter(
454 \@_,
455 curve => { isa => enum( [ 1 .. 59 ] ) },
456 index => { isa => enum( [ 1 .. 200 ] ) },
457 );
458 0 my $curve = delete $args{curve};
459 0 my $index = delete $args{index};
460 0 my $rv = $self->query( command => "CRVPT? $curve, $index", %args );
461 0 my %point;
462 0 @point{qw/units temp/} = split /,/,
463 $rv;
464 0 return %point;
465 }
466  
467  
468 0 ▶sub set_input_name {
Subroutine set_input_name: not called CC=2 SCAR=17.9
Pod documented
469 0 my ( $self, $value, %args ) = validated_setter(
470 \@_,
471 %channel_arg,
472 );
473 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
474 0 $self->write( command => "INNAME $channel, $value", %args );
475 }
476  
477 0 ▶sub get_input_name {
Subroutine get_input_name: not called CC=2 SCAR=17.9
Pod documented
478 0 my ( $self, %args ) = validated_getter(
479 \@_,
480 %channel_arg,
481 );
482 0 ▶ my $channel = delete $args{channel} // $self->input_channel();
Condition0%0/3
delete $args{"channel"} // $self->input_channel
l!l&&r!l&&!r
000
MC/DC0%0/2
delete $args{"channel"} // $self->input_channel
delete $args{"channel"} $self->input_channel
Truth table0%0/3
A // B
A= delete $args{"channel"}B= $self->input_channel
ABresult
1X1
011
000
483 0 return $self->query( command => "INNAME? $channel", %args );
484 }
485  
486  
487 0 ▶sub set_ramp {
Subroutine set_ramp: not called CC=1 SCAR=6.9
Pod documented
488 0 my ( $self, %args ) = validated_getter(
489 \@_,
490 %output_arg,
491 rate => { isa => 'Lab::Moose::PosNum' },
492 on => { isa => enum( [ 0, 1 ] ) },
493 );
494 0 my $output = delete $args{output};
495 0 my $rate = delete $args{rate};
496 0 my $on = delete $args{on};
497 0 $self->write( command => "RAMP $output, $on, $rate", %args );
498 }
499  
500 0 ▶sub get_ramp {
Subroutine get_ramp: not called CC=1 SCAR=6.9
Pod documented
501 0 my ( $self, %args ) = validated_getter(
502 \@_,
503 %output_arg,
504 );
505 0 my $output = delete $args{output};
506 0 my $rv = $self->query( command => "RAMP? $output", %args );
507 0 my %ramp;
508 0 @ramp{qw/on rate/} = split ',', $rv;
509 0 return %ramp;
510 }
511  
512  
513 0 ▶sub set_display_field {
Subroutine set_display_field: not called CC=1 SCAR=6.9
Pod documented
514 0 my ( $self, %args ) = validated_getter(
515 \@_,
516 field => { isa => enum( [ 1 .. 8 ] ) },
517 input => { isa => enum( [ 0 .. 8 ] ) },
518 units => { isa => enum( [ 1 .. 5 ] ) },
519 );
520 0 my ( $field, $input, $units ) = delete @args{qw/field input units/};
521 0 $self->write( command => "DISPFLD $field, $input, $units", %args );
522 }
523  
524 0 ▶sub get_display_field {
Subroutine get_display_field: not called CC=1 SCAR=6.9
Pod documented
525 0 my ( $self, %args ) = validated_getter(
526 \@_,
527 field => { isa => enum( [ 1 .. 8 ] ) }
528 );
529 0 my $field = delete $args{field};
530 0 my $rv = $self->query( command => "DISPFLD? $field", %args );
531 0 my ( $input, $units ) = split ',', $rv;
532 0 return ( input => $input, units => $units );
533 }
534  
535  
536 0 ▶sub set_display {
Subroutine set_display: not called CC=1 SCAR=6.9
Pod documented
537 0 my ( $self, %args ) = validated_getter(
538 \@_,
539 mode => { isa => enum( [ 0 .. 10 ] ) },
540 num_fields => { isa => enum( [ 0, 1, 2 ] ) },
541 displayed_info => { isa => enum( [ 1 .. 4 ] ) }
542 );
543 my ( $mode, $num_fields, $displayed_info )
544 0 = delete @args{qw/mode num_fields displayed_info/};
545 0 $self->write(
546 command => "DISPLAY $mode, $num_fields, $displayed_info",
547 %args
548 );
549 }
550  
551 0 ▶sub get_display {
Subroutine get_display: not called CC=1 SCAR=6.9
Pod documented
552 0 my ( $self, %args ) = validated_getter( \@_ );
553 0 my $rv = $self->query( command => "DISPLAY?", %args );
554 0 my ( $mode, $num_fields, $displayed_info ) = split ',', $rv;
555 return (
556 0 mode => $mode, num_fields => $num_fields,
557 displayed_info => $displayed_info
558 );
559 }
560  
561  
562 1 __PACKAGE__->meta()->make_immutable();
563  
564 1 1;
565  
566 __END__
« Moose/Instrument/Lakeshore340/Helium3.pm ↑ Summary Moose/Sweep/Step/Frequency.pm »