Lab::Connection::RS232 - RS232 Connection base class
version 3.662
This is the base class for all connections providing a RS232 interface. Every inheriting class constructor should start as follows:
sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = $class->SUPER::new(@_); $self->_construct(__PACKAGE__); #initialize fields etc. ... }
Lab::Connection::RS232 is the base class for all connections providing a GPIB interface. It is not usable on its own. It inherits from Lab::Connection.
Lab::Connection::RS232
Lab::Connection::RS232 - RS232 connection base class
Generally called in child class constructor:
my $self = $class->SUPER::new(@_);
Return blessed $self, with @_ accessible through $self->Config().
This just calls back on the methods inherited from Lab::Connection.
If you inherit this class in your own connection however, you have to provide the following methods. Take a look at e.g. Lab::Connection::VISA_RS232 and at the basic implementations in Lab::Connection (they may even suffice).
Takes a config hash, has to at least pass the key 'command' correctly to the underlying bus.
Takes a config hash, reads back a message from the device.
Clears the instrument.
Provides unified access to the fields in initial @_ to all the child classes. E.g.
Probably few. Mostly because there's not a lot to be done here. Please report.
Lab::Connection
Lab::Connection::System_RS232
Lab::Connection::VISA_RS232
Copyright 2011 Florian Olbrich 2012 Andreas K. Hüttel
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This software is copyright (c) 2018 by the Lab::Measurement team; in detail:
Copyright 2012 Andreas K. Huettel 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.