File Coverage

blib/lib/Lab/Moose/Sweep/Step/Frequency.pm
Criterion Covered Total %
statement 5 11 45.4
branch n/a
condition n/a
subroutine 2 4 50.0
pod n/a
total 7 15 46.6


line stmt bran cond sub pod time code
1             package Lab::Moose::Sweep::Step::Frequency;
2             $Lab::Moose::Sweep::Step::Frequency::VERSION = '3.880';
3             #ABSTRACT: Frequency sweep.
4              
5 1     1   2538 use v5.20;
  1         4  
6              
7              
8 1     1   12 use Moose;
  1         2  
  1         7  
9              
10             extends 'Lab::Moose::Sweep::Step';
11              
12             has filename_extension =>
13             ( is => 'ro', isa => 'Str', default => 'Frequency=' );
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             sub _build_setter {
21 0     0     return \&_frq_setter;
22             }
23              
24             sub _frq_setter {
25 0     0     my $self = shift;
26 0           my $value = shift;
27 0           foreach (@{$self->instrument}) {
  0            
28 0           $_->set_frq( value => $value );
29             }
30             }
31              
32             __PACKAGE__->meta->make_immutable();
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             Lab::Moose::Sweep::Step::Frequency - Frequency sweep.
44              
45             =head1 VERSION
46              
47             version 3.880
48              
49             =head1 Description
50              
51             Step sweep with following properties:
52              
53             =over
54              
55             =item *
56              
57             Uses instruments C<set_frq> method to change the frequency.
58              
59             =item *
60              
61             Default filename extension: C<'Frequency='>
62              
63             =back
64              
65             =head1 COPYRIGHT AND LICENSE
66              
67             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
68              
69             Copyright 2018 Simon Reinhardt
70             2020 Andreas K. Huettel
71             2021 Fabian Weinelt
72              
73              
74             This is free software; you can redistribute it and/or modify it under
75             the same terms as the Perl 5 programming language system itself.
76              
77             =cut