| 1 | package Lab::Connection::DEBUG; | ||
| 2 | #ABSTRACT: Connection to the DEBUG bus | ||
| 3 | $Lab::Connection::DEBUG::VERSION = '3.899'; | ||
| 4 | use v5.20; | ||
| 5 | |||
| 6 | use strict; | ||
| 7 | use Time::HiRes qw (usleep sleep); | ||
| 8 | use Lab::Connection; | ||
| 9 | use Data::Dumper; | ||
| 10 | use Carp; | ||
| 11 | |||
| 12 | use parent 'Lab::Connection'; | ||
| 13 | |||
| 14 | our %fields = ( | ||
| 15 | bus_class => "Lab::Bus::DEBUG", | ||
| 16 | brutal => 0, # brutal as default? | ||
| 17 | type => 'DEBUG', | ||
| 18 | wait_status => 10e-6, # sec; | ||
| 19 | wait_query => 10e-6, # sec; | ||
| 20 | query_length => 300, # bytes | ||
| 21 | query_long_length => 10240, #bytes | ||
| 22 | read_length => 1000, # bytesx | ||
| 23 | instrument_index => 0, | ||
| 24 | ); | ||
| 25 | |||
| 26 | sub new { | ||
| 27 | my $proto = shift; | ||
| 28 | my $class = ref($proto) || $proto; | ||
| 29 | my $twin = undef; | ||
| 30 | my $self = $class->SUPER::new(@_) | ||
| 31 | ; # getting fields and _permitted from parent class | ||
| 32 | $self->${ \( __PACKAGE__ . '::_construct' ) }(__PACKAGE__); | ||
| 33 | |||
| 34 | return $self; | ||
| 35 | } | ||
| 36 | |||
| 37 | 1; | ||
| 38 | |||
| 39 | __END__ |