Moose/Instrument/SCPI/Sense/NPLC.pm

filter: Statementstmt 100% 25 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 100% 2 / 2 totaltotal 100% 34 / 34 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Moose/Instrument/SCPI/Sense/Function.pm ↑ Summary Moose/Instrument/SCPI/Sense/Null.pm »
1 package Lab::Moose::Instrument::SCPI::Sense::NPLC;
2 5 $Lab::Moose::Instrument::SCPI::Sense::NPLC::VERSION = '3.931';
3 #ABSTRACT: Role for the SCPI SENSe:$function:NPLC subsystem
4  
5 5 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 5 ▶use Lab::Moose::Instrument::Cache;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 5 ▶use Lab::Moose::Instrument qw/validated_getter validated_setter/;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 5 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 5 requires 'cached_sense_function';
15  
16 5 cache sense_nplc => ( getter => 'sense_nplc_query' );
17  
18 14 ▶sub sense_nplc_query {
Subroutine sense_nplc_query: called CC=1 SCAR=0.0
Pod documented
19 14 my ( $self, %args ) = validated_getter( \@_ );
20  
21 14 my $func = $self->cached_sense_function();
22  
23 14 return $self->cached_sense_nplc(
24 $self->query( command => "SENS:$func:NPLC?", %args ) );
25 }
26  
27 16 ▶sub sense_nplc {
Subroutine sense_nplc: called CC=1 SCAR=0.0
Pod documented
28 16 my ( $self, $value, %args ) = validated_setter(
29 \@_,
30 value => { isa => 'Num' },
31 );
32  
33 16 my $func = $self->cached_sense_function();
34  
35 16 $self->write( command => "SENS:$func:NPLC $value", %args );
36  
37 16 $self->cached_sense_nplc($value);
38 }
39  
40 5 1;
41  
42 __END__
« Moose/Instrument/SCPI/Sense/Function.pm ↑ Summary Moose/Instrument/SCPI/Sense/Null.pm »