Lab::Bus - Bus base class
version 3.553
This is a base class for inheriting bus types.
Lab::Bus is a base class for individual buses. It does not do anything on its own. For more detailed information on the use of bus objects, take a look on a child class, e.g. Lab::Bus::LinuxGPIB.
Lab::Bus
Lab::Bus::BusList contains a hash with references to all the active buses in your program. They are put there by the constructor of the individual bus Lab::Bus::new() and have two levels: Package name and a unique bus ID (GPIB board index offers itself for GPIB). This is to transparently (to the use interface) reuse bus objects, as there may only be one bus object for every (hardware) bus. weaken() is used on every reference stored in this hash, so it doesn't prevent object destruction when the last "real" reference is lost. Yes, this breaks object orientation a little, but it comes so handy!
Lab::Bus::BusList
Lab::Bus::new()
our %Lab::Bus::BusList = [ $Package => { $UniqueID => $Object, } 'Lab::Bus::GPIB' => { '0' => $Object, "0" is the gpib board index }
Place your twin searching code in $self-_search_twin()>. Make sure it evaluates $self-IgnoreTwin()>. Look at Lab::Bus::LinuxGPIB.
$self-
Generally called in child class constructor:
my $self = $class->SUPER::new(@_);
Return blessed $self, with @_ accessible through $self->Config().
Provides unified access to the fields in initial @_ to all the child classes.
Empty stub function for overloading
Probably few. Mostly because there's not so much done here.
Lab::Bus::GPIB
Lab::Bus::MODBUS
and many more...
This software is copyright (c) 2017 by the Lab::Measurement team; in detail:
Copyright 2011-2012 Andreas K. Huettel, Florian Olbrich 2014 Alexei Iankilevitch 2016 Simon Reinhardt 2017 Andreas K. Huettel
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Lab::Measurement, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lab::Measurement
CPAN shell
perl -MCPAN -e shell install Lab::Measurement
For more information on module installation, please visit the detailed CPAN module installation guide.