The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lab::Connection::RS232 - RS232 Connection base class

VERSION

version 3.623

SYNOPSIS

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.
                ...
        }

DESCRIPTION

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.

NAME

Lab::Connection::RS232 - RS232 connection base class

CONSTRUCTOR

new

Generally called in child class constructor:

 my $self = $class->SUPER::new(@_);

Return blessed $self, with @_ accessible through $self->Config().

METHODS

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).

Write()

Takes a config hash, has to at least pass the key 'command' correctly to the underlying bus.

Read()

Takes a config hash, reads back a message from the device.

Clear()

Clears the instrument.

config

Provides unified access to the fields in initial @_ to all the child classes. E.g.

CAVEATS/BUGS

Probably few. Mostly because there's not a lot to be done here. Please report.

SEE ALSO

AUTHOR/COPYRIGHT

 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.

COPYRIGHT AND LICENSE

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.