| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Source::Level; |
|
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Source::Level::VERSION = '3.881'; |
|
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the SCPI SOURce:(CURRent|VOLTage):Level commands |
|
4
|
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
3925
|
use v5.20; |
|
|
6
|
|
|
|
|
27
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
53
|
use Moose::Role; |
|
|
6
|
|
|
|
|
15
|
|
|
|
6
|
|
|
|
|
47
|
|
|
8
|
6
|
|
|
6
|
|
31443
|
use Moose::Util::TypeConstraints 'enum'; |
|
|
6
|
|
|
|
|
20
|
|
|
|
6
|
|
|
|
|
63
|
|
|
9
|
6
|
|
|
6
|
|
2731
|
use Lab::Moose::Instrument::Cache; |
|
|
6
|
|
|
|
|
17
|
|
|
|
6
|
|
|
|
|
47
|
|
|
10
|
6
|
|
|
6
|
|
3808
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
|
6
|
|
|
|
|
30
|
|
|
|
6
|
|
|
|
|
363
|
|
|
11
|
6
|
|
|
6
|
|
69
|
use namespace::autoclean; |
|
|
6
|
|
|
|
|
15
|
|
|
|
6
|
|
|
|
|
42
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
with 'Lab::Moose::Instrument::SCPI::Source::Function'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
cache source_level => ( getter => 'source_level_query' ); |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub source_level_query { |
|
19
|
25
|
|
|
25
|
1
|
2792
|
my ( $self, %args ) = validated_getter( \@_ ); |
|
20
|
|
|
|
|
|
|
|
|
21
|
25
|
|
|
|
|
15302
|
my $function = $self->cached_source_function(); |
|
22
|
|
|
|
|
|
|
|
|
23
|
25
|
|
|
|
|
150
|
return $self->cached_source_level( |
|
24
|
|
|
|
|
|
|
$self->query( command => "SOUR:$function:LEV?", %args ) ); |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub source_level { |
|
28
|
206
|
|
|
206
|
1
|
12173
|
my ( $self, $value, %args ) = validated_setter( |
|
29
|
|
|
|
|
|
|
\@_, |
|
30
|
|
|
|
|
|
|
value => { isa => 'Num' } |
|
31
|
|
|
|
|
|
|
); |
|
32
|
|
|
|
|
|
|
|
|
33
|
206
|
|
|
|
|
901
|
my $function = $self->cached_source_function(); |
|
34
|
|
|
|
|
|
|
|
|
35
|
206
|
|
|
|
|
2429
|
$self->write( |
|
36
|
|
|
|
|
|
|
command => sprintf( "SOUR:$function:LEV %.15g", $value ), |
|
37
|
|
|
|
|
|
|
%args |
|
38
|
|
|
|
|
|
|
); |
|
39
|
206
|
|
|
|
|
915
|
$self->cached_source_level($value); |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__END__ |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=pod |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=encoding UTF-8 |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 NAME |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Source::Level - Role for the SCPI SOURce:(CURRent|VOLTage):Level commands |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 VERSION |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
version 3.881 |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 METHODS |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 source_level_query |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head2 source_level |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$self->source_level(value => '0.001'); |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Query/Set the output level. |
|
67
|
|
|
|
|
|
|
The type of output signal is determined with the SCPI::Source::Function role. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Copyright 2017 Simon Reinhardt |
|
74
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
78
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |