Moose/Instrument/SCPI/Unit.pm

filter: Statementstmt 80.0% 20 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod 100% 2 / 2 totaltotal 80.0% 28 / 35 CC 1 SCAR 2.2
CC
1
Cov
80%
unit_power_query
2.0
unit_power
2.0
BEGIN
1.0
CRAP 1.2
« Moose/Instrument/SCPI/Output/State.pm ↑ Summary Moose/Connection/HTTP.pm »
1 package Lab::Moose::Instrument::SCPI::Unit;
2 1 $Lab::Moose::Instrument::SCPI::Unit::VERSION = '3.931';
3 #ABSTRACT: Role for SCPI UNIT subsystem.
4  
5 1 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Lab::Moose::Instrument qw/setter_params getter_params validated_channel_setter validated_getter/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Lab::Moose::Instrument::Cache;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use MooseX::Params::Validate;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13  
14 1 cache unit_power => ( getter => 'unit_power_query' );
15  
16 0 ▶sub unit_power_query {
Subroutine unit_power_query: not called CC=1 SCAR=6.9
Pod documented
17 0 my ( $self, %args ) = validated_getter( \@_ );
18  
19 0 return $self->cached_unit_power(
20 $self->query( command => "UNIT:POWer?", %args ) );
21 }
22  
23 0 ▶sub unit_power {
Subroutine unit_power: not called CC=1 SCAR=6.9
Pod documented
24 0 my ( $self, $channel, $value, %args ) = validated_channel_setter( \@_ );
25 0 $self->write(
26 command => sprintf( "UNIT:POWer %s", $value ),
27 %args
28 );
29 0 $self->cached_unit_power($value);
30 }
31  
32 1 1;
33  
34 __END__
« Moose/Instrument/SCPI/Output/State.pm ↑ Summary Moose/Connection/HTTP.pm »