line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Lab::Moose::Instrument::SCPI::Source::Function; |
2
|
|
|
|
|
|
|
$Lab::Moose::Instrument::SCPI::Source::Function::VERSION = '3.880'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Role for the SCPI SOURce:FUNCtion subsystem |
4
|
|
|
|
|
|
|
|
5
|
7
|
|
|
7
|
|
4777
|
use v5.20; |
|
7
|
|
|
|
|
32
|
|
6
|
|
|
|
|
|
|
|
7
|
7
|
|
|
7
|
|
47
|
use Moose::Role; |
|
7
|
|
|
|
|
26
|
|
|
7
|
|
|
|
|
54
|
|
8
|
7
|
|
|
7
|
|
37142
|
use Moose::Util::TypeConstraints 'enum'; |
|
7
|
|
|
|
|
26
|
|
|
7
|
|
|
|
|
77
|
|
9
|
7
|
|
|
7
|
|
3453
|
use Lab::Moose::Instrument::Cache; |
|
7
|
|
|
|
|
22
|
|
|
7
|
|
|
|
|
59
|
|
10
|
7
|
|
|
7
|
|
4447
|
use Lab::Moose::Instrument qw/validated_getter validated_setter/; |
|
7
|
|
|
|
|
29
|
|
|
7
|
|
|
|
|
420
|
|
11
|
|
|
|
|
|
|
|
12
|
7
|
|
|
7
|
|
65
|
use namespace::autoclean; |
|
7
|
|
|
|
|
28
|
|
|
7
|
|
|
|
|
109
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
cache source_function => ( getter => 'source_function_query' ); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub source_function_query { |
18
|
4
|
|
|
4
|
1
|
3748
|
my ( $self, %args ) = validated_getter( \@_ ); |
19
|
|
|
|
|
|
|
|
20
|
4
|
|
|
|
|
2058
|
my $value = $self->query( command => "SOUR:FUNC?", %args ); |
21
|
4
|
|
|
|
|
14
|
$value =~ s/["']//g; |
22
|
4
|
|
|
|
|
18
|
return $self->cached_source_function($value); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub source_function { |
26
|
4
|
|
|
4
|
1
|
15896
|
my ( $self, $value, %args ) = validated_setter( \@_ ); |
27
|
4
|
|
|
|
|
29
|
$self->write( command => "SOUR:FUNC $value", %args ); |
28
|
4
|
|
|
|
|
26
|
$self->cached_source_function($value); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=pod |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=encoding UTF-8 |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 NAME |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Lab::Moose::Instrument::SCPI::Source::Function - Role for the SCPI SOURce:FUNCtion subsystem |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 VERSION |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
version 3.880 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 source_function_query |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 source_function |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
$self->source_function(value => 'VOLT'); |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Query/Set the type of output signal. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
This software is copyright (c) 2023 by the Lab::Measurement team; in detail: |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
Copyright 2017-2018 Simon Reinhardt |
62
|
|
|
|
|
|
|
2020 Andreas K. Huettel |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
66
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |