NAME

RFID::Alien::Reader::Serial - Implement RFID::Alien::Reader over a serial link

SYNOPSIS

This class takes a serial port object and implements the Alien RFID protocol over it. The serial port object should be compatible with Win32::SerialPort; the Unix equivalent is Device::SerialPort. You are responsible for creating the serial port object.

An example:

    use Win32::Serialport;
    use RFID::Alien::Reader::Serial;

    $com = Win32::SerialPort->new('COM1')
	or die "Couldn't open COM port 'COM1': $^E\n";

    my $reader = 
      RFID::Alien::Reader::Serial->new(Port => $com,
				       AntennaSequence => [0,1,2,3])
        or die "Couldn't create reader object\n";

    $reader->set(PersistTime => 0,
                 AcquireMode => 'Inventory') == 0
        or die "Couldn't set reader properties\n";

    my @tags = $reader->readtags();
    foreach my $tag (@tags)
    {
	print "I see tag ",$tag->id,"\n";
    }

DESCRIPTION

This class is built on top of RFID::Alien::Reader, and implements the underlying setup, reading, and writing functions.

Constructor

new

Creates a new object. It takes the following parameters:

Port

Required parameter. A Win32::SerialPort-compatible object over which the serial communication should take place.

Baud

Optional parameter. The baud rate at which we should communicate over the serial port. The default is 115200, which is the default speed of the Alien reader.

Any other parameters will be passed to the object's set method. In the event of an error, this constructor will die with an appropriate error message; you can catch this in an eval block..

SEE ALSO

RFID::Alien::Reader.

AUTHOR

Scott Gifford <gifford@umich.edu>, <sgifford@suspectclass.com>

Copyright (C) 2004 The Regents of the University of Michigan.

See the file LICENSE included with the distribution for license information.