NAME

RFID::Matrics::Reader::TCP - Implement RFID::Matrics::Reader over a TCP connection

SYNOPSIS

This class takes a host and port to connect to, connects to it, and implements the Matrics RFID protocol over that connection. It is designed to use a serial-to-Ethernet adapter plugged into the serial port of the reader; I tested it with the NPort Express from Moxa.

An example:

    use RFID::Matrics::Reader::TCP;

    my $reader = 
      RFID::Matrics::Reader::TCP->new(PeerAddr => 1.2.3.4,
				      PeerPort => 4001,
				      node => 4,
				      antenna => MATRICS_ANT_1,
				      debug => 1,
				      timeout => CMD_TIMEOUT,
				      )
        or die "Couldn't create reader object.\n";

    $reader->changeparam(antenna => MATRICS_ANT_1,
			 environment => 4,
			 power_level => 0xff,
			 combine_antenna_bits => 0);
    my $rff = $reader->readfullfield(antenna => MATRICS_ANT_1);
    foreach my $tag (@{$pp->{utags}})
    {
	print "I see tag $tag->{id}\n";
    }

DESCRIPTION

This class is built on top of RFID::Matrics::Reader and IO::Socket::INET, and implements the underlying setup, reading, and writing functions. It has some special implementation details to deal with the timeout parameter.

Constructor

new

This constructor accepts all arguments to the constructors for RFID::Matrics::Reader and IO::Socket::INET, and passes them along to both constructors.

SEE ALSO

RFID::Matrics::Reader, RFID::Matrics::Reader::Serial, IO::Socket::INET.

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.

1;