line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Sense::Impedance; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Sense::Impedance::VERSION = '3.881'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the HP/Agilent/Keysight SCPI SENSe:$function:IMPedance subsystem |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1535
|
use v5.20; |
|
2
|
|
|
|
|
8
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
13
|
use Moose::Role; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
20
|
|
8
|
2
|
|
|
2
|
|
10843
|
use Lab::Moose::Instrument::Cache; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
15
|
|
9
|
2
|
|
|
2
|
|
1333
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
128
|
|
10
|
2
|
|
|
2
|
|
14
|
use Moose::Util::TypeConstraints 'enum'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
16
|
|
11
|
2
|
|
|
2
|
|
937
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
117
|
|
12
|
2
|
|
|
2
|
|
16
|
use namespace::autoclean; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
11
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires 'cached_sense_function'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
cache sense_impedance_auto => ( getter => 'sense_impedance_auto_query' ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub sense_impedance_auto_query { |
20
|
3
|
|
|
3
|
1
|
1422
|
my ( $self, %args ) = validated_getter( \@_ ); |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
1536
|
my $func = $self->cached_sense_function(); |
23
|
3
|
50
|
|
|
|
14
|
if ( $func ne 'VOLT' ) { |
24
|
0
|
|
|
|
|
0
|
croak "query impedance with function $func"; |
25
|
|
|
|
|
|
|
} |
26
|
3
|
|
|
|
|
14
|
return $self->cached_sense_impedance_auto( |
27
|
|
|
|
|
|
|
$self->query( command => "SENS:$func:IMP:AUTO?", %args ) ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub sense_impedance_auto { |
31
|
3
|
|
|
3
|
1
|
3065
|
my ( $self, $value, %args ) = validated_setter( |
32
|
|
|
|
|
|
|
\@_, |
33
|
|
|
|
|
|
|
value => { isa => enum( [ 0, 1 ] ) }, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
3
|
|
|
|
|
17
|
my $func = $self->cached_sense_function(); |
37
|
3
|
50
|
|
|
|
13
|
if ( $func ne 'VOLT' ) { |
38
|
0
|
|
|
|
|
0
|
croak "query impedance with function $func"; |
39
|
|
|
|
|
|
|
} |
40
|
3
|
|
|
|
|
20
|
$self->write( command => "SENS:$func:IMP:AUTO $value", %args ); |
41
|
|
|
|
|
|
|
|
42
|
3
|
|
|
|
|
14
|
$self->cached_sense_impedance_auto($value); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Sense::Impedance - Role for the HP/Agilent/Keysight SCPI SENSe:$function:IMPedance subsystem |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 3.881 |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 METHODS |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 sense_impedance_auto_query |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 sense_impedance_auto |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
$self->sense_impedance_auto(value => 1); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Query/Set input impedance mode. Allowed values: '0' or '1'. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Copyright 2018 Simon Reinhardt |
76
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
80
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |