| 1 | package Lab::Moose::Instrument::SCPI::Initiate; | ||||||||||
| 2 | #ABSTRACT: Role for the SCPI INITiate subsystem used by Rohde&Schwarz | ||||||||||
| 3 | 4 | $Lab::Moose::Instrument::SCPI::Initiate::VERSION = '3.881'; | |||||||||
| 4 | 4 | ▶ | use v5.20; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 4 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | use Lab::Moose::Instrument | ||||||||||
| 8 | 4 | ▶ | qw/validated_no_param_setter validated_setter validated_getter/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 4 | ▶ | use Lab::Moose::Instrument::Cache; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 4 | ▶ | use MooseX::Params::Validate; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 4 | cache initiate_continuous => ( getter => 'initiate_continuous_query' ); | |||||||||
| 14 | |||||||||||
| 15 | sub initiate_continuous { | ||||||||||
| 16 | 3 | ▶ | my ( $self, %args ) | ||||||||
|
Subroutine
initiate_continuous: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 17 | = validated_no_param_setter( \@_, value => { isa => 'Bool' } ); | ||||||||||
| 18 | |||||||||||
| 19 | 3 | my $value = delete $args{value}; | |||||||||
| 20 | 3 | ▶ | $value = $value ? 1 : 0; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | |||||||||||
| 22 | 3 | $self->write( command => "INIT:CONT $value", %args ); | |||||||||
| 23 | 3 | $self->cached_initiate_continuous($value); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | sub initiate_continuous_query { | ||||||||||
| 27 | 3 | ▶ | my ( $self, %args ) = validated_getter( \@_ ); | ||||||||
|
Subroutine
initiate_continuous_query: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 28 | |||||||||||
| 29 | 3 | return $self->cached_initiate_continuous( | |||||||||
| 30 | $self->query( command => 'INIT:CONT?', %args ) ); | ||||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | |||||||||||
| 34 | sub initiate_immediate { | ||||||||||
| 35 | 9 | ▶ | my ( $self, %args ) = validated_no_param_setter( \@_ ); | ||||||||
|
Subroutine
initiate_immediate: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 36 | 9 | $self->write( command => 'INIT', %args ); | |||||||||
| 37 | } | ||||||||||
| 38 | |||||||||||
| 39 | 4 | 1; | |||||||||
| 40 | |||||||||||
| 41 | __END__ | ||||||||||
| 42 | |||||||||||
| 43 | =pod | ||||||||||
| 44 | |||||||||||
| 45 | =encoding UTF-8 | ||||||||||
| 46 | |||||||||||
| 47 | =head1 NAME | ||||||||||
| 48 | |||||||||||
| 49 | Lab::Moose::Instrument::SCPI::Initiate - Role for the SCPI INITiate subsystem used by Rohde&Schwarz | ||||||||||
| 50 | |||||||||||
| 51 | =head1 VERSION | ||||||||||
| 52 | |||||||||||
| 53 | version 3.881 | ||||||||||
| 54 | |||||||||||
| 55 | =head1 METHODS | ||||||||||
| 56 | |||||||||||
| 57 | =head2 initiate_continuous_query | ||||||||||
| 58 | |||||||||||
| 59 | =head2 initiate_continuous | ||||||||||
| 60 | |||||||||||
| 61 | Query/Set whether to use single sweeps or continuous sweep mode. | ||||||||||
| 62 | |||||||||||
| 63 | =head2 initiate_immediate | ||||||||||
| 64 | |||||||||||
| 65 | $self->initiate_immediate(); | ||||||||||
| 66 | |||||||||||
| 67 | Start a new single sweep. | ||||||||||
| 68 | |||||||||||
| 69 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 70 | |||||||||||
| 71 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||||||||||
| 72 | |||||||||||
| 73 | Copyright 2016 Simon Reinhardt | ||||||||||
| 74 | 2017 Andreas K. Huettel, Simon Reinhardt | ||||||||||
| 75 | 2020 Andreas K. Huettel | ||||||||||
| 76 | |||||||||||
| 77 | |||||||||||
| 78 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 79 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 80 | |||||||||||
| 81 | =cut | ||||||||||