line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Source::Range; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Source::Range::VERSION = '3.900'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the SCPI SOURce:RANGe subsystem. |
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
3853
|
use v5.20; |
|
6
|
|
|
|
|
31
|
|
6
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
48
|
use Moose::Role; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
44
|
|
8
|
6
|
|
|
6
|
|
31285
|
use Moose::Util::TypeConstraints 'enum'; |
|
6
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
420
|
|
9
|
6
|
|
|
6
|
|
2674
|
use Lab::Moose::Instrument::Cache; |
|
6
|
|
|
|
|
18
|
|
|
6
|
|
|
|
|
50
|
|
10
|
6
|
|
|
6
|
|
3627
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
6
|
|
|
|
|
21
|
|
|
6
|
|
|
|
|
347
|
|
11
|
|
|
|
|
|
|
|
12
|
6
|
|
|
6
|
|
42
|
use namespace::autoclean; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
42
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
with 'Lab::Moose::Instrument::SCPI::Source::Function'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
cache source_range => ( getter => 'source_range_query' ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub source_range_query { |
20
|
8
|
|
|
8
|
1
|
4269
|
my ( $self, %args ) = validated_getter( \@_ ); |
21
|
|
|
|
|
|
|
|
22
|
8
|
|
|
|
|
4063
|
my $function = $self->cached_source_function(); |
23
|
8
|
|
|
|
|
38
|
return $self->cached_source_range( |
24
|
|
|
|
|
|
|
$self->query( command => "SOUR:$function:RANG?", %args ) ); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub source_range { |
28
|
10
|
|
|
10
|
1
|
19066
|
my ( $self, $value, %args ) = validated_setter( |
29
|
|
|
|
|
|
|
\@_, |
30
|
|
|
|
|
|
|
); |
31
|
|
|
|
|
|
|
|
32
|
10
|
|
|
|
|
44
|
my $function = $self->cached_source_function(); |
33
|
10
|
|
|
|
|
69
|
$self->write( command => "SOUR:$function:RANG $value", %args ); |
34
|
|
|
|
|
|
|
|
35
|
10
|
|
|
|
|
58
|
$self->cached_source_range($value); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=encoding UTF-8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Source::Range - Role for the SCPI SOURce:RANGe subsystem. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
version 3.900 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 METHODS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 source_range_query |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 source_range |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
$self->source_range(value => '0.001'); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Query/Set the output range. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright 2017-2018 Simon Reinhardt |
69
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
73
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |