| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Output::State; |
|
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Output::State::VERSION = '3.900'; |
|
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the SCPI OUTPut:STATe subsystem |
|
4
|
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
2145
|
use v5.20; |
|
|
3
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
20
|
use Moose::Role; |
|
|
3
|
|
|
|
|
6
|
|
|
|
3
|
|
|
|
|
27
|
|
|
8
|
3
|
|
|
3
|
|
16929
|
use Moose::Util::TypeConstraints 'enum'; |
|
|
3
|
|
|
|
|
13
|
|
|
|
3
|
|
|
|
|
30
|
|
|
9
|
3
|
|
|
3
|
|
1402
|
use Lab::Moose::Instrument::Cache; |
|
|
3
|
|
|
|
|
10
|
|
|
|
3
|
|
|
|
|
67
|
|
|
10
|
3
|
|
|
3
|
|
1908
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
|
3
|
|
|
|
|
14
|
|
|
|
3
|
|
|
|
|
213
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
3
|
|
|
3
|
|
27
|
use namespace::autoclean; |
|
|
3
|
|
|
|
|
9
|
|
|
|
3
|
|
|
|
|
36
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
cache output_state => ( getter => 'output_state_query' ); |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub output_state_query { |
|
18
|
0
|
|
|
0
|
1
|
|
my ( $self, %args ) = validated_getter( \@_ ); |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
return $self->cached_output_state( |
|
21
|
|
|
|
|
|
|
$self->query( command => "OUTP:STAT?", %args ) ); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub output_state { |
|
25
|
0
|
|
|
0
|
1
|
|
my ( $self, $value, %args ) = validated_setter( |
|
26
|
|
|
|
|
|
|
\@_, |
|
27
|
|
|
|
|
|
|
value => { isa => enum( [qw/ON OFF/] ) } |
|
28
|
|
|
|
|
|
|
); |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$self->write( command => "OUTP:STAT $value", %args ); |
|
31
|
0
|
|
|
|
|
|
$self->cached_output_state($value); |
|
32
|
|
|
|
|
|
|
} |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__END__ |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=pod |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=encoding UTF-8 |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 NAME |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Output::State - Role for the SCPI OUTPut:STATe subsystem |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 VERSION |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
version 3.900 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 METHODS |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head2 output_state_query |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head2 output_state |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
$self->output_state(value => 'ON'); |
|
57
|
|
|
|
|
|
|
$self->output_state(value => 'OFF'); |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Query/Set whether output is on or off. Allowed values: C<ON, OFF>. |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Copyright 2017 Simon Reinhardt |
|
66
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
70
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |