line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Sweep::Step::Pulsewidth; |
2
|
|
|
|
|
|
|
$Lab::Moose::Sweep::Step::Pulsewidth::VERSION = '3.881'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Pulsewidth sweep. |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
2162
|
use v5.20; |
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Lab::Moose::Sweep::Step'; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has filename_extension => |
13
|
|
|
|
|
|
|
( is => 'ro', isa => 'Str', default => 'Pulsewidth=' ); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
has setter => ( is => 'ro', isa => 'CodeRef', builder => '_build_setter' ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has instrument => |
18
|
|
|
|
|
|
|
( is => 'ro', isa => 'ArrayRefOfInstruments', coerce => 1, required => 1 ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has constant_delay => ( is => 'ro', isa => 'Bool', default => 0 ); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub _build_setter { |
23
|
0
|
|
|
0
|
|
|
return \&_pulsewidth_setter; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub _pulsewidth_setter { |
27
|
0
|
|
|
0
|
|
|
my $self = shift; |
28
|
0
|
|
|
|
|
|
my $value = shift; |
29
|
0
|
|
|
|
|
|
foreach (@{$self->instrument}) { |
|
0
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
$_->set_pulsewidth( |
31
|
|
|
|
|
|
|
value => $value, |
32
|
|
|
|
|
|
|
constant_width => $self->constant_delay |
33
|
|
|
|
|
|
|
); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=pod |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=encoding UTF-8 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 NAME |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Lab::Moose::Sweep::Step::Pulsewidth - Pulsewidth sweep. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 VERSION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
version 3.881 |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 Description |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Step sweep with following properties: |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=over |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=item * |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Uses instruments C<set_pulsewidth> method to change the pulsewidth. On initialization |
63
|
|
|
|
|
|
|
an optional boolean parameter C<constant_delay> can be passed to keep a constant |
64
|
|
|
|
|
|
|
delay time over a pulse period. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=item * |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Default filename extension: C<'Pulsewidth='> |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=back |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
See pulsewidth-sweep.pl in the examples::Sweeps folder for a simple pulsewidth |
73
|
|
|
|
|
|
|
sweep example. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
Copyright 2021 Fabian Weinelt |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
83
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |