NAME
RFID::Alien::Tag - Object representing a single tag read by an Alien reader.
SYNOPSIS
These objects are usually returned by an RFID::Alien::Reader object:
use RFID::Alien::Tag;
my $reader =
RFID::Alien::Reader::TCP->new(PeerAddr => 'alien1.example.com',
PeerPort => 4001,
)
or die "Couldn't create reader object";
my @tags = RFID::Alien::Reader->new->readtags();
foreach my $tag (@tags)
{
print "I see tag ",$tag->id,"\n";
}
But you can create your own if you want:
my $tag = RFID::Alien::Tag->new(id => '8000800433065081');
print "Tag is ",$tag->id,"\n";
DESCRIPTION
Constructor
new
Creates a new RFID::Alien::Tag object. Taks a hash containing various settings as its parameters. There is currently only one required setting, id
, which should contain a string of hex digits representing the ID of the tag. An optional setting is ant
, which specifies the antenna this tag was read from.
Methods
id
Returns a text representation of the tag's ID number.
ant
Returns a text representation of the antenna this tag was read from, if available.
Utility Functions
tagcmp
A comparison function for sort
. Compares the ID numbers of two tags, and returns -1 if the first ID is lower, 0 if they are the same, or 1 if the first ID is higher.
SEE ALSO
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.