line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::RS_ZVM; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::RS_ZVM::VERSION = '3.900'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Rohde & Schwarz ZVM Vector Network Analyzer |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
4465
|
use v5.20; |
|
2
|
|
|
|
|
9
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
11
|
use Moose; |
|
2
|
|
|
|
|
80
|
|
|
2
|
|
|
|
|
19
|
|
8
|
2
|
|
|
2
|
|
13908
|
use Moose::Util::TypeConstraints; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
18
|
|
9
|
2
|
|
|
2
|
|
4666
|
use MooseX::Params::Validate; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
21
|
|
10
|
2
|
|
|
2
|
|
927
|
use Lab::Moose::Instrument qw/getter_params timeout_param validated_getter validated_setter/; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
150
|
|
11
|
2
|
|
|
2
|
|
20
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
113
|
|
12
|
2
|
|
|
2
|
|
25
|
use Config; |
|
2
|
|
|
|
|
14
|
|
|
2
|
|
|
|
|
105
|
|
13
|
2
|
|
|
2
|
|
14
|
use namespace::autoclean; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
15
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
extends 'Lab::Moose::Instrument'; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
with 'Lab::Moose::Instrument::SCPI::Format' => { |
18
|
|
|
|
|
|
|
-excludes => [qw/format_border format_border_query/], |
19
|
|
|
|
|
|
|
}, |
20
|
|
|
|
|
|
|
qw( |
21
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Sense::Function |
22
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Source::Power |
23
|
|
|
|
|
|
|
Lab::Moose::Instrument::VNASweep |
24
|
|
|
|
|
|
|
); |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub BUILD { |
27
|
1
|
|
|
1
|
0
|
29
|
my $self = shift; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
#$self->clear(); |
30
|
|
|
|
|
|
|
#$self->cls(timeout => 5); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub cached_format_data_builder { |
34
|
1
|
|
|
1
|
0
|
4
|
my $self = shift; |
35
|
1
|
|
|
|
|
7
|
return $self->format_data_query( timeout => 3 ); |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub sparam_catalog { |
39
|
4
|
|
|
4
|
0
|
16
|
my $self = shift; |
40
|
4
|
|
|
|
|
19
|
my $function = $self->cached_sense_function(); |
41
|
|
|
|
|
|
|
|
42
|
4
|
50
|
|
|
|
28
|
if ( $function !~ /(?<sparam>S[12]{2})/ ) { |
43
|
0
|
|
|
|
|
0
|
croak "no S-parameter selected"; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
4
|
|
|
1
|
|
39
|
my $sparam = $+{sparam}; |
|
1
|
|
|
|
|
723
|
|
|
1
|
|
|
|
|
481
|
|
|
1
|
|
|
|
|
329
|
|
47
|
|
|
|
|
|
|
|
48
|
4
|
|
|
|
|
28
|
return [ "Re($sparam)", "Im($sparam)" ]; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub trace_data_response_all { |
52
|
3
|
|
|
3
|
0
|
12
|
my ( $self, %args ) = validated_hash( |
53
|
|
|
|
|
|
|
\@_, |
54
|
|
|
|
|
|
|
getter_params(), |
55
|
|
|
|
|
|
|
trace => { isa => 'Str' }, |
56
|
|
|
|
|
|
|
); |
57
|
|
|
|
|
|
|
|
58
|
3
|
|
|
|
|
1645
|
my $trace = delete $args{trace}; |
59
|
|
|
|
|
|
|
|
60
|
3
|
|
|
|
|
17
|
return $self->binary_query( |
61
|
|
|
|
|
|
|
command => "TRAC:DATA:RESP:ALL? $trace", |
62
|
|
|
|
|
|
|
%args |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub sparam_sweep_data { |
67
|
3
|
|
|
3
|
0
|
13
|
my ( $self, %args ) = validated_getter( \@_ ); |
68
|
|
|
|
|
|
|
|
69
|
3
|
|
|
|
|
2038
|
my $channel = $self->cached_instrument_nselect(); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# Start single sweep. |
72
|
3
|
|
|
|
|
14
|
$self->initiate_immediate(); |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# Wait until single sweep is finished. |
75
|
3
|
|
|
|
|
21
|
$self->wai(); |
76
|
3
|
|
|
|
|
20
|
return $self->trace_data_response_all( |
77
|
|
|
|
|
|
|
trace => "CH${channel}DATA", |
78
|
|
|
|
|
|
|
%args |
79
|
|
|
|
|
|
|
); |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub set_power { |
86
|
0
|
|
|
0
|
1
|
0
|
my ( $self, $value, %args ) = validated_setter( \@_ ); |
87
|
0
|
|
|
|
|
0
|
$self->source_power_level_immediate_amplitude( value => $value ); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
sub get_power { |
91
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
92
|
0
|
|
|
|
|
0
|
return $self->source_power_level_immediate_amplitude_query(); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
1; |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
__END__ |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=pod |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=encoding UTF-8 |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 NAME |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Lab::Moose::Instrument::RS_ZVM - Rohde & Schwarz ZVM Vector Network Analyzer |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 VERSION |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
version 3.900 |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SYNOPSIS |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
my $data = $zvm->sparam_sweep(timeout => 10); |
117
|
|
|
|
|
|
|
my $matrix = $data->matrix; |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
=head1 METHODS |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
See L<Lab::Moose::Instrument::VNASweep> for the high-level C<sparam_sweep> and |
122
|
|
|
|
|
|
|
C<sparam_catalog> methods. |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head2 set_power, get_power |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Interface for power sweeps |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Copyright 2016 Simon Reinhardt |
133
|
|
|
|
|
|
|
2017 Andreas K. Huettel, Simon Reinhardt |
134
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
135
|
|
|
|
|
|
|
2023 Andreas K. Huettel |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
139
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=cut |