File Coverage

blib/lib/Lab/Moose/Instrument/SCPI/Instrument.pm
Criterion Covered Total %
statement 22 25 88.0
branch n/a
condition n/a
subroutine 8 9 88.8
pod 2 2 100.0
total 32 36 88.8


line stmt bran cond sub pod time code
1             package Lab::Moose::Instrument::SCPI::Instrument;
2             $Lab::Moose::Instrument::SCPI::Instrument::VERSION = '3.900';
3             #ABSTRACT: Role for SCPI INSTrument subsystem.
4              
5 3     3   1724 use v5.20;
  3         13  
6              
7 3     3   28 use Moose::Role;
  3         11  
  3         20  
8 3     3   15212 use Lab::Moose::Instrument::Cache;
  3         11  
  3         25  
9 3     3   1776 use Lab::Moose::Instrument qw/validated_getter validated_setter/;
  3         44  
  3         169  
10 3     3   19 use MooseX::Params::Validate;
  3         17  
  3         24  
11 3     3   1378 use Carp;
  3         8  
  3         208  
12              
13 3     3   21 use namespace::autoclean;
  3         8  
  3         23  
14              
15              
16             cache instrument_nselect => ( getter => 'instrument_nselect_query' );
17              
18             sub instrument_nselect_query {
19 2     2 1 10 my ( $self, %args ) = validated_getter( \@_ );
20              
21 2         1022 return $self->cached_instrument_nselect(
22             $self->query( command => 'INST:NSEL?', %args ) );
23             }
24              
25             sub instrument_nselect {
26 0     0 1   my ( $self, $value, %args ) = validated_setter( \@_ );
27              
28 0           $self->write( command => "INST:NSEL $value", %args );
29              
30 0           return $self->cached_instrument_nselect($value);
31             }
32              
33             1;
34              
35             __END__
36              
37             =pod
38              
39             =encoding UTF-8
40              
41             =head1 NAME
42              
43             Lab::Moose::Instrument::SCPI::Instrument - Role for SCPI INSTrument subsystem.
44              
45             =head1 VERSION
46              
47             version 3.900
48              
49             =head1 METHODS
50              
51             =head2 instrument_nselect_query
52              
53             =head2 instrument_nselect
54              
55             Query/Set instrument channel for multi-channel instruments.
56              
57             =head2
58              
59             =head1 COPYRIGHT AND LICENSE
60              
61             This software is copyright (c) 2023 by the Lab::Measurement team; in detail:
62              
63             Copyright 2016 Simon Reinhardt
64             2017 Andreas K. Huettel, Simon Reinhardt
65             2020 Andreas K. Huettel
66              
67              
68             This is free software; you can redistribute it and/or modify it under
69             the same terms as the Perl 5 programming language system itself.
70              
71             =cut