NAME
GPS::Lowrance::LSI - Lowrance Serial Interface Protocol module in Perl
REQUIREMENTS
The following modules are required to use this module:
Carp::Assert
Win32::SerialPort or Device::SerialPort
This module should work with Perl 5.6.x. It has been tested on Perl 5.8.2.
SYNOPSIS
use Win32::SerialPort; # or Device::SerialPort (?)
use GPS::Lowrance::LSI 'lsi_query';
my $port = new Win32::SerialPort( 'com1' );
my $data = lsi_query( $port, 0x30e, "", 0 );
DESCRIPTION
This module provides very low-level support for the LSI 100 protocol used to communicate with Lowrance GPS devices.
(Higher-level functions and wrappers for specific commands will be provided in other modules.)
FUNCTIONS
- lsi_query
-
$data_out = lsi_query( $port, $cmd, $data_in, $id, $debug, $timeout );This method submits an LSI query sentence (with the command and input data) to a GPS connected to the device specified by serial port at
$port. (See the LSI specification on the Lowrance web site for the specific command codes.)It then waits
$timeoutseconds (defaults to 30) for a response. If there is no response, it returnsundef.Otherwise, it verifies that the response is well-formed and returns the data. (The first 8-bytes of the returned data is the response header.)
The format of the rest of the data depends on the command.
If
$debugis true, then debugging information is shown.
CAVEATS
This is an early release of the module, so likely there are bugs.
This module has not (yet) been tested with Device::SerialPort. Feedback on this would be appreciated.
Win32::SerialPort unfortunately has not been updated since 1999.
SEE ALSO
The Lowrance Serial Interface (LSI) Protocol is described in a document available on the Lowrance web site at http://www.lowrance.com.
AUTHOR
Robert Rothenberg <rrwo at cpan.org>
Please report any bugs using the CPAN Request Tracker at http://rt.cpan.org.
COPYRIGHT AND LICENSE
Copyright (C) 2004 by Robert Rothenberg <rrwo at cpan.org>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.