line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Sense::Null; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Sense::Null::VERSION = '3.900'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the HP/Agilent/Keysight SCPI SENSe:$function:NULL subsystem |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1174
|
use v5.20; |
|
2
|
|
|
|
|
10
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
16
|
use Moose::Role; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
15
|
|
8
|
2
|
|
|
2
|
|
10254
|
use Lab::Moose::Instrument::Cache; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
21
|
|
9
|
2
|
|
|
2
|
|
1194
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
107
|
|
10
|
2
|
|
|
2
|
|
12
|
use Moose::Util::TypeConstraints 'enum'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
19
|
|
11
|
2
|
|
|
2
|
|
896
|
use Carp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
130
|
|
12
|
2
|
|
|
2
|
|
15
|
use namespace::autoclean; |
|
2
|
|
|
|
|
10
|
|
|
2
|
|
|
|
|
19
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
requires 'cached_sense_function'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
cache sense_null_state => ( getter => 'sense_null_state_query' ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub sense_null_state_query { |
20
|
3
|
|
|
3
|
1
|
1625
|
my ( $self, %args ) = validated_getter( \@_ ); |
21
|
|
|
|
|
|
|
|
22
|
3
|
|
|
|
|
1573
|
my $func = $self->cached_sense_function(); |
23
|
3
|
|
|
|
|
15
|
return $self->cached_sense_null_state( |
24
|
|
|
|
|
|
|
$self->query( command => "SENS:$func:NULL:STAT?", %args ) ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub sense_null_state { |
28
|
3
|
|
|
3
|
1
|
5763
|
my ( $self, $value, %args ) = validated_setter( |
29
|
|
|
|
|
|
|
\@_, |
30
|
|
|
|
|
|
|
value => { isa => enum( [ 0, 1 ] ) }, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
14
|
my $func = $self->cached_sense_function(); |
34
|
3
|
|
|
|
|
19
|
$self->write( command => "SENS:$func:NULL:STATE $value", %args ); |
35
|
|
|
|
|
|
|
|
36
|
3
|
|
|
|
|
18
|
$self->cached_sense_null_state($value); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
cache sense_null_value => ( getter => 'sense_null_value_query' ); |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
sub sense_null_value_query { |
43
|
3
|
|
|
3
|
1
|
1625
|
my ( $self, %args ) = validated_getter( \@_ ); |
44
|
|
|
|
|
|
|
|
45
|
3
|
|
|
|
|
1573
|
my $func = $self->cached_sense_function(); |
46
|
|
|
|
|
|
|
|
47
|
3
|
|
|
|
|
18
|
return $self->cached_sense_null_value( |
48
|
|
|
|
|
|
|
$self->query( command => "SENS:$func:NULL:VAL?", %args ) ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub sense_null_value { |
52
|
3
|
|
|
3
|
1
|
6083
|
my ( $self, $value, %args ) = validated_setter( |
53
|
|
|
|
|
|
|
\@_, |
54
|
|
|
|
|
|
|
value => { isa => 'Num' }, |
55
|
|
|
|
|
|
|
); |
56
|
|
|
|
|
|
|
|
57
|
3
|
|
|
|
|
14
|
my $func = $self->cached_sense_function(); |
58
|
|
|
|
|
|
|
|
59
|
3
|
|
|
|
|
19
|
$self->write( command => "SENS:$func:NULL:VAL $value", %args ); |
60
|
|
|
|
|
|
|
|
61
|
3
|
|
|
|
|
17
|
$self->cached_sense_null_value($value); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__END__ |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=pod |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=encoding UTF-8 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 NAME |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Sense::Null - Role for the HP/Agilent/Keysight SCPI SENSe:$function:NULL subsystem |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=head1 VERSION |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
version 3.900 |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 METHODS |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 sense_null_state_query |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 sense_null_state |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
$self->sense_null_state(value => 1); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Query/Set state of null function. |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head1 METHODS |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head2 sense_null_value_query |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 sense_null_value |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
$self->sense_null_value(value => 0.12345); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Query/Set state of null function. |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Copyright 2018 Simon Reinhardt |
105
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
109
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |