NAME
Device::GPIB::Controllers::Serial - Interface to devices that implement GPIB-like commands over Serial ports. Available as a superclass to GPIB controllers that use a Serial interface.
SYNOPSIS
use Device::GPIB::Controllers::Serial;
my $d = Device::GPIB::Controllers::Serial->new('/dev/ttyUSB0');
$d->sendTo('id?');
my $id = $d->read();
DESCRIPTION
This module provides an OO interface to devices that implement GPIB-like commands over a serial port, such as the Tektronix 1240 with 1200C01 RS232C Comm Pack. Available as a superclass to GPIB controllers that use a Serial interface such as the Prologix GPIB-USB Controller.
It allows you to issue commands and read and write data to and from GPIB-like Serial devices.
Requires Device::SerialPort.
EXPORT
None by default.
LOW LEVEL FUNCTIONS
- send
-
$d->send($command);
Sends the $command to the currently addressed device.
- sendTo
-
$d->sendTo($command, $pad);
Sets the current address if necessary, sends the $command to the specified device.
- read_to_timeout
-
Reads data until a timeout. No interpretation of incoming characters is done.
- read_to_eol
-
Reads data until and EOL character (newline, "\n") is read.
- close
-
Closes the serial port device.
AUTHOR
Mike McCauley, <mikem@airspayce.com>
COPYRIGHT AND LICENSE
Copyright (C) 2015 by Mike McCauley
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.18.1 or, at your option, any later version of Perl 5 you may have available.