| 1 | package Lab::Connection::Socket; | ||||||||||||||||||||
| 2 | #ABSTRACT: IP socket connection | ||||||||||||||||||||
| 3 | 1 | $Lab::Connection::Socket::VERSION = '3.881'; | |||||||||||||||||||
| 4 | 1 | ▶ | use v5.20; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 1 | ▶ | use Lab::Bus::Socket; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 1 | ▶ | use Lab::Connection; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 1 | ▶ | use Lab::Exception; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 1 | our @ISA = ("Lab::Connection"); | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 1 | our %fields = ( | |||||||||||||||||||
| 13 | bus_class => 'Lab::Bus::Socket', | ||||||||||||||||||||
| 14 | wait_status => 0, # usec; | ||||||||||||||||||||
| 15 | wait_query => 10e-6, # sec; | ||||||||||||||||||||
| 16 | read_length => 1000, # bytes | ||||||||||||||||||||
| 17 | ); | ||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | sub new { | ||||||||||||||||||||
| 20 | 0 | ▶ | my $proto = shift; | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 21 | 0 | ▶ | my $class = ref($proto) || $proto; | ||||||||||||||||||
|
Condition0%0/3
ref $proto || $proto
MC/DC0%0/2
ref $proto || $proto
ref $proto
$proto
Truth table0%0/3
A || B
A= ref $protoB= $proto
| |||||||||||||||||||||
| 22 | 0 | my $twin = undef; | |||||||||||||||||||
| 23 | 0 | my $self = $class->SUPER::new(@_) | |||||||||||||||||||
| 24 | ; # getting fields and _permitted from parent class | ||||||||||||||||||||
| 25 | 0 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | 0 | return $self; | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | #---For compatibility with Instruments written for GPIB---- | ||||||||||||||||||||
| 31 | sub EnableTermChar { # 0/1 off/on | ||||||||||||||||||||
| 32 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
EnableTermChar: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 33 | 0 | my $enable = shift; | |||||||||||||||||||
| 34 | 0 | print "EnableTermChar Ignored: Only for GPIB not for SOCKET?\n"; | |||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | #$self->{'TermChar'}=$enable;#bus()->connection_enabletermchar($self->connection_handle(), $enable);} | ||||||||||||||||||||
| 37 | 0 | return 1; | |||||||||||||||||||
| 38 | } | ||||||||||||||||||||
| 39 | |||||||||||||||||||||
| 40 | sub SetTermChar { # the character as string | ||||||||||||||||||||
| 41 | 0 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
SetTermChar: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 42 | 0 | my $termchar = shift; | |||||||||||||||||||
| 43 | 0 | print "SetTermChar Ignored: Only for GPIB not for SOCKET?\n"; | |||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | #my $result=$self->bus()->connection_settermchar($self->connection_handle(), $termchar); | ||||||||||||||||||||
| 46 | 0 | return 1; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 1 | 1; | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | __END__ | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | =pod | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | =encoding UTF-8 | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | =head1 NAME | ||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | Lab::Connection::Socket - IP socket connection | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | =head1 VERSION | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | version 3.881 | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | This software is copyright (c) 2023 by the Lab::Measurement team; in detail: | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | Copyright 2012 David Kalok | ||||||||||||||||||||
| 70 | 2013 Andreas K. Huettel | ||||||||||||||||||||
| 71 | 2016 Simon Reinhardt | ||||||||||||||||||||
| 72 | 2017 Andreas K. Huettel | ||||||||||||||||||||
| 73 | 2020 Andreas K. Huettel | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | |||||||||||||||||||||
| 76 | This is free software; you can redistribute it and/or modify it under | ||||||||||||||||||||
| 77 | the same terms as the Perl 5 programming language system itself. | ||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | =cut | ||||||||||||||||||||