line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Sense::Bandwidth; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Sense::Bandwidth::VERSION = '3.900'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the SCPI SENSe:BANDwidth subsystem |
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
2448
|
use v5.20; |
|
4
|
|
|
|
|
16
|
|
6
|
|
|
|
|
|
|
|
7
|
4
|
|
|
4
|
|
29
|
use Moose::Role; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
25
|
|
8
|
4
|
|
|
4
|
|
20615
|
use Lab::Moose::Instrument::Cache; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
30
|
|
9
|
|
|
|
|
|
|
use Lab::Moose::Instrument |
10
|
4
|
|
|
4
|
|
2389
|
qw/validated_channel_getter validated_channel_setter/; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
205
|
|
11
|
4
|
|
|
4
|
|
28
|
use MooseX::Params::Validate; |
|
4
|
|
|
|
|
19
|
|
|
4
|
|
|
|
|
33
|
|
12
|
4
|
|
|
4
|
|
2249
|
use Moose::Util::TypeConstraints qw/enum/; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
36
|
|
13
|
4
|
|
|
4
|
|
1783
|
use Carp; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
226
|
|
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
4
|
|
26
|
use namespace::autoclean; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
24
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
cache sense_bandwidth_resolution => |
19
|
|
|
|
|
|
|
( getter => 'sense_bandwidth_resolution_query' ); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub sense_bandwidth_resolution_query { |
22
|
6
|
|
|
6
|
1
|
3064
|
my ( $self, $channel, %args ) = validated_channel_getter( \@_ ); |
23
|
|
|
|
|
|
|
|
24
|
6
|
|
|
|
|
32
|
return $self->cached_sense_bandwidth_resolution( |
25
|
|
|
|
|
|
|
$self->query( command => "SENS${channel}:BAND?", %args ) ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub sense_bandwidth_resolution { |
29
|
6
|
|
|
6
|
1
|
18002
|
my ( $self, $channel, $value, %args ) = validated_channel_setter( |
30
|
|
|
|
|
|
|
\@_, |
31
|
|
|
|
|
|
|
value => { isa => 'Num' } |
32
|
|
|
|
|
|
|
); |
33
|
6
|
|
|
|
|
88
|
$self->write( |
34
|
|
|
|
|
|
|
command => sprintf( "SENS%s:BAND %.17g", $channel, $value ), |
35
|
|
|
|
|
|
|
%args |
36
|
|
|
|
|
|
|
); |
37
|
6
|
|
|
|
|
49
|
$self->cached_sense_bandwidth_resolution($value); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
cache sense_bandwidth_video => ( getter => 'sense_bandwidth_video_query' ); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub sense_bandwidth_video_query { |
44
|
0
|
|
|
0
|
1
|
0
|
my ( $self, $channel, %args ) = validated_channel_getter( \@_ ); |
45
|
|
|
|
|
|
|
|
46
|
0
|
|
|
|
|
0
|
return $self->cached_sense_bandwidth_video( |
47
|
|
|
|
|
|
|
$self->query( command => "SENS${channel}:BAND:VIDEO?", %args ) ); |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub sense_bandwidth_video { |
51
|
0
|
|
|
0
|
1
|
0
|
my ( $self, $channel, $value, %args ) = validated_channel_setter( |
52
|
|
|
|
|
|
|
\@_, |
53
|
|
|
|
|
|
|
value => { isa => 'Num' } |
54
|
|
|
|
|
|
|
); |
55
|
0
|
|
|
|
|
0
|
$self->write( |
56
|
|
|
|
|
|
|
command => sprintf( "SENS%s:BAND:VIDEO %.17g", $channel, $value ), |
57
|
|
|
|
|
|
|
%args |
58
|
|
|
|
|
|
|
); |
59
|
0
|
|
|
|
|
0
|
$self->cached_sense_bandwidth_video($value); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
cache sense_bandwidth_resolution_select => |
64
|
|
|
|
|
|
|
( getter => 'sense_bandwidth_resolution_select_query' ); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub sense_bandwidth_resolution_select_query { |
67
|
3
|
|
|
3
|
1
|
2404
|
my ( $self, $channel, %args ) = validated_channel_getter( \@_ ); |
68
|
|
|
|
|
|
|
|
69
|
3
|
|
|
|
|
25
|
return $self->cached_sense_bandwidth_resolution( |
70
|
|
|
|
|
|
|
$self->query( command => "SENS${channel}:BAND:SEL?", %args ) ); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
sub sense_bandwidth_resolution_select { |
74
|
3
|
|
|
3
|
1
|
5967
|
my ( $self, $channel, $value, %args ) = validated_channel_setter( |
75
|
|
|
|
|
|
|
\@_, |
76
|
|
|
|
|
|
|
value => { isa => enum( [qw/NORM HIGH/] ) } |
77
|
|
|
|
|
|
|
); |
78
|
|
|
|
|
|
|
|
79
|
3
|
|
|
|
|
26
|
$self->write( |
80
|
|
|
|
|
|
|
command => sprintf( "SENS%s:BAND:SEL %s", $channel, $value ), %args ); |
81
|
3
|
|
|
|
|
19
|
$self->cached_sense_bandwidth_resolution_select($value); |
82
|
|
|
|
|
|
|
} |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
1; |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
__END__ |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=pod |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=encoding UTF-8 |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 NAME |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Sense::Bandwidth - Role for the SCPI SENSe:BANDwidth subsystem |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 VERSION |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
version 3.900 |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=head1 METHODS |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 sense_bandwidth_resolution_query |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head2 sense_bandwidth_resolution |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Query/Set the bandwidth resolution (in Hz). |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=head2 sense_bandwidth_video_query |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 sense_bandwidth_video |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Query/Set the video bandwidth (in Hz). |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head2 sense_bandwidth_resolution_select_query |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 sense_bandwidth_resolution_select |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Query/Set selectivity of IF filter. Can be NORM or HIGH. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Used by R&S VNAs. |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Copyright 2017 Andreas K. Huettel, Simon Reinhardt |
127
|
|
|
|
|
|
|
2018 Eugeniy E. Mikhailov |
128
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
132
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=cut |