| 1 | package Lab::Moose::Instrument::SCPI::Unit; | ||
| 2 | 1 | $Lab::Moose::Instrument::SCPI::Unit::VERSION = '3.881'; | |
| 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 | sub unit_power_query { | ||
| 17 | 0 | ▶ | my ( $self, %args ) = validated_getter( \@_ ); |
|
Subroutine
unit_power_query: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 18 | |||
| 19 | 0 | return $self->cached_unit_power( | |
| 20 | $self->query( command => "UNIT:POWer?", %args ) ); | ||
| 21 | } | ||
| 22 | |||
| 23 | sub unit_power { | ||
| 24 | 0 | ▶ | my ( $self, $channel, $value, %args ) = validated_channel_setter( \@_ ); |
|
Subroutine
unit_power: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 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__ | ||
| 35 | |||
| 36 | =pod | ||
| 37 | |||
| 38 | =encoding UTF-8 | ||
| 39 | |||
| 40 | =head1 NAME | ||
| 41 | |||
| 42 | Lab::Moose::Instrument::SCPI::Unit - Role for SCPI UNIT subsystem. | ||
| 43 | |||
| 44 | =head1 VERSION | ||
| 45 | |||
| 46 | version 3.881 | ||
| 47 | |||
| 48 | =head1 METHODS | ||
| 49 | |||
| 50 | =head2 unit_power_query | ||
| 51 | |||
| 52 | =head2 unit_power | ||
| 53 | |||
| 54 | Set/Get amplitude units for the input, output and display. | ||
| 55 | Allowed values are DBM|DBMV|DBUV|DBUA|V|W|A. | ||
| 56 | |||
| 57 | =head1 COPYRIGHT AND LICENSE | ||
| 58 | |||
| 59 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||
| 60 | |||
| 61 | Copyright 2018 Eugeniy E. Mikhailov | ||
| 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 | ||