line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::RS_ZVA; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::RS_ZVA::VERSION = '3.900'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Rohde & Schwarz ZVA Vector Network Analyzer |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1172
|
use v5.20; |
|
2
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
12
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
15
|
|
8
|
2
|
|
|
2
|
|
14183
|
use Moose::Util::TypeConstraints; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
23
|
|
9
|
2
|
|
|
2
|
|
4619
|
use MooseX::Params::Validate; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
18
|
|
10
|
|
|
|
|
|
|
use Lab::Moose::Instrument |
11
|
2
|
|
|
2
|
|
964
|
qw/validated_getter validated_setter validated_channel_getter validated_channel_setter /; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
132
|
|
12
|
2
|
|
|
2
|
|
1009
|
use Lab::Moose::Instrument::Cache; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
8
|
|
13
|
2
|
|
|
2
|
|
1233
|
use Carp; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
117
|
|
14
|
2
|
|
|
2
|
|
11
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
8
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
extends 'Lab::Moose::Instrument'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
with qw( |
19
|
|
|
|
|
|
|
Lab::Moose::Instrument::VNASweep |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Output::State |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub BUILD { |
25
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
26
|
1
|
|
|
|
|
10
|
$self->clear(); |
27
|
1
|
|
|
|
|
9
|
$self->cls(); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
cache calculate_data_call_catalog => ( |
31
|
|
|
|
|
|
|
getter => 'calculate_data_call_catalog', |
32
|
|
|
|
|
|
|
isa => 'ArrayRef' |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub calculate_data_call_catalog { |
36
|
1
|
|
|
1
|
0
|
8
|
my ( $self, $channel, %args ) = validated_channel_getter( \@_ ); |
37
|
|
|
|
|
|
|
|
38
|
1
|
|
|
|
|
8
|
my $string |
39
|
|
|
|
|
|
|
= $self->query( command => "CALC${channel}:DATA:CALL:CAT?", %args ); |
40
|
1
|
|
|
|
|
6
|
$string =~ s/'//g; |
41
|
|
|
|
|
|
|
|
42
|
1
|
|
|
|
|
12
|
return $self->cached_calculate_data_call_catalog( |
43
|
|
|
|
|
|
|
[ split ',', $string ] ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub calculate_data_call { |
47
|
3
|
|
|
3
|
0
|
16
|
my ( $self, $channel, %args ) = validated_channel_getter( |
48
|
|
|
|
|
|
|
\@_, |
49
|
|
|
|
|
|
|
format => { isa => 'Str' } # {isa => enum([qw/FDATA SDATA MDATA/])} |
50
|
|
|
|
|
|
|
); |
51
|
|
|
|
|
|
|
|
52
|
3
|
|
|
|
|
11
|
my $format = delete $args{format}; |
53
|
|
|
|
|
|
|
|
54
|
3
|
|
|
|
|
17
|
return $self->binary_query( |
55
|
|
|
|
|
|
|
command => "CALC${channel}:DATA:CALL? $format", |
56
|
|
|
|
|
|
|
%args |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub sparam_catalog { |
62
|
4
|
|
|
4
|
0
|
100172
|
my $self = shift; |
63
|
|
|
|
|
|
|
|
64
|
4
|
|
|
|
|
19
|
my $catalog = $self->cached_calculate_data_call_catalog(); |
65
|
4
|
|
|
|
|
12
|
my @complex_catalog; |
66
|
|
|
|
|
|
|
|
67
|
4
|
|
|
|
|
6
|
for my $sparam ( @{$catalog} ) { |
|
4
|
|
|
|
|
11
|
|
68
|
4
|
|
|
|
|
17
|
push @complex_catalog, "Re($sparam)", "Im($sparam)"; |
69
|
|
|
|
|
|
|
} |
70
|
|
|
|
|
|
|
|
71
|
4
|
|
|
|
|
15
|
return \@complex_catalog; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub sparam_sweep_data { |
75
|
3
|
|
|
3
|
0
|
13
|
my ( $self, %args ) = validated_getter( \@_ ); |
76
|
|
|
|
|
|
|
|
77
|
3
|
|
|
|
|
2111
|
my $byte_order = $self->cached_format_border(); |
78
|
3
|
50
|
|
|
|
15
|
if ( $byte_order ne 'SWAP' ) { |
79
|
0
|
|
|
|
|
0
|
carp 'setting network byteorder to little endian.'; |
80
|
0
|
|
|
|
|
0
|
$self->format_border( value => 'SWAP' ); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# Start single sweep. |
84
|
3
|
|
|
|
|
20
|
$self->initiate_immediate(); |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
# Wait until single sweep is finished. |
87
|
3
|
|
|
|
|
20
|
$self->wai(); |
88
|
|
|
|
|
|
|
|
89
|
3
|
|
|
|
|
17
|
return $self->calculate_data_call( format => 'SDATA', %args ); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
sub set_power { |
95
|
0
|
|
|
0
|
0
|
|
my ( $self, $value, %args ) = validated_setter( \@_ ); |
96
|
0
|
|
|
|
|
|
$self->source_power_level_immediate_amplitude( value => $value ); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub get_power { |
100
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
101
|
0
|
|
|
|
|
|
return $self->source_power_level_immediate_amplitude_query(); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
1; |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
__END__ |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=pod |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=encoding UTF-8 |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=head1 NAME |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
Lab::Moose::Instrument::RS_ZVA - Rohde & Schwarz ZVA Vector Network Analyzer |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=head1 VERSION |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
version 3.900 |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
=head1 SYNOPSIS |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
my $data = $zva->sparam_sweep(timeout => 10); |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 METHODS |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
See L<Lab::Moose::Instrument::VNASweep> for the high-level C<sparam_sweep> and |
132
|
|
|
|
|
|
|
C<sparam_catalog> methods. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Copyright 2016 Simon Reinhardt |
139
|
|
|
|
|
|
|
2017 Andreas K. Huettel, Simon Reinhardt |
140
|
|
|
|
|
|
|
2020 Andreas K. Huettel, Simon Reinhardt |
141
|
|
|
|
|
|
|
2023 Andreas K. Huettel |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
145
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
=cut |